guowenxue
2019-08-03 1ba740d4f23b97f105bbc3dd9780904f422a766c
update mqttd main.c, fix debug with java bug for JSON with \0 bug
1 files modified
2 ■■■ changed files
mqttd/main.c 2 ●●● patch | view | raw | blame | history
mqttd/main.c
@@ -274,7 +274,7 @@
        else 
            snprintf(msg, sizeof(msg), "{ \"id\":%s, \"temp\":\"%.2f\" }", ctx->id, temp);
        rv = mosquitto_publish(mosq, NULL, ctx->pubTopic, strlen(msg)+1, msg, ctx->pubQos, retain);
        rv = mosquitto_publish(mosq, NULL, ctx->pubTopic, strlen(msg), msg, ctx->pubQos, retain);
        if( rv )
        {
            log_err("Publisher broadcast message '%s' failure: %d\n", msg, rv);