MQTTPacket

Dependents:   MQTT

Fork of MQTTPacket by MQTT

Files at this revision

API Documentation at this revision

Comitter:
zhangyx
Date:
Fri Aug 25 15:07:47 2017 +0000
Parent:
21:62396c1620b6
Commit message:
fix compilation

Changed in this revision

MQTTConnectClient.c Show annotated file Show diff for this revision Revisions of this file
MQTTConnectServer.c Show annotated file Show diff for this revision Revisions of this file
MQTTPacket.c Show annotated file Show diff for this revision Revisions of this file
MQTTPacket.h Show annotated file Show diff for this revision Revisions of this file
--- 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
 };