Fix mosquitto_sub %j or %J not working on Windows.

Closes #1674. Thanks to amigian74.
pull/1691/head
Roger A. Light 5 years ago
parent c343812c42
commit 24049b1a1e

@ -12,6 +12,9 @@ Client library:
- Don't treat an unexpected PUBACK, PUBREL, or PUBCOMP as a fatal error.
Issue #1629.
Clients:
- Fix mosquitto_sub %j or %J not working on Windows. Closes #1674.
Build:
- Various fixes for building with <C99 support. Closes #1622.
- Fix use of sed on BSD. Closes #1614.

@ -114,7 +114,7 @@ static void json_print(const struct mosquitto_message *message, const struct tm
{
char buf[100];
strftime(buf, 100, "%s", ti);
snprintf(buf, 100, "%ld", time(NULL));
printf("{\"tst\":%s,\"topic\":\"%s\",\"qos\":%d,\"retain\":%d,\"payloadlen\":%d,", buf, message->topic, message->qos, message->retain, message->payloadlen);
if(message->qos > 0){
printf("\"mid\":%d,", message->mid);

Loading…
Cancel
Save