From fe508431376f0634afaabecb36c8f836078cc1a3 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Sat, 15 Mar 2014 22:58:47 +0000 Subject: [PATCH] --- Project/applications/smartcities/json.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Project/applications/smartcities/json.c b/Project/applications/smartcities/json.c index 6c8214e..ab381fe 100644 --- a/Project/applications/smartcities/json.c +++ b/Project/applications/smartcities/json.c @@ -42,8 +42,12 @@ char* prepare_observation(char* observation, uint32_t length) uint8_t send_json(char* statement, uint32_t length) { - //CHECK CONNECTIVITY - //RETURN JSON_COMM_ERROR + int connectivity; + connectivity = libwismart_IsConnected(); + if(connectivity != WISMART_CONNECT) + { + return JSON_COMM_ERROR; + } //PREPARE HTTP POST //SEND POST //RETURN JSON_OTHER_ERROR -- libgit2 0.22.2