瀏覽代碼

Fixed issue #26: When there was a connection error, there was no json found so all the alarms would be discarted.

jancoow 9 年之前
父節點
當前提交
0e31af0737
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      network.c

+ 1 - 0
network.c

@@ -113,6 +113,7 @@ void parseAlarmJson(char* content){
     r = jsmn_parse(&p, content, strlen(content), token, sizeof(token)/sizeof(token[0]));
     if (r < 0) {
         printf("Failed to parse JSON: %d \n", r);
+        return;
     }else{
         printf("Aantal tokens found: %d \n", r);
     }