IsOutside boolean added to config and insertData. Readme updated
This commit is contained in:
@@ -57,11 +57,12 @@ int cfgreadsensornodes(sensornode *nodes, int nodecount) {
|
||||
|
||||
/* Only output the record if all of the expected fields are present. */
|
||||
const char *ip;
|
||||
|
||||
if (!config_setting_lookup_string(sensornodesetting, "ip", &ip))
|
||||
int outside;
|
||||
if (!(config_setting_lookup_string(sensornodesetting, "ip", &ip) && config_setting_lookup_int(sensornodesetting, "outside", &outside)))
|
||||
continue;
|
||||
|
||||
strcpy(currentNode->ip, ip);
|
||||
currentNode->isoutside = outside;
|
||||
//if (i < count - 1) { //stop at last item
|
||||
currentNode->next = malloc(sizeof(sensornode));
|
||||
currentNode = currentNode->next;
|
||||
|
Reference in New Issue
Block a user