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.
Fork of MQTTPacket by
Revision 22:a487a702b185, committed 2017-08-25
- Comitter:
- zhangyx
- Date:
- Fri Aug 25 15:07:47 2017 +0000
- Parent:
- 21:62396c1620b6
- Commit message:
- fix compilation
Changed in this revision
--- a/MQTTConnectClient.c Mon Aug 03 12:38:58 2015 +0000 +++ b/MQTTConnectClient.c Fri Aug 25 15:07:47 2017 +0000 @@ -71,7 +71,7 @@ } header.byte = 0; - header.bits.type = CONNECT; + header.bits.type = CONNECT_1; writeChar(&ptr, header.byte); /* write header */ ptr += MQTTPacket_encode(ptr, len); /* write remaining length */
--- a/MQTTConnectServer.c Mon Aug 03 12:38:58 2015 +0000 +++ b/MQTTConnectServer.c Fri Aug 25 15:07:47 2017 +0000 @@ -61,7 +61,7 @@ FUNC_ENTRY; header.byte = readChar(&curdata); - if (header.bits.type != CONNECT) + if (header.bits.type != CONNECT_1) goto exit; curdata += MQTTPacket_decodeBuf(curdata, &mylen); /* read remaining length */
--- a/MQTTPacket.c Mon Aug 03 12:38:58 2015 +0000 +++ b/MQTTPacket.c Fri Aug 25 15:07:47 2017 +0000 @@ -332,7 +332,7 @@ switch (header.bits.type) { - case CONNECT: + case CONNECT_1: { MQTTPacket_connectData data; if (MQTTDeserialize_connect(&data, buf, buflen) == 1)
--- a/MQTTPacket.h Mon Aug 03 12:38:58 2015 +0000 +++ b/MQTTPacket.h Fri Aug 25 15:07:47 2017 +0000 @@ -30,7 +30,7 @@ enum msgTypes { - CONNECT = 1, CONNACK, PUBLISH, PUBACK, PUBREC, PUBREL, + CONNECT_1 = 1, CONNACK, PUBLISH, PUBACK, PUBREC, PUBREL, PUBCOMP, SUBSCRIBE, SUBACK, UNSUBSCRIBE, UNSUBACK, PINGREQ, PINGRESP, DISCONNECT };