A client for the SmartREST protocol from Cumulocity.
Fork of MbedSmartRest by
Diff: MbedDataSink.cpp
- Revision:
- 14:dc3f8dd5c02b
- Parent:
- 13:e76920d5e1ec
diff -r e76920d5e1ec -r dc3f8dd5c02b MbedDataSink.cpp --- a/MbedDataSink.cpp Fri Apr 11 09:33:45 2014 +0000 +++ b/MbedDataSink.cpp Mon Apr 14 11:23:50 2014 +0000 @@ -1,7 +1,6 @@ #include "MbedDataSink.h" #include "MbedClient.h" #include <stdlib.h> -#include <stdio.h> #include <string.h> #include "mbed.h" @@ -21,7 +20,6 @@ return 0; } - putchar(c); _buf[_len++] = c; return 1; } @@ -58,7 +56,7 @@ { char str[24]; - snprintf(str, 24, "%uld", number); + snprintf(str, 24, "%lu", number); return write(str); } @@ -78,7 +76,7 @@ if (!_sock.is_connected()) return false; - + _sock.set_blocking(true); ret = _sock.send(_buf, _len);