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: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: operation/PollThread.cpp
- Revision:
- 125:979ab0d075de
- Parent:
- 124:311fa85af2b3
- Child:
- 126:e1fcf720c63a
--- a/operation/PollThread.cpp Fri May 29 12:05:01 2015 +0000
+++ b/operation/PollThread.cpp Mon Jun 01 11:24:17 2015 +0000
@@ -9,10 +9,11 @@
l = snprintf(buf, sizeof(buf), fmtSmartRest, uri, l, buf2);
sock.setBlocking(3000);
l = sock.sendAndReceive(buf, l, sizeof(buf));
- if (l <= 0)
- return false;
+ if (l <= 0) return false;
+ const char* p = skipHTTPHeader(buf);
+ if (p == NULL) return false;
size_t i = 0;
- for (const char* p = skipHTTPHeader(buf); isalnum(*p); ++p, ++i) {
+ for (; isalnum(*p); ++p, ++i) {
bayeuxId[i] = *p;
}
bayeuxId[i] = 0;

Cumulocity