Rest return fixes; Sensornode delay fix

This commit is contained in:
2017-08-31 19:22:57 +02:00
parent e6b7bdf721
commit c2b7c1eed7
3 changed files with 16 additions and 10 deletions

View File

@@ -86,6 +86,11 @@ int getRestSensor(sensor *sensor) {
sensor->temperature = (float)temperature->valuedouble;
sensor->humidity = (float)humidity->valuedouble;
sensor->node_id = atoi(id->valuestring);
} else {
//free
cJSON_Delete(jsondata);
free(data);
return 0;
}
//free
cJSON_Delete(jsondata);