diff --git a/Docs/html/app__conn_8h_source.html b/Docs/html/app__conn_8h_source.html index f5eeb5f..b83a33a 100644 --- a/Docs/html/app__conn_8h_source.html +++ b/Docs/html/app__conn_8h_source.html @@ -159,7 +159,7 @@
- + diff --git a/src/app_conn.cpp b/src/app_conn.cpp index 51895be..f6a7c6d 100644 --- a/src/app_conn.cpp +++ b/src/app_conn.cpp @@ -227,11 +227,11 @@ int CLAppConn::loadPrefs() { // read static IP if(ret == OS_SUCCESS && json_obj_get_object(&jctx, (char*)"static_ip") == OS_SUCCESS) { - readStaticIPfromJSON(&jctx, &staticIP.ip, "ip"); - readStaticIPfromJSON(&jctx, &staticIP.netmask, "netmask"); - readStaticIPfromJSON(&jctx, &staticIP.gateway, "gateway"); - readStaticIPfromJSON(&jctx, &staticIP.dns1, "dns1"); - readStaticIPfromJSON(&jctx, &staticIP.dns2, "dns2"); + readIPFromJSON(&jctx, &staticIP.ip, (char*)"ip"); + readIPFromJSON(&jctx, &staticIP.netmask, (char*)"netmask"); + readIPFromJSON(&jctx, &staticIP.gateway, (char*)"gateway"); + readIPFromJSON(&jctx, &staticIP.dns1, (char*)"dns1"); + readIPFromJSON(&jctx, &staticIP.dns2, (char*)"dns2"); json_obj_leave_object(&jctx); } @@ -244,8 +244,8 @@ int CLAppConn::loadPrefs() { // read AP IP if(ret == OS_SUCCESS && json_obj_get_object(&jctx, (char*)"ap_ip") == OS_SUCCESS) { - readStaticIPfromJSON(&jctx, &apIP.ip, "ip"); - readStaticIPfromJSON(&jctx, &apIP.netmask, "netmask"); + readIPFromJSON(&jctx, &apIP.ip, (char*)"ip"); + readIPFromJSON(&jctx, &apIP.netmask, (char*)"netmask"); json_obj_leave_object(&jctx); } @@ -277,7 +277,7 @@ void CLAppConn::setStaticIP (IPAddress ** ip_address, const char * strval) { } } -void CLAppConn::readStaticIPfromJSON (jparse_ctx_t * context, IPAddress ** ip_address, char * token) { +void CLAppConn::readIPFromJSON (jparse_ctx_t * context, IPAddress ** ip_address, char * token) { char buf[16]; if(json_obj_get_string(context, token, buf, sizeof(buf)) == OS_SUCCESS) { setStaticIP(ip_address, buf); diff --git a/src/app_conn.h b/src/app_conn.h index db0d6ef..5094574 100644 --- a/src/app_conn.h +++ b/src/app_conn.h @@ -99,7 +99,7 @@ class CLAppConn : public CLAppComponent { private: int getSSIDIndex(); void calcURLs(); - void readStaticIPfromJSON(jparse_ctx_t * context, IPAddress ** ip_address, char * token); + void readIPFromJSON(jparse_ctx_t * context, IPAddress ** ip_address, char * token); // Known networks structure. Max number of known stations limited for memory considerations Station *stationList[MAX_KNOWN_STATIONS]; diff --git a/src/app_httpd.cpp b/src/app_httpd.cpp index 12a8321..d1da6f1 100644 --- a/src/app_httpd.cpp +++ b/src/app_httpd.cpp @@ -540,13 +540,13 @@ int CLAppHttpd::loadPrefs() { return ret; } - if (json_obj_get_array(&jctx, "mapping", &mappingCount) == OS_SUCCESS) { + if (json_obj_get_array(&jctx, (char*)"mapping", &mappingCount) == OS_SUCCESS) { if(mappingCount > 0) for(int i=0; i < mappingCount && i < MAX_URI_MAPPINGS; i++) { if(json_arr_get_object(&jctx, i) == OS_SUCCESS) { UriMapping *um = (UriMapping*) malloc(sizeof(UriMapping)); - if(json_obj_get_string(&jctx, "uri", um->uri, sizeof(um->uri)) == OS_SUCCESS && - json_obj_get_string(&jctx, "path", um->path, sizeof(um->path)) == OS_SUCCESS ) { + if(json_obj_get_string(&jctx, (char*)"uri", um->uri, sizeof(um->uri)) == OS_SUCCESS && + json_obj_get_string(&jctx, (char*)"path", um->path, sizeof(um->path)) == OS_SUCCESS ) { mappingList[i] = um; } else { @@ -558,9 +558,9 @@ int CLAppHttpd::loadPrefs() { json_obj_leave_array(&jctx); } - json_obj_get_string(&jctx, "my_name", myName, sizeof(myName)); + json_obj_get_string(&jctx, (char*)"my_name", myName, sizeof(myName)); bool dbg; - if(json_obj_get_bool(&jctx, "debug_mode", &dbg) == OS_SUCCESS) + if(json_obj_get_bool(&jctx, (char*)"debug_mode", &dbg) == OS_SUCCESS) setDebugMode(dbg); return ret;