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
Diff: MQTTSerializePublish.c
- Revision:
- 12:cd99ac9cb25a
- Parent:
- 0:7734401cc1b4
- Child:
- 14:c2052aee81de
diff -r b97b9873af52 -r cd99ac9cb25a MQTTSerializePublish.c
--- a/MQTTSerializePublish.c Tue May 06 10:57:57 2014 +0100
+++ b/MQTTSerializePublish.c Fri Aug 01 13:03:52 2014 +0100
@@ -51,8 +51,8 @@
* @param payloadlen integer - the length of the MQTT payload
* @return the length of the serialized data. <= 0 indicates error
*/
-int MQTTSerialize_publish(char* buf, int buflen, int dup, int qos, int retained, int packetid, MQTTString topicName,
- char* payload, int payloadlen)
+int MQTTSerialize_publish(char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, int packetid,
+ MQTTString topicName, char* payload, int payloadlen)
{
char *ptr = buf;
MQTTHeader header;
@@ -100,7 +100,7 @@
* @param packetid integer - the MQTT packet identifier
* @return serialized length, or error if 0
*/
-int MQTTSerialize_ack(char* buf, int buflen, int type, int dup, int packetid)
+int MQTTSerialize_ack(char* buf, int buflen, int type, unsigned char dup, int packetid)
{
MQTTHeader header;
int rc = 0;
@@ -147,7 +147,7 @@
* @param packetid integer - the MQTT packet identifier
* @return serialized length, or error if 0
*/
-int MQTTSerialize_pubrel(char* buf, int buflen, int dup, int packetid)
+int MQTTSerialize_pubrel(char* buf, int buflen, unsigned char dup, int packetid)
{
return MQTTSerialize_ack(buf, buflen, PUBREL, packetid, dup);
}
