Commit fe508431376f0634afaabecb36c8f836078cc1a3
1 parent
e3d99926
--no commit message
Showing
1 changed file
with
6 additions
and
2 deletions
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 |