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.
Dependencies: FP MQTTPacket
Dependents: IDW01M1_Cloud_IBM IDW01M1-MQTT IDW01M1-MQTT-1 IDW01M1-MQTT3 ... more
Fork of MQTT by
Diff: MQTTClient.cpp
- Revision:
- 7:f9d690fb6dad
- Parent:
- 6:4d312a49200b
- Child:
- 8:c46930bd6c82
--- a/MQTTClient.cpp Tue Apr 08 22:54:37 2014 +0000
+++ b/MQTTClient.cpp Wed Apr 09 11:37:28 2014 +0100
@@ -21,8 +21,8 @@
{
buf = new char[buffer_size];
- readbuf = new char[buffer_size];
- this->ipstack = ipstack;
+ readbuf = new char[buffer_size];
+ buflen = readbuflen = buffer_size;
this->command_timeout = command_timeout;
//this->thread = new Thread(0); // only need a background thread for non-blocking mode
this->ipstack = network;
@@ -153,7 +153,8 @@
}
this->keepalive = options->keepAliveInterval;
- len = MQTTSerialize_connect(buf, buflen, options);
+ len = MQTTSerialize_connect(buf, buflen, options);
+ printf("len from send is %d %d\n", len, buflen);
rc = sendPacket(len); // send the connect packet
printf("rc from send is %d\n", rc);
@@ -205,4 +206,4 @@
}
return rc;
-}
\ No newline at end of file
+}
