Merge branch 'master' of git.komect.net:ISG/secogateway
This commit is contained in:
commit
11cd32ce85
|
@ -156,7 +156,7 @@ ret_code LTE_json_parse(pointer input, uint *conf_type, int action)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void killpid()
|
/*void killpid()
|
||||||
{
|
{
|
||||||
char pid[10] =
{0};
|
char pid[10] =
{0};
|
||||||
char cmd[20] = {0};
|
char cmd[20] = {0};
|
||||||
|
@ -173,7 +173,7 @@ void killpid()
|
||||||
sprintf(cmd,"kill %d",pid_int);
|
sprintf(cmd,"kill %d",pid_int);
|
||||||
system(cmd);
|
system(cmd);
|
||||||
pclose(fp);
|
pclose(fp);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
ret_code start_lte()
|
ret_code start_lte()
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,9 @@ ret_code start_lte()
|
||||||
}
|
}
|
||||||
else if(strstr(result,"start pppd ppp0") != NULL)
|
else if(strstr(result,"start pppd ppp0") != NULL)
|
||||||
{
|
{
|
||||||
while(i < 120)
|
pclose(f);
|
||||||
|
return RET_OK;
|
||||||
|
/* while(i < 120)
|
||||||
{
|
{
|
||||||
if(access(file_path,0) != -1)
|
if(access(file_path,0) != -1)
|
||||||
{
|
{
|
||||||
|
@ -227,12 +229,12 @@ ret_code start_lte()
|
||||||
//ɱËÀ½ø³Ì
|
//ɱËÀ½ø³Ì
|
||||||
killpid();
|
killpid();
|
||||||
rpc_log_info("please check the sim card\n");
|
rpc_log_info("please check the sim card\n");
|
||||||
return RET_EXEC_SHELL_ERR;
|
return RET_EXEC_SHELL_ERR;*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pclose(f);
|
pclose(f);
|
||||||
return RET_UNKNOWN;
|
return RET_EXEC_SHELL_ERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +271,7 @@ ret_code stop_lte()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pclose(f);
|
pclose(f);
|
||||||
return RET_UNKNOWN;
|
return RET_EXEC_SHELL_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -302,14 +304,16 @@ ret_code restart_lte()
|
||||||
return RET_NO_LTE_MODULE_ERR;
|
return RET_NO_LTE_MODULE_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(strstr(result,"pppd apparently already active, start aborted!") != NULL)
|
else if(strstr(result,"pppd apparently already active") != NULL)
|
||||||
{
|
{
|
||||||
pclose(f);
|
pclose(f);
|
||||||
return RET_ALREADY_START_ERR;
|
return RET_ALREADY_START_ERR;
|
||||||
}
|
}
|
||||||
else if(strstr(result,"start pppd ppp0") != NULL)
|
else if(strstr(result,"start pppd ppp0") != NULL)
|
||||||
{
|
{
|
||||||
while(i < 120)
|
pclose(f);
|
||||||
|
return RET_OK;
|
||||||
|
/* while(i < 120)
|
||||||
{
|
{
|
||||||
if(access(file_path,0) != -1)
|
if(access(file_path,0) != -1)
|
||||||
{
|
{
|
||||||
|
@ -326,13 +330,13 @@ ret_code restart_lte()
|
||||||
//ɱËÀ½ø³Ì
|
//ɱËÀ½ø³Ì
|
||||||
killpid();
|
killpid();
|
||||||
rpc_log_info("please check the sim card\n");
|
rpc_log_info("please check the sim card\n");
|
||||||
return RET_EXEC_SHELL_ERR;
|
return RET_EXEC_SHELL_ERR;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pclose(f);
|
pclose(f);
|
||||||
return RET_UNKNOWN;
|
return RET_EXEC_SHELL_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -719,7 +719,7 @@ ret_code br_if_config_chk(uint source,uint *config_type,
|
||||||
{
|
{
|
||||||
strncpy(input, br_config.ports[i], INTERFACE_NAMSIZ);
|
strncpy(input, br_config.ports[i], INTERFACE_NAMSIZ);
|
||||||
rpc_free(br_config.ports[i]);
|
rpc_free(br_config.ports[i]);
|
||||||
|
br_config.ports[i] = NULL;
|
||||||
input += INTERFACE_NAMSIZ;
|
input += INTERFACE_NAMSIZ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -730,7 +730,16 @@ exit:
|
||||||
|
|
||||||
if(br_config.ports)
|
if(br_config.ports)
|
||||||
{
|
{
|
||||||
|
for(i = 0; i < br_config.port_num; i++)
|
||||||
|
{
|
||||||
|
if(br_config.ports[i])
|
||||||
|
{
|
||||||
|
rpc_free(br_config.ports[i]);
|
||||||
|
br_config.ports[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
rpc_free(br_config.ports);
|
rpc_free(br_config.ports);
|
||||||
|
br_config.ports = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue