Commit fe508431376f0634afaabecb36c8f836078cc1a3

Authored by Imanol-Mikel Barba Sabariego
1 parent e3d99926

--no commit message

Project/applications/smartcities/json.c
@@ -42,8 +42,12 @@ char* prepare_observation(char* observation, uint32_t length) @@ -42,8 +42,12 @@ char* prepare_observation(char* observation, uint32_t length)
42 42
43 uint8_t send_json(char* statement, uint32_t length) 43 uint8_t send_json(char* statement, uint32_t length)
44 { 44 {
45 - //CHECK CONNECTIVITY  
46 - //RETURN JSON_COMM_ERROR 45 + int connectivity;
  46 + connectivity = libwismart_IsConnected();
  47 + if(connectivity != WISMART_CONNECT)
  48 + {
  49 + return JSON_COMM_ERROR;
  50 + }
47 //PREPARE HTTP POST 51 //PREPARE HTTP POST
48 //SEND POST 52 //SEND POST
49 //RETURN JSON_OTHER_ERROR 53 //RETURN JSON_OTHER_ERROR