Selaa lähdekoodia

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

jancoow 9 vuotta sitten
vanhempi
commit
0e31af0737
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  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);
     }