Many bugfixes - fixed warnings and compile errors
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
config_t cfg;
|
||||
const config_setting_t *pins;
|
||||
|
||||
@@ -60,7 +61,7 @@ int cfgreadsensornodes(sensornode *nodes, int nodecount) {
|
||||
if (!config_setting_lookup_string(sensornodesetting, "ip", &ip))
|
||||
continue;
|
||||
|
||||
currentNode->ip = ip;
|
||||
strcpy(currentNode->ip, ip);
|
||||
//if (i < count - 1) { //stop at last item
|
||||
currentNode->next = malloc(sizeof(sensornode));
|
||||
currentNode = currentNode->next;
|
||||
@@ -70,5 +71,5 @@ int cfgreadsensornodes(sensornode *nodes, int nodecount) {
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user