for WIZwiki-W7500 board

Dependencies:   FP MQTTPacket

Dependents:   IBMIoTClientEthernetExample_WIZnet

Fork of MQTT by MQTT

Files at this revision

API Documentation at this revision

Comitter:
icraggs
Date:
Fri Aug 01 13:13:35 2014 +0000
Parent:
33:8bbc3a992326
Child:
36:2f1ada427e56
Commit message:
Change boolean flag size in MQTTPacket to one byte (unsigned char)

Changed in this revision

MQTTClient.h Show annotated file Show diff for this revision Revisions of this file
MQTTPacket.lib Show annotated file Show diff for this revision Revisions of this file
MQTTPacket.lib.orig Show annotated file Show diff for this revision Revisions of this file
--- a/MQTTClient.h	Wed Jul 30 19:12:00 2014 +0000
+++ b/MQTTClient.h	Fri Aug 01 13:13:35 2014 +0000
@@ -417,7 +417,7 @@
         case PUBLISH:
             MQTTString topicName;
             Message msg;
-            if (MQTTDeserialize_publish((int*)&msg.dup, (int*)&msg.qos, (int*)&msg.retained, (int*)&msg.id, &topicName,
+            if (MQTTDeserialize_publish((unsigned char*)&msg.dup, (int*)&msg.qos, (unsigned char*)&msg.retained, (int*)&msg.id, &topicName,
                                  (char**)&msg.payload, (int*)&msg.payloadlen, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
                 goto exit;
 //          if (msg.qos != QOS2) 
@@ -444,7 +444,8 @@
             }
             break;
         case PUBREC:
-            int type, dup, mypacketid;
+            int type, mypacketid;
+            unsigned char dup;
             if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
                 rc = FAILURE;
             else if ((len = MQTTSerialize_ack(buf, MAX_MQTT_PACKET_SIZE, PUBREL, 0, mypacketid)) <= 0)
@@ -652,7 +653,8 @@
     {
         if (waitfor(PUBACK, timer) == PUBACK)
         {
-            int type, dup, mypacketid;
+            int type, mypacketid;
+            unsigned char dup;
             if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
                 rc = FAILURE;
         }
@@ -663,7 +665,8 @@
     {
         if (waitfor(PUBCOMP, timer) == PUBCOMP)
         {
-            int type, dup, mypacketid;
+            int type, mypacketid;
+            unsigned char dup;
             if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
                 rc = FAILURE;
         }
--- a/MQTTPacket.lib	Wed Jul 30 19:12:00 2014 +0000
+++ b/MQTTPacket.lib	Fri Aug 01 13:13:35 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/mqtt/code/MQTTPacket/#f6574a654c6a
+http://mbed.org/teams/mqtt/code/MQTTPacket/#5e60cd1a52e7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MQTTPacket.lib.orig	Fri Aug 01 13:13:35 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/mqtt/code/MQTTPacket/#f6574a654c6a