Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Revision:
106:c61f0d62b625
Parent:
99:e369fc75c000
Child:
109:2ec12f10ebf4
--- a/operation/ReportThread.cpp	Fri May 08 14:50:43 2015 +0000
+++ b/operation/ReportThread.cpp	Mon May 11 18:10:44 2015 +0000
@@ -1,11 +1,11 @@
 #include "ReportThread.h"
 #include "logging.h"
 
-const char *fmt2 = "111,%ld,%s\r\n";
+static const char *fmt2 = "111,%ld,%s\r\n";
 
 void ReportThread::threadFunc()
 {
-    sock.set_blocking(false);
+    sock.setBlocking(3000);
     while (true) {
         osEvent e = ipool.get();
         if (e.status == osEventMail) {
@@ -21,7 +21,7 @@
                     id = op->identifier;
                     OperationState state = op->state;
                     ipool.free(op);
-                    l += snprintf(buf2+l, SMARRESTBODY_SIZE-l, fmt2, id, strOperationState(state));
+                    l += snprintf(buf2+l, sizeof(buf2)-l, fmt2, id, strOperationState(state));
                 } else {
                     break;
                 }