Skip to content

Commit

Permalink
fix MQTTClient-RT/paho_mqtt_pipe.c function naming error2 (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: shihao.zhao <[email protected]>
  • Loading branch information
ShihaoZhao-2019 and shihao.zhao committed Jun 26, 2023
1 parent ee93c0e commit cf73010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion MQTTClient-RT/paho_mqtt_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ int MQTTPublish(MQTTClient *client, const char *topic, MQTTMessage *message)
if (!client->isconnected)
goto exit;


msg_len = sizeof(MQTTMessage) + message->payloadlen + strlen(topic) + 1;
if(msg_len >= client->buf_size)
{
Expand Down
4 changes: 2 additions & 2 deletions MQTTClient-RT/paho_mqtt_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,9 @@ int MQTTPublish(MQTTClient *client, const char *topic, MQTTMessage *message)
goto exit;

msg_len = sizeof(MQTTMessage) + message->payloadlen + strlen(topic) + 1;
if(msg_len >= c->buf_size)
if(msg_len >= client->buf_size)
{
LOG_E("Message is too long %d:%d.", msg_len, c->buf_size);
LOG_E("Message is too long %d:%d.", msg_len, client->buf_size);
rc = PAHO_BUFFER_OVERFLOW;
goto exit;
}
Expand Down

0 comments on commit cf73010

Please sign in to comment.