Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:573d544b5d3c, committed 2019-01-03
- Comitter:
- m_ahsan
- Date:
- Thu Jan 03 05:49:15 2019 +0000
- Parent:
- 1:7fa362fa563f
- Commit message:
- test
Changed in this revision
| MQTTSNPacket.c | Show annotated file Show diff for this revision Revisions of this file |
| MQTTSNSerializePublish.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/MQTTSNPacket.c Wed Jan 06 14:19:27 2016 +0000
+++ b/MQTTSNPacket.c Thu Jan 03 05:49:15 2019 +0000
@@ -48,7 +48,7 @@
*/
int MQTTSNPacket_len(int length)
{
- return (length > 255) ? length + 3 : length + 1;
+ return (length > 256) ? length + 3 : length + 1;
}
@@ -63,7 +63,7 @@
int rc = 0;
FUNC_ENTRY;
- if (length > 255)
+ if (length > 1024)
{
buf[rc++] = 0x01;
MQTTSNPacket_writeInt(&buf, length);
--- a/MQTTSNSerializePublish.c Wed Jan 06 14:19:27 2016 +0000
+++ b/MQTTSNSerializePublish.c Thu Jan 03 05:49:15 2019 +0000
@@ -33,7 +33,7 @@
if (topic.type == MQTTSN_TOPIC_TYPE_NORMAL && qos == 3)
len += topic.data.long_.len;
-
+ printf("payloadlen %d", payloadlen+len);
return payloadlen + len;
}