Merge "[Bugfix][T106BUG-476 T106BUG-477]Resolved the ims registration problem in India"
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
index 0c20965..3e4f2e0 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
@@ -515,11 +515,11 @@
 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.gateway);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.pri_dns);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.sec_dns);

-				offset += sprintf(at_str+offset,"%d,", pdp_type);

 				offset += sprintf(at_str+offset,"\"%s\",", g_pdpinfo_mng[info->c_id-1].ip6addr);	

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.gateway6);

 				offset += sprintf(at_str+offset,"\"%s\",", info->act_info.pri_dns6);

 				offset += sprintf(at_str+offset,"\"%s\"", info->act_info.sec_dns6);

+				offset += sprintf(at_str+offset,",%d", pdp_type);

 			}

 			break;

 		}

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
index cca6719..ff164db 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_pdp.c
@@ -732,14 +732,14 @@
 						act_info->gateway,

 					 	act_info->pri_dns,

 					 	act_info->sec_dns,

-						&pdpinfo->pdp_type,

 						act_info->ip6,

 						act_info->gateway6,

 						act_info->pri_dns6,

-						act_info->sec_dns6

+						act_info->sec_dns6,

+						&pdpinfo->pdp_type

 					  };

 		act_info->ip46flag = V46_VALID;

-		parse_param("%d,%s,%s,%s,%s,%s,%d,%s,%s,%s,%s",at_paras,(void **)p3);

+		parse_param("%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%d",at_paras,(void **)p3);

 		//save_unicast_ip6addr(cid, act_info->ip6);

 		if(pdpinfo->pdp_type == PDP_EXT){

 			proc_netdev(cid, 1, act_info->ip);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
index fa3d1f3..389799f 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/libsctel/data/sc_data.c
@@ -72,27 +72,47 @@
 	char pri_dns6[IPV6ADDLEN_MAX];

 	char sec_dns6[IPV6ADDLEN_MAX];

 	char at_cmd[128] = {0};

+	char str[512] = {0};

+	void *p[] = {str};

 	char *at_str = at_cmd;

-	void *p[] = {	&rsp->c_id, 

+	void *p0[] = {	&rsp->c_id, 

 					ip_type, 

 					ip,

 					gateway,

 					pri_dns,

 					sec_dns,

-					&rsp->pdp_type,

 					ip6,

 					gateway6,

 					pri_dns6,

-					sec_dns6

+					sec_dns6,

+					&rsp->pdp_type

+				};

+	void *p1[] = {	&rsp->c_id, 

+					ip_type, 

+					ip,

+					gateway,

+					pri_dns,

+					sec_dns,

+					&rsp->pdp_type

+				};

+	void *p2[] = {	&rsp->c_id, 

+					ip_type, 

+					ip6,

+					gateway6,

+					pri_dns6,

+					sec_dns6,

+					&rsp->pdp_type

 				};

 

 	offset += sprintf(at_str+offset,"AT+ZPDPACT=%d,\"%s\",\"%s\",,,", req->c_id, req->ip_type, req->apn);

 	offset += sprintf(at_str+offset,",%d,\"%s\",\"%s\"", req->auth_type, req->username, req->password);

 	offset += sprintf(at_str+offset,",\"%s\",,1,%d\r\n", req->challenge, req->act_type);

-	ret = get_modem_info(at_cmd, "%d,%s,%s,%s,%s,%s,%d,%s,%s,%s,%s", (void **)p);

+	ret = get_modem_info(at_cmd, "%s", (void **)p);

 	if(ret == 0){

+		ret = parse_param("%d,%s,%s,%s,%s,%s,%d", str, (void **)p2);

 		if(0 == strcmp("IP", ip_type))

 		{

+			parse_param("%d,%s,%s,%s,%s,%s,%d", str, (void **)p1);

 			strncpy(rsp->act_info.ip, ip, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.gateway, gateway, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.pri_dns, pri_dns, IPV4ADDLEN_MAX-1);

@@ -109,6 +129,11 @@
 		}

 		else if(0 == strcmp("IPV4V6", ip_type))

 		{

+			memset(ip6, 0, sizeof(ip6));

+			memset(gateway6, 0, sizeof(gateway6));

+			memset(pri_dns6, 0, sizeof(pri_dns6));

+			memset(sec_dns6, 0, sizeof(sec_dns6));

+			parse_param("%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%d", str, (void **)p0);

 			strncpy(rsp->act_info.ip, ip, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.gateway, gateway, IPV4ADDLEN_MAX-1);

 			strncpy(rsp->act_info.pri_dns, pri_dns, IPV4ADDLEN_MAX-1);