ME910 support

Dependents:   5_Dragonfly_Cayenne_Sprint_IKS01A1

Fork of Cayenne-MQTT-mbed-MTSAS by Peter Ferland

Branch:
feature/multivalue
Revision:
22:0dbabcc6e7b2
Parent:
0:09ef59d2d0f7
diff -r e46b1f93c011 -r 0dbabcc6e7b2 src/CayenneMQTTClient/MQTTClient.h
--- a/src/CayenneMQTTClient/MQTTClient.h	Tue Nov 08 18:48:37 2016 -0700
+++ b/src/CayenneMQTTClient/MQTTClient.h	Wed Jan 25 10:34:16 2017 -0700
@@ -576,7 +576,7 @@
             Message msg;
             int intQoS;
             if (MQTTDeserialize_publish((unsigned char*)&msg.dup, &intQoS, (unsigned char*)&msg.retained, (unsigned short*)&msg.id, &topicName,
-                                 (unsigned char**)&msg.payload, (int*)&msg.payloadlen, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
+                                 (unsigned char**)&msg.payload, &msg.payloadlen, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
                 goto exit;
             msg.qos = (enum QoS)intQoS;
 #if MQTTCLIENT_QOS2
@@ -762,7 +762,7 @@
         goto exit;
 
     this->keepAliveInterval = options.keepAliveInterval;
-    this->cleansession = options.cleansession;
+    this->cleansession = (options.cleansession != 0);
     if ((len = MQTTSerialize_connect(sendbuf, MAX_MQTT_PACKET_SIZE, &options)) <= 0)
         goto exit;
     if ((rc = sendPacket(len, connect_timer)) != SUCCESS)  // send the connect packet