|
|
@@ -2594,19 +2594,19 @@ static void communicationManagement(void *conn)
|
|
|
//查询网络参数
|
|
|
if(strcmp(reqInfo.type,"listWkIPV4Query")==0 || strcmp(reqInfo.type,"listWkIPV6Query")==0)//缃戠粶鍙傛暟鏌ヨ
|
|
|
{
|
|
|
- NetworkInfo_t* info = &devInfo->_network_info;
|
|
|
- int ipv=strstr(reqInfo.type, "listWkIPV4Query")?IP_V4:IP_V6;
|
|
|
-
|
|
|
- sys_get_net(info, ipv);
|
|
|
- //print_net("get", info);
|
|
|
+ NetworkInfo_t info={0};
|
|
|
+ int r,ipv=(strstr(reqInfo.type, "listWkIPV4Query")?IP_V4:IP_V6);
|
|
|
|
|
|
- ack_str = communication_net_ack_to_json(info);
|
|
|
+ r = sys_get_net(&info, ipv);
|
|
|
+ if(r==0) {
|
|
|
+ ack_str = communication_net_ack_to_json(&info);
|
|
|
+ }
|
|
|
}
|
|
|
else if(strcmp(reqInfo.type,"WkIPV4Save")==0 || strcmp(reqInfo.type,"WkIPV6Save")==0 ) //淇濆瓨鏁版嵁
|
|
|
{
|
|
|
NetworkInfo_t* info = &devInfo->_network_info;
|
|
|
_NET_CommunicationRequestInfo *info2=&reqInfo._net_info;
|
|
|
- int ipv=strstr(reqInfo.type, "WkIPV4Save")?IP_V4:IP_V6;
|
|
|
+ int ipv=(strstr(reqInfo.type, "WkIPV4Save")?IP_V4:IP_V6);
|
|
|
|
|
|
int mode = atoi(info2->mode);
|
|
|
if(mode==IP_STATIC) {
|