mirror of
https://github.com/eclipse/mosquitto.git
synced 2025-05-08 16:52:13 +08:00
Fix mosquitto_sub %j or %J not working on Windows.
Closes #1674. Thanks to amigian74.
This commit is contained in:
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…
x
Reference in New Issue
Block a user