Explorar o código

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

jancoow %!s(int64=9) %!d(string=hai) anos
pai
achega
0e31af0737
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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);
     }