|
@@ -662,6 +662,7 @@ int main(int argc, char *argv[]) {
|
|
|
char *TelcomChapPapId=NULL;
|
|
|
char *TelcomChapPapPwd=NULL;
|
|
|
char *TelcomIpAddress=NULL;
|
|
|
+ char TelcomEnabled=NULL;
|
|
|
if( json_object_object_get_ex(jobj, "Eth0DhcpClient", &val_obj) ) {
|
|
|
Eth0DhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
@@ -710,6 +711,9 @@ int main(int argc, char *argv[]) {
|
|
|
if( json_object_object_get_ex(jobj, "TelcomIpAddress", &val_obj) ) {
|
|
|
TelcomIpAddress = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
+ if( json_object_object_get_ex(jobj, "TelcomEnabled", &val_obj) ) {
|
|
|
+ TelcomEnabled = json_object_get_int(val_obj);
|
|
|
+ }
|
|
|
|
|
|
ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient=Eth0DhcpClient;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,Eth0IpAddress);
|
|
@@ -728,6 +732,7 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId,TelcomChapPapId);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd,TelcomChapPapPwd);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress,TelcomIpAddress);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomEnabled=TelcomEnabled;
|
|
|
}
|
|
|
if (strcmp(argv[1], "4") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
@@ -793,7 +798,7 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "aaa") == 0) {
|
|
|
//struct SysConfigData SysConfig;
|
|
|
//system
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DSLU601J1UT1P0D");
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "AW0E770001W1P0D");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber, "SerialNumber");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId, "1234567890");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemDateTime, "2019-12-31 23:59:59");
|
|
@@ -1187,6 +1192,7 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *TelcomModemMode;
|
|
|
struct json_object *TelcomIpAddress;
|
|
|
struct json_object *TelcomNetworkConn;
|
|
|
+ struct json_object *TelcomEnabled;
|
|
|
//backend
|
|
|
struct json_object *BackendConnTimeout;
|
|
|
struct json_object *OfflinePolicy;
|
|
@@ -1624,6 +1630,7 @@ int main(int argc, char *argv[]) {
|
|
|
TelcomModemMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode);
|
|
|
TelcomIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress);
|
|
|
TelcomNetworkConn = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomNetworkConn);
|
|
|
+ TelcomEnabled = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomEnabled);
|
|
|
//backend
|
|
|
BackendConnTimeout = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
|
|
|
OfflinePolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
|
|
@@ -1848,6 +1855,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj3,"TelcomModemMode",TelcomModemMode);
|
|
|
json_object_object_add(jobj3,"TelcomIpAddress",TelcomIpAddress);
|
|
|
json_object_object_add(jobj3,"TelcomNetworkConn",TelcomNetworkConn);
|
|
|
+ json_object_object_add(jobj3,"TelcomEnabled",TelcomEnabled);
|
|
|
printf("%s\n", json_object_to_json_string(jobj3));
|
|
|
json_object_put(jobj3);
|
|
|
|