mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Apply patch #9478: MQTT.c printf warning in debug messages
in a modified version that uses lwIP's format string #defines
This commit is contained in:
parent
472f7985b5
commit
de991b1158
@ -736,7 +736,7 @@ mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u
|
||||
payload_length = length - after_topic;
|
||||
payload_offset = after_topic;
|
||||
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %d\n",
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %"U32_F"\n",
|
||||
qos, topic, remaining_length + payload_length));
|
||||
if (client->pub_cb != NULL) {
|
||||
client->pub_cb(client->inpub_arg, (const char *)topic, remaining_length + payload_length);
|
||||
@ -829,7 +829,7 @@ mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p)
|
||||
if (fixed_hdr_idx >= 2) {
|
||||
msg_rem_len |= (u32_t)(b & 0x7f) << ((fixed_hdr_idx - 2) * 7);
|
||||
if ((b & 0x80) == 0) {
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: Remaining length after fixed header: %d\n", msg_rem_len));
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: Remaining length after fixed header: %"U32_F"\n", msg_rem_len));
|
||||
if (msg_rem_len == 0) {
|
||||
/* Complete message with no extra headers of payload received */
|
||||
mqtt_message_received(client, fixed_hdr_idx, 0, 0);
|
||||
@ -861,7 +861,7 @@ mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p)
|
||||
in_offset += cpy_len;
|
||||
msg_rem_len -= cpy_len;
|
||||
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: msg_idx: %d, cpy_len: %d, remaining %d\n", client->msg_idx, cpy_len, msg_rem_len));
|
||||
LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_parse_incoming: msg_idx: %"U32_F", cpy_len: %"U16_F", remaining %"U32_F"\n", client->msg_idx, cpy_len, msg_rem_len));
|
||||
if (msg_rem_len == 0 || cpy_len == buffer_space) {
|
||||
/* Whole message received or buffer is full */
|
||||
mqtt_connection_status_t res = mqtt_message_received(client, fixed_hdr_idx, (cpy_start + cpy_len) - fixed_hdr_idx, msg_rem_len);
|
||||
|
Loading…
Reference in New Issue
Block a user