Skip to content

Commit

Permalink
Merge pull request #298 from embhorn/rel_v1.13.0_take2
Browse files Browse the repository at this point in the history
Fix example msg cb print error
  • Loading branch information
dgarske authored May 4, 2022
2 parents d71aee9 + 4c80c92 commit 5cf4821
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fix for improper reset of shared object by @dgarske in #291
* cmake: add example option and fixes for vcpkg by @elms in #293
* cmake: shared/static lib build and cleanup by @elms in #295
* Fix example msg cb print error @embhorn in #298

### v1.12 (2/23/2022)
* Allow MqttClient_WaitType to return MQTT_CODE_CONTINUE with MT (PR #283)
Expand Down
2 changes: 1 addition & 1 deletion examples/aws/awsiot.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down
2 changes: 1 addition & 1 deletion examples/azure/azureiothub.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down
2 changes: 1 addition & 1 deletion examples/mqttclient/mqttclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

#ifdef WOLFMQTT_V5
Expand Down
2 changes: 1 addition & 1 deletion examples/mqttsimple/mqttsimple.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down
2 changes: 1 addition & 1 deletion examples/multithread/multithread.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down
2 changes: 1 addition & 1 deletion examples/nbclient/nbclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down
2 changes: 1 addition & 1 deletion examples/wiot/wiot.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int mqtt_message_cb(MqttClient *client, MqttMessage *msg,
}
XMEMCPY(buf, msg->buffer, len);
buf[len] = '\0'; /* Make sure its null terminated */
PRINTF("Payload (%d - %d) printing %d bytes:"LINE_END"%s",
PRINTF("Payload (%d - %d) printing %d bytes:" LINE_END "%s",
msg->buffer_pos, msg->buffer_pos + msg->buffer_len, len, buf);

if (msg_done) {
Expand Down

0 comments on commit 5cf4821

Please sign in to comment.