Merge pull request #120 from agprimatic/master

Update net_services.c
pull/98/head
sfeakes 2020-09-13 13:57:30 -05:00 committed by GitHub
commit 42586e50f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -988,7 +988,7 @@ void action_mqtt_message(struct mg_connection *nc, struct mg_mqtt_message *msg)
//unsigned int i;
//LOG(NET_LOG,LOG_DEBUG, "MQTT: topic %.*s %.2f\n",msg->topic.len, msg->topic.p, atof(msg->payload.p));
// If message doesn't end in set or increment we don't care about it.
if (strncmp(&msg->topic.p[msg->topic.len -4], "/set", 4) != 0 && strncmp(&msg->topic.p[msg->topic.len -4], "/increment", 10) != 0) {
if (strncmp(&msg->topic.p[msg->topic.len -4], "/set", 4) != 0 && strncmp(&msg->topic.p[msg->topic.len -10], "/increment", 10) != 0) {
LOG(NET_LOG,LOG_DEBUG, "MQTT: Ignore %.*s %.*s\n",msg->topic.len, msg->topic.p, msg->payload.len, msg->payload.p);
return;
}
@ -2039,4 +2039,4 @@ void OLD_action_websocket_request(struct mg_connection *nc, struct websocket_mes
LOG(NET_LOG,LOG_DEBUG, "WS: Unknown parameter %s\n", request.first.value);
}
}
}
}