Rest return fixes; Sensornode delay fix
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user