[Feature][ZXW-136]merge P50U04 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I7b6a8e22777591bc7a9ede91d6695d9415116f81
diff --git a/ap/app/Script/scripts/lan.sh b/ap/app/Script/scripts/lan.sh
index a1c74d1..6c471e9 100755
--- a/ap/app/Script/scripts/lan.sh
+++ b/ap/app/Script/scripts/lan.sh
@@ -71,7 +71,7 @@
     webv6_enable=`nv get webv6_enable`
     ipv6=`nv get lan_ipv6addr`
     if [ "x$webv6_enable" == "x1" ]; then
-        ifconfig $lan_if $ipv6
+        ifconfig $lan_if $ipv6/64
     if [ $? -ne 0 ];then
         echo "Error: ifconfig $lan_if $ipv6 failed." >> $test_log
     fi
diff --git a/ap/app/Script/scripts/psext_down_ipv6.sh b/ap/app/Script/scripts/psext_down_ipv6.sh
index 2ce0d21..c738a77 100755
--- a/ap/app/Script/scripts/psext_down_ipv6.sh
+++ b/ap/app/Script/scripts/psext_down_ipv6.sh
@@ -39,7 +39,7 @@
 	#if [ $? -ne 0 ];then
 	#    echo "Error: ip -6 addr del $ps_ip/126 dev $ps_if  failed." >> $test_log
     #fi
-    ip -6 route del default
+    ip -6 route del default dev $ps_if
 	#if [ $? -ne 0 ];then
 	#    echo "Error: ip -6 route del default failed." >> $test_log
     #fi
diff --git a/ap/app/Script/scripts/psext_up_ipv6.sh b/ap/app/Script/scripts/psext_up_ipv6.sh
index 71890e0..302b842 100755
--- a/ap/app/Script/scripts/psext_up_ipv6.sh
+++ b/ap/app/Script/scripts/psext_up_ipv6.sh
@@ -77,11 +77,18 @@
     ip6tables -t filter -A FORWARD -p icmpv6 --icmpv6-type 135 -j DROP
 	
     ip -6 route flush cache
+
+	route_info=`ip -6 route|grep default`
 	
-    #这句设完,里面可以ping通外网了
-    echo "Info: route_set ps_ip=$ps_ip" >> $test_log
-    #ip -6 route add default via $ps_ip dev $ps_if
-    ip -6 route add default dev $ps_if 2>>$test_log
+	if [ "$route_info" == "" ];then
+		#这句设完,里面可以ping通外网了
+		echo "Info: route_set ps_ip=$ps_ip" >> $test_log
+		#ip -6 route add default via $ps_ip dev $ps_if
+		ip -6 route add default dev $ps_if 2>>$test_log
+	else
+		echo "Debug: default route6 already exist." >> $test_log
+	fi
+
     if [ $? -ne 0 ];then
 	    echo "Error: ip -6 route add default dev $ps_if failed." >> $test_log
     fi
diff --git a/ap/app/Script/scripts/psext_updown_ipv6.sh b/ap/app/Script/scripts/psext_updown_ipv6.sh
index a48bd73..81be275 100755
--- a/ap/app/Script/scripts/psext_updown_ipv6.sh
+++ b/ap/app/Script/scripts/psext_updown_ipv6.sh
@@ -199,11 +199,18 @@
     ip6tables -t filter -A FORWARD -p icmpv6 --icmpv6-type 135 -j DROP
 	
     ip -6 route flush cache
+
+	route_info=`ip -6 route|grep default`
 	
-    #这句设完,里面可以ping通外网了
-    echo "Info: route_set ps_ip=$ps_ip" >> $test_log
-    #ip -6 route add default via $ps_ip dev $ps_if
-    ip -6 route add default dev $ps_if 2>>$test_log
+	if [ "$route_info" == "" ];then
+		#这句设完,里面可以ping通外网了
+		echo "Info: route_set ps_ip=$ps_ip" >> $test_log
+		#ip -6 route add default via $ps_ip dev $ps_if
+		ip -6 route add default dev $ps_if 2>>$test_log
+	else
+		echo "Debug: default route6 already exist." >> $test_log
+	fi	
+
     if [ $? -ne 0 ];then
 	    echo "Error: ip -6 route add default dev $ps_if failed." >> $test_log
     fi
@@ -377,7 +384,7 @@
 	#if [ $? -ne 0 ];then
 	#    echo "Error: ip -6 addr del $ps_ip/126 dev $ps_if  failed." >> $test_log
     #fi
-    ip -6 route del default
+    ip -6 route del default dev $ps_if
 	#if [ $? -ne 0 ];then
 	#    echo "Error: ip -6 route del default failed." >> $test_log
     #fi
diff --git a/ap/app/hostapd-2.10/hostapd/libwpa_client.a b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
index b8b324f..6d8221f 100755
--- a/ap/app/hostapd-2.10/hostapd/libwpa_client.a
+++ b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
Binary files differ
diff --git a/ap/app/nvro_tool/main.c b/ap/app/nvro_tool/main.c
index 681e236..35f6fd3 100755
--- a/ap/app/nvro_tool/main.c
+++ b/ap/app/nvro_tool/main.c
@@ -14,6 +14,7 @@
         printf("%s backup\n", argv[0]);
         printf("%s restore\n", argv[0]);
         printf("%s check\n", argv[0]);
+        printf("%s getflag\n", argv[0]);
         return -1;
     }
     if (argc > 1 && (strcmp("backup", argv[1])==0))
@@ -63,6 +64,26 @@
             return -1;
         }
     }
+    if (argc > 1 && (strcmp("getflag", argv[1])==0))
+    {
+        nvro_flag = flags_get_nvroflag();
+        switch (nvro_flag)
+        {
+        case NVRO_INIT:
+            printf("nvro_flag init:%08x\n", nvro_flag);
+            break;
+        case NVRO_BACKED_UP:
+            printf("nvro_flag backed up:%08x\n", nvro_flag);
+            break;
+        case NVRO_RESTORING:
+            printf("nvro_flag restoring:%08x\n", nvro_flag);
+            break;
+        default:
+            printf("nvro_flag invalid:%08x\n", nvro_flag);
+            break;
+        }
+        return 0;
+    }
 
     return -1;
 }
diff --git a/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a b/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
index 235b8bd..9e9c84b 100755
--- a/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
+++ b/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
Binary files differ
diff --git a/ap/app/zte_comm/at_ctl/inc/ps_normal.h b/ap/app/zte_comm/at_ctl/inc/ps_normal.h
index f131a9b..f065271 100755
--- a/ap/app/zte_comm/at_ctl/inc/ps_normal.h
+++ b/ap/app/zte_comm/at_ctl/inc/ps_normal.h
@@ -878,6 +878,8 @@
 int cusd_auto_act(char *at_paras ,int is_query_report);

 int zcardswitch_auto_act(char *at_paras ,int is_query_report);

 int zsciscan_auto_act(char *at_paras ,int is_query_report);

+int zudry_auto_act(char *at_paras ,int is_query_report);

+int zimsvmode_auto_act(char *at_paras ,int is_query_report);

 

 int defapn_query_func(int at_fd, char *at_paras,void ** res_msg, int *res_msglen);

 

diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/config_linux.c b/ap/app/zte_comm/at_ctl/src/atconfig/config_linux.c
index 9687244..5bfe6f9 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/config_linux.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/config_linux.c
@@ -306,6 +306,9 @@
 	register_clt_func("ZVERSION",zversion_ok_act,zversion_err_act);

 

 	register_inform_func("ZVERSION",zversion_auto_act);

+	register_inform_func("IMSVMODE",zimsvmode_auto_act);

+	register_inform_func("ZURDY",zudry_auto_act);

+	

 

 	register_fwd_func("ATD",atd_req_rcv_act,NULL,NULL);

 	

diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
index 03d43eb..a814119 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
@@ -24,12 +24,12 @@
 

 typedef struct

 {

-	unsigned int pubKeyRsaE[32];

-	unsigned int pubKeyRsaN[32];

-	unsigned int secureFlag;

-	unsigned int pubKeyHash[4];

-	unsigned int secureDevId[3];

-}T_ZDrvEfuse_Secure;

+    unsigned int pubKeyRsaE[32];

+    unsigned int pubKeyRsaN[32];

+    unsigned int secureFlag;

+    unsigned int pubKeyHash[4];

+    unsigned int secureDevId[3];

+} T_ZDrvEfuse_Secure;

 

 #define EFUSE_IOC_MAGIC 	'E'

 #define EFUSE_GET_DATA 		_IOWR(EFUSE_IOC_MAGIC, 1, char *)

@@ -52,27 +52,28 @@
     unsigned char  type;

 } T_zAt_CnumRes;

 

-struct time_info{

-	SINT32 time_zone;

-	SINT32 sav_time;

-	char univer_time[64];

+struct time_info

+{

+    SINT32 time_zone;

+    SINT32 sav_time;

+    char univer_time[64];

 };

 

 //extern AT_PDP_ACT_REQ_INFO * g_pdp_set_info;

-psnormal_state psinfo={0};

+psnormal_state psinfo = {0};

 static T_zAt_Zsec_Res g_LockZsec = {0};

-static int cfun_state=0;//ÓÃÓÚ±ê¼Çcfun״̬

+static int cfun_state = 0; //ÓÃÓÚ±ê¼Çcfun״̬

 static int g_plmnLen = 5;//ccmnc³¤¶È

 static char mccNum[10] 		= {0};

 static char mncNum[10] 		= {0};

-static int g_zUfi_Mode=-1;//ModeÉϱ¨±ä»¯£¬Óбä³É²Å²éѯSysinfo

-static int g_zUfi_SubMode=-1;//ModeÉϱ¨±ä»¯£¬Óбä³É²Å²éѯSysinfo

-static int g_zUfi_Stat=-1;//CEREG\CREG\CGREG±ä»¯£¬Óб仯²Å²éѯSysinfo

+static int g_zUfi_Mode = -1; //ModeÉϱ¨±ä»¯£¬Óбä³É²Å²éѯSysinfo

+static int g_zUfi_SubMode = -1; //ModeÉϱ¨±ä»¯£¬Óбä³É²Å²éѯSysinfo

+static int g_zUfi_Stat = -1; //CEREG\CREG\CGREG±ä»¯£¬Óб仯²Å²éѯSysinfo

 static int g_isSearchingNetwork = FALSE;

 static int g_zUfi_canPdpDail = TRUE;

 static int g_zUfi_firstCsq = TRUE;

-static char *crsmrsp=NULL;//ÓÃÓڼǼcrsm»Ø¸´½á¹û

-static char *mactozssid=NULL;//¼Ç¼ÊÕµ½µÄMACµØÖ·

+static char *crsmrsp = NULL; //ÓÃÓڼǼcrsm»Ø¸´½á¹û

+static char *mactozssid = NULL; //¼Ç¼ÊÕµ½µÄMACµØÖ·

 static BOOL g_SimSlotFlag = TRUE;//¼Ç¼sim¿¨²åÈë°Î³ö״̬

 static int sysinfo_flag = 0;

 int g_modem_model = 0;

@@ -90,677 +91,723 @@
 char imsi[50] = {0};

 //zdm ÇëÕ×·áÈ·ÈÏÊÇ·ñÐèҪͬ²½µ½AP²à

 //ºóÐøÓÃËøÍøÌæ´ú£¬ÆÕͨ°æ±¾²»Ëø

-char* zurdy_convert_cmd(void *msg,struct at_context *context)

-{   

+char* zurdy_convert_cmd(void *msg, struct at_context *context)

+{

     char *at_str = NULL;

-    

+

     at_str = (char *)malloc(20);

-    if(at_str == NULL){

-		softap_assert("");

-		return NULL;

-	}

+    if (at_str == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

     strcpy(at_str, "AT+ZSCHPLMN=1\r\n");

     return at_str;

 }

 

-int zmmi_auto_act(char *at_paras ,int is_query_report)

+int zmmi_auto_act(char *at_paras, int is_query_report)

 {

-	

-	char mode[10] = {0};

-	struct time_info timeinfo = {0};

-	struct tm set_tm = {0};

-	struct timeval time_tv = {0};

-	char temp1[256] = {0};

-	char temp2[256] = {0};

-	void *p[5] = {&timeinfo.time_zone,&timeinfo.sav_time,temp1,temp2,timeinfo.univer_time};

-	int time_zone = 0;

-	

-	//>>>sj.zhang add @2023-08-10 for systime NITZ sync enable/disenable.

-	if(0 != system("uci get lynq_uci.lynq_sync_time.lynq_modem_sync_time_enable | grep -E \'^1$\'"))

-	{

-		at_print(AT_ERR,"zmmi_auto_act: nitz disenabled. \n");

-		return AT_END;

-	}

-	//>>>sj.zhang add @2023-08-10 end.

 

+    char mode[10] = {0};

+    struct time_info timeinfo = {0};

+    struct tm set_tm = {0};

+    struct timeval time_tv = {0};

+    char temp1[256] = {0};

+    char temp2[256] = {0};

+    void *p[5] = {&timeinfo.time_zone, &timeinfo.sav_time, temp1, temp2, timeinfo.univer_time};

+    int time_zone = 0;

+

+#ifndef USE_CAP_SUPPORT

     sc_cfg_get("sntp_time_set_mode", mode, sizeof(mode));

-	if(strcmp(mode, "manual") == 0)

-	{

-		at_print(AT_ERR,"zmmi_auto_act: do not need to nitz \n");

-		return AT_END;

-	}

-	parse_param2("%d,%d,%256s,%256s,%64s", at_paras, p);

-	time_zone = timeinfo.time_zone;// / 4;time_zoneµÄ¼ÆË㷽ʽ²»¶Ô£¬Èç¹ûÊ±ÇøÊÇ+22µÄ»°£¬¾Í»á¶ªÊ§0.5£¬¸Äµ½ÏÂÃæ³ý

-	set_tm.tm_isdst = timeinfo.sav_time;

-	if(0 == strlen(timeinfo.univer_time))

-	{

-		at_print(AT_ERR,"zmmi_auto_act,univer_time invalid");

-		return AT_END;

-	}

-	sscanf(timeinfo.univer_time,"%2d/%2d/%2d,%2d:%2d:%2d",&set_tm.tm_year,

-		&set_tm.tm_mon,&set_tm.tm_mday,&set_tm.tm_hour,&set_tm.tm_min,&set_tm.tm_sec);

-	

-	at_print(AT_ERR, "zmmi_auto_act, year:%d, month:%d, day:%d, hour:%d, min:%d, sec:%d, wday:%d \n", 

-		set_tm.tm_year, set_tm.tm_mon, set_tm.tm_mday, set_tm.tm_hour, set_tm.tm_min, set_tm.tm_sec, set_tm.tm_wday);

+    if (strcmp(mode, "manual") == 0)

+    {

+        at_print(AT_ERR, "zmmi_auto_act: do not need to nitz \n");

+        return AT_END;

+    }

+#endif

+    parse_param2("%d,%d,%256s,%256s,%64s", at_paras, p);

+    time_zone = timeinfo.time_zone;// / 4;time_zoneµÄ¼ÆË㷽ʽ²»¶Ô£¬Èç¹ûÊ±ÇøÊÇ+22µÄ»°£¬¾Í»á¶ªÊ§0.5£¬¸Äµ½ÏÂÃæ³ý

+    set_tm.tm_isdst = timeinfo.sav_time;

+    if (0 == strlen(timeinfo.univer_time))

+    {

+        at_print(AT_ERR, "zmmi_auto_act,univer_time invalid");

+        return AT_END;

+    }

+    sscanf(timeinfo.univer_time, "%2d/%2d/%2d,%2d:%2d:%2d", &set_tm.tm_year,

+           &set_tm.tm_mon, &set_tm.tm_mday, &set_tm.tm_hour, &set_tm.tm_min, &set_tm.tm_sec);

 

-	if(set_tm.tm_year < 0 || set_tm.tm_year > INT_MAX-1) // kw 3

-	{

-		set_tm.tm_year = 0;

-	}

+    at_print(AT_ERR, "zmmi_auto_act, year:%d, month:%d, day:%d, hour:%d, min:%d, sec:%d, wday:%d \n",

+             set_tm.tm_year, set_tm.tm_mon, set_tm.tm_mday, set_tm.tm_hour, set_tm.tm_min, set_tm.tm_sec, set_tm.tm_wday);

 

-	if(set_tm.tm_mon < 0 || set_tm.tm_mon > INT_MAX-1)

-	{

-		set_tm.tm_mon = 0;

-	}

+    if (set_tm.tm_year < 0 || set_tm.tm_year > INT_MAX - 1) // kw 3

+    {

+        set_tm.tm_year = 0;

+    }

 

-		

-	set_tm.tm_year = set_tm.tm_year + 100;

-	set_tm.tm_mon = set_tm.tm_mon - 1;	

+    if (set_tm.tm_mon < 0 || set_tm.tm_mon > INT_MAX - 1)

+    {

+        set_tm.tm_mon = 0;

+    }

 

-	time_tv.tv_sec = mktime(&set_tm);

-	time_tv.tv_sec = time_tv.tv_sec +	time_zone * 3600 /4;

-		

-	

-	if (0 != settimeofday(&time_tv,NULL))

-	{

-		at_print(AT_ERR,"zmmi_auto_act,set time of system wrong");

-		return AT_END;

-	}

-	rtc_set_time(MODULE_ID_AT_CTL);

-	return AT_END;

+

+    set_tm.tm_year = set_tm.tm_year + 100;

+    set_tm.tm_mon = set_tm.tm_mon - 1;

+

+    time_tv.tv_sec = mktime(&set_tm);

+    time_tv.tv_sec = time_tv.tv_sec +	time_zone * 3600 / 4;

+

+

+    if (0 != settimeofday(&time_tv, NULL))

+    {

+        at_print(AT_ERR, "zmmi_auto_act,set time of system wrong");

+        return AT_END;

+    }

+

+#ifdef USE_CAP_SUPPORT

+    sc_cfg_set("nitz_is_valid", "1");

+    sprintf(temp1, "%d", timeinfo.time_zone);

+    sc_cfg_set("nitz_time_zone", temp1);

+    sprintf(temp2, "%d", timeinfo.sav_time);

+    sc_cfg_set("nitz_sav_time", temp2);

+#endif

+

+    rtc_set_time(MODULE_ID_AT_CTL);

+    return AT_END;

 }

 

 char* normal_getsysconfigread()

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    sprintf(at_next,"AT^SYSCONFIG?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT^SYSCONFIG?\r\n");

+    return at_next;

 }

 

 /***********atÃüÁî»ñÈ¡****************/

 //pin/pukÂëÊ£Óà´ÎÊý²éѯÃüÁî

 char* normal_getzrapread()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+ZRAP?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+ZRAP?\r\n");

+    return at_next;

 }

 

 //pinÂë²éѯÃüÁî

 char* normal_getcpinread()

 {

-    char *at_next=NULL;

-    at_next=malloc(16);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,16);

-	sprintf(at_next,"AT+CPIN?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(16);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 16);

+    sprintf(at_next, "AT+CPIN?\r\n");

+    return at_next;

 }

 

 //pinÂëÉèÖÃÃüÁî

 char* normal_getcpinset(char *pin)

 {

-    if(pin == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CPIN=\"%s\"\r\n",pin);

-	return at_next;

+    if (pin == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CPIN=\"%s\"\r\n", pin);

+    return at_next;

 }

 

 //½âpukÂëÃüÁî

-char* normal_getcpukset(char *puk,char *newpin)

+char* normal_getcpukset(char *puk, char *newpin)

 {

-    if(puk == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CPIN=\"%s\",\"%s\"\r\n",puk,newpin);

-	return at_next;

+    if (puk == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CPIN=\"%s\",\"%s\"\r\n", puk, newpin);

+    return at_next;

 }

 

 //IMEIºÅ»ñÈ¡ÃüÁî

 char* normal_getcgsn()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CGSN\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CGSN\r\n");

+    return at_next;

 }

 

 //ZICCID»ñÈ¡

 char* normal_getziccid()

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+ZICCID?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+ZICCID?\r\n");

+    return at_next;

 }

 

 //ÉèÖÃÓÐÏÞSIM¿¨·ÃÎÊ£¬µ±Ç°×÷ÓÃÖ÷ÒªÊÇ»ñÈ¡PLMNµÄλÊý

 char* normal_getcrsmset(char *param)

 {

-    if(param == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CRSM=%s\r\n",param);

-	return at_next;

+    if (param == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CRSM=%s\r\n", param);

+    return at_next;

 }

 

 //IMSIºÅ»ñÈ¡

 char* normal_getcimi()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CIMI\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CIMI\r\n");

+    return at_next;

 }

 

 //Óû§ºÅÂë»ñÈ¡£¬Ä¿Ç°·µ»ØµÄ¶àΪERROR

 char* normal_CnumRead()

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CNUM\r\n");

-    if(AT_CMD_MAX <= strlen(at_next)){softap_assert("");}

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CNUM\r\n");

+    if (AT_CMD_MAX <= strlen(at_next))

+    {

+        softap_assert("");

+    }

+    return at_next;

 }

 

 /*¸ù¾Ýµ±Ç°NVÖµ,·µ»ØsysconfigÉèÖÃÃüÁî*/

 char* normal_getsysconfigset()

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     int mode = ZAT_SYSCONFIG_MODE_AUTO;

     int acqorder = ZAT_SYSCONFIG_PREF_ACQ_AUTO;

-	int roam = 1;

+    int roam = 1;

     normal_getsysconfigsetParam(&mode, &acqorder, &roam);

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    sprintf(at_next,"AT^SYSCONFIG=%d,%d,%d,2\r\n", mode, acqorder, roam);

-	return at_next;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT^SYSCONFIG=%d,%d,%d,2\r\n", mode, acqorder, roam);

+    return at_next;

 }

 

 /*¸ù¾Ýµ±Ç°NVÖµ,·µ»Øcgdcont PDPÉÏÏÂÎÄÉèÖÃÃüÁî*/

 char* normal_getcgdcontset(int cid)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     char strPdptype[10] = {0};

     char strAPN[APN_MAX_LEN] = {0};

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    at_print(AT_DEBUG,"normal_getcgdcontset cid=%d\n",cid);

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    at_print(AT_DEBUG, "normal_getcgdcontset cid=%d\n", cid);

     //ÉèÖÃipv4v6µÄÖ§³Ö

-    sc_cfg_get(NV_PDP_TYPE,strPdptype,sizeof(strPdptype));

-    sc_cfg_get(NV_WAN_APN,strAPN,sizeof(strAPN)); 

-    if(strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype,"IPv6") == 0)

+    sc_cfg_get(NV_PDP_TYPE, strPdptype, sizeof(strPdptype));

+    sc_cfg_get(NV_WAN_APN, strAPN, sizeof(strAPN));

+    if (strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype, "IPv6") == 0)

     {

-        strncpy(strPdptype, "IPV6",sizeof(strPdptype)-1);

-        sc_cfg_get(NV_IPV6_WAN_APN,strAPN,sizeof(strAPN)); 

+        strncpy(strPdptype, "IPV6", sizeof(strPdptype) - 1);

+        sc_cfg_get(NV_IPV6_WAN_APN, strAPN, sizeof(strAPN));

     }

-    else if(strcmp(strPdptype,"IPV4V6") == 0 || strcmp(strPdptype,"IPv4v6") == 0)

+    else if (strcmp(strPdptype, "IPV4V6") == 0 || strcmp(strPdptype, "IPv4v6") == 0)

     {

-        strncpy(strPdptype, "IPV4V6",sizeof(strPdptype)-1);

-        sc_cfg_get(NV_IPV6_WAN_APN,strAPN,sizeof(strAPN)); 

+        strncpy(strPdptype, "IPV4V6", sizeof(strPdptype) - 1);

+        sc_cfg_get(NV_IPV6_WAN_APN, strAPN, sizeof(strAPN));

     }

-    sprintf(at_next,"AT+CGDCONT=%d,\"%s\",\"%s\"\r\n", cid, strPdptype, strAPN);

+    sprintf(at_next, "AT+CGDCONT=%d,\"%s\",\"%s\"\r\n", cid, strPdptype, strAPN);

     return at_next;

 }

 

 /*¸ù¾Ýµ±Ç°NVÖµ,·µ»Øzgpcoauth¼øÈ¨ÉèÖÃÃüÁî*/

 char* normal_getzgpcoauthset(int cid)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     char strAuthtype[10]             = {0};

     char strPdptype[20 ]  = {0};

     char strUsename[PDP_AUTH_USER_PWD_LENGTH]  = {0};

     char strPawd[PDP_AUTH_USER_PWD_LENGTH] = {0};

     int auth_type = -1;

-    at_print(AT_DEBUG,"normal_getzgpcoauthset cid=%d\n",cid);

+    at_print(AT_DEBUG, "normal_getzgpcoauthset cid=%d\n", cid);

 

-    sc_cfg_get(NV_PDP_TYPE,strPdptype,sizeof(strPdptype));

-    

-    if(strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype,"IPv6") == 0)

+    sc_cfg_get(NV_PDP_TYPE, strPdptype, sizeof(strPdptype));

+

+    if (strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype, "IPv6") == 0)

     {

-        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-    	sc_cfg_get(NV_IPV6_PPP_USERNAME,strUsename,sizeof(strUsename));

-    	sc_cfg_get(NV_IPV6_PPP_PASSWD,strPawd,sizeof(strPawd));

-    

+        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_IPV6_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_IPV6_PPP_PASSWD, strPawd, sizeof(strPawd));

+

     }

-    else if(strcmp(strPdptype,"IPV4V6") == 0 || strcmp(strPdptype,"IPv4v6") == 0)

+    else if (strcmp(strPdptype, "IPV4V6") == 0 || strcmp(strPdptype, "IPv4v6") == 0)

     {

-        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-    	sc_cfg_get(NV_IPV6_PPP_USERNAME,strUsename,sizeof(strUsename));

-    	sc_cfg_get(NV_IPV6_PPP_PASSWD,strPawd,sizeof(strPawd));

+        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_IPV6_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_IPV6_PPP_PASSWD, strPawd, sizeof(strPawd));

     }

-    else 

+    else

     {

 

-        sc_cfg_get(NV_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-        sc_cfg_get(NV_PPP_USERNAME,strUsename,sizeof(strUsename));

-        sc_cfg_get(NV_PPP_PASSWD,strPawd,sizeof(strPawd));

+        sc_cfg_get(NV_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_PPP_PASSWD, strPawd, sizeof(strPawd));

     }

     auth_type = normal_getauthtype(strAuthtype);

 

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    sprintf(at_next,"AT+ZGPCOAUTH=%d,\"%s\",\"%s\",%d\r\n", cid, strUsename, strPawd, auth_type);

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+ZGPCOAUTH=%d,\"%s\",\"%s\",%d\r\n", cid, strUsename, strPawd, auth_type);

     return at_next;

 }

 

 

 char* normal_getcfunset(char *cmdtype)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

 

-    at_next=malloc(128);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,128);

-    if(cmdtype != ZUFI_NULL)//ÅжÏÊÇ¿ªÉ䯵»¹ÊǽøÈë·ÉÐÐģʽ²Ù×÷

-    {  

-        if(memcmp(cmdtype, ZAT_POWEROFF, strlen(ZAT_POWEROFF)) == 0)

+    at_next = malloc(128);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 128);

+    if (cmdtype != ZUFI_NULL) //ÅжÏÊÇ¿ªÉ䯵»¹ÊǽøÈë·ÉÐÐģʽ²Ù×÷

+    {

+        if (memcmp(cmdtype, ZAT_POWEROFF, strlen(ZAT_POWEROFF)) == 0)

         {

-            cfun_state=0;

+            cfun_state = 0;

         }

-        else if(memcmp(cmdtype, ZAT_AIRMODE, strlen(ZAT_AIRMODE)) == 0)

+        else if (memcmp(cmdtype, ZAT_AIRMODE, strlen(ZAT_AIRMODE)) == 0)

         {

-            cfun_state=4;

-			sc_cfg_set(NV_NETWORK_TYPE, "No Service");

-			sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

+            cfun_state = 4;

+            sc_cfg_set(NV_NETWORK_TYPE, "No Service");

+            sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

         }

         else

         {

-            cfun_state=1;

+            cfun_state = 1;

         }

     }

-	else

-	{

-        cfun_state=1;	

-	}

-	if(cfun_state == 1)

-    {   	    

-	   	sprintf(at_next,"AT+ZSCHPLMN=1;+CFUN=%d\r\n",cfun_state);

+    else

+    {

+        cfun_state = 1;

     }

-	else

-	    sprintf(at_next,"AT+CFUN=%d\r\n",cfun_state);

-	sc_cfg_set("cfun_work", "work");

-	return at_next;

+    if (cfun_state == 1)

+    {

+        sprintf(at_next, "AT+ZSCHPLMN=1;+CFUN=%d\r\n", cfun_state);

+    }

+    else

+    {

+        sprintf(at_next, "AT+CFUN=%d\r\n", cfun_state);

+    }

+    sc_cfg_set("cfun_work", "work");

+    return at_next;

 }

 

 //ÉèÖÃCGREGÖ÷¶¯Éϱ¨

 char* normal_getcgregset(char *param)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CGREG=%s\r\n",param);

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CGREG=%s\r\n", param);

+    return at_next;

 }

 

 //ÉèÖÃCEREGÖ÷¶¯Éϱ¨

 char* normal_getceregset(char *param)

 {

-    char *at_next=NULL;

-    at_next=malloc(16);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,16);

-	sprintf(at_next,"AT+CEREG=%s\r\n",param);

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(16);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 16);

+    sprintf(at_next, "AT+CEREG=%s\r\n", param);

+    return at_next;

 }

 

 //×Ô¶¯ËÑÍø»òÊÖ¶¯ËÑÍøÉèÖÃ

-char* normal_getcopsset(int paramnum,...)

+char* normal_getcopsset(int paramnum, ...)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    va_list ap;    

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    va_list ap;

     va_start(ap, paramnum);

-    if(paramnum==1)

+    if (paramnum == 1)

     {

-        sprintf(at_next,"AT+COPS=%s\r\n",va_arg(ap,char*));//ÉèÖÃÑ¡ÍøÄ£Ê½£¬Ò»°ã²ÎÊýÖÃΪ0£¬±íʾ×Ô¶¯ËÑÍø

+        sprintf(at_next, "AT+COPS=%s\r\n", va_arg(ap, char*)); //ÉèÖÃÑ¡ÍøÄ£Ê½£¬Ò»°ã²ÎÊýÖÃΪ0£¬±íʾ×Ô¶¯ËÑÍø

     }

-    else if(paramnum==2)

+    else if (paramnum == 2)

     {

-        sprintf(at_next,"AT+COPS=1,2,\"%s\",%d\r\n",va_arg(ap,char*),va_arg(ap,int));//ÊÖ¶¯ËÑÍøÉèÖ㬲»Ð¯´ø×ÓÖÆÊ½

+        sprintf(at_next, "AT+COPS=1,2,\"%s\",%d\r\n", va_arg(ap, char*), va_arg(ap, int)); //ÊÖ¶¯ËÑÍøÉèÖ㬲»Ð¯´ø×ÓÖÆÊ½

     }

-    else if(paramnum==3)

+    else if (paramnum == 3)

     {

-        sprintf(at_next,"AT+COPS=1,2,\"%s\",%d,%d\r\n",va_arg(ap,char*),va_arg(ap,int),va_arg(ap,int));	//ÊÖ¶¯ËÑÍøÉèÖã¬Ð¯´ø×ÓÖÆÊ½

+        sprintf(at_next, "AT+COPS=1,2,\"%s\",%d,%d\r\n", va_arg(ap, char*), va_arg(ap, int), va_arg(ap,

+                int));	//ÊÖ¶¯ËÑÍøÉèÖã¬Ð¯´ø×ÓÖÆÊ½

     }

     else

     {

-    	free(at_next);

-		va_end(ap);

+        free(at_next);

+        va_end(ap);

         return NULL;

     }

     va_end(ap);

-    at_print(AT_DEBUG,"normal_getcopsset %s!\n",at_next);

+    at_print(AT_DEBUG, "normal_getcopsset %s!\n", at_next);

     return at_next;

 }

 

 //ÊÖ¶¯ËÑÍøÊ±£¬»ñÈ¡µ±Ç°ÍøÂçÖдæÔÚµÄÔËÓªÉÌÁбí

 char* normal_getcopstest()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+COPS=?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+COPS=?\r\n");

+    return at_next;

 }

 

 //·µ»Øµ±Ç°µÄÍøÂçģʽ

 char* normal_getcopsread()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+COPS?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+COPS?\r\n");

+    return at_next;

 }

 

 //²éѯÐźÅÇ¿¶È

 char* normal_getcsq()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CSQ\r\n");

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CSQ\r\n");

     sc_cfg_set(NV_CSQ_DONE, "1");

-	return at_next;

+    return at_next;

 }

 

 //²éѯÈí¼þÄÚ²¿°æ±¾ºÅÃüÁî

 char* normal_getzversion()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT^ZVERSION\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT^ZVERSION\r\n");

+    return at_next;

 }

 

 //ÉèÖÃʱ¼äÃüÁî

-char* normal_getsyctimeset(long sec,long usec)

+char* normal_getsyctimeset(long sec, long usec)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    sprintf(at_next,"AT+SYCTIME=%ld,%ld\r\n",sec,usec);

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+SYCTIME=%ld,%ld\r\n", sec, usec);

     return at_next;

 }

 

 //ÉèÖÃmtnet²âÊÔÃüÁî

 char* normal_getmtnetset(char *mcc)

 {

-    char *at_next=NULL;

-	char mcc_list[256] = {0};

-	

+    char *at_next = NULL;

+    char mcc_list[256] = {0};

+

     sc_cfg_get("mtnet_test_mcc", mcc_list, sizeof(mcc_list));

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	if(strlen(mcc_list) > 3 && mcc && strlen(mcc) == 3 && strstr(mcc_list,mcc) != NULL)

-	{

-		sprintf(at_next,"AT+ZSET=\"MTNET_TEST\",1\r\n");

-	}

-	else

-	{

-		sprintf(at_next,"AT+ZSET=\"MTNET_TEST\",0\r\n");

-	}

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    if (strlen(mcc_list) > 3 && mcc && strlen(mcc) == 3 && strstr(mcc_list, mcc) != NULL)

+    {

+        sprintf(at_next, "AT+ZSET=\"MTNET_TEST\",1\r\n");

+    }

+    else

+    {

+        sprintf(at_next, "AT+ZSET=\"MTNET_TEST\",0\r\n");

+    }

     return at_next;

 }

 

 //¶ÁÈ¡°åºÅ(Ŀǰ½á¹ûΪ¿Õ£¬ÊÇ·ñÊDZØÐëÃüÁî??)

 char* normal_getboardnumread()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+BOARDNUM?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+BOARDNUM?\r\n");

+    return at_next;

 }

 

 //ϵͳÐÅÏ¢»ñÈ¡

 char* normal_getsysinfo()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT^SYSINFO\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT^SYSINFO\r\n");

+    return at_next;

 }

 

 //USSDÈ¡ÏûÃüÁî

 char* normal_getcusdset_clean()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CUSD=2\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CUSD=2\r\n");

+    return at_next;

 }

 

 //USSD·¢ËÍÃüÁî

 char* normal_getcusdset(char *param)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CUSD=1,\"%s\",15\r\n",param);

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CUSD=1,\"%s\",15\r\n", param);

+    return at_next;

 }

 

-char* normal_getclckset(int paramnum,...)

+char* normal_getclckset(int paramnum, ...)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    va_list ap;    

-    va_start(ap, paramnum);

-    if(paramnum==2)//²éѯµ±Ç°SIM¿¨×´Ì¬

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

     {

-        sprintf(at_next,"AT+CLCK=\"%s\",%d\r\n",va_arg(ap,char*),va_arg(ap,int));

+        softap_assert("");

+        return NULL;

     }

-    else if(paramnum==3)//¹Ø±Õ»òÕß´ò¿ªPINÂ빦ÄÜ

+    memset(at_next, 0, AT_CMD_MAX);

+    va_list ap;

+    va_start(ap, paramnum);

+    if (paramnum == 2) //²éѯµ±Ç°SIM¿¨×´Ì¬

     {

-        sprintf(at_next,"AT+CLCK=\"%s\",%d,\"%s\"\r\n",va_arg(ap,char*),va_arg(ap,int),va_arg(ap,char*));

+        sprintf(at_next, "AT+CLCK=\"%s\",%d\r\n", va_arg(ap, char*), va_arg(ap, int));

+    }

+    else if (paramnum == 3) //¹Ø±Õ»òÕß´ò¿ªPINÂ빦ÄÜ

+    {

+        sprintf(at_next, "AT+CLCK=\"%s\",%d,\"%s\"\r\n", va_arg(ap, char*), va_arg(ap, int), va_arg(ap, char*));

     }

     else

     {

-    	free(at_next);

-		va_end(ap);

+        free(at_next);

+        va_end(ap);

         return NULL;

     }

     va_end(ap);

     return at_next;

 }

 

-char* normal_getcpwdset(char *type,char *oldPin,char *newPin)

+char* normal_getcpwdset(char *type, char *oldPin, char *newPin)

 {

-    char *at_next=NULL;

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+CPWD=\"%s\",\"%s\",\"%s\"\r\n",type,oldPin,newPin);

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+CPWD=\"%s\",\"%s\",\"%s\"\r\n", type, oldPin, newPin);

+    return at_next;

 }

 

 char* normal_getmacread()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+MAC?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+MAC?\r\n");

+    return at_next;

 }

 

 char* normal_getmac2read()

 {

-    char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+MAC2?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+MAC2?\r\n");

+    return at_next;

 }

 

 //LTEËøÆµ,δʹÓÃ

 char *normal_getzltelcset()

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     T_zAt_ZltelcPara zltelcPara = {0};

     char actionLte[30] = {0};

     char uarfcnLte[30] = {0};

     char cellPara[30] = {0};

-    at_next=malloc(AT_CMD_MAX);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,AT_CMD_MAX);

-    sc_cfg_get(NV_ACTIONLTE,actionLte,sizeof(actionLte));

-    sc_cfg_get(NV_UARFCNLTE,uarfcnLte,sizeof(uarfcnLte));

-	sc_cfg_get(NV_CELLPARAIDLTE,cellPara,sizeof(cellPara));

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sc_cfg_get(NV_ACTIONLTE, actionLte, sizeof(actionLte));

+    sc_cfg_get(NV_UARFCNLTE, uarfcnLte, sizeof(uarfcnLte));

+    sc_cfg_get(NV_CELLPARAIDLTE, cellPara, sizeof(cellPara));

     zltelcPara.actionlte        = atoi(actionLte);

     zltelcPara.uarfcnlte        = atoi(uarfcnLte);

-    zltelcPara.cellParaIdlte    = atoi(cellPara); 

-    sprintf(at_next,"AT+ZLTELC=%d,%d,%d\r\n", (int)zltelcPara.actionlte, (int)zltelcPara.uarfcnlte, (int)zltelcPara.cellParaIdlte); 

+    zltelcPara.cellParaIdlte    = atoi(cellPara);

+    sprintf(at_next, "AT+ZLTELC=%d,%d,%d\r\n", (int)zltelcPara.actionlte, (int)zltelcPara.uarfcnlte,

+            (int)zltelcPara.cellParaIdlte);

     return at_next;

 }

 /***********atÃüÁî»ñÈ¡****************/

@@ -770,174 +817,175 @@
     char strPdptype[10] = {0};

     char strAPN[APN_MAX_LEN] = {0};

     //pdpsetinfo->pdp_type=PDP_NORMAL;

-    

-    sc_cfg_get(NV_PDP_TYPE,strPdptype,sizeof(strPdptype));

-    sc_cfg_get(NV_WAN_APN,strAPN,sizeof(strAPN)); 

-    if(strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype,"IPv6") == 0)

+

+    sc_cfg_get(NV_PDP_TYPE, strPdptype, sizeof(strPdptype));

+    sc_cfg_get(NV_WAN_APN, strAPN, sizeof(strAPN));

+    if (strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype, "IPv6") == 0)

     {

-        strncpy(strPdptype, "IPV6",sizeof(strPdptype)-1);

-        sc_cfg_get(NV_IPV6_WAN_APN,strAPN,sizeof(strAPN)); 

+        strncpy(strPdptype, "IPV6", sizeof(strPdptype) - 1);

+        sc_cfg_get(NV_IPV6_WAN_APN, strAPN, sizeof(strAPN));

     }

-    else if(strcmp(strPdptype,"IPV4V6") == 0 || strcmp(strPdptype,"IPv4v6") == 0)

+    else if (strcmp(strPdptype, "IPV4V6") == 0 || strcmp(strPdptype, "IPv4v6") == 0)

     {

-        strncpy(strPdptype, "IPV4V6",sizeof(strPdptype)-1);

-        sc_cfg_get(NV_IPV6_WAN_APN,strAPN,sizeof(strAPN)); 

+        strncpy(strPdptype, "IPV4V6", sizeof(strPdptype) - 1);

+        sc_cfg_get(NV_IPV6_WAN_APN, strAPN, sizeof(strAPN));

     }

-    strncpy(pdpsetinfo->comm_info.apn,strAPN,sizeof(pdpsetinfo->comm_info.apn)-1);

-    strncpy(pdpsetinfo->comm_info.ip_type,strPdptype,sizeof(pdpsetinfo->comm_info.ip_type)-1);

-    at_print(AT_DEBUG,"normal_getcurparam apn=%s,apntype=%s\n",pdpsetinfo->comm_info.apn,pdpsetinfo->comm_info.ip_type);

-    

+    strncpy(pdpsetinfo->comm_info.apn, strAPN, sizeof(pdpsetinfo->comm_info.apn) - 1);

+    strncpy(pdpsetinfo->comm_info.ip_type, strPdptype, sizeof(pdpsetinfo->comm_info.ip_type) - 1);

+    at_print(AT_DEBUG, "normal_getcurparam apn=%s,apntype=%s\n", pdpsetinfo->comm_info.apn, pdpsetinfo->comm_info.ip_type);

+

     char strAuthtype[10]             = {0};

     char strUsename[PDP_AUTH_USER_PWD_LENGTH]  = {0};

     char strPawd[PDP_AUTH_USER_PWD_LENGTH] = {0};

-    if(strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype,"IPv6") == 0)

+    if (strcmp("IPV6", strPdptype) == 0 || strcmp(strPdptype, "IPv6") == 0)

     {

-        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-        sc_cfg_get(NV_IPV6_PPP_USERNAME,strUsename,sizeof(strUsename));

-        sc_cfg_get(NV_IPV6_PPP_PASSWD,strPawd,sizeof(strPawd));

-        

+        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_IPV6_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_IPV6_PPP_PASSWD, strPawd, sizeof(strPawd));

+

     }

-    else if(strcmp(strPdptype,"IPV4V6") == 0 || strcmp(strPdptype,"IPv4v6") == 0)

+    else if (strcmp(strPdptype, "IPV4V6") == 0 || strcmp(strPdptype, "IPv4v6") == 0)

     {

-        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-        sc_cfg_get(NV_IPV6_PPP_USERNAME,strUsename,sizeof(strUsename));

-        sc_cfg_get(NV_IPV6_PPP_PASSWD,strPawd,sizeof(strPawd));

+        sc_cfg_get(NV_IPV6_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_IPV6_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_IPV6_PPP_PASSWD, strPawd, sizeof(strPawd));

     }

-    else 

+    else

     {

-        

-        sc_cfg_get(NV_PPP_AUTH_MODE,strAuthtype,sizeof(strAuthtype));

-        sc_cfg_get(NV_PPP_USERNAME,strUsename,sizeof(strUsename));

-        sc_cfg_get(NV_PPP_PASSWD,strPawd,sizeof(strPawd));

+

+        sc_cfg_get(NV_PPP_AUTH_MODE, strAuthtype, sizeof(strAuthtype));

+        sc_cfg_get(NV_PPP_USERNAME, strUsename, sizeof(strUsename));

+        sc_cfg_get(NV_PPP_PASSWD, strPawd, sizeof(strPawd));

     }

     pdpsetinfo->comm_info.auth_type = normal_getauthtype(strAuthtype);

-    strncpy(pdpsetinfo->comm_info.username,strUsename,sizeof(pdpsetinfo->comm_info.username)-1);

-    strncpy(pdpsetinfo->comm_info.password,strPawd,sizeof(pdpsetinfo->comm_info.password)-1);

-    at_print(AT_DEBUG,"normal_getcurparam authtype=%d,user=%s,psw=%s\n",pdpsetinfo->comm_info.auth_type,pdpsetinfo->comm_info.username,pdpsetinfo->comm_info.password);

+    strncpy(pdpsetinfo->comm_info.username, strUsename, sizeof(pdpsetinfo->comm_info.username) - 1);

+    strncpy(pdpsetinfo->comm_info.password, strPawd, sizeof(pdpsetinfo->comm_info.password) - 1);

+    at_print(AT_DEBUG, "normal_getcurparam authtype=%d,user=%s,psw=%s\n", pdpsetinfo->comm_info.auth_type,

+             pdpsetinfo->comm_info.username, pdpsetinfo->comm_info.password);

     return 0;

 }

 

 DbResult noraml_dbopen(char *filename, sqlite3**pDb)

 {

-	//zdm tosÁ¬½Ó²»¹ý

-	#if (APP_OS_TYPE == APP_OS_LINUX)

+    //zdm tosÁ¬½Ó²»¹ý

+#if (APP_OS_TYPE == APP_OS_LINUX)

     sqlite3* pTmpDb = NULL;

-    if(NULL == pDb)

+    if (NULL == pDb)

     {

-        at_print(AT_ERR,"noraml_dbopen:invalide inputs.");/*lint  !e26*/

+        at_print(AT_ERR, "noraml_dbopen:invalide inputs."); /*lint  !e26*/

         return DB_ERROR_INVALIDPTR;

     }

-    at_print(AT_DEBUG,"noraml_dbopen:sqlite3_open call");/*lint  !e26*/

-    if(sqlite3_open(filename, &pTmpDb))

+    at_print(AT_DEBUG, "noraml_dbopen:sqlite3_open call"); /*lint  !e26*/

+    if (sqlite3_open(filename, &pTmpDb))

     {

-        at_print(AT_DEBUG,"noraml_dbopen:can not open db,sqlite3_errmsg:%s.",sqlite3_errmsg(pTmpDb));

+        at_print(AT_DEBUG, "noraml_dbopen:can not open db,sqlite3_errmsg:%s.", sqlite3_errmsg(pTmpDb));

         (VOID) sqlite3_close(pTmpDb);

         return DB_ERROR_NOTOPENDB;

     }

     *pDb = pTmpDb;

-	#else

+#else

     softap_assert("");

-	#endif

-	

+#endif

+

     return DB_OK;

 }

 

 DbResult normal_dbclose(sqlite3 *pDb)

 {

-	#if (APP_OS_TYPE == APP_OS_LINUX)

-	

-    if(sqlite3_close(pDb))

+#if (APP_OS_TYPE == APP_OS_LINUX)

+

+    if (sqlite3_close(pDb))

     {

-        at_print(AT_ERR,"normal_dbclose:can not close db");/*lint  !e26*/

+        at_print(AT_ERR, "normal_dbclose:can not close db"); /*lint  !e26*/

         return DB_ERROR;

     }

-	#else

-		softap_assert("");

-	#endif

+#else

+    softap_assert("");

+#endif

     return DB_OK;

 }

 

-DbResult normal_execdbsql(char *filename, const char *pSql, sqlite3_callback callback,VOID *pFvarg)

+DbResult normal_execdbsql(char *filename, const char *pSql, sqlite3_callback callback, VOID *pFvarg)

 {

     sqlite3 *pDb = NULL;

     char dbErrMsg[128] = {0};

-	#if (APP_OS_TYPE == APP_OS_LINUX)

-    

-    if(DB_OK != noraml_dbopen(filename, &pDb))

+#if (APP_OS_TYPE == APP_OS_LINUX)

+

+    if (DB_OK != noraml_dbopen(filename, &pDb))

     {

-        at_print(AT_ERR,"normal_execdbsql:open pbm.db failed.");

+        at_print(AT_ERR, "normal_execdbsql:open pbm.db failed.");

         return DB_ERROR_NOTOPENDB;

     }

-    at_print(AT_DEBUG,"normal_execdbsql:atPb_ExecDbSql:%s\n",pSql);

-    if(sqlite3_exec(pDb,pSql,callback,pFvarg,NULL))

+    at_print(AT_DEBUG, "normal_execdbsql:atPb_ExecDbSql:%s\n", pSql);

+    if (sqlite3_exec(pDb, pSql, callback, pFvarg, NULL))

     {

-        strncpy(dbErrMsg,sqlite3_errmsg(pDb),sizeof(dbErrMsg)-1);

-        at_print(AT_ERR,"normal_execdbsql:can not exec sql,sqlite3_errmsg:%s.",dbErrMsg);

+        strncpy(dbErrMsg, sqlite3_errmsg(pDb), sizeof(dbErrMsg) - 1);

+        at_print(AT_ERR, "normal_execdbsql:can not exec sql,sqlite3_errmsg:%s.", dbErrMsg);

         (VOID)sqlite3_close(pDb);

         return DB_ERROR;

     }

     (VOID)normal_dbclose(pDb);

-	#else

-		softap_assert("");

-	#endif

+#else

+    softap_assert("");

+#endif

     return DB_OK;

 }

 

-int normal_count_callback(void *fvarg,int line,char **zresult,char **lname)

+int normal_count_callback(void *fvarg, int line, char **zresult, char **lname)

 {

-	if(1 > line)

-	{

-		at_print(AT_DEBUG,"atBase:record no data.");

-		return -1;

-	}

-	*(int*)fvarg = atoi(zresult[0]);

-	return 0;

+    if (1 > line)

+    {

+        at_print(AT_DEBUG, "atBase:record no data.");

+        return -1;

+    }

+    *(int*)fvarg = atoi(zresult[0]);

+    return 0;

 }

 

 /*¸ù¾ÝÉ豸ÐͺźÍplmn,²éѯlocknet.db*/

 int normal_islocknetwhitelist(char *pmodel, char *pplmn)

 {

     char sql[128] = {0};

-	int lcount = 0;

+    int lcount = 0;

     int result = DB_OK;

-    

-    snprintf(sql,128-1,"select count(*) from net_list where product_model=\'%s\' and plmn=\'%s\'", pmodel, pplmn);

+

+    snprintf(sql, 128 - 1, "select count(*) from net_list where product_model=\'%s\' and plmn=\'%s\'", pmodel, pplmn);

     result = normal_execdbsql(ZLOCKNET_DB_PATH, sql, normal_count_callback, &lcount);

-    if(DB_OK != result)

+    if (DB_OK != result)

     {

-        at_print(AT_DEBUG,"atBase_isLockNetWhiteList error:%d !\n", result); 

+        at_print(AT_DEBUG, "atBase_isLockNetWhiteList error:%d !\n", result);

         return -1;

     }

-    if(lcount > 0)

+    if (lcount > 0)

     {

-        at_print(AT_DEBUG,"atBase_isLockNetWhiteList succ:%d !\n", lcount); 

-		return 0;

-	}

-	at_print(AT_DEBUG,"atBase_isLockNetWhiteList not int list:%d, model:%s, plmn:%s !\n", lcount, pmodel, pplmn); 

+        at_print(AT_DEBUG, "atBase_isLockNetWhiteList succ:%d !\n", lcount);

+        return 0;

+    }

+    at_print(AT_DEBUG, "atBase_isLockNetWhiteList not int list:%d, model:%s, plmn:%s !\n", lcount, pmodel, pplmn);

     return -1;

 }

 

 /*ËøÍø¼ì²â*/

 BOOL normal_locknetmatch(const char* mcc, const char* mnc)

 {

-	char plmn[LOCK_NET_PLMN_LEN] = {0};

-	char product_model[LOCK_NET_PLMN_LEN] = {0};

-	char useLockNet[10] = {0};

-	snprintf(plmn, LOCK_NET_PLMN_LEN-1, "%s%s", mcc, mnc);

-	sc_cfg_get("product_model", product_model, sizeof(product_model));

+    char plmn[LOCK_NET_PLMN_LEN] = {0};

+    char product_model[LOCK_NET_PLMN_LEN] = {0};

+    char useLockNet[10] = {0};

+    snprintf(plmn, LOCK_NET_PLMN_LEN - 1, "%s%s", mcc, mnc);

+    sc_cfg_get("product_model", product_model, sizeof(product_model));

     sc_cfg_get("use_lock_net", useLockNet, sizeof(useLockNet));

-	if(0 == strcmp("yes", useLockNet))

-	{

-		if(normal_islocknetwhitelist(product_model, plmn) == 0)

-		{

-			return TRUE;

-		}

-		return FALSE;

-	}

-	else

-	{

-		return TRUE;

-	}	

+    if (0 == strcmp("yes", useLockNet))

+    {

+        if (normal_islocknetwhitelist(product_model, plmn) == 0)

+        {

+            return TRUE;

+        }

+        return FALSE;

+    }

+    else

+    {

+        return TRUE;

+    }

 }

 

 /*Ñ¡ÔñÓëwebui NVÅäÖÃÒ»ÖµÄsysconfig²ÎÊý*/

@@ -946,123 +994,123 @@
     long  i                           = 0;

     char    netSelect[20]  = {0};

     char    modeSelect[20] = {0};

-    long  tableSize                   = sizeof(G_ZAT_SYSCONFIG_CFGPARA_SET)/sizeof(T_zAt_SysConfigParaSet);

-	char needTds[50] = {0};

+    long  tableSize                   = sizeof(G_ZAT_SYSCONFIG_CFGPARA_SET) / sizeof(T_zAt_SysConfigParaSet);

+    char needTds[50] = {0};

     char needGsm[50] = {0};

     char roamSet[10] = {0};

-    

-    sc_cfg_get(NV_NET_SELECT,netSelect,sizeof(netSelect));

-    sc_cfg_get(NV_PRE_MODE,modeSelect,sizeof(modeSelect));

-    sc_cfg_get(NV_NETWORK_NEED_TDS,needTds,sizeof(needTds));

-    sc_cfg_get(NV_NETWORK_NEED_GSM,needGsm,sizeof(needGsm));

-    sc_cfg_get(NV_ROAM_SETTING_OPTION,roamSet,sizeof(roamSet));

-	at_print(AT_DEBUG,"atBase_AtSysconfigSet:netSelect:%s! modeSelect:%s roamSet:%s.\n",netSelect,modeSelect,roamSet);

-    if(0 == strcmp(roamSet, "on"))

-	{

-		*roam = 1;

-	}

-	else if(0 == strcmp(roamSet, "off"))

-	{

-		*roam = 0;

-	}

-	else

-	{

-		*roam = 2;

-	}

-    if(0 == strcmp(netSelect, "NETWORK_auto"))  

+

+    sc_cfg_get(NV_NET_SELECT, netSelect, sizeof(netSelect));

+    sc_cfg_get(NV_PRE_MODE, modeSelect, sizeof(modeSelect));

+    sc_cfg_get(NV_NETWORK_NEED_TDS, needTds, sizeof(needTds));

+    sc_cfg_get(NV_NETWORK_NEED_GSM, needGsm, sizeof(needGsm));

+    sc_cfg_get(NV_ROAM_SETTING_OPTION, roamSet, sizeof(roamSet));

+    at_print(AT_DEBUG, "atBase_AtSysconfigSet:netSelect:%s! modeSelect:%s roamSet:%s.\n", netSelect, modeSelect, roamSet);

+    if (0 == strcmp(roamSet, "on"))

     {

-        if(0 == strcmp(modeSelect, "LTE_TD_pre"))

+        *roam = 1;

+    }

+    else if (0 == strcmp(roamSet, "off"))

+    {

+        *roam = 0;

+    }

+    else

+    {

+        *roam = 2;

+    }

+    if (0 == strcmp(netSelect, "NETWORK_auto"))

+    {

+        if (0 == strcmp(modeSelect, "LTE_TD_pre"))

         {

             *mode       = ZAT_SYSCONFIG_MODE_GSM_TD_LTE;

             *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_LTEPRE;

             return TRUE;

         }

-        else if(0 == strcmp(modeSelect, "TD_GSM_pre"))

+        else if (0 == strcmp(modeSelect, "TD_GSM_pre"))

         {

             *mode       = ZAT_SYSCONFIG_MODE_GSM_TD_LTE;

             *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_TDPRE;

             return TRUE;

         }

-		else if(0 == strcmp(modeSelect, "")) 

-        {        	

-			char auto_acqorder[50] = {0};

-        	

-			sc_cfg_get("auto_acqorder",auto_acqorder,sizeof(auto_acqorder));

+        else if (0 == strcmp(modeSelect, ""))

+        {

+            char auto_acqorder[50] = {0};

 

-			//Óû§Ñ¡Ôñ×Ô¶¯ËÑÍø£¬Ê¹ÓÃNV±£´æµÄÍøÂç½ÓÈë´ÎÐò£¬¸ÃNVÓ¦ÔÚ°æ±¾¿ª»úµÚÒ»´Î±£´æÆðÀ´ÁË

-			if(0 == strlen(auto_acqorder))

-			{

-				//softap_assert("");

-				at_print(AT_ERR,"normal_getsysconfigsetParam auto_acqorder null\n");

-			}

-			*mode       = ZAT_SYSCONFIG_MODE_AUTO;

+            sc_cfg_get("auto_acqorder", auto_acqorder, sizeof(auto_acqorder));

+

+            //Óû§Ñ¡Ôñ×Ô¶¯ËÑÍø£¬Ê¹ÓÃNV±£´æµÄÍøÂç½ÓÈë´ÎÐò£¬¸ÃNVÓ¦ÔÚ°æ±¾¿ª»úµÚÒ»´Î±£´æÆðÀ´ÁË

+            if (0 == strlen(auto_acqorder))

+            {

+                //softap_assert("");

+                at_print(AT_ERR, "normal_getsysconfigsetParam auto_acqorder null\n");

+            }

+            *mode       = ZAT_SYSCONFIG_MODE_AUTO;

             *acqOrder   = atoi(auto_acqorder);

 #if 0

-			if((strcmp("yes", needTds) == 0) && (strcmp("yes", needGsm) == 0))

-			{

-				*mode       = ZAT_SYSCONFIG_MODE_AUTO;

+            if ((strcmp("yes", needTds) == 0) && (strcmp("yes", needGsm) == 0))

+            {

+                *mode       = ZAT_SYSCONFIG_MODE_AUTO;

                 *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_AUTO;

-			}

-			else if(strcmp("yes", needGsm) == 0)

-			{

-				*mode       = ZAT_SYSCONFIG_MODE_W_GSM_LTE;

+            }

+            else if (strcmp("yes", needGsm) == 0)

+            {

+                *mode       = ZAT_SYSCONFIG_MODE_W_GSM_LTE;

                 *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_AUTO;

-			}

-			else if(strcmp("yes", needTds) == 0)

-			{

-				*mode       = ZAT_SYSCONFIG_MODE_TD_W_LTE;

+            }

+            else if (strcmp("yes", needTds) == 0)

+            {

+                *mode       = ZAT_SYSCONFIG_MODE_TD_W_LTE;

                 *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_AUTO;

-			}

-			else

-			{

-				*mode       = ZAT_SYSCONFIG_MODE_WCDMA_LTE;

+            }

+            else

+            {

+                *mode       = ZAT_SYSCONFIG_MODE_WCDMA_LTE;

                 *acqOrder   = ZAT_SYSCONFIG_PREF_ACQ_LTE_W_GSM;

-			}			

+            }

             return TRUE;

 #endif

         }

         else

         {

-            at_print(AT_DEBUG,"atBase_AtSysconfigSet Value Is not support!\n");

+            at_print(AT_DEBUG, "atBase_AtSysconfigSet Value Is not support!\n");

             return FALSE;

         }

     }

     else

     {

-        for(i = 0; i < tableSize; i++)

+        for (i = 0; i < tableSize; i++)

         {

-            if( 0 ==  strcmp(G_ZAT_SYSCONFIG_CFGPARA_SET[i].netselect, netSelect))

+            if ( 0 ==  strcmp(G_ZAT_SYSCONFIG_CFGPARA_SET[i].netselect, netSelect))

             {

                 *mode       = G_ZAT_SYSCONFIG_CFGPARA_SET[i].modeValue;

                 *acqOrder   = G_ZAT_SYSCONFIG_CFGPARA_SET[i].acqOrder;

-                

-                at_print(AT_DEBUG,"atBase_AtSysconfigSet:mode:%d/acqOrder:%d.\n",*mode,*acqOrder);

+

+                at_print(AT_DEBUG, "atBase_AtSysconfigSet:mode:%d/acqOrder:%d.\n", *mode, *acqOrder);

                 return TRUE;

             }

         }

-        at_print(AT_DEBUG,"atBase_AtSysconfigSet Error\n");

+        at_print(AT_DEBUG, "atBase_AtSysconfigSet Error\n");

         return FALSE;

     }

-	return FALSE;

+    return FALSE;

 }

 

 int normal_getauthtype(char* pAuthType)

 {

 

-	if(strcmp(PDP_AUTH_TYPE_PAP, pAuthType) == 0 || strcmp("PAP", pAuthType) == 0)

-	{

-		return PAP_AUTH;

-	}

-	else if(strcmp(PDP_AUTH_TYPE_CHAP, pAuthType) == 0 || strcmp("CHAP", pAuthType) == 0)

-	{

-		return CHAP_AUTH;

-	}

-	else if(strcmp(PDP_AUTH_TYPE_PAP_CHAP, pAuthType) == 0)

-	{

-		return PAP_CHAP_AUTH;

-	}

+    if (strcmp(PDP_AUTH_TYPE_PAP, pAuthType) == 0 || strcmp("PAP", pAuthType) == 0)

+    {

+        return PAP_AUTH;

+    }

+    else if (strcmp(PDP_AUTH_TYPE_CHAP, pAuthType) == 0 || strcmp("CHAP", pAuthType) == 0)

+    {

+        return CHAP_AUTH;

+    }

+    else if (strcmp(PDP_AUTH_TYPE_PAP_CHAP, pAuthType) == 0)

+    {

+        return PAP_CHAP_AUTH;

+    }

 

-	return NONE_AUTH;

+    return NONE_AUTH;

 }

 

 

@@ -1071,20 +1119,20 @@
 {

     static UINT32  iCount = 0;

     iCount++;

-    if(iCount%10 == 0)

+    if (iCount % 10 == 0)

     {

-        char csqDone[50]={0};

-        char networkType[50]={0};

-        sc_cfg_get(NV_CSQ_DONE,csqDone,sizeof(csqDone));

-        sc_cfg_get(NV_NETWORK_TYPE,networkType,sizeof(networkType));

-        if(0==strcmp("1",csqDone)&&strcmp("No Service",networkType))

-        {   

+        char csqDone[50] = {0};

+        char networkType[50] = {0};

+        sc_cfg_get(NV_CSQ_DONE, csqDone, sizeof(csqDone));

+        sc_cfg_get(NV_NETWORK_TYPE, networkType, sizeof(networkType));

+        if (0 == strcmp("1", csqDone) && strcmp("No Service", networkType))

+        {

             sc_cfg_set(NV_CSQ_DONE, "0");

-            if(0!=ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL,MSG_CMD_QUERY_CSQ_REQ, 0, NULL,04000))

+            if (0 != ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_CSQ_REQ, 0, NULL, 04000))

             {

                 sc_cfg_set(NV_CSQ_DONE, "1");

             }

-        }	

+        }

     }

     return ZUFI_NULL;

 }

@@ -1092,237 +1140,246 @@
 void normal_cfunOkSet()

 {

 #if(APP_OS_TYPE == APP_OS_TOS)

-	softap_assert("");

-#else 

+    softap_assert("");

+#else

     /*´´½¨¶¨Ê±PDPÔÚÏß¶¨Ê±Æ÷*/

     sc_timer_create(PdpTimerID,

-                        TIMER_FLAG_RESTART,

-                        PdpTimer_INTERVAL,

-                        normal_pdptimeractstart,

-                        NULL);

-#endif   

+                    TIMER_FLAG_RESTART,

+                    PdpTimer_INTERVAL,

+                    normal_pdptimeractstart,

+                    NULL);

+#endif

 }

 

 void* normal_copstimeractstart(VOID *arg)

 {

     static UINT32  iCount = 0;

     iCount++;

-    if(iCount>=2)

+    if (iCount >= 2)

     {

-        at_print(AT_DEBUG,"normal_copstimeractstart Timeout!\n");

+        at_print(AT_DEBUG, "normal_copstimeractstart Timeout!\n");

         struct at_context * context = context_head[NEAR_PS];

-        char at_str[AT_CMD_MAX]="AT\r\n";//¸ù¾Ýmsg_bufÉú³ÉatÖжÏÃüÁÍõÕ׷ḺÔð

-        for(;context;context = context->next)

+        char at_str[AT_CMD_MAX] = "AT\r\n"; //¸ù¾Ýmsg_bufÉú³ÉatÖжÏÃüÁÍõÕ׷ḺÔð

+        for (; context; context = context->next)

         {

-            if(context->context_type == AT_CLIENT && 0 == at_strcmp(context->at_cmd_prefix,"COPS=?"))

+            if (context->context_type == AT_CLIENT && 0 == at_strcmp(context->at_cmd_prefix, "COPS=?"))

             {

-                at_print(AT_DEBUG,"normal_copstimeractstart write AT!\n");

-                write(context->at_channel->at_fd,at_str, strlen(at_str));//for cov ¶¨Ê±Æ÷Àï²»ÄÜÓÐsleep

+                at_print(AT_DEBUG, "normal_copstimeractstart write AT!\n");

+                write(context->at_channel->at_fd, at_str, strlen(at_str)); //for cov ¶¨Ê±Æ÷Àï²»ÄÜÓÐsleep

                 //at_write(context->at_channel->at_fd,at_str, strlen(at_str));//·¢ËÍÖÕÖ¹at£¬ÍõÕ׷ḺÔðÌîд¾ßÌåµÄat_stlÈ¡ÏûÃüÁî

             }

         }

-        iCount=0;

+        iCount = 0;

     }

     return 0;

 }

 

 void normal_copstest_timerout(void *msg)

 {

-	//zdm º¯Êý¼´Ê¹²»²ÎÓëµ÷Óã¬Ò²»áÁ¬½Ó²»¹ý£¬ÐèÒªÇëÖ§³Ö°ïæ½â¾ö

-	#if (APP_OS_TYPE == APP_OS_LINUX)

+    //zdm º¯Êý¼´Ê¹²»²ÎÓëµ÷Óã¬Ò²»áÁ¬½Ó²»¹ý£¬ÐèÒªÇëÖ§³Ö°ïæ½â¾ö

+#if (APP_OS_TYPE == APP_OS_LINUX)

     /*AT+COPS=?¶¨Ê±Æ÷*/

     sc_timer_create(CopstestTimerID,

-                        TIMER_FLAG_RESTART,

-                        CopstestTimer_INTERVAL,

-                        normal_copstimeractstart,

-                        NULL);

-	#endif

+                    TIMER_FLAG_RESTART,

+                    CopstestTimer_INTERVAL,

+                    normal_copstimeractstart,

+                    NULL);

+#endif

 }

 

 void normal_getsignalbarinfo(T_zAt_SignalBarInfo* signalBarInfo, T_zAt_SignalBar_Type signalBarType)

 {

-	UINT8 tableSize = 0;

-	int i, prefixIndex = -1;

-	char signalBarName[30] = {0};

-	int signalBarVal[SIGNALBAR_NUM_MAX] = {0};

-	char strSigbar[10] = { 0 };	

-	       

-	prefixIndex = (int)	signalBarType; 	

-	tableSize = sizeof(suffixSignalBarNV) / 20;

-    at_print(AT_DEBUG,"atBase_GetSignalBarInfo enter, tableSize = %d, prefixIndex = %d!\n", tableSize, prefixIndex); 

+    UINT8 tableSize = 0;

+    int i, prefixIndex = -1;

+    char signalBarName[30] = {0};

+    int signalBarVal[SIGNALBAR_NUM_MAX] = {0};

+    char strSigbar[10] = { 0 };

+

+    prefixIndex = (int)	signalBarType;

+    tableSize = sizeof(suffixSignalBarNV) / 20;

+    at_print(AT_DEBUG, "atBase_GetSignalBarInfo enter, tableSize = %d, prefixIndex = %d!\n", tableSize, prefixIndex);

 #if 0  // kw 3 UNREACH.RETURN  

-    if(tableSize > SIGNALBAR_NUM_MAX)

-	{

-		return;

-	}

-#endif    

-	for(i = 0; i < tableSize; i++)

-	{

-		memset(strSigbar, 0, 10);

-		memset(signalBarName, 0, 30);

-		snprintf(signalBarName, 30, "%s%s", prefixSignalBarNV[prefixIndex], suffixSignalBarNV[i]);	

-			    

-		sc_cfg_get(signalBarName, strSigbar,sizeof(strSigbar));

-		if(strlen(strSigbar) > 0)

-		{

-			signalBarVal[i] = atoi(strSigbar);

-		}

-		else

-		{

-			signalBarVal[i] = -1;

-		}

-	}

-   signalBarInfo->signalbar0_low =  signalBarVal[0];

-   signalBarInfo->signalbar0_high = signalBarVal[1];

-   signalBarInfo->signalbar1_low =  signalBarVal[2];

-   signalBarInfo->signalbar1_high = signalBarVal[3];

-   signalBarInfo->signalbar2_low =  signalBarVal[4];

-   signalBarInfo->signalbar2_high = signalBarVal[5];

-   signalBarInfo->signalbar3_low =  signalBarVal[6];

-   signalBarInfo->signalbar3_high = signalBarVal[7];

-   signalBarInfo->signalbar4_low =  signalBarVal[8];

-   signalBarInfo->signalbar4_high = signalBarVal[9];

-   signalBarInfo->signalbar5_low =  signalBarVal[10];

-   signalBarInfo->signalbar5_high = signalBarVal[11];

+    if (tableSize > SIGNALBAR_NUM_MAX)

+    {

+        return;

+    }

+#endif

+    for (i = 0; i < tableSize; i++)

+    {

+        memset(strSigbar, 0, 10);

+        memset(signalBarName, 0, 30);

+        snprintf(signalBarName, 30, "%s%s", prefixSignalBarNV[prefixIndex], suffixSignalBarNV[i]);

+

+        sc_cfg_get(signalBarName, strSigbar, sizeof(strSigbar));

+        if (strlen(strSigbar) > 0)

+        {

+            signalBarVal[i] = atoi(strSigbar);

+        }

+        else

+        {

+            signalBarVal[i] = -1;

+        }

+    }

+    signalBarInfo->signalbar0_low =  signalBarVal[0];

+    signalBarInfo->signalbar0_high = signalBarVal[1];

+    signalBarInfo->signalbar1_low =  signalBarVal[2];

+    signalBarInfo->signalbar1_high = signalBarVal[3];

+    signalBarInfo->signalbar2_low =  signalBarVal[4];

+    signalBarInfo->signalbar2_high = signalBarVal[5];

+    signalBarInfo->signalbar3_low =  signalBarVal[6];

+    signalBarInfo->signalbar3_high = signalBarVal[7];

+    signalBarInfo->signalbar4_low =  signalBarVal[8];

+    signalBarInfo->signalbar4_high = signalBarVal[9];

+    signalBarInfo->signalbar5_low =  signalBarVal[10];

+    signalBarInfo->signalbar5_high = signalBarVal[11];

 }

 

 /**

 **                 RSSI < - 115dBm     1¸ñ(0-25)

 **  -115dBm <= RSSI < -108 dBm   2¸ñ(26-32)

-**  -108dBm <= RSSI < -102 dBm   3¸ñ(33-38)    

-**  -102dBm <= RSSI < -96 dBm     4¸ñ(39-44)    

-**  -96dBm <= RSSI                      5¸ñ(>=45)    

-**  

+**  -108dBm <= RSSI < -102 dBm   3¸ñ(33-38)

+**  -102dBm <= RSSI < -96 dBm     4¸ñ(39-44)

+**  -96dBm <= RSSI                      5¸ñ(>=45)

+**

 **/

 void normal_calcltesignalbar(long rssi)

 {

-	T_zAt_SignalBarInfo signalBarInfo = {0};

-	normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_LTE);

-    printf("atBase_CalcLteSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d,!\n", \

-		         signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low, signalBarInfo.signalbar1_high,signalBarInfo.signalbar2_low, \

-				 signalBarInfo.signalbar2_high,signalBarInfo.signalbar3_low,signalBarInfo.signalbar3_high,signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

-		         signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high); 

-	if((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

+    T_zAt_SignalBarInfo signalBarInfo = {0};

+    normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_LTE);

+    printf("atBase_CalcLteSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d,!\n",

+           \

+           signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low,

+           signalBarInfo.signalbar1_high, signalBarInfo.signalbar2_low, \

+           signalBarInfo.signalbar2_high, signalBarInfo.signalbar3_low, signalBarInfo.signalbar3_high,

+           signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

+           signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high);

+    if ((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

     {

         sc_cfg_set("signalbar", "0");

     }

-	else if((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

+    else if ((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

     {

         sc_cfg_set("signalbar", "1");

     }

-    else if((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

+    else if ((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

     {

         sc_cfg_set("signalbar", "2");

     }

-    else if((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

+    else if ((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

     {

         sc_cfg_set("signalbar", "3");

     }

-    else if((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

+    else if ((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

     {

         sc_cfg_set("signalbar", "4");

     }

-	else if(rssi==99)

+    else if (rssi == 99)

     {

-        normal_calcunknowsignalbar();	

+        normal_calcunknowsignalbar();

         return;

-    }		

+    }

     else

     {

         sc_cfg_set("signalbar", "5");

-    }   

+    }

 }

 

 /**

 **            RSSI <= -110dBm   0¸ñ(0-6)

 **  -110dBm < RSSI <= -104 dBm  1¸ñ(7-12)

-**  -104dBm < RSSI <= -98 dBm   2¸ñ(13-18)    

-**  -98dBm < RSSI <= -90 dBm    3¸ñ(19-26)    

-**  -90dBm < RSSI <= -80 dBm    4¸ñ(27-36)    

+**  -104dBm < RSSI <= -98 dBm   2¸ñ(13-18)

+**  -98dBm < RSSI <= -90 dBm    3¸ñ(19-26)

+**  -90dBm < RSSI <= -80 dBm    4¸ñ(27-36)

 **  -80dBm < RSSI               5¸ñ(>=37   )

 **/

 void normal_calctdsignalbar(long rssi)

 {

-	T_zAt_SignalBarInfo signalBarInfo = {0};

-	normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_TDS);

-    printf("atBase_CalcTdSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d!\n", \

-		         signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low, signalBarInfo.signalbar1_high,signalBarInfo.signalbar2_low, \

-				 signalBarInfo.signalbar2_high,signalBarInfo.signalbar3_low,signalBarInfo.signalbar3_high,signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

-		         signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high); 

-	if((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

+    T_zAt_SignalBarInfo signalBarInfo = {0};

+    normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_TDS);

+    printf("atBase_CalcTdSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d!\n",

+           \

+           signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low,

+           signalBarInfo.signalbar1_high, signalBarInfo.signalbar2_low, \

+           signalBarInfo.signalbar2_high, signalBarInfo.signalbar3_low, signalBarInfo.signalbar3_high,

+           signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

+           signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high);

+    if ((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

     {

         sc_cfg_set("signalbar", "0");

     }

-	else if((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

+    else if ((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

     {

         sc_cfg_set("signalbar", "1");

     }

-    else if((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

+    else if ((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

     {

         sc_cfg_set("signalbar", "2");

     }

-    else if((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

+    else if ((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

     {

         sc_cfg_set("signalbar", "3");

     }

-    else if((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

+    else if ((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

     {

         sc_cfg_set("signalbar", "4");

     }

-	else if(rssi==99)

+    else if (rssi == 99)

     {

-        normal_calcunknowsignalbar();	

+        normal_calcunknowsignalbar();

         return;

     }

     else

     {

         sc_cfg_set("signalbar", "5");

-    }  

+    }

 }

 

 /**

 **                 RSSI <= -110dBm   0¸ñ(0-1)

 **  -110dBm < RSSI <= -104 dBm  1¸ñ(2-4)

-**  -104dBm < RSSI <= -98 dBm   2¸ñ(5-7)    

-**  -98dBm < RSSI <= -90 dBm    3¸ñ(8-11)    

-**  -90dBm < RSSI <= -80 dBm    4¸ñ(12-16)    

+**  -104dBm < RSSI <= -98 dBm   2¸ñ(5-7)

+**  -98dBm < RSSI <= -90 dBm    3¸ñ(8-11)

+**  -90dBm < RSSI <= -80 dBm    4¸ñ(12-16)

 **  -80dBm < RSSI               5¸ñ(>=17   )

 **/

 void normal_calcothersignalbar(long rssi)

 {

-	T_zAt_SignalBarInfo signalBarInfo = {0};

+    T_zAt_SignalBarInfo signalBarInfo = {0};

 

-	normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_GSM);

-    printf("atBase_CalcOtherSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d,!\n", \

-		         signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low, signalBarInfo.signalbar1_high,signalBarInfo.signalbar2_low, \

-				 signalBarInfo.signalbar2_high,signalBarInfo.signalbar3_low,signalBarInfo.signalbar3_high,signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

-		         signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high); 

-    if(rssi==99)

+    normal_getsignalbarinfo(&signalBarInfo, ZAT_SIGNALBAR_TYPE_GSM);

+    printf("atBase_CalcOtherSignalBar: %d <= sigbar0 <= %d, %d <= sigbar1 <= %d, %d <= sigbar2 <= %d, %d <= sigbar3 <= %d,%d <= sigbar4 <= %d, %d <= sigbar5 <= %d,!\n",

+           \

+           signalBarInfo.signalbar0_low, signalBarInfo.signalbar0_high, signalBarInfo.signalbar1_low,

+           signalBarInfo.signalbar1_high, signalBarInfo.signalbar2_low, \

+           signalBarInfo.signalbar2_high, signalBarInfo.signalbar3_low, signalBarInfo.signalbar3_high,

+           signalBarInfo.signalbar4_low, signalBarInfo.signalbar4_high, \

+           signalBarInfo.signalbar5_low, signalBarInfo.signalbar5_high);

+    if (rssi == 99)

     {

-		normal_calcunknowsignalbar();			

+        normal_calcunknowsignalbar();

         return;

     }

-	if((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

+    if ((rssi >= signalBarInfo.signalbar0_low) && (rssi <= signalBarInfo.signalbar0_high))

     {

         sc_cfg_set("signalbar", "0");

     }

-	else if((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

+    else if ((rssi >= signalBarInfo.signalbar1_low) && (rssi <= signalBarInfo.signalbar1_high))

     {

         sc_cfg_set("signalbar", "1");

     }

-    else if((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

+    else if ((rssi >= signalBarInfo.signalbar2_low) && (rssi <= signalBarInfo.signalbar2_high))

     {

         sc_cfg_set("signalbar", "2");

     }

-    else if((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

+    else if ((rssi >= signalBarInfo.signalbar3_low) && (rssi <= signalBarInfo.signalbar3_high))

     {

         sc_cfg_set("signalbar", "3");

     }

-    else if((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

+    else if ((rssi >= signalBarInfo.signalbar4_low) && (rssi <= signalBarInfo.signalbar4_high))

     {

         sc_cfg_set("signalbar", "4");

     }

-    else if((rssi>=signalBarInfo.signalbar5_low) && (rssi<=signalBarInfo.signalbar5_high))

+    else if ((rssi >= signalBarInfo.signalbar5_low) && (rssi <= signalBarInfo.signalbar5_high))

     {

         sc_cfg_set("signalbar", "5");

     }

@@ -1331,209 +1388,210 @@
 void normal_calcunknowsignalbar(void)

 {

     char signalbar_99[30] = {0};

-    char netType[50]={0};

-    sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));

-    sc_cfg_get("signalbar_99", signalbar_99,sizeof(signalbar_99));

-    if(strcmp("0", signalbar_99) == 0)

+    char netType[50] = {0};

+    sc_cfg_get(NV_NETWORK_TYPE, netType, sizeof(netType));

+    sc_cfg_get("signalbar_99", signalbar_99, sizeof(signalbar_99));

+    if (strcmp("0", signalbar_99) == 0)

     {

         sc_cfg_set("signalbar", "0");

     }

     else if (g_zUfi_firstCsq

-            &&0!=strcmp("No Service",netType)

-            &&0!=strcmp("Limited Service",netType)

-            &&0!=strcmp(NETWORK_TYPE_INIT,netType))

+             && 0 != strcmp("No Service", netType)

+             && 0 != strcmp("Limited Service", netType)

+             && 0 != strcmp(NETWORK_TYPE_INIT, netType))

     {

         sc_cfg_set("signalbar", "3");

     }

 }

 

 void normal_calcsignalbar(T_zAt_SignalBar_Type signalBarType)

-{	

+{

     char netType[30] = {0};

     char strRssi[30] = { 0 };

     long  csq  = 0;

-    at_print(AT_DEBUG,"normal_calcsignalbar!\n");

+    at_print(AT_DEBUG, "normal_calcsignalbar!\n");

     UINT32 signalbar = 0;

     char oldSignalbar[10] = {0};

     char newSignalbar[10] = {0};

-    sc_cfg_get("signalbar",oldSignalbar,sizeof(oldSignalbar));

-    at_print(AT_DEBUG,"oldSignalbar=%s!\n",oldSignalbar);

-    

-    sc_cfg_get("csq",strRssi,sizeof(strRssi));

+    sc_cfg_get("signalbar", oldSignalbar, sizeof(oldSignalbar));

+    at_print(AT_DEBUG, "oldSignalbar=%s!\n", oldSignalbar);

+

+    sc_cfg_get("csq", strRssi, sizeof(strRssi));

     csq = atoi(strRssi);

-	if(csq < 0 || csq > INT_MAX-1) // kw 3

-	{

-	    csq = 0;

-	}

-    sc_cfg_get("network_type",netType,sizeof(netType));

-    if(signalBarType == ZAT_SIGNALBAR_TYPE_LTE)

+    if (csq < 0 || csq > INT_MAX - 1) // kw 3

+    {

+        csq = 0;

+    }

+    sc_cfg_get("network_type", netType, sizeof(netType));

+    if (signalBarType == ZAT_SIGNALBAR_TYPE_LTE)

     {

         normal_calcltesignalbar(csq - 100);

     }

-    else if(signalBarType == ZAT_SIGNALBAR_TYPE_WCDMA)

+    else if (signalBarType == ZAT_SIGNALBAR_TYPE_WCDMA)

     {

         normal_calctdsignalbar(csq - 100);

     }

-    else if(signalBarType == ZAT_SIGNALBAR_TYPE_TDS)

+    else if (signalBarType == ZAT_SIGNALBAR_TYPE_TDS)

     {

         normal_calctdsignalbar(csq - 100);

     }

-    else if(signalBarType == ZAT_SIGNALBAR_TYPE_GSM)

+    else if (signalBarType == ZAT_SIGNALBAR_TYPE_GSM)

     {

         normal_calcothersignalbar(csq);

     }

-    else if(signalBarType == ZAT_SIGNALBAR_TYPE_NONE)

+    else if (signalBarType == ZAT_SIGNALBAR_TYPE_NONE)

     {

-        if(csq == 99 || csq == 199)

+        if (csq == 99 || csq == 199)

         {

-            normal_calcunknowsignalbar();	

+            normal_calcunknowsignalbar();

         }

     }

-    sc_cfg_get("signalbar",newSignalbar,sizeof(newSignalbar));

-    at_print(AT_DEBUG,"newSignalbar=%s!\n",newSignalbar);

-    if(strcmp(newSignalbar, oldSignalbar))

+    sc_cfg_get("signalbar", newSignalbar, sizeof(newSignalbar));

+    at_print(AT_DEBUG, "newSignalbar=%s!\n", newSignalbar);

+    if (strcmp(newSignalbar, oldSignalbar))

     {

         signalbar = atoi(newSignalbar);

-    	if(signalbar > UINT_MAX-1)  // kw 3 cov M

-    	{

-    	    signalbar = UINT_MAX;

-    	}		

-        int result = ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MMI,MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar), (UINT8 *)&signalbar,0);

-        at_print(AT_DEBUG,"normal_calcsignalbar %d!\n", result);

+        if (signalbar > UINT_MAX - 1) // kw 3 cov M

+        {

+            signalbar = UINT_MAX;

+        }

+        int result = ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar),

+                                      (UINT8 *)&signalbar, 0);

+        at_print(AT_DEBUG, "normal_calcsignalbar %d!\n", result);

     }

 }

 

 void normal_calcltesignalstrength(long rssi)

 {

-	CHAR rssi_buf[20] = {0};

-	int dbm_val = 0;

-	if(0 == rssi)

+    CHAR rssi_buf[20] = {0};

+    int dbm_val = 0;

+    if (0 == rssi)

     {

-        snprintf(rssi_buf, 20, "%s", "<-140");		

+        snprintf(rssi_buf, 20, "%s", "<-140");

     }

-	else if(97 == rssi)

-	{

-		snprintf(rssi_buf, 20, "%s", ">=-44");

-	}

-	else if(99 == rssi)

-	{

-       return;

-	}

-	else if((rssi > 0) && (rssi < 97))

-	{

-		dbm_val = 141 - rssi;

-		snprintf(rssi_buf, 20, "-%d", dbm_val);

-	}

-	sc_cfg_set("lte_rsrp", rssi_buf);

-	sc_cfg_set("rssi", rssi_buf);

+    else if (97 == rssi)

+    {

+        snprintf(rssi_buf, 20, "%s", ">=-44");

+    }

+    else if (99 == rssi)

+    {

+        return;

+    }

+    else if ((rssi > 0) && (rssi < 97))

+    {

+        dbm_val = 141 - rssi;

+        snprintf(rssi_buf, 20, "-%d", dbm_val);

+    }

+    sc_cfg_set("lte_rsrp", rssi_buf);

+    sc_cfg_set("rssi", rssi_buf);

 }

 

 void normal_calctdsignalstrength(long rssi)

 {

-	char rssi_buf[20] = {0};

-	int dbm_val = 0;

-	if(0 == rssi)

+    char rssi_buf[20] = {0};

+    int dbm_val = 0;

+    if (0 == rssi)

     {

-        snprintf(rssi_buf, 20, "%s", "<-115");		

+        snprintf(rssi_buf, 20, "%s", "<-115");

     }

-	else if(91 == rssi)

-	{

-		snprintf(rssi_buf, 20, "%s", ">=-25");

-	}

-	else if(99 == rssi)

-	{

-       return;

-	}

-	else if((rssi > 0) && (rssi < 91))

-	{

-		dbm_val = 116 - rssi;

-		snprintf(rssi_buf, 20, "-%d", dbm_val);

-	}

-	sc_cfg_set("rscp", rssi_buf);

-	sc_cfg_set("rssi", rssi_buf);

-	sc_cfg_set("lte_rsrp", "");

+    else if (91 == rssi)

+    {

+        snprintf(rssi_buf, 20, "%s", ">=-25");

+    }

+    else if (99 == rssi)

+    {

+        return;

+    }

+    else if ((rssi > 0) && (rssi < 91))

+    {

+        dbm_val = 116 - rssi;

+        snprintf(rssi_buf, 20, "-%d", dbm_val);

+    }

+    sc_cfg_set("rscp", rssi_buf);

+    sc_cfg_set("rssi", rssi_buf);

+    sc_cfg_set("lte_rsrp", "");

 }

 

 void normal_calcothersignalstrength(long rssi)

 {

-	char rssi_buf[20] = {0};

-	int dbm_val = 0;

-	if(0 == rssi)

+    char rssi_buf[20] = {0};

+    int dbm_val = 0;

+    if (0 == rssi)

     {

-        snprintf(rssi_buf, 20, "%s", "<=-113");		

+        snprintf(rssi_buf, 20, "%s", "<=-113");

     }

-	else if(31 == rssi)

-	{

-		snprintf(rssi_buf, 20, "%s", ">=-51");

-	}

-	else if(99 == rssi)

-	{

-       return;

-	}

-	else if((rssi > 0) && (rssi < 31))

-	{

-		dbm_val = 113 - 2*rssi;

-		snprintf(rssi_buf, 20, "-%d", dbm_val);

-	}

-	sc_cfg_set("rssi", rssi_buf);

-	sc_cfg_set("lte_rsrp", "");

+    else if (31 == rssi)

+    {

+        snprintf(rssi_buf, 20, "%s", ">=-51");

+    }

+    else if (99 == rssi)

+    {

+        return;

+    }

+    else if ((rssi > 0) && (rssi < 31))

+    {

+        dbm_val = 113 - 2 * rssi;

+        snprintf(rssi_buf, 20, "-%d", dbm_val);

+    }

+    sc_cfg_set("rssi", rssi_buf);

+    sc_cfg_set("lte_rsrp", "");

 }

 

 void normal_calcsignalstrength(T_zAt_SignalBar_Type signalBarType, long  rssi)

-{	

-	if(signalBarType == ZAT_SIGNALBAR_TYPE_LTE)

-	{

-		normal_calcltesignalstrength(rssi - 100);

-	}

-    else if((signalBarType == ZAT_SIGNALBAR_TYPE_WCDMA) || (signalBarType == ZAT_SIGNALBAR_TYPE_TDS))

+{

+    if (signalBarType == ZAT_SIGNALBAR_TYPE_LTE)

+    {

+        normal_calcltesignalstrength(rssi - 100);

+    }

+    else if ((signalBarType == ZAT_SIGNALBAR_TYPE_WCDMA) || (signalBarType == ZAT_SIGNALBAR_TYPE_TDS))

     {

         normal_calctdsignalstrength(rssi - 100);

-	}

-	else if(signalBarType == ZAT_SIGNALBAR_TYPE_GSM)

-	{

-		normal_calcothersignalstrength(rssi);

-	}

+    }

+    else if (signalBarType == ZAT_SIGNALBAR_TYPE_GSM)

+    {

+        normal_calcothersignalstrength(rssi);

+    }

 }

 

 VOID normal_sysinfosysmodecfgset(long sysModeIn, long sysSubModeIn)

 {

     UINT32 i            =   0;

-    UINT32 tableSize = sizeof(G_ZAT_SYSINFO_SET_NETTYPE)/sizeof(T_zAt_SysInfoSetNetType);

+    UINT32 tableSize = sizeof(G_ZAT_SYSINFO_SET_NETTYPE) / sizeof(T_zAt_SysInfoSetNetType);

 

-	for(i = 0; i < tableSize; i++)

+    for (i = 0; i < tableSize; i++)

     {

-        if(G_ZAT_SYSINFO_SET_NETTYPE[i].sysmode == sysModeIn)

+        if (G_ZAT_SYSINFO_SET_NETTYPE[i].sysmode == sysModeIn)

         {

-            sc_cfg_set(NV_NETWORK_TYPE,G_ZAT_SYSINFO_SET_NETTYPE[i].netType);

+            sc_cfg_set(NV_NETWORK_TYPE, G_ZAT_SYSINFO_SET_NETTYPE[i].netType);

         }

     }

-	

-	tableSize = sizeof(G_ZAT_SYSINFO_SET_SUBNETTYPE)/sizeof(T_zAt_SysInfoSetNetType);

-	for(i = 0; i < tableSize; i++)

+

+    tableSize = sizeof(G_ZAT_SYSINFO_SET_SUBNETTYPE) / sizeof(T_zAt_SysInfoSetNetType);

+    for (i = 0; i < tableSize; i++)

     {

-        if(G_ZAT_SYSINFO_SET_SUBNETTYPE[i].sysmode == sysSubModeIn)

+        if (G_ZAT_SYSINFO_SET_SUBNETTYPE[i].sysmode == sysSubModeIn)

         {

-            sc_cfg_set(NV_SUB_NETWORK_TYPE,G_ZAT_SYSINFO_SET_SUBNETTYPE[i].netType);

+            sc_cfg_set(NV_SUB_NETWORK_TYPE, G_ZAT_SYSINFO_SET_SUBNETTYPE[i].netType);

         }

     }

-	

-	return;

+

+    return;

 }

 

-VOID normal_sysinfonetworktypeSet(long sysMode,long sysSubmode)

+VOID normal_sysinfonetworktypeSet(long sysMode, long sysSubmode)

 {

     UINT32 i            =   0;

-    UINT32 tableSize = sizeof(G_ZAT_SYSINFO_CMCC_NETTYPE)/sizeof(T_zAt_SysInfoSetNetType);

-    if(sysMode==ZAT_SYSINFORES_SYSMODE_GSM && sysSubmode==3)

+    UINT32 tableSize = sizeof(G_ZAT_SYSINFO_CMCC_NETTYPE) / sizeof(T_zAt_SysInfoSetNetType);

+    if (sysMode == ZAT_SYSINFORES_SYSMODE_GSM && sysSubmode == 3)

     {

-        sc_cfg_set(NV_NETWORK_TYPE,"E");

+        sc_cfg_set(NV_NETWORK_TYPE, "E");

         return;

     }

-    for(i = 0; i < tableSize; i++)

+    for (i = 0; i < tableSize; i++)

     {

-        if(G_ZAT_SYSINFO_CMCC_NETTYPE[i].sysmode == sysMode)

+        if (G_ZAT_SYSINFO_CMCC_NETTYPE[i].sysmode == sysMode)

         {

-            sc_cfg_set(NV_NETWORK_TYPE,G_ZAT_SYSINFO_CMCC_NETTYPE[i].netType);

+            sc_cfg_set(NV_NETWORK_TYPE, G_ZAT_SYSINFO_CMCC_NETTYPE[i].netType);

         }

     }

 }

@@ -1541,28 +1599,28 @@
 long normal_isroam(char *sim_plmn, char *net_plmn)

 {

     char sql[128] = {0};

-	int lcount = 0;

+    int lcount = 0;

     int result = DB_OK;

-	

-    if(ZUFI_NULL == sim_plmn || ZUFI_NULL == net_plmn)

+

+    if (ZUFI_NULL == sim_plmn || ZUFI_NULL == net_plmn)

     {

-		at_print(AT_DEBUG,"atBase_IsRoam paraments error !\n"); 

+        at_print(AT_DEBUG, "atBase_IsRoam paraments error !\n");

         return -1;

     }

 

-    snprintf(sql,128-1,"select count(*) from roam_list where sim_plmn=\'%s\' and net_plmn=\'%s\'", sim_plmn, net_plmn);

+    snprintf(sql, 128 - 1, "select count(*) from roam_list where sim_plmn=\'%s\' and net_plmn=\'%s\'", sim_plmn, net_plmn);

     result = normal_execdbsql(ZROAM_DB_PATH, sql, normal_count_callback, &lcount);

-    if(DB_OK != result)

+    if (DB_OK != result)

     {

-        at_print(AT_DEBUG,"atBase_IsRoam error:%d !\n", result); 

+        at_print(AT_DEBUG, "atBase_IsRoam error:%d !\n", result);

         return -1;

     }

-    if(lcount > 0)

+    if (lcount > 0)

     {

-        at_print(AT_DEBUG,"atBase_IsRoam succ:%d !\n", lcount); 

-		return 0;

-	}

-	at_print(AT_DEBUG,"atBase_IsRoam not int list:%d, sim_plmn:%s, net_plmn:%s !\n", lcount, sim_plmn, net_plmn); 

+        at_print(AT_DEBUG, "atBase_IsRoam succ:%d !\n", lcount);

+        return 0;

+    }

+    at_print(AT_DEBUG, "atBase_IsRoam not int list:%d, sim_plmn:%s, net_plmn:%s !\n", lcount, sim_plmn, net_plmn);

     return -1;

 }

 

@@ -1570,107 +1628,107 @@
 {

     char imcc[10] = {0};

     char imnc[10] = {0};

-	char checkRoam[10] = {0};

-	char sim_plmn[10] = {0};

-	char net_plmn[10] = {0};

+    char checkRoam[10] = {0};

+    char sim_plmn[10] = {0};

+    char net_plmn[10] = {0};

 

-    sc_cfg_get("check_roam", checkRoam,sizeof(checkRoam));

-	sc_cfg_get("mcc", imcc,sizeof(imcc));

-	sc_cfg_get("mnc", imnc,sizeof(imnc));

-	if(0 == strcmp("yes", checkRoam))

-	{

-	    snprintf(sim_plmn, 10-1, "%s%s", mcc, mnc);

-	    snprintf(net_plmn, 10-1, "%s%s", imcc, imnc);

-		

-		if(normal_isroam(sim_plmn, net_plmn) == 0)

-		{

-			return TRUE;

-		}

+    sc_cfg_get("check_roam", checkRoam, sizeof(checkRoam));

+    sc_cfg_get("mcc", imcc, sizeof(imcc));

+    sc_cfg_get("mnc", imnc, sizeof(imnc));

+    if (0 == strcmp("yes", checkRoam))

+    {

+        snprintf(sim_plmn, 10 - 1, "%s%s", mcc, mnc);

+        snprintf(net_plmn, 10 - 1, "%s%s", imcc, imnc);

 

-		return FALSE;

-	}

-	else

-	{

-		return FALSE;

-	}	

+        if (normal_isroam(sim_plmn, net_plmn) == 0)

+        {

+            return TRUE;

+        }

+

+        return FALSE;

+    }

+    else

+    {

+        return FALSE;

+    }

 

 }

 

 VOID normal_simcardcfgreset()

 {

-	sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_undetected");

+    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_undetected");

     sc_cfg_set("lte_pci", "");

-	sc_cfg_set("lte_earfcn", "");

-	sc_cfg_set("lte_rsrp", "");

-	sc_cfg_set("lte_sinr", "");

-	sc_cfg_set("sim_zpbic_status","no_card");

-	sc_cfg_set(NV_MSISDN,"");

-	sc_cfg_set(NV_SIMCARD_TYPE,"");

-	sc_cfg_set(NV_IMEI, "");

-	sc_cfg_set(NV_OPER_NUM, "");

-	sc_cfg_set(NV_PDP_STATUS, "0");

+    sc_cfg_set("lte_earfcn", "");

+    sc_cfg_set("lte_rsrp", "");

+    sc_cfg_set("lte_sinr", "");

+    sc_cfg_set("sim_zpbic_status", "no_card");

+    sc_cfg_set(NV_MSISDN, "");

+    sc_cfg_set(NV_SIMCARD_TYPE, "");

+    sc_cfg_set(NV_IMEI, "");

+    sc_cfg_set(NV_OPER_NUM, "");

+    sc_cfg_set(NV_PDP_STATUS, "0");

     sc_cfg_set(NV_NETWORK_PROVIDER, "");

     sc_cfg_set(NV_NETWORK_TYPE, "");

-	sc_cfg_set(NV_SUB_NETWORK_TYPE, "");

+    sc_cfg_set(NV_SUB_NETWORK_TYPE, "");

     sc_cfg_set(NV_SIMCARD_ROAM, "");

     sc_cfg_set(NV_CSQ, "");

     sc_cfg_set(NV_RSSI, "");

     sc_cfg_set(NV_ECIO, "");

-    sc_cfg_set(NV_LAC_CODE,"");

-    sc_cfg_set(NV_CELL_ID,"");

+    sc_cfg_set(NV_LAC_CODE, "");

+    sc_cfg_set(NV_CELL_ID, "");

     sc_cfg_set(NV_WAN_IPADDR, "0.0.0.0");

-    sc_cfg_set(NV_WAN_NETMASK,"0.0.0.0");

-    sc_cfg_set(NV_WAN_GATEWAY,"0.0.0.0");

+    sc_cfg_set(NV_WAN_NETMASK, "0.0.0.0");

+    sc_cfg_set(NV_WAN_GATEWAY, "0.0.0.0");

     sc_cfg_set(NV_PREFER_DNS_AUTO, "0.0.0.0");

     sc_cfg_set(NV_STANDBY_DNS_AUTO, "0.0.0.0");

     sc_cfg_set(NV_SIM_PIN, "0");

     sc_cfg_set(NV_SIM_PUK, "0");

-    sc_cfg_set(NV_PIN_MANAGE_RESULT,"");

-    sc_cfg_set(NV_PINNUMBER,"3");

-    sc_cfg_set(NV_PUKNUMBER,"10");

-    sc_cfg_set(NV_PIN_STATUS,"");

-    sc_cfg_set(NV_PIN_PUK_PROCESS,"");

-    sc_cfg_set(NV_PIN_MANAGE_PROCESS,"");

-    sc_cfg_set(NV_UNLOCK_AT_WAIT,"0");

-    sc_cfg_set(NV_SIM_SPN,"");

-    sc_cfg_set(NV_SEND_PIN_FLAG,"0"); //0:±íʾ±£´æµÄPINÂëûÓз¢ËÍ  £¬1±íʾÒѾ­·¢ËÍ

-    sc_cfg_set(NV_MCC,"");

-    sc_cfg_set(NV_MNC,"");

-    sc_cfg_set(NV_LOCK_UI,"" );

-    sc_cfg_set(NV_ACTION,"");

-    sc_cfg_set(NV_UARFCN,"");

-    sc_cfg_set(NV_CELLPARAID,"");

-    sc_cfg_set(NV_BANDLOCKSET,"");

-    sc_cfg_set(NV_BANDLOCKSTATE,"UnLocked");

-    sc_cfg_set(NV_PPP_DIAL,"");

-    sc_cfg_set(NV_ZCELL_RESULT,"");

+    sc_cfg_set(NV_PIN_MANAGE_RESULT, "");

+    sc_cfg_set(NV_PINNUMBER, "3");

+    sc_cfg_set(NV_PUKNUMBER, "10");

+    sc_cfg_set(NV_PIN_STATUS, "");

+    sc_cfg_set(NV_PIN_PUK_PROCESS, "");

+    sc_cfg_set(NV_PIN_MANAGE_PROCESS, "");

+    sc_cfg_set(NV_UNLOCK_AT_WAIT, "0");

+    sc_cfg_set(NV_SIM_SPN, "");

+    sc_cfg_set(NV_SEND_PIN_FLAG, "0"); //0:±íʾ±£´æµÄPINÂëûÓз¢ËÍ  £¬1±íʾÒѾ­·¢ËÍ

+    sc_cfg_set(NV_MCC, "");

+    sc_cfg_set(NV_MNC, "");

+    sc_cfg_set(NV_LOCK_UI, "" );

+    sc_cfg_set(NV_ACTION, "");

+    sc_cfg_set(NV_UARFCN, "");

+    sc_cfg_set(NV_CELLPARAID, "");

+    sc_cfg_set(NV_BANDLOCKSET, "");

+    sc_cfg_set(NV_BANDLOCKSTATE, "UnLocked");

+    sc_cfg_set(NV_PPP_DIAL, "");

+    sc_cfg_set(NV_ZCELL_RESULT, "");

     sc_cfg_set(NV_ZCONSTAT_UP_RESULT, "");

     sc_cfg_set(NV_CGATT_SET_RESULT, "");

-    sc_cfg_set(NV_ZGIPDNS_RESULT_DEFAULTCID,"0");

-    sc_cfg_set(NV_ZGIPDNS_RESULT_PPPDCID,"0");

-	sc_cfg_set(NV_ZGACT_RESULT_DEFAULTCID,"0");

-	sc_cfg_set(NV_ZGACT_RESULT_PPPDCID,"0");

-    sc_cfg_set(NV_RESETMODEM,"");

-    sc_cfg_set(NV_SIGNALBAR,"");// ÇåÁ㣬·ÀÖ¹²»²åsim¿¨ÖØÆôºó»¹ÓÐÐźŸñÊý

+    sc_cfg_set(NV_ZGIPDNS_RESULT_DEFAULTCID, "0");

+    sc_cfg_set(NV_ZGIPDNS_RESULT_PPPDCID, "0");

+    sc_cfg_set(NV_ZGACT_RESULT_DEFAULTCID, "0");

+    sc_cfg_set(NV_ZGACT_RESULT_PPPDCID, "0");

+    sc_cfg_set(NV_RESETMODEM, "");

+    sc_cfg_set(NV_SIGNALBAR, ""); // ÇåÁ㣬·ÀÖ¹²»²åsim¿¨ÖØÆôºó»¹ÓÐÐźŸñÊý

     //sc_cfg_set(NV_AUTO_RECONNECT,"");//·ÀÖ¹×Ô¶¯²¦ºÅʧ°Ü

-    sc_cfg_set(NV_IPV6_WAN_IPADDR,"");

-    sc_cfg_set(NV_IPV6_WAN_DEFAULT_GW_ADDR,"");

-    sc_cfg_set(NV_IPV6_PREFER_DNS_AUTO,"");

-    sc_cfg_set(NV_IPV6_STANDBY_DNS_AUTO,"");

-    sc_cfg_set(NV_CFUN_STATE,"1");

+    sc_cfg_set(NV_IPV6_WAN_IPADDR, "");

+    sc_cfg_set(NV_IPV6_WAN_DEFAULT_GW_ADDR, "");

+    sc_cfg_set(NV_IPV6_PREFER_DNS_AUTO, "");

+    sc_cfg_set(NV_IPV6_STANDBY_DNS_AUTO, "");

+    sc_cfg_set(NV_CFUN_STATE, "1");

     sc_cfg_set(NV_CSQ_DONE, "1");

-    //sc_cfg_set(NV_SD_CARD_STATE,"0");	

+    //sc_cfg_set(NV_SD_CARD_STATE,"0");

     sc_cfg_set(NV_SIM_IMSI, "");

-    sc_cfg_set(NV_SIM_ICCID,"");

-	sc_cfg_set(NV_ZICCID,"");

+    sc_cfg_set(NV_SIM_ICCID, "");

+    sc_cfg_set(NV_ZICCID, "");

     sc_cfg_set(NV_M_NETSELECT_MODE, "0");

     sc_cfg_set(NV_SYS_MODE, "");

     sc_cfg_set(NV_SYS_SUBMODE, "");

     sc_cfg_set(NV_DAIL_STEP, "1");

 

     sc_cfg_set(LOCK_CELL_STATE_FLAG, "0");

-    sc_cfg_set("ussd_cancel_flag","no");//ussd

-	

+    sc_cfg_set("ussd_cancel_flag", "no"); //ussd

+

 }

 

 char *normal_findsubstr(const char *pStr, const char *pSubStr)

@@ -1680,7 +1738,7 @@
     long  nLengthStr = 0;

     long  nLengthSubStr = 0;

     const char *pchTemp = ZUFI_NULL;

-    

+

     /* È¡µÃÁ½¸ö×Ö·û´®µÄ³¤¶È */

     nLengthStr      = (long)strlen(pStr);

     nLengthSubStr   = (long)strlen(pSubStr);

@@ -1716,21 +1774,23 @@
 }

 

 /*Ô¤´¦Àí*/

-VOID normal_preprocresparalineex(char *pParaLine,int paraSize)

+VOID normal_preprocresparalineex(char *pParaLine, int paraSize)

 {

     UINT32 i = 0;

     UINT32 length = 0;

     char *pSource = ZUFI_NULL;

     char *pDest = ZUFI_NULL;

     char strDestLine[AT_CMD_MAX] = {0};

-	

+

     if (AT_CMD_MAX <= strlen(pParaLine)) /* ²ÎÊý¼ì²é ¡¢³¤¶È¼ì²é*/

     {

-    	softap_assert("");

+        softap_assert("");

         return;

     }

-	if(0 == strlen(pParaLine))

-		return;

+    if (0 == strlen(pParaLine))

+    {

+        return;

+    }

     length = (UINT32)strlen(pParaLine);

     pSource = pParaLine;                /* Ñ­»·´¦Àí */

     pDest = strDestLine;

@@ -1758,7 +1818,7 @@
     }

     /* ½«Ô¤´¦ÀíºóµÄÄÚÈÝ¿½±´»Ø²ÎÊýÐÐÖÐ */

     memset(pParaLine, 0, paraSize);

-    strncpy(pParaLine, strDestLine,paraSize-1);

+    strncpy(pParaLine, strDestLine, paraSize - 1);

 }

 

 /*Ô¤´¦Àí*/

@@ -1767,15 +1827,15 @@
     long i = 0;

     char *pHead = ZUFI_NULL;

     char *pEnd = ZUFI_NULL;

-	

-	if(!at_strcmp(pParas, "OK"))

-	{

-		pParaList->listCount = 0;

-		return;

-	}

-	

+

+    if (!at_strcmp(pParas, "OK"))

+    {

+        pParaList->listCount = 0;

+        return;

+    }

+

     /* Ñ­»·²éÕÒ';' */

-	

+

     pHead = pEnd = (char *) pParas;

     pEnd = normal_findsubstr(pHead, ";");

     while (pEnd != ZUFI_NULL)

@@ -1783,7 +1843,7 @@
         /* ÕÒµ½';' */

         /* Ô½½ç±£»¤ */

         if ((pParaList->listCount >= ZAT_RES_PARAM_MAX_NUM)

-            || (pEnd - pHead >= ZAT_RES_PARAM_MAX_LEN))

+                || (pEnd - pHead >= ZAT_RES_PARAM_MAX_LEN))

         {

             return;

         }

@@ -1794,10 +1854,10 @@
         pHead = pEnd + 1;

         pEnd = normal_findsubstr(pHead, ";");// yx  new  add  2013-5-20

     }

-	

+

     if ((strlen(pHead) != 0) && (pParaList->listCount < ZAT_RES_PARAM_MAX_NUM))

     {

-        strncpy(pParaList->strParasLine[i], pHead,ZAT_RES_PARAM_MAX_LEN-1);

+        strncpy(pParaList->strParasLine[i], pHead, ZAT_RES_PARAM_MAX_LEN - 1);

         pParaList->listCount++;

     }

 }

@@ -1805,131 +1865,132 @@
 //cops=?ÃüÁîÉϱ¨½á¹û´¦Àí

 VOID normal_recvcopstestrsp(char *at_paras)

 {

-	UINT32 listIndex = 0;

-	UINT32 copsIndex = 0;

-	T_zAt_CopsTestRes		 tPara		 = {0};

-	T_zAt_RES_PARAS_LIST	tParasList	= {0};

-	const char *pCopHeader = NULL;

-	char *pCopEnd = NULL;

-	int len = 0;

-			

-	pCopHeader = at_paras;

-	pCopEnd = normal_findsubstr(pCopHeader, ",,");

-	{

-		char copsContent[AT_CMD_MAX] = {0};

-		if(pCopEnd == NULL)

-		{

-			strncpy(copsContent, at_paras,sizeof(copsContent)-1);

-		}

-		else

-		{

-		    if(pCopEnd - pCopHeader >= sizeof(copsContent))

-			{

-			    len = sizeof(copsContent)-1;

-			}

-		    else

-			{

-			    len = pCopEnd - pCopHeader;

-			}

-			snprintf(copsContent,len+1,"%s",at_paras);

-			//strncpy(copsContent, at_paras, len);

-		}

-		

-		normal_preprocresparalineex(copsContent,sizeof(copsContent));			   /* Ô¤´¦Àí¸´ÔÓ²ÎÊýÐÐ */

-		normal_preprocresparalist(&tParasList, copsContent);   /* Ô¤´¦Àí²ÎÊýÁÐ±í   */

-	}

-	{

-		char operatorInfo[256]	= {0};

-		char copsList[512] = {0};

-		char copsList_tmp[512] = {0};

-		for(listIndex = 0; listIndex < tParasList.listCount; listIndex++)

-		{	

-			void *p[6] = {&tPara.oplist[copsIndex].stat,tPara.oplist[copsIndex].lalphaOper,tPara.oplist[copsIndex].salphaOper,

-					tPara.oplist[copsIndex].numericOper,&tPara.oplist[copsIndex].netType,&tPara.oplist[copsIndex].subType};

-			at_print(AT_DEBUG,"normal_recvcopstestrsp at_paras=%s!\n",tParasList.strParasLine[listIndex]);

-		    parse_param2("%d,%s,%s,%s,%d,%d", tParasList.strParasLine[listIndex], p);

-		    at_print(AT_DEBUG,"normal_recvcopstestrsp stat=%d,lalphaOper=%s,salphaOper=%s,numericOper=%s,netType=%d,subType=%d!\n",

-		    tPara.oplist[copsIndex].stat,tPara.oplist[copsIndex].lalphaOper,tPara.oplist[copsIndex].salphaOper,

-			tPara.oplist[copsIndex].numericOper,tPara.oplist[copsIndex].netType,tPara.oplist[copsIndex].subType);  

-			

-			if(0 == tPara.oplist[copsIndex].stat && 0 ==strcmp("", tPara.oplist[copsIndex].numericOper))

-			{

-				continue;

-			}

-			snprintf(operatorInfo, sizeof(operatorInfo), "%d,%s,%s,%d,%d", 

-				tPara.oplist[copsIndex].stat, tPara.oplist[copsIndex].salphaOper, 

-				tPara.oplist[copsIndex].numericOper, tPara.oplist[copsIndex].netType, tPara.oplist[copsIndex].subType);

-			if(0 == copsIndex)

-			{

-				snprintf(copsList,sizeof(copsList),"%s", operatorInfo);	

-			}

-			else

-			{

-				memcpy(copsList_tmp,copsList,sizeof(copsList_tmp));

-				snprintf(copsList,sizeof(copsList),"%s;%s", copsList_tmp ,operatorInfo); 

-			}

-		    copsIndex++;

-		}

-		char strValue[20] = {0};

-		snprintf(strValue,sizeof(strValue), "%ld", copsIndex);

-		sc_cfg_set(NV_NET_NUM, strValue);

-		sc_cfg_set(NV_M_NETSELECT_CONTENTS, copsList);

-		sc_cfg_set(NV_M_NETSELECT_STATUS, "manual_selected");

-	}

+    UINT32 listIndex = 0;

+    UINT32 copsIndex = 0;

+    T_zAt_CopsTestRes		 tPara		 = {0};

+    T_zAt_RES_PARAS_LIST	tParasList	= {0};

+    const char *pCopHeader = NULL;

+    char *pCopEnd = NULL;

+    int len = 0;

+

+    pCopHeader = at_paras;

+    pCopEnd = normal_findsubstr(pCopHeader, ",,");

+    {

+        char copsContent[AT_CMD_MAX] = {0};

+        if (pCopEnd == NULL)

+        {

+            strncpy(copsContent, at_paras, sizeof(copsContent) - 1);

+        }

+        else

+        {

+            if (pCopEnd - pCopHeader >= sizeof(copsContent))

+            {

+                len = sizeof(copsContent) - 1;

+            }

+            else

+            {

+                len = pCopEnd - pCopHeader;

+            }

+            snprintf(copsContent, len + 1, "%s", at_paras);

+            //strncpy(copsContent, at_paras, len);

+        }

+

+        normal_preprocresparalineex(copsContent, sizeof(copsContent));			  /* Ô¤´¦Àí¸´ÔÓ²ÎÊýÐÐ */

+        normal_preprocresparalist(&tParasList, copsContent);   /* Ô¤´¦Àí²ÎÊýÁÐ±í   */

+    }

+    {

+        char operatorInfo[256]	= {0};

+        char copsList[512] = {0};

+        char copsList_tmp[512] = {0};

+        for (listIndex = 0; listIndex < tParasList.listCount; listIndex++)

+        {

+            void *p[6] = {&tPara.oplist[copsIndex].stat, tPara.oplist[copsIndex].lalphaOper, tPara.oplist[copsIndex].salphaOper,

+                          tPara.oplist[copsIndex].numericOper, &tPara.oplist[copsIndex].netType, &tPara.oplist[copsIndex].subType

+                         };

+            at_print(AT_DEBUG, "normal_recvcopstestrsp at_paras=%s!\n", tParasList.strParasLine[listIndex]);

+            parse_param2("%d,%s,%s,%s,%d,%d", tParasList.strParasLine[listIndex], p);

+            at_print(AT_DEBUG, "normal_recvcopstestrsp stat=%d,lalphaOper=%s,salphaOper=%s,numericOper=%s,netType=%d,subType=%d!\n",

+                     tPara.oplist[copsIndex].stat, tPara.oplist[copsIndex].lalphaOper, tPara.oplist[copsIndex].salphaOper,

+                     tPara.oplist[copsIndex].numericOper, tPara.oplist[copsIndex].netType, tPara.oplist[copsIndex].subType);

+

+            if (0 == tPara.oplist[copsIndex].stat && 0 == strcmp("", tPara.oplist[copsIndex].numericOper))

+            {

+                continue;

+            }

+            snprintf(operatorInfo, sizeof(operatorInfo), "%d,%s,%s,%d,%d",

+                     tPara.oplist[copsIndex].stat, tPara.oplist[copsIndex].salphaOper,

+                     tPara.oplist[copsIndex].numericOper, tPara.oplist[copsIndex].netType, tPara.oplist[copsIndex].subType);

+            if (0 == copsIndex)

+            {

+                snprintf(copsList, sizeof(copsList), "%s", operatorInfo);

+            }

+            else

+            {

+                memcpy(copsList_tmp, copsList, sizeof(copsList_tmp));

+                snprintf(copsList, sizeof(copsList), "%s;%s", copsList_tmp, operatorInfo);

+            }

+            copsIndex++;

+        }

+        char strValue[20] = {0};

+        snprintf(strValue, sizeof(strValue), "%ld", copsIndex);

+        sc_cfg_set(NV_NET_NUM, strValue);

+        sc_cfg_set(NV_M_NETSELECT_CONTENTS, copsList);

+        sc_cfg_set(NV_M_NETSELECT_STATUS, "manual_selected");

+    }

 }

 

-int normal_netprovider_callback(void *fvarg,int line,char **zresult,char **lname)

+int normal_netprovider_callback(void *fvarg, int line, char **zresult, char **lname)

 {

-	T_zAt_OperatorName operatorName = {0};

-	if(1 > line)

-	{

-		at_print(AT_DEBUG,"atBase: NetProvider record no data.");

-		return -1;

-	}

-    if(zresult[0] != NULL)

+    T_zAt_OperatorName operatorName = {0};

+    if (1 > line)

     {

-    	strncpy(operatorName.OperFullName,  zresult[0], sizeof(operatorName.OperFullName)-1);

+        at_print(AT_DEBUG, "atBase: NetProvider record no data.");

+        return -1;

     }

-    if(zresult[1] != NULL)

-	{

-    	strncpy(operatorName.OperShortName, zresult[1], sizeof(operatorName.OperShortName)-1);

-		

-	}

-	memcpy(fvarg,&operatorName,sizeof(operatorName));

-	return 0;

+    if (zresult[0] != NULL)

+    {

+        strncpy(operatorName.OperFullName,  zresult[0], sizeof(operatorName.OperFullName) - 1);

+    }

+    if (zresult[1] != NULL)

+    {

+        strncpy(operatorName.OperShortName, zresult[1], sizeof(operatorName.OperShortName) - 1);

+

+    }

+    memcpy(fvarg, &operatorName, sizeof(operatorName));

+    return 0;

 }

 

 

 long normal_number2networkprovider(char *pplmn, T_zAt_OperatorName *opraName)

 {

     char sql[128] = {0};

-	T_zAt_OperatorName operatorName = {0};

+    T_zAt_OperatorName operatorName = {0};

     int result = DB_OK;

-	

-    if(ZUFI_NULL == pplmn)

+

+    if (ZUFI_NULL == pplmn)

     {

         return -1;

     }

 

-    snprintf(sql,128-1,"select full_name,short_name from net_list where plmn=\'%s\' limit 1", pplmn);

+    snprintf(sql, 128 - 1, "select full_name,short_name from net_list where plmn=\'%s\' limit 1", pplmn);

     result = normal_execdbsql(ZNETPROVIDER_DB_PATH, sql, normal_netprovider_callback, &operatorName);

-    if(DB_OK != result)

+    if (DB_OK != result)

     {

         return ZUFI_FAIL;

     }

-    at_print(AT_DEBUG,"normal_number2networkprovider OperShortName=%s\n",operatorName.OperShortName);

-	strncpy(opraName->OperShortName, operatorName.OperShortName, sizeof(opraName->OperShortName)-1);

-    if(operatorName.OperFullName[0] == '\0')

+    at_print(AT_DEBUG, "normal_number2networkprovider OperShortName=%s\n", operatorName.OperShortName);

+    strncpy(opraName->OperShortName, operatorName.OperShortName, sizeof(opraName->OperShortName) - 1);

+    if (operatorName.OperFullName[0] == '\0')

     {

         return ZUFI_FAIL;

     }

-	strncpy(opraName->OperFullName, operatorName.OperFullName, sizeof(opraName->OperFullName)-1);

-		

-	return ZUFI_SUCC;

+    strncpy(opraName->OperFullName, operatorName.OperFullName, sizeof(opraName->OperFullName) - 1);

+

+    return ZUFI_SUCC;

 

 }

 

-long normal_getnetworkprovidername(char *MCC, char *MNC,char *Net_Provider_Name,int len)

+long normal_getnetworkprovidername(char *MCC, char *MNC, char *Net_Provider_Name, int len)

 {

     long   listSize       = 0;

     long   iCount         = 0;

@@ -1937,38 +1998,38 @@
     long   mncNum         = 0;

     long   qualListMcc    = 0;

     long   quallistMnc    = 0;

-	

-    if(ZUFI_NULL == MCC || ZUFI_NULL == MNC ||  ZUFI_NULL == Net_Provider_Name)

+

+    if (ZUFI_NULL == MCC || ZUFI_NULL == MNC ||  ZUFI_NULL == Net_Provider_Name)

     {

-        at_print(AT_ERR,"the paraments of function is wrong!");

+        at_print(AT_ERR, "the paraments of function is wrong!");

         return ZUFI_FAIL;

     }

     mccNum = atoi( MCC );

     mncNum = atoi( MNC );

-	

-    listSize = sizeof(G_ZAT_QUALCOMMLISTNODE)/sizeof(T_zAt_QualcommListNode);

-	

-    for(iCount = 0; iCount< listSize; iCount++)

+

+    listSize = sizeof(G_ZAT_QUALCOMMLISTNODE) / sizeof(T_zAt_QualcommListNode);

+

+    for (iCount = 0; iCount < listSize; iCount++)

     {

         qualListMcc = atoi( G_ZAT_QUALCOMMLISTNODE[iCount].mcc );

         quallistMnc = atoi( G_ZAT_QUALCOMMLISTNODE[iCount].mnc );

-        if( (qualListMcc == mccNum)  && (quallistMnc == mncNum))

+        if ( (qualListMcc == mccNum)  && (quallistMnc == mncNum))

         {

-            strncpy(Net_Provider_Name,G_ZAT_QUALCOMMLISTNODE[iCount].networkProvider,len-1);

+            strncpy(Net_Provider_Name, G_ZAT_QUALCOMMLISTNODE[iCount].networkProvider, len - 1);

             break;

         }

     }

-	

+

     if (iCount < listSize)

     {

         /* ÕÒµ½Æ¥ÅäÔËÓªÉÌÃû³Æ */

-        at_print(AT_DEBUG,"get provider name in list  ok !\n");

+        at_print(AT_DEBUG, "get provider name in list  ok !\n");

         return ZUFI_SUCC;

     }

     else

     {

         /* δÕÒµ½Æ¥ÅäÔËÓªÉÌÃû³Æ */

-        at_print(AT_DEBUG,"can not get provider name in list!\n");

+        at_print(AT_DEBUG, "can not get provider name in list!\n");

         return  ZUFI_FAIL;

     }

 }

@@ -1980,136 +2041,137 @@
     char netProviderName[70] = {0};

     char sMCC[10]            = {0};

     char sMNC[10]            = {0};

-	char needCopsNumFormat[10] = {0};

-	T_zAt_CopsReadRes  copsReadPara = {0};

-	T_zAt_OperatorName operatorName = {0};

-	

-	void *p[5] = {&copsReadPara.mode,&copsReadPara.format,copsReadPara.oper,&copsReadPara.act,&copsReadPara.subact};

-	at_print(AT_DEBUG,"normal_recvcopsreadrsp at_paras=%s!\n",at_paras);

-	parse_param2("%d,%d,%s,%d,%d", at_paras, p);

-	at_print(AT_DEBUG,"normal_recvcopsreadrsp mode=%ld,format=%ld,oper=%s,act=%ld,subact=%ld!\n",

-	copsReadPara.mode,copsReadPara.format,copsReadPara.oper,copsReadPara.act,copsReadPara.subact);	

+    char needCopsNumFormat[10] = {0};

+    T_zAt_CopsReadRes  copsReadPara = {0};

+    T_zAt_OperatorName operatorName = {0};

 

-    strncpy(sProvider, copsReadPara.oper, sizeof(sProvider)-1);

-	

+    void *p[5] = {&copsReadPara.mode, &copsReadPara.format, copsReadPara.oper, &copsReadPara.act, &copsReadPara.subact};

+    at_print(AT_DEBUG, "normal_recvcopsreadrsp at_paras=%s!\n", at_paras);

+    parse_param2("%d,%d,%s,%d,%d", at_paras, p);

+    at_print(AT_DEBUG, "normal_recvcopsreadrsp mode=%ld,format=%ld,oper=%s,act=%ld,subact=%ld!\n",

+             copsReadPara.mode, copsReadPara.format, copsReadPara.oper, copsReadPara.act, copsReadPara.subact);

+

+    strncpy(sProvider, copsReadPara.oper, sizeof(sProvider) - 1);

+

     strncpy(sMCC, sProvider, 3);

-    at_print(AT_DEBUG,"MCC is %s\n", sMCC);

-	

-    strncpy(sMNC, sProvider+3,sizeof(sMNC)-1);

-    at_print(AT_DEBUG,"MNC is %s\n", sMNC);

-	

+    at_print(AT_DEBUG, "MCC is %s\n", sMCC);

+

+    strncpy(sMNC, sProvider + 3, sizeof(sMNC) - 1);

+    at_print(AT_DEBUG, "MNC is %s\n", sMNC);

+

     sc_cfg_set(NV_MCC, sMCC);

     sc_cfg_set(NV_MNC, sMNC);

     sc_cfg_set(NV_OPER_NUM, copsReadPara.oper);

     sc_cfg_get("need_cops_number_format", needCopsNumFormat, sizeof(needCopsNumFormat));

-    if(0 == strcmp("yes", needCopsNumFormat))

-	{

-		if(2 == copsReadPara.format && ZUFI_SUCC == normal_number2networkprovider(sProvider, &operatorName))

-		{

-			strncpy(netProviderName,operatorName.OperFullName,sizeof(netProviderName)-1);

-			sc_cfg_set("network_provider",netProviderName);

-            at_print(AT_DEBUG,"operator brand found in the Qualcomm list ! \n");

-		}

-		else

-	    {

-	        if(0 == strcmp(copsReadPara.oper,"CHINA MOBILE"))

-	        {

-	            strcpy(copsReadPara.oper, "China Mobile");

-	        }

-	        sc_cfg_set("network_provider",copsReadPara.oper);

-	        at_print(AT_DEBUG,"operator brand not found in the Qualcomm list ! \n");

-	    }

-	}

-	else

+    if (0 == strcmp("yes", needCopsNumFormat))

     {

-        if(2 == copsReadPara.format && ZUFI_SUCC == normal_getnetworkprovidername(sMCC, sMNC,netProviderName,sizeof(netProviderName)))

+        if (2 == copsReadPara.format && ZUFI_SUCC == normal_number2networkprovider(sProvider, &operatorName))

         {

-            sc_cfg_set(NV_NETWORK_PROVIDER,netProviderName);

+            strncpy(netProviderName, operatorName.OperFullName, sizeof(netProviderName) - 1);

+            sc_cfg_set("network_provider", netProviderName);

+            at_print(AT_DEBUG, "operator brand found in the Qualcomm list ! \n");

         }

         else

         {

-            if(0 == strcmp(copsReadPara.oper,"CHINA MOBILE"))

+            if (0 == strcmp(copsReadPara.oper, "CHINA MOBILE"))

             {

-                strncpy(copsReadPara.oper, "China Mobile",sizeof(copsReadPara.oper)-1);

+                strcpy(copsReadPara.oper, "China Mobile");

             }

-            sc_cfg_set(NV_NETWORK_PROVIDER,copsReadPara.oper);    

-            at_print(AT_DEBUG,"operator brand not found in the Qualcomm list ! \n");

+            sc_cfg_set("network_provider", copsReadPara.oper);

+            at_print(AT_DEBUG, "operator brand not found in the Qualcomm list ! \n");

         }

     }

-    at_print(AT_DEBUG,"normal_recvcopsreadrsp send to mmi MSG_CMD_GET_NET_PROVIDER\n");

-    ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MMI,MSG_CMD_GET_NET_PROVIDER, 0, NULL,0);   

+    else

+    {

+        if (2 == copsReadPara.format

+                && ZUFI_SUCC == normal_getnetworkprovidername(sMCC, sMNC, netProviderName, sizeof(netProviderName)))

+        {

+            sc_cfg_set(NV_NETWORK_PROVIDER, netProviderName);

+        }

+        else

+        {

+            if (0 == strcmp(copsReadPara.oper, "CHINA MOBILE"))

+            {

+                strncpy(copsReadPara.oper, "China Mobile", sizeof(copsReadPara.oper) - 1);

+            }

+            sc_cfg_set(NV_NETWORK_PROVIDER, copsReadPara.oper);

+            at_print(AT_DEBUG, "operator brand not found in the Qualcomm list ! \n");

+        }

+    }

+    at_print(AT_DEBUG, "normal_recvcopsreadrsp send to mmi MSG_CMD_GET_NET_PROVIDER\n");

+    ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_GET_NET_PROVIDER, 0, NULL, 0);

 }

 

 

-int normal_getautoapn_callback(void *fvarg,int line,char **zresult,char **lname)

+int normal_getautoapn_callback(void *fvarg, int line, char **zresult, char **lname)

 {

     T_zAt_APN_PROFILE para = {0};

-    if(1 > line)

+    if (1 > line)

     {

-        at_print(AT_DEBUG,"zte_sms:record no data.\n");

-        sc_cfg_get(NV_PDP_TYPE,para.pdp_type,sizeof(para.pdp_type));

+        at_print(AT_DEBUG, "zte_sms:record no data.\n");

+        sc_cfg_get(NV_PDP_TYPE, para.pdp_type, sizeof(para.pdp_type));

         return -1;

     }

-    if(zresult[0] != NULL)

+    if (zresult[0] != NULL)

     {

         strncpy(para.profile_name, zresult[0], ZAT_PROFILE_MEMBER_LEN - 1);

     }

-    if(zresult[1] != NULL)

+    if (zresult[1] != NULL)

     {

         strncpy(para.apn_name, zresult[1], ZAT_PROFILE_MEMBER_LEN - 1);

-        at_print(AT_DEBUG,"atBase_GetAutoApn_Callback: apn_name != NULL!\n");

+        at_print(AT_DEBUG, "atBase_GetAutoApn_Callback: apn_name != NULL!\n");

     }

-    if(zresult[2] != NULL)

+    if (zresult[2] != NULL)

     {

         strncpy(para.dial_num, zresult[2], ZAT_PROFILE_MEMBER_LEN - 1);

     }

-    if(zresult[3] != NULL)

+    if (zresult[3] != NULL)

     {

         strncpy(para.ppp_auth_mode, zresult[3], ZAT_PROFILE_MEMBER_LEN - 1);

     }

-    if(zresult[4] != NULL)

+    if (zresult[4] != NULL)

     {

         strncpy(para.ppp_username, zresult[4], ZAT_PROFILE_MEMBER_LEN - 1);

-        at_print(AT_DEBUG,"atBase_GetAutoApn_Callback: para.ppp_username != NULL!\n");

+        at_print(AT_DEBUG, "atBase_GetAutoApn_Callback: para.ppp_username != NULL!\n");

     }

-    if(zresult[5] != NULL)

+    if (zresult[5] != NULL)

     {

         strncpy(para.ppp_passwd, zresult[5], ZAT_PROFILE_MEMBER_LEN - 1);

     }

-    if(zresult[6] != NULL)

+    if (zresult[6] != NULL)

     {

         strncpy(para.pdp_type, zresult[6], ZAT_PROFILE_MEMBER_LEN - 1);

-    }    

-    memcpy(fvarg,&para,sizeof(para));

-    

+    }

+    memcpy(fvarg, &para, sizeof(para));

+

     return 0;

 }

 

 void normal_get_cardtype(char *ccmnc)

 {

-	if (strcmp(ccmnc, "46000") == 0 || 

-        strcmp(ccmnc, "46002") == 0 || 

-        strcmp(ccmnc, "46007") == 0 ||

-        strcmp(ccmnc, "46008") == 0)

-	{

-		sc_cfg_set(NV_SIMCARD_TYPE, "1");

-	}

-	else if (strcmp(ccmnc, "46001") == 0 || 

-        strcmp(ccmnc, "46006") == 0)

-	{

-		sc_cfg_set(NV_SIMCARD_TYPE, "2");

-	}

-	else if (strcmp(ccmnc, "46003") == 0 || 

-        strcmp(ccmnc, "46005") == 0 ||

-        strcmp(ccmnc, "46011") == 0 )

-	{

-		sc_cfg_set(NV_SIMCARD_TYPE, "3");

-	}

-	else

-	{

-		sc_cfg_set(NV_SIMCARD_TYPE, "4");

+    if (strcmp(ccmnc, "46000") == 0 ||

+            strcmp(ccmnc, "46002") == 0 ||

+            strcmp(ccmnc, "46007") == 0 ||

+            strcmp(ccmnc, "46008") == 0)

+    {

+        sc_cfg_set(NV_SIMCARD_TYPE, "1");

+    }

+    else if (strcmp(ccmnc, "46001") == 0 ||

+             strcmp(ccmnc, "46006") == 0)

+    {

+        sc_cfg_set(NV_SIMCARD_TYPE, "2");

+    }

+    else if (strcmp(ccmnc, "46003") == 0 ||

+             strcmp(ccmnc, "46005") == 0 ||

+             strcmp(ccmnc, "46011") == 0 )

+    {

+        sc_cfg_set(NV_SIMCARD_TYPE, "3");

+    }

+    else

+    {

+        sc_cfg_set(NV_SIMCARD_TYPE, "4");

 

-	}

+    }

 

 }

 

@@ -2121,63 +2183,65 @@
     T_zAt_APN_PROFILE apnpara = {0};

     DbResult result = DB_OK;

     char apnMode[50] = {0};

-    sc_cfg_get(NV_APN_MODE,apnMode,sizeof(apnMode));

-    

-    snprintf(sql,sizeof(sql),"select ConfigFileName,APN,LoginNumber,AuthType,UserName,Password,PDPType from apn_list where CCMNC='%s' limit 1",CCMNC);

-    result = normal_execdbsql(ZAPN_DB_PATH,sql, normal_getautoapn_callback, &apnpara);

-	

-    at_print(AT_DEBUG,"atBase_GetAutoApn CCMNC:%s!\n",CCMNC);

-    if(DB_OK != result)

+    sc_cfg_get(NV_APN_MODE, apnMode, sizeof(apnMode));

+

+    snprintf(sql, sizeof(sql),

+             "select ConfigFileName,APN,LoginNumber,AuthType,UserName,Password,PDPType from apn_list where CCMNC='%s' limit 1",

+             CCMNC);

+    result = normal_execdbsql(ZAPN_DB_PATH, sql, normal_getautoapn_callback, &apnpara);

+

+    at_print(AT_DEBUG, "atBase_GetAutoApn CCMNC:%s!\n", CCMNC);

+    if (DB_OK != result)

     {

         return -1;

     }

-	if(strlen(apnpara.profile_name) == 0)

-	{

-		at_print(AT_ERR,"normal_getautoapn no item CCMNC:%s!\n",CCMNC);

-		return -1;

-	}

-    if(strlen(apnpara.pdp_type) == 0)

+    if (strlen(apnpara.profile_name) == 0)

+    {

+        at_print(AT_ERR, "normal_getautoapn no item CCMNC:%s!\n", CCMNC);

+        return -1;

+    }

+    if (strlen(apnpara.pdp_type) == 0)

     {

         strncpy(apnpara.pdp_type, "IP", ZAT_PROFILE_MEMBER_LEN - 1);

     }

-    

-    if(0 == strcmp("auto", apnMode))

+

+    if (0 == strcmp("auto", apnMode))

     {

         sc_cfg_set(NV_PDP_TYPE, apnpara.pdp_type);

-        if(strcmp("IPv6", apnpara.pdp_type) == 0 || strcmp(apnpara.pdp_type, "IPv4v6") == 0)

+        if (strcmp("IPv6", apnpara.pdp_type) == 0 || strcmp(apnpara.pdp_type, "IPv4v6") == 0)

         {

             sc_cfg_set(NV_IPV6_WAN_APN, apnpara.apn_name);

-    	    sc_cfg_set(NV_IPV6_PDP_TYPE, apnpara.pdp_type);

-    	    sc_cfg_set(NV_WAN_APN, apnpara.apn_name);

-    	    sc_cfg_set(NV_IPV6_PPP_AUTH_MODE, apnpara.ppp_auth_mode);

-			sc_cfg_set(NV_IPV6_PPP_USERNAME,apnpara.ppp_username);

-			sc_cfg_set(NV_IPV6_PPP_PASSWD,apnpara.ppp_passwd);

-			ipv6apn_encrypt_code();

+            sc_cfg_set(NV_IPV6_PDP_TYPE, apnpara.pdp_type);

+            sc_cfg_set(NV_WAN_APN, apnpara.apn_name);

+            sc_cfg_set(NV_IPV6_PPP_AUTH_MODE, apnpara.ppp_auth_mode);

+            sc_cfg_set(NV_IPV6_PPP_USERNAME, apnpara.ppp_username);

+            sc_cfg_set(NV_IPV6_PPP_PASSWD, apnpara.ppp_passwd);

+            ipv6apn_encrypt_code();

         }

         else

         {

             sc_cfg_set(NV_WAN_APN, apnpara.apn_name);

-	        sc_cfg_set(NV_PPP_AUTH_MODE, apnpara.ppp_auth_mode);

-			sc_cfg_set(NV_PPP_USERNAME,apnpara.ppp_username);

-			sc_cfg_set(NV_PPP_PASSWD,apnpara.ppp_passwd);

-			apn_encrypt_code();

-        }	

+            sc_cfg_set(NV_PPP_AUTH_MODE, apnpara.ppp_auth_mode);

+            sc_cfg_set(NV_PPP_USERNAME, apnpara.ppp_username);

+            sc_cfg_set(NV_PPP_PASSWD, apnpara.ppp_passwd);

+            apn_encrypt_code();

+        }

         sc_cfg_set(NV_M_PROFILE_NAME, apnpara.profile_name);

-		if(g_modem_model)

-		{

-			sc_cfg_set("default_apn", apnpara.apn_name);

-			MSG_BUF *buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_APN_SET_REQ,0,NULL);

-			rcv_clt_req_msg_proc(buf);

-			free(buf);

-		}

+        if (g_modem_model)

+        {

+            sc_cfg_set("default_apn", apnpara.apn_name);

+            MSG_BUF *buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_APN_SET_REQ, 0, NULL);

+            rcv_clt_req_msg_proc(buf);

+            free(buf);

+        }

     }

-    snprintf(apn_auto_config, sizeof(apn_auto_config),"%s($)%s($)auto($)%s($)%s($)%s($)%s($)%s($)auto($)($)auto($)($)", 

-		apnpara.profile_name, apnpara.apn_name, apnpara.dial_num, apnpara.ppp_auth_mode, apnpara.ppp_username, 

-		apnpara.ppp_passwd, apnpara.pdp_type);	

-    at_print(AT_DEBUG,"atBase_GetAutoApn apn_auto_config = %s!\n",apn_auto_config);

+    snprintf(apn_auto_config, sizeof(apn_auto_config), "%s($)%s($)auto($)%s($)%s($)%s($)%s($)%s($)auto($)($)auto($)($)",

+             apnpara.profile_name, apnpara.apn_name, apnpara.dial_num, apnpara.ppp_auth_mode, apnpara.ppp_username,

+             apnpara.ppp_passwd, apnpara.pdp_type);

+    at_print(AT_DEBUG, "atBase_GetAutoApn apn_auto_config = %s!\n", apn_auto_config);

     sc_cfg_set(NV_APN_AUTO_CONFIG, apn_auto_config);

 #if 0//def MULTI_CPU

-	sync_default_apn(NULL);

+    sync_default_apn(NULL);

 #endif

     return 0;

 }

@@ -2187,38 +2251,40 @@
     char modemState[50] = {0};

     char pinProcess[50] = {0};

     char pinManage[50] = {0};

-    sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-    sc_cfg_get(NV_PIN_PUK_PROCESS,pinProcess,sizeof(pinProcess));

-    sc_cfg_get(NV_PIN_MANAGE_PROCESS,pinManage,sizeof(pinManage));

-    

-    if(strcmp(pinProcess,"begin") == 0

-	    &&0 == strcmp("modem_init_complete",modemState))

+    sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+    sc_cfg_get(NV_PIN_PUK_PROCESS, pinProcess, sizeof(pinProcess));

+    sc_cfg_get(NV_PIN_MANAGE_PROCESS, pinManage, sizeof(pinManage));

+

+    if (strcmp(pinProcess, "begin") == 0

+            && 0 == strcmp("modem_init_complete", modemState))

     {

         sc_cfg_set(NV_PIN_PUK_PROCESS, "end");

-        printf("pin_puk_process = end --- modem_init_complete"); 

+        printf("pin_puk_process = end --- modem_init_complete");

     }

     /*web pin¡¢pukÂëÑéÖ¤¶¯×÷½áÊøºó£¬·¢ZAT_SYSCONFIGREAD_CMD*/

-    else if(strcmp(pinProcess,"begin") == 0)

+    else if (strcmp(pinProcess, "begin") == 0)

     {

         sc_cfg_set(NV_PIN_PUK_PROCESS, "end");

-        printf("pin_puk_process = end"); 

+        printf("pin_puk_process = end");

     }

-		

+

     /*web pinÂë¹ÜÀí¶¯×÷´¥·¢ZrapºóÎÞÏÂÒ»ÌõAT£¬½«ATÃüÁîÔ´¸³ÖµÎªATMIAN*/

-    if(strcmp(pinManage,"begin") == 0)

+    if (strcmp(pinManage, "begin") == 0)

     {

-        printf("pin_manage_process = end");        

+        printf("pin_manage_process = end");

         sc_cfg_set(NV_PIN_MANAGE_PROCESS, "end");

     }

 }

 

-MSG_BUF *normal_getmsg(unsigned short src_id,unsigned short dst_id,unsigned short Msg_cmd,unsigned short us_DataLen,unsigned char *pData)

+MSG_BUF *normal_getmsg(unsigned short src_id, unsigned short dst_id, unsigned short Msg_cmd, unsigned short us_DataLen,

+                       unsigned char *pData)

 {

-    MSG_BUF *buf=malloc(sizeof(MSG_BUF));

-    if(buf == NULL){

-		softap_assert("");

-		return NULL;

-	}

+    MSG_BUF *buf = malloc(sizeof(MSG_BUF));

+    if (buf == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

     memset(buf, 0, sizeof(MSG_BUF));

     buf->ulMagic = MSG_MAGIC_WORD;

     buf->lMsgType = MSG_TYPE_DEFAULT;

@@ -2226,7 +2292,7 @@
     buf->dst_id = dst_id;

     buf->usMsgCmd = Msg_cmd;

     buf->usDataLen = us_DataLen;

-    if(us_DataLen > 0)

+    if (us_DataLen > 0)

     {

         memcpy(buf->aucDataBuf, pData, us_DataLen);

     }

@@ -2235,175 +2301,190 @@
 

 char* normal_zschplmnset(int mode)

 {

-	char *at_next=NULL;

-	at_next=malloc(20);

- 	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

- 	memset(at_next,0,20);

-	snprintf(at_next,20,"AT+ZSCHPLMN=%d\r\n",mode);

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    snprintf(at_next, 20, "AT+ZSCHPLMN=%d\r\n", mode);

+    return at_next;

 

 }

 

-int zupci_auto_act(char *at_paras ,int is_query_report)

+int zupci_auto_act(char *at_paras, int is_query_report)

 {

-    at_print(AT_ERR,"zupci=%s\n",at_paras);

-	MSG_BUF *buf=NULL;

-	buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_ZUTR_REQ,strlen(at_paras),(unsigned char *)at_paras);

-	rcv_clt_req_msg_proc(buf);

-	free(buf);

+    at_print(AT_ERR, "zupci=%s\n", at_paras);

+    MSG_BUF *buf = NULL;

+    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_ZUTR_REQ, strlen(at_paras), (unsigned char *)at_paras);

+    rcv_clt_req_msg_proc(buf);

+    free(buf);

     return AT_END;

 }

 

-char* start_zutr_cmd(void *msg,struct at_context *context)

+char* start_zutr_cmd(void *msg, struct at_context *context)

 {

-	int cmd_type=0;

-	int cmd_num=0;

-	int cmd_qual=0;

-	MSG_BUF *buf=NULL;

-	char *at_paras=malloc(strlen((char *)((MSG_BUF*)msg)->aucDataBuf)+1);

-	if(at_paras == NULL)

-		return NULL;

-	memset(at_paras,0,strlen((char *)((MSG_BUF*)msg)->aucDataBuf)+1);

-	strcpy(at_paras,(char *)((MSG_BUF*)msg)->aucDataBuf);

-	

-	void *p[3] = {&cmd_type,&cmd_num,&cmd_qual};

-	at_print(AT_DEBUG,"start_zutr_cmd at_paras=%s!\n",at_paras);

-	parse_param2("%d,%d,%d", at_paras, p);

-	at_print(AT_ERR,"start_zutr_cmd %d,%d,%d!\n",cmd_type,cmd_num,cmd_qual);

-	free(at_paras);

+    int cmd_type = 0;

+    int cmd_num = 0;

+    int cmd_qual = 0;

+    MSG_BUF *buf = NULL;

+    char *at_paras = malloc(strlen((char *)((MSG_BUF*)msg)->aucDataBuf) + 1);

+    if (at_paras == NULL)

+    {

+        return NULL;

+    }

+    memset(at_paras, 0, strlen((char *)((MSG_BUF*)msg)->aucDataBuf) + 1);

+    strcpy(at_paras, (char *)((MSG_BUF*)msg)->aucDataBuf);

 

-	if(cmd_type == 33 || cmd_type == 34 || cmd_type == 35 || cmd_type == 36 || cmd_type == 37)

-	{

-		char *at_next=NULL;

-		at_next=malloc(64);

-		if(at_next == NULL){

-			softap_assert("");

-			return NULL;

-		}

-		memset(at_next,0,64);

-		if(cmd_type == 33)

-			snprintf(at_next,64,"AT+ZUTR=%d,%d,%d,0\r\n",cmd_type,cmd_qual,cmd_num);

-		else

-			snprintf(at_next,64,"AT+ZUTR=%d,%d,%d,32\r\n",cmd_type,cmd_qual,cmd_num);

-		return at_next;

-	}

-		

-	return NULL;

+    void *p[3] = {&cmd_type, &cmd_num, &cmd_qual};

+    at_print(AT_DEBUG, "start_zutr_cmd at_paras=%s!\n", at_paras);

+    parse_param2("%d,%d,%d", at_paras, p);

+    at_print(AT_ERR, "start_zutr_cmd %d,%d,%d!\n", cmd_type, cmd_num, cmd_qual);

+    free(at_paras);

+

+    if (cmd_type == 33 || cmd_type == 34 || cmd_type == 35 || cmd_type == 36 || cmd_type == 37)

+    {

+        char *at_next = NULL;

+        at_next = malloc(64);

+        if (at_next == NULL)

+        {

+            softap_assert("");

+            return NULL;

+        }

+        memset(at_next, 0, 64);

+        if (cmd_type == 33)

+        {

+            snprintf(at_next, 64, "AT+ZUTR=%d,%d,%d,0\r\n", cmd_type, cmd_qual, cmd_num);

+        }

+        else

+        {

+            snprintf(at_next, 64, "AT+ZUTR=%d,%d,%d,32\r\n", cmd_type, cmd_qual, cmd_num);

+        }

+        return at_next;

+    }

+

+    return NULL;

 }

 

-int zmsri_auto_act(char *at_paras ,int is_query_report)

+int zmsri_auto_act(char *at_paras, int is_query_report)

 {

-    at_print(AT_DEBUG,"modem init start!\n");

-	MSG_BUF *buf=NULL;

-	//int guodian = 0;

-	normal_simcardcfgreset();

-	buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZCHNELSET_MSG,0,NULL);

-	rcv_clt_req_msg_proc(buf);

-	free(buf);

-	

-	buf = normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_IMEI_REQ,0,NULL);//modem³õʼ»¯Íê³Éºó£¬²éѯimeiºÅ

-	rcv_clt_req_msg_proc(buf);

-	free(buf);

-	buf = NULL;

-//#ifdef GUODIAN

-//	guodian = 1;

-//#endif

-	if(g_customer_type)

-	{

-		buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_CVMOD_MSG,0,NULL);

-		rcv_clt_req_msg_proc(buf);

-		free(buf);

-	}

-	if(g_modem_model || g_customer_type)

-	{

-		buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

-		rcv_clt_req_msg_proc(buf);

-		free(buf);

-	}

-	if(!g_modem_model)

-	{

-		buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_NITZ_REQ,2,"1");

-		rcv_clt_req_msg_proc(buf);

-		free(buf);

-	}

+    at_print(AT_DEBUG, "modem init start!\n");

+    MSG_BUF *buf = NULL;

+    //int guodian = 0;

+    normal_simcardcfgreset();

+    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZCHNELSET_MSG, 0, NULL);

+    rcv_clt_req_msg_proc(buf);

+    free(buf);

+

+    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_IMEI_REQ, 0, NULL); //modem³õʼ»¯Íê³Éºó£¬²éѯimeiºÅ

+    rcv_clt_req_msg_proc(buf);

+    free(buf);

+    buf = NULL;

+    //#ifdef GUODIAN

+    //	guodian = 1;

+    //#endif

+    if (g_customer_type)

+    {

+        buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_CVMOD_MSG, 0, NULL);

+        rcv_clt_req_msg_proc(buf);

+        free(buf);

+    }

+    if (g_modem_model || g_customer_type)

+    {

+        buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

+        rcv_clt_req_msg_proc(buf);

+        free(buf);

+    }

+    if (!g_modem_model)

+    {

+        buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_NITZ_REQ, 2, "1");

+        rcv_clt_req_msg_proc(buf);

+        free(buf);

+    }

     return AT_END;

 }

 

-int zrefreshind_auto_act(char *at_paras ,int is_query_report)

+int zrefreshind_auto_act(char *at_paras, int is_query_report)

 {

-	at_print(AT_ERR,"zrefreshind start!\n");

-	if(g_modem_model)

-	{

-		char needrestart[50]  = {0};

-		sc_cfg_get("need_restart_when_sim_insert",needrestart,sizeof(needrestart));

-		if(strcmp("yes", needrestart) == 0)//ÖØÆô²Ù×÷

-		{

-			at_print(AT_DEBUG,"zrefreshind_auto_act RESTART\n");

-			ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_RESTART_REQUEST, 0, NULL,0);

-		}

-		else//²»ÖØÆô²Ù×÷£¬ÖØÐÂ×ßÒ»±é¿ª»úÁ÷³Ì£¬TODO

-		{

-			MSG_BUF *buf=NULL;

-			T_zAt_ZuslotRes zuslotPara = {0};//¸´Óðο¨Á÷³Ì

-			if(g_support_sms)	

-			ipc_send_message2(MODULE_ID_AT_CTL,MODULE_ID_SMS,MSG_CMD_ZUSLOT_IND,sizeof(zuslotPara),(unsigned char *)&zuslotPara,0);

-			if(g_support_pb)	

-			ipc_send_message2(MODULE_ID_AT_CTL,MODULE_ID_PB,MSG_CMD_ZUSLOT_IND,sizeof(zuslotPara),(unsigned char *)&zuslotPara,0);

-			buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

-			rcv_clt_req_msg_proc(buf);

-			free(buf);

-		}

-	}

-	return AT_END;

-}

-

-int zuslot_auto_act(char *at_paras ,int is_query_report)

-{

-    at_print(AT_DEBUG,"zuslot:%s start!\n",at_paras);

-	if(g_modem_model)

-	{

-		MSG_BUF *buf=NULL;

-		buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZUSLOT_MSG,strlen(at_paras),(unsigned char *)at_paras);

-		rcv_clt_req_msg_proc(buf);

-		free(buf);

-	}

-	else

-	{

-		sc_cfg_set(NV_AUTO_RECONNECT,"");

-	}

+    at_print(AT_ERR, "zrefreshind start!\n");

+    if (g_modem_model)

+    {

+        char needrestart[50]  = {0};

+        sc_cfg_get("need_restart_when_sim_insert", needrestart, sizeof(needrestart));

+        if (strcmp("yes", needrestart) == 0) //ÖØÆô²Ù×÷

+        {

+            at_print(AT_DEBUG, "zrefreshind_auto_act RESTART\n");

+            ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MAIN_CTRL, MSG_CMD_RESTART_REQUEST, 0, NULL, 0);

+        }

+        else//²»ÖØÆô²Ù×÷£¬ÖØÐÂ×ßÒ»±é¿ª»úÁ÷³Ì£¬TODO

+        {

+            MSG_BUF *buf = NULL;

+            T_zAt_ZuslotRes zuslotPara = {0};//¸´Óðο¨Á÷³Ì

+            if (g_support_sms)

+            {

+                ipc_send_message2(MODULE_ID_AT_CTL, MODULE_ID_SMS, MSG_CMD_ZUSLOT_IND, sizeof(zuslotPara), (unsigned char *)&zuslotPara,

+                                  0);

+            }

+            if (g_support_pb)

+            {

+                ipc_send_message2(MODULE_ID_AT_CTL, MODULE_ID_PB, MSG_CMD_ZUSLOT_IND, sizeof(zuslotPara), (unsigned char *)&zuslotPara,

+                                  0);

+            }

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

+            rcv_clt_req_msg_proc(buf);

+            free(buf);

+        }

+    }

     return AT_END;

 }

 

-char* start_start_zmsri(void *msg,struct at_context *context)

+int zuslot_auto_act(char *at_paras, int is_query_report)

 {

-	sc_cfg_set("ppp_status", "ppp_disconnected");

+    at_print(AT_DEBUG, "zuslot:%s start!\n", at_paras);

+    if (g_modem_model)

+    {

+        MSG_BUF *buf = NULL;

+        buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZUSLOT_MSG, strlen(at_paras),

+                            (unsigned char *)at_paras);

+        rcv_clt_req_msg_proc(buf);

+        free(buf);

+    }

+    else

+    {

+        sc_cfg_set(NV_AUTO_RECONNECT, "");

+    }

+    return AT_END;

+}

+

+char* start_start_zmsri(void *msg, struct at_context *context)

+{

+    sc_cfg_set("ppp_status", "ppp_disconnected");

     //psinfo.zrap_state = ZRAP_READ_FIR_CMD;

     //return normal_getzrapread();

     return normal_getcfunset(ZAT_POWERON);

 }

 

 //²éѯÐźÅÇ¿¶Èat+csq

-char* start_query_csq(void *msg,struct at_context *context)

+char* start_query_csq(void *msg, struct at_context *context)

 {

     return normal_getcsq();

 }

 

 

-char* start_verifypin_cmd(void *msg,struct at_context *context)

+char* start_verifypin_cmd(void *msg, struct at_context *context)

 {

     char modemState[50] = {0};

     if (msg == NULL)

     {

         return NULL;

     }

-    sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-    at_print(AT_DEBUG,"VerifyPin %s.modem_main_state is %s.\n",((MSG_BUF*)msg)->aucDataBuf,modemState);

-    if(0 == strcmp("modem_waitpin",modemState))//ÐèÒªpinÂë

+    sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+    at_print(AT_DEBUG, "VerifyPin %s.modem_main_state is %s.\n", ((MSG_BUF*)msg)->aucDataBuf, modemState);

+    if (0 == strcmp("modem_waitpin", modemState)) //ÐèÒªpinÂë

     {

-        if(strcmp((char *)((MSG_BUF*)msg)->aucDataBuf, "") != 0)

+        if (strcmp((char *)((MSG_BUF*)msg)->aucDataBuf, "") != 0)

         {

             return normal_getcpinset((char *)((MSG_BUF*)msg)->aucDataBuf);

         }

@@ -2411,93 +2492,94 @@
     return NULL;

 }

 

-char* start_verifypuk_cmd(void *msg,struct at_context *context)

+char* start_verifypuk_cmd(void *msg, struct at_context *context)

 {

     T_zAt_CpinPukSet tCpinSet = {0};

     char modemState[50]   = {0};

     char pinNumber[50] = {0};

-	

+

     if (msg == ZUFI_NULL)

     {

-		return NULL;

+        return NULL;

     }

-    sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-    sc_cfg_get(NV_PINNUMBER,pinNumber,sizeof(pinNumber));

-	at_print(AT_DEBUG,"VerifyPuk modem_main_state is %s.\n", modemState);

- 	if(0 == strcmp("modem_waitpuk",modemState) || 0 == strcmp("0",pinNumber)) //ÐèÒªpukÂë

-	{

-		memcpy(&tCpinSet,((MSG_BUF*)msg)->aucDataBuf, sizeof(T_zAt_CpinPukSet));

-		

-		at_print(AT_DEBUG,"VerifyPuk puk=%s,newpin=%s\n", tCpinSet.pin, tCpinSet.newpin);

-		if (0 != strcmp(tCpinSet.pin,"") && 0 != strcmp(tCpinSet.newpin,""))

-		{        

+    sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+    sc_cfg_get(NV_PINNUMBER, pinNumber, sizeof(pinNumber));

+    at_print(AT_DEBUG, "VerifyPuk modem_main_state is %s.\n", modemState);

+    if (0 == strcmp("modem_waitpuk", modemState) || 0 == strcmp("0", pinNumber)) //ÐèÒªpukÂë

+    {

+        memcpy(&tCpinSet, ((MSG_BUF*)msg)->aucDataBuf, sizeof(T_zAt_CpinPukSet));

+

+        at_print(AT_DEBUG, "VerifyPuk puk=%s,newpin=%s\n", tCpinSet.pin, tCpinSet.newpin);

+        if (0 != strcmp(tCpinSet.pin, "") && 0 != strcmp(tCpinSet.newpin, ""))

+        {

             return normal_getcpukset(tCpinSet.pin, tCpinSet.newpin);

         }

     }

     return NULL;

 }

 

-char* start_netselect_cmd(void *msg,struct at_context *context)

+char* start_netselect_cmd(void *msg, struct at_context *context)

 {

     char *at_next = NULL;

     char netMode[50] = {0};

-    sc_cfg_get(NV_NET_SELECT_MODE,netMode,sizeof(netMode));

-    if(0 == strcmp("manual_select", netMode))//ÊÖ¶¯ËÑÍø

+    sc_cfg_get(NV_NET_SELECT_MODE, netMode, sizeof(netMode));

+    if (0 == strcmp("manual_select", netMode)) //ÊÖ¶¯ËÑÍø

     {

-        at_print(AT_DEBUG,"atWeb_NetSelect manual_select!\n");

+        at_print(AT_DEBUG, "atWeb_NetSelect manual_select!\n");

         sc_cfg_set("manual_search_network_status", "searching");

-        at_next=normal_getcopstest();

+        at_next = normal_getcopstest();

         normal_copstest_timerout(msg);

     }

-    else if(0 == strcmp("auto_select", netMode))

+    else if (0 == strcmp("auto_select", netMode))

     {

-        at_print(AT_DEBUG,"atWeb_NetSelect auto_select!\n");

-        at_next=normal_getcfunset(ZAT_AIRMODE);

+        at_print(AT_DEBUG, "atWeb_NetSelect auto_select!\n");

+        at_next = normal_getcfunset(ZAT_AIRMODE);

     }

-	else

-	{

-        at_print(AT_DEBUG,"atWeb_NetSelect ???!\n");

-        at_next=normal_getcfunset(ZAT_AIRMODE);

-	}

+    else

+    {

+        at_print(AT_DEBUG, "atWeb_NetSelect ???!\n");

+        at_next = normal_getcfunset(ZAT_AIRMODE);

+    }

     return at_next;

 }

 

-char *start_pinmanage_cmd(void *msg,struct at_context *context)

+char *start_pinmanage_cmd(void *msg, struct at_context *context)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     char pinMode[10] = {0};

     T_zAt_PinManage *ptPara = ZUFI_NULL;

-    if(msg == NULL)

+    if (msg == NULL)

     {

         return NULL;

     }

     ptPara = (T_zAt_PinManage*)(((MSG_BUF*)msg)->aucDataBuf);

-	at_print(AT_DEBUG,"start_pinmanage_webui action=%d,pincode=%s,newpincode=%s!\n",ptPara->action,ptPara->oldPin,ptPara->newPin);

-    if(ZAT_PIN_MANAGE_ENABLE == ptPara->action || ZAT_PIN_MANAGE_DISABLE == ptPara->action)

+    at_print(AT_DEBUG, "start_pinmanage_webui action=%d,pincode=%s,newpincode=%s!\n", ptPara->action, ptPara->oldPin,

+             ptPara->newPin);

+    if (ZAT_PIN_MANAGE_ENABLE == ptPara->action || ZAT_PIN_MANAGE_DISABLE == ptPara->action)

     {

-        at_next=normal_getclckset(3,"SC",ptPara->action,ptPara->oldPin);

-        psinfo.clck_state=CLCK_SET_CMD;

-        snprintf(pinMode,sizeof(pinMode), "%d",ptPara->action);

-        sc_cfg_set(NV_CLCK_SET_MODE,pinMode);

+        at_next = normal_getclckset(3, "SC", ptPara->action, ptPara->oldPin);

+        psinfo.clck_state = CLCK_SET_CMD;

+        snprintf(pinMode, sizeof(pinMode), "%d", ptPara->action);

+        sc_cfg_set(NV_CLCK_SET_MODE, pinMode);

     }

     else if (ZAT_PIN_MANAGE_MODIFY == ptPara->action)

     {

-        at_next=normal_getcpwdset("SC",ptPara->oldPin,ptPara->newPin);

+        at_next = normal_getcpwdset("SC", ptPara->oldPin, ptPara->newPin);

     }

     return at_next;

 }

 

-char* start_setnetwork_cmd(void *msg,struct at_context *context)

+char* start_setnetwork_cmd(void *msg, struct at_context *context)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     char subType[10] = {0};

     T_zAt_CopsSet copsSetPara = {0};

     char netType[30] = {0};

-    sc_cfg_get("current_subrat_tmp",subType,sizeof(subType));

-    sc_cfg_get(NV_STR_NUM_RPLMN_TMP,copsSetPara.oper,sizeof(copsSetPara.oper));

-    sc_cfg_get(NV_CURRENT_RAT_TMP,netType,sizeof(netType));

-    copsSetPara.nettype=atoi(netType);

-    if(0 == strcmp(subType, ""))

+    sc_cfg_get("current_subrat_tmp", subType, sizeof(subType));

+    sc_cfg_get(NV_STR_NUM_RPLMN_TMP, copsSetPara.oper, sizeof(copsSetPara.oper));

+    sc_cfg_get(NV_CURRENT_RAT_TMP, netType, sizeof(netType));

+    copsSetPara.nettype = atoi(netType);

+    if (0 == strcmp(subType, ""))

     {

         copsSetPara.subtype = -1;;

     }

@@ -2505,255 +2587,271 @@
     {

         copsSetPara.subtype = atoi(subType);

     }

-    at_print(AT_DEBUG, "atWeb_NetManualselect: %s,--%ld--,%ld\n",copsSetPara.oper,copsSetPara.nettype,copsSetPara.subtype);

-    if(-1 == copsSetPara.subtype)

+    at_print(AT_DEBUG, "atWeb_NetManualselect: %s,--%ld--,%ld\n", copsSetPara.oper, copsSetPara.nettype,

+             copsSetPara.subtype);

+    if (-1 == copsSetPara.subtype)

     {

-        at_next=normal_getcopsset(2,copsSetPara.oper,copsSetPara.nettype);

+        at_next = normal_getcopsset(2, copsSetPara.oper, copsSetPara.nettype);

     }

     else

     {

-        at_next=normal_getcopsset(3,copsSetPara.oper,copsSetPara.nettype,copsSetPara.subtype);			

-    }	

+        at_next = normal_getcopsset(3, copsSetPara.oper, copsSetPara.nettype, copsSetPara.subtype);

+    }

     sc_cfg_set(NV_NETWORK_TYPE, "No Service");

-	sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

+    sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

 

     return at_next;

 }

 

-char* start_syctimeset_cmd(void *msg,struct at_context *context)

+char* start_syctimeset_cmd(void *msg, struct at_context *context)

 {

     struct timeval tp;

 

-    if (0 != gettimeofday(&tp,NULL))

+    if (0 != gettimeofday(&tp, NULL))

     {

-        at_print(AT_ERR,"get time of system wrong");

+        at_print(AT_ERR, "get time of system wrong");

         return NULL;

     }

     return normal_getsyctimeset(tp.tv_sec, tp.tv_usec);

 }

 

-char *start_ussdset_cmd(void *msg,struct at_context *context)

+char *start_ussdset_cmd(void *msg, struct at_context *context)

 {

     char networktype[50]  = {0};

     char ussdstring[50]  = {0};

-	sc_cfg_get("network_type",networktype,sizeof(networktype));

-    if((strcmp("No Service",networktype) == 0) || (strcmp("Limited Service",networktype) == 0) || (strcmp("Searching",networktype) == 0))

+    sc_cfg_get("network_type", networktype, sizeof(networktype));

+    if ((strcmp("No Service", networktype) == 0) || (strcmp("Limited Service", networktype) == 0)

+            || (strcmp("Searching", networktype) == 0))

     {

-        sc_cfg_set("ussd_write_flag","1");

+        sc_cfg_set("ussd_write_flag", "1");

         return NULL;

     }

-    sc_cfg_get("ussd_string",ussdstring,sizeof(ussdstring));

+    sc_cfg_get("ussd_string", ussdstring, sizeof(ussdstring));

     return normal_getcusdset(ussdstring);

 }

 

-char *start_ussdcancel_cmd(void *msg,struct at_context *context)

+char *start_ussdcancel_cmd(void *msg, struct at_context *context)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     char cancelflag[50]  = {0};

-	sc_cfg_get("ussd_cancel_flag",cancelflag,sizeof(cancelflag));

-    if(strcmp(cancelflag,"yes") == 0)

+    sc_cfg_get("ussd_cancel_flag", cancelflag, sizeof(cancelflag));

+    if (strcmp(cancelflag, "yes") == 0)

     {

-        at_next=normal_getcusdset_clean();

+        at_next = normal_getcusdset_clean();

     }

     else

     {

-        sc_cfg_set("ussd_write_flag","13");

+        sc_cfg_set("ussd_write_flag", "13");

     }

     return at_next;

 }

 

-char *start_airmode_cmd(void *msg,struct at_context *context)

+char *start_airmode_cmd(void *msg, struct at_context *context)

 {

-    char *at_next=NULL;

+    char *at_next = NULL;

     int par = *((int *)(((MSG_BUF*)msg)->aucDataBuf));

-    if(1 == par)

+    if (1 == par)

     {

-        at_next=normal_getcfunset(ZAT_AIRMODE);

+        at_next = normal_getcfunset(ZAT_AIRMODE);

     }

-    else if(0 == par)

+    else if (0 == par)

     {

-        at_next=normal_getcfunset(ZAT_POWERON);

+        at_next = normal_getcfunset(ZAT_POWERON);

     }

     return at_next;

 }

 

 //LTEËøÆµ,δʹÓÃ

-char *start_celllock_cmd(void *msg,struct at_context *context)

+char *start_celllock_cmd(void *msg, struct at_context *context)

 {

     return normal_getzltelcset();

 }

 

-char *start_imeireq_cmd(void *msg,struct at_context *context)

+char *start_imeireq_cmd(void *msg, struct at_context *context)

 {

     return normal_getcgsn();

 }

 

-char *start_zversionreq_cmd(void *msg,struct at_context *context)

+char *start_zversionreq_cmd(void *msg, struct at_context *context)

 {

     return normal_getzversion();

 }

 

-char *start_cgdcontset_cmd(void *msg,struct at_context *context)

+char *start_cgdcontset_cmd(void *msg, struct at_context *context)

 {

-	char creg_stat[20] = {0};

-	char cereg_stat[20] = {0};

-	

-	sc_cfg_get("cgreg_stat", creg_stat, sizeof(creg_stat));

-	sc_cfg_get("cereg_stat", cereg_stat, sizeof(cereg_stat));

-	at_print(AT_ERR,"cgdcontset cgreg =%s, cereg =%s!\n",creg_stat,cereg_stat);

-	if(1 != atoi(creg_stat) && 5 != atoi(creg_stat) && 1 != atoi(cereg_stat) && 5 != atoi(cereg_stat))

-	{//ûËѵ½ÍøÔòÒªÁ¢¼´ÅäÖÃAPN£¬autoapnºÍwebuiÅäÖÃʱÓÐЧ

-		return normal_getcgdcontset(1);

-	}

-	return NULL;

+    char creg_stat[20] = {0};

+    char cereg_stat[20] = {0};

+

+    sc_cfg_get("cgreg_stat", creg_stat, sizeof(creg_stat));

+    sc_cfg_get("cereg_stat", cereg_stat, sizeof(cereg_stat));

+    at_print(AT_ERR, "cgdcontset cgreg =%s, cereg =%s!\n", creg_stat, cereg_stat);

+    if (1 != atoi(creg_stat) && 5 != atoi(creg_stat) && 1 != atoi(cereg_stat) && 5 != atoi(cereg_stat))

+    {

+        //ûËѵ½ÍøÔòÒªÁ¢¼´ÅäÖÃAPN£¬autoapnºÍwebuiÅäÖÃʱÓÐЧ

+        return normal_getcgdcontset(1);

+    }

+    return NULL;

 }

 

 //ϵͳÐÅÏ¢»ñÈ¡ÃüÁîat^sysinfo

-char *start_query_sysinfo(void *msg,struct at_context *context)

+char *start_query_sysinfo(void *msg, struct at_context *context)

 {

     return normal_getsysinfo();

 }

 

 //zuslotÖ÷¶¯Éϱ¨ÃüÁîµÄ´¦Àí

-char *start_start_zuslot(void *msg,struct at_context *context)

+char *start_start_zuslot(void *msg, struct at_context *context)

 {

     T_zAt_ZuslotRes   zuslotPara = {0};

     char needrestart[50]  = {0};

-    MSG_BUF *buf=NULL;

-    char *at_paras=malloc(strlen((char *)((MSG_BUF*)msg)->aucDataBuf)+1);

-	if(at_paras == NULL)

-		return NULL;

-    memset(at_paras,0,strlen((char *)((MSG_BUF*)msg)->aucDataBuf)+1);

-    strcpy(at_paras,(char *)((MSG_BUF*)msg)->aucDataBuf);

-	

-	void *p[2] = {&zuslotPara.slot,&zuslotPara.slot_state};

-	at_print(AT_DEBUG,"start_start_zuslot at_paras=%s!\n",at_paras);

-	parse_param2("%d,%d", at_paras, p);

-	at_print(AT_DEBUG,"start_start_zuslot slot=%ld,slot_state=%ld!\n",zuslotPara.slot,zuslotPara.slot_state);

+    MSG_BUF *buf = NULL;

+    char *at_paras = malloc(strlen((char *)((MSG_BUF*)msg)->aucDataBuf) + 1);

+    if (at_paras == NULL)

+    {

+        return NULL;

+    }

+    memset(at_paras, 0, strlen((char *)((MSG_BUF*)msg)->aucDataBuf) + 1);

+    strcpy(at_paras, (char *)((MSG_BUF*)msg)->aucDataBuf);

+

+    void *p[2] = {&zuslotPara.slot, &zuslotPara.slot_state};

+    at_print(AT_DEBUG, "start_start_zuslot at_paras=%s!\n", at_paras);

+    parse_param2("%d,%d", at_paras, p);

+    at_print(AT_DEBUG, "start_start_zuslot slot=%ld,slot_state=%ld!\n", zuslotPara.slot, zuslotPara.slot_state);

     free(at_paras);

-    if(zuslotPara.slot_state == 0)//°Î¿¨²Ù×÷

-    {	

-        at_print(AT_DEBUG,"zuslot simcard plugout\n");

-        sc_cfg_set(NV_NEED_SIM_PIN,"");

-	    g_SimSlotFlag = FALSE;

+    if (zuslotPara.slot_state == 0) //°Î¿¨²Ù×÷

+    {

+        at_print(AT_DEBUG, "zuslot simcard plugout\n");

+        sc_cfg_set(NV_NEED_SIM_PIN, "");

+        g_SimSlotFlag = FALSE;

         normal_simcardcfgreset();

         //¸øsms¡¢pbÄ£¿é·¢ÏûÏ¢£¬nvÖØÖ㬿¨²à¶ÌÐÅ¡¢ÁªÏµÈËɾ³ý

-	    if(g_modem_model)

-	    {

-			if(g_support_sms)	

-            ipc_send_message2(MODULE_ID_AT_CTL,MODULE_ID_SMS,MSG_CMD_ZUSLOT_IND,sizeof(zuslotPara),(unsigned char *)&zuslotPara,0);

-			if(g_support_pb)	

-            ipc_send_message2(MODULE_ID_AT_CTL,MODULE_ID_PB,MSG_CMD_ZUSLOT_IND,sizeof(zuslotPara),(unsigned char *)&zuslotPara,0);

-	    }

+        if (g_modem_model)

+        {

+            if (g_support_sms)

+            {

+                ipc_send_message2(MODULE_ID_AT_CTL, MODULE_ID_SMS, MSG_CMD_ZUSLOT_IND, sizeof(zuslotPara), (unsigned char *)&zuslotPara,

+                                  0);

+            }

+            if (g_support_pb)

+            {

+                ipc_send_message2(MODULE_ID_AT_CTL, MODULE_ID_PB, MSG_CMD_ZUSLOT_IND, sizeof(zuslotPara), (unsigned char *)&zuslotPara,

+                                  0);

+            }

+        }

         //psinfo.powersave_state=POWERSAVE_CARDREMOVE_CMD;

         //return normal_getpowersave();

     }

-    else if(zuslotPara.slot_state == 1)//²å¿¨²Ù×÷

+    else if (zuslotPara.slot_state == 1) //²å¿¨²Ù×÷

     {

-        at_print(AT_DEBUG,"zuslot simcard plugin\n");

-        sc_cfg_get("need_restart_when_sim_insert",needrestart,sizeof(needrestart));

-        if(strcmp("yes", needrestart) == 0)//ÖØÆô²Ù×÷

+        at_print(AT_DEBUG, "zuslot simcard plugin\n");

+        sc_cfg_get("need_restart_when_sim_insert", needrestart, sizeof(needrestart));

+        if (strcmp("yes", needrestart) == 0) //ÖØÆô²Ù×÷

         {

-            at_print(AT_DEBUG,"zuslot simcard plugin,sendmsg to MODULE_ID_MAIN_CTRL\n");

-            ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_RESTART_REQUEST, 0, NULL,0);

+            at_print(AT_DEBUG, "zuslot simcard plugin,sendmsg to MODULE_ID_MAIN_CTRL\n");

+            ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MAIN_CTRL, MSG_CMD_RESTART_REQUEST, 0, NULL, 0);

         }

         else//²»ÖØÆô²Ù×÷£¬ÖØÐÂ×ßÒ»±é¿ª»úÁ÷³Ì

         {

             g_SimSlotFlag = TRUE;

-		    g_zUfi_canPdpDail = TRUE;

-			g_need_smspb_init = 0;

-            buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

+            g_zUfi_canPdpDail = TRUE;

+            g_need_smspb_init = 0;

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

             rcv_clt_req_msg_proc(buf);

             free(buf);

         }

-    }	

+    }

     return NULL;

 }

 

-char *start_setroam_cmd(void *msg,struct at_context *context)

+char *start_setroam_cmd(void *msg, struct at_context *context)

 {

     return normal_getsysconfigset();

 }

 

-int sysconfigread_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int sysconfigread_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"sysconfigread_ok_act msg_id=%x!\n",context->msg_id);

-    switch(context->msg_id)

+    at_print(AT_DEBUG, "sysconfigread_ok_act msg_id=%x!\n", context->msg_id);

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

             psinfo.zrap_state = ZRAP_READ_FIR_CMD;

             *next_req = normal_getzrapread();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

     }

     return AT_END;

 }

 

-int sysconfigread_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int sysconfigread_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"zrap_err_act msg_id=%x!\n",context->msg_id);

-    switch(context->msg_id)

+    at_print(AT_DEBUG, "zrap_err_act msg_id=%x!\n", context->msg_id);

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

             psinfo.zrap_state = ZRAP_READ_FIR_CMD;

             *next_req = normal_getzrapread();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

     }

     return AT_END;

 }

 

-int  zrap_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zrap_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"zrap_ok_act msg_id=%x!\n",context->msg_id);

-    switch(context->msg_id)

+    at_print(AT_DEBUG, "zrap_ok_act msg_id=%x!\n", context->msg_id);

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         case MSG_CMD_VERIFY_PIN_REQ:

         case MSG_CMD_VERIFY_PUK_REQ:

         {

-            if(psinfo.zrap_state == ZRAP_READ_FIR_CMD)//¿ª»úÁ÷³Ì×ߵķÖÖ§

+            if (psinfo.zrap_state == ZRAP_READ_FIR_CMD) //¿ª»úÁ÷³Ì×ߵķÖÖ§

             {

                 *next_req = normal_getcpinread();

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                return AT_CONTINUE;

-				}

-            }

-            else if(psinfo.zrap_state == ZRAP_READ_SEC_CMD)//pinºÍpukÂëÑéÖ¤ºó×ߵķÖÖ§

-            {

-                char pinSet[50]={0};

-                normal_recvzrapok();

-                sc_cfg_get(NV_PINSET_RESULT,pinSet,sizeof(pinSet));

-                if(0 == strcmp(pinSet,"succ"))

+                if (*next_req)

                 {

-                    *next_req = normal_getcgsn();

-					if(*next_req){

-                        *next_len = strlen(*next_req);

-                        return AT_CONTINUE;

-					}

+                    *next_len = strlen(*next_req);

+                    return AT_CONTINUE;

                 }

             }

-            psinfo.zrap_state=ZRAP_OTHER_CMD;

+            else if (psinfo.zrap_state == ZRAP_READ_SEC_CMD) //pinºÍpukÂëÑéÖ¤ºó×ߵķÖÖ§

+            {

+                char pinSet[50] = {0};

+                normal_recvzrapok();

+                sc_cfg_get(NV_PINSET_RESULT, pinSet, sizeof(pinSet));

+                if (0 == strcmp(pinSet, "succ"))

+                {

+                    *next_req = normal_getcgsn();

+                    if (*next_req)

+                    {

+                        *next_len = strlen(*next_req);

+                        return AT_CONTINUE;

+                    }

+                }

+            }

+            psinfo.zrap_state = ZRAP_OTHER_CMD;

             return AT_END;

         }

         case MSG_CMD_PIN_NUM_REQ:

         {

-            *next_req=malloc(10);

-			if(*next_req){

-                *next_len=10;

-                sc_cfg_get("pinnumber",*next_req, 10-1);

+            *next_req = malloc(10);

+            if (*next_req)

+            {

+                *next_len = 10;

+                sc_cfg_get("pinnumber", *next_req, 10 - 1);

                 return AT_END;

-			}

-			break; // cov 	M

+            }

+            break; // cov 	M

         }

         case MSG_CMD_PIN_MANAGE_REQ:

         {

@@ -2764,37 +2862,37 @@
     return AT_END;

 }

 

-int  zrap_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zrap_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         case MSG_CMD_PIN_MANAGE_REQ:

         case MSG_CMD_VERIFY_PIN_REQ:

         case MSG_CMD_VERIFY_PUK_REQ:

         {

-            psinfo.zrap_state=ZRAP_OTHER_CMD;

+            psinfo.zrap_state = ZRAP_OTHER_CMD;

             if ((0 == strcmp(at_str, "10"))    /*no sim card*/

-                             ||(0 == strcmp(at_str, "13"))    /*card initialize failed*/

-                             ||(0 == strcmp(at_str, "15")))    /*card error*/

+                    || (0 == strcmp(at_str, "13"))   /*card initialize failed*/

+                    || (0 == strcmp(at_str, "15")))   /*card error*/

             {

-                if(0 == strcmp(at_str, "13"))

+                if (0 == strcmp(at_str, "13"))

                 {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_destroy");

-                    at_print(AT_DEBUG,"modem_sim_destroy:%s\n",at_str);

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_destroy");

+                    at_print(AT_DEBUG, "modem_sim_destroy:%s\n", at_str);

                 }

                 else

                 {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_undetected");

-                    at_print(AT_DEBUG,"modem_sim_undetected:%s\n",at_str);

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_undetected");

+                    at_print(AT_DEBUG, "modem_sim_undetected:%s\n", at_str);

                 }

 

-				

-				ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL,0);

-				

+

+                ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL, 0);

+

                 /*³õʼ»¯pbmµÄAP ²àµç»°±¾×¼±¸³É¹¦£¬·ñÔòÎÞ¿¨Ê±webuiתȦ*/

-                sc_cfg_set("pbm_init_flag","0");

-                

+                sc_cfg_set("pbm_init_flag", "0");

+

                 //½ø·ÉÐÐģʽ

                 //*next_req = normal_getpowersave();

                 //*next_len = strlen(*next_req);

@@ -2806,28 +2904,30 @@
                     return AT_END;

                 }

                 *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

-				*next_req = normal_getmtnetset(mccNum);

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getmtnetset(mccNum);

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    return AT_CONTINUE;

+                }

             }

             return AT_END;

         }

         case MSG_CMD_PIN_NUM_REQ:

         {

-            *next_req=malloc(10);

-			if(*next_req){

-            *next_len=10;

-            strcpy(*next_req,"0");

-            return AT_END;

-			}

+            *next_req = malloc(10);

+            if (*next_req)

+            {

+                *next_len = 10;

+                strcpy(*next_req, "0");

+                return AT_END;

+            }

         }

     }

     return AT_END;

 }

 

-int sysconfig_auto_act( char *at_paras ,int is_query_report)

+int sysconfig_auto_act( char *at_paras, int is_query_report)

 {

     int mode = ZAT_SYSCONFIG_MODE_AUTO;

     int acqorder = ZAT_SYSCONFIG_PREF_ACQ_AUTO;

@@ -2835,58 +2935,59 @@
     int  acqordernow = -1;

     int  roam = -1;

     int  roamnow = -1;

-    int  srvdomain = -1;	

-	char auto_acqorder[50] = {0};

-	char strTemp[10] = {0};

-	

-	sc_cfg_get("auto_acqorder",auto_acqorder,sizeof(auto_acqorder));

+    int  srvdomain = -1;

+    char auto_acqorder[50] = {0};

+    char strTemp[10] = {0};

 

-	at_print(AT_DEBUG,"sysconfig_auto_act\n");	

-    sscanf(at_paras,"%d,%d,%d,%d",&modenow,&acqordernow,&roamnow,&srvdomain);

+    sc_cfg_get("auto_acqorder", auto_acqorder, sizeof(auto_acqorder));

 

-	at_print(AT_DEBUG,"sysconfig_auto_act modenow=%d, acqordernow=%d, auto_acqorder=%s\n",modenow, acqordernow, auto_acqorder);	

+    at_print(AT_DEBUG, "sysconfig_auto_act\n");

+    sscanf(at_paras, "%d,%d,%d,%d", &modenow, &acqordernow, &roamnow, &srvdomain);

 

-	//×Ô¶¯ËÑÍøµÄÍøÂç½ÓÈë´ÎÐòΪ¿Õ£¬¶øµ±Ç°²éѯµ½µÄËÑÍø·½Ê½ÊÇ×Ô¶¯£¬Ôò±£´æÍøÂç½ÓÈë´ÎÐò

-	if(0 == strlen(auto_acqorder) && modenow == 2)

-	{		

-	    snprintf(strTemp, sizeof(strTemp), "%d", acqordernow);

-	    sc_cfg_set("auto_acqorder", strTemp);

-	}

-	

-	normal_getsysconfigsetParam(&mode, &acqorder, &roam);

-	if(mode != modenow || acqorder != acqordernow || roam != roamnow)

-	{

-		MSG_BUF *msg_buf = NULL;

-		msg_buf=normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_NET_SELECT_REQ, 0, NULL);

-		rcv_msg_proc(msg_buf);

-		free(msg_buf);

-	}

+    at_print(AT_DEBUG, "sysconfig_auto_act modenow=%d, acqordernow=%d, auto_acqorder=%s\n", modenow, acqordernow,

+             auto_acqorder);

+

+    //×Ô¶¯ËÑÍøµÄÍøÂç½ÓÈë´ÎÐòΪ¿Õ£¬¶øµ±Ç°²éѯµ½µÄËÑÍø·½Ê½ÊÇ×Ô¶¯£¬Ôò±£´æÍøÂç½ÓÈë´ÎÐò

+    if (0 == strlen(auto_acqorder) && modenow == 2)

+    {

+        snprintf(strTemp, sizeof(strTemp), "%d", acqordernow);

+        sc_cfg_set("auto_acqorder", strTemp);

+    }

+

+    normal_getsysconfigsetParam(&mode, &acqorder, &roam);

+    if (mode != modenow || acqorder != acqordernow || roam != roamnow)

+    {

+        MSG_BUF *msg_buf = NULL;

+        msg_buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_NET_SELECT_REQ, 0, NULL);

+        rcv_msg_proc(msg_buf);

+        free(msg_buf);

+    }

 

     return AT_END;

 }

 

-int zrap_auto_act( char *at_paras ,int is_query_report)

+int zrap_auto_act( char *at_paras, int is_query_report)

 {

     char strTemp[10] = {0};

     int  pinNum1 = -1;

     int  pinNum2 = -1;

     int  pukNum1 = -1;

     int  pukNum2 = -1;

-    at_print(AT_DEBUG,"zrap_auto_act\n");	

-    sscanf(at_paras,"%d,%d,%d,%d",&pinNum1,&pinNum2,&pukNum1,&pukNum2);

+    at_print(AT_DEBUG, "zrap_auto_act\n");

+    sscanf(at_paras, "%d,%d,%d,%d", &pinNum1, &pinNum2, &pukNum1, &pukNum2);

 

-    snprintf(strTemp, sizeof(strTemp),"%d", pinNum1);

+    snprintf(strTemp, sizeof(strTemp), "%d", pinNum1);

     sc_cfg_set(NV_PINNUMBER, strTemp);

-	

-    snprintf(strTemp, sizeof(strTemp),"%d", pukNum1);

+

+    snprintf(strTemp, sizeof(strTemp), "%d", pukNum1);

     sc_cfg_set(NV_PUKNUMBER, strTemp);

     return AT_END;

 }

 

 //cpin²éѯ·µ»Øok´¦Àíº¯Êý

-int cpin_read_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cpin_read_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

 

         case ATCTL_INNER_ZMSRI_MSG:

@@ -2896,101 +2997,104 @@
             char autoSimpin[50] = {0};

             char autoCode[50] = {0};

             char pinNumber[50] = {0};

-            sc_cfg_get(NV_SIM_PIN,simPin,sizeof(simPin));

-            sc_cfg_get(NV_SIM_PUK,simPuk,sizeof(simPuk));

-            

-            /*²»ÐèÒªPINÂ룬·¢CGSN²éѯÃüÁî*/

-            if(strcmp("0",simPin) == 0 && strcmp("0",simPuk) == 0 )

-            {	

-				*next_req = normal_getcgregset("2");

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                return AT_CONTINUE;

-				}

-            }

-            /*ÐèÒªÑéÖ¤*/

-            else if(strcmp("1",simPin)==0)

-            {

-            	ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL,0);

+            sc_cfg_get(NV_SIM_PIN, simPin, sizeof(simPin));

+            sc_cfg_get(NV_SIM_PUK, simPuk, sizeof(simPuk));

 

-                sc_cfg_get(NV_AUTO_SIMPIN,autoSimpin,sizeof(autoSimpin));

-                sc_cfg_get(NV_AUTO_SIMPIN_CODE,autoCode,sizeof(autoCode));

-                sc_cfg_get(NV_PINNUMBER,pinNumber,sizeof(pinNumber));

-                /*×Ô¶¯pinÂëÑéÖ¤*/

-                if((0 == strcmp(autoSimpin,"1")) && (strcmp(autoCode,"") != 0))

+            /*²»ÐèÒªPINÂ룬·¢CGSN²éѯÃüÁî*/

+            if (strcmp("0", simPin) == 0 && strcmp("0", simPuk) == 0 )

+            {

+                *next_req = normal_getcgregset("2");

+                if (*next_req)

                 {

-                    *next_req = normal_getcpinset(autoCode);

-					if(*next_req){

                     *next_len = strlen(*next_req);

                     return AT_CONTINUE;

-					}

+                }

+            }

+            /*ÐèÒªÑéÖ¤*/

+            else if (strcmp("1", simPin) == 0)

+            {

+                ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL, 0);

+

+                sc_cfg_get(NV_AUTO_SIMPIN, autoSimpin, sizeof(autoSimpin));

+                sc_cfg_get(NV_AUTO_SIMPIN_CODE, autoCode, sizeof(autoCode));

+                sc_cfg_get(NV_PINNUMBER, pinNumber, sizeof(pinNumber));

+                /*×Ô¶¯pinÂëÑéÖ¤*/

+                if ((0 == strcmp(autoSimpin, "1")) && (strcmp(autoCode, "") != 0))

+                {

+                    *next_req = normal_getcpinset(autoCode);

+                    if (*next_req)

+                    {

+                        *next_len = strlen(*next_req);

+                        return AT_CONTINUE;

+                    }

                 }

                 /*ÈôpinµÄÊ£Óà´ÎÊýΪ0£¬Ôò½«ÊÇ·ñÐèÒªPukÂë¸ÄΪ1*/

-                else if(strcmp("0",pinNumber)==0)

+                else if (strcmp("0", pinNumber) == 0)

                 {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpuk");

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpuk");

                     return AT_END;

                 }

                 return AT_END;

             }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M MISSING_BREAK

         }

         case MSG_CMD_PIN_STATUS_REQ:

         {

             char simPin[50] = {0};

             char simPuk[50] = {0};

-            

-            sc_cfg_get("sim_pin",simPin,sizeof(simPin));

-            sc_cfg_get("sim_puk",simPuk,sizeof(simPuk));  

-            *next_req=malloc(10);

-			if(*next_req){

-            *next_len=10;

-            if(strcmp("0", simPin) == 0 && strcmp("0", simPuk) == 0 )

+

+            sc_cfg_get("sim_pin", simPin, sizeof(simPin));

+            sc_cfg_get("sim_puk", simPuk, sizeof(simPuk));

+            *next_req = malloc(10);

+            if (*next_req)

             {

-                sprintf(*next_req,"%d", PIN_STATUS_NO_PIN);

+                *next_len = 10;

+                if (strcmp("0", simPin) == 0 && strcmp("0", simPuk) == 0 )

+                {

+                    sprintf(*next_req, "%d", PIN_STATUS_NO_PIN);

+                }

+                else if (strcmp("1", simPin) == 0)

+                {

+                    sprintf(*next_req, "%d", PIN_STATUS_PIN1);

+                }

+                else if (strcmp("1", simPuk) == 0)

+                {

+                    sprintf(*next_req, "%d", PIN_STATUS_PUK1);

+                }

+                return AT_END;

             }

-            else if(strcmp("1", simPin)==0)

-            {

-                sprintf(*next_req,"%d", PIN_STATUS_PIN1);

-            }  

-            else if(strcmp("1", simPuk)==0)

-            {

-                sprintf(*next_req,"%d", PIN_STATUS_PUK1);

-            }  

-            return AT_END;

-			}

         }

     }

     return AT_END;

 }

 

-int cpin_read_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cpin_read_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

             if ((0 == strcmp(at_str, "10"))    /*no sim card*/

-                             ||(0 == strcmp(at_str, "13"))    /*card initialize failed*/

-                             ||(0 == strcmp(at_str, "15")))    /*card error*/

+                    || (0 == strcmp(at_str, "13"))   /*card initialize failed*/

+                    || (0 == strcmp(at_str, "15")))   /*card error*/

             {

-                if(0 == strcmp(at_str, "13"))

+                if (0 == strcmp(at_str, "13"))

                 {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_destroy");

-                    at_print(AT_DEBUG,"modem_sim_destroy:%s\n",at_str);

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_destroy");

+                    at_print(AT_DEBUG, "modem_sim_destroy:%s\n", at_str);

                 }

                 else

                 {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_undetected");

-                    at_print(AT_DEBUG,"modem_sim_undetected:%s\n",at_str);					

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_undetected");

+                    at_print(AT_DEBUG, "modem_sim_undetected:%s\n", at_str);

                 }

 

-				ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL,0);

+                ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_SIM_ABNORMAL_IND, 0, NULL, 0);

 

                 /*³õʼ»¯pbmµÄAP ²àµç»°±¾×¼±¸³É¹¦£¬·ñÔòÎÞ¿¨Ê±webuiתȦ*/

-                sc_cfg_set("pbm_init_flag","0");

-                

+                sc_cfg_set("pbm_init_flag", "0");

+

                 //½ø·ÉÐÐģʽ

                 //*next_req = normal_getpowersave();

                 //*next_len = strlen(*next_req);

@@ -3001,45 +3105,47 @@
                     return AT_END;

                 }

                 *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

-				*next_req = normal_getmtnetset(mccNum);

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                //psinfo.powersave_state=POWERSAVE_CARDERROR_CMD;

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getmtnetset(mccNum);

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    //psinfo.powersave_state=POWERSAVE_CARDERROR_CMD;

+                    return AT_CONTINUE;

+                }

             }

             return AT_END;

         }

         case MSG_CMD_PIN_STATUS_REQ:

         {

-            *next_req=malloc(10);

-			if(*next_req){

-            *next_len=10;

-            sprintf(*next_req,"%d", PIN_STATUS_NO_PIN);

-            return AT_END;

-			}

+            *next_req = malloc(10);

+            if (*next_req)

+            {

+                *next_len = 10;

+                sprintf(*next_req, "%d", PIN_STATUS_NO_PIN);

+                return AT_END;

+            }

         }

     }

     return AT_END;

 }

 

 

-int cpin_set_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cpin_set_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         case MSG_CMD_VERIFY_PIN_REQ:

         {

             char pinProcess[50] = {0};

-            MSG_BUF *buf=NULL;

-            sc_cfg_get(NV_PIN_PUK_PROCESS,pinProcess,sizeof(pinProcess));

-            if(strcmp(pinProcess,"begin") == 0)

+            MSG_BUF *buf = NULL;

+            sc_cfg_get(NV_PIN_PUK_PROCESS, pinProcess, sizeof(pinProcess));

+            if (strcmp(pinProcess, "begin") == 0)

             {

-                sc_cfg_set(NV_PIN_PUK_PROCESS, "end");        

+                sc_cfg_set(NV_PIN_PUK_PROCESS, "end");

             }

-            sc_cfg_set(NV_PINSET_RESULT,"succ");

-            sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_ready");

+            sc_cfg_set(NV_PINSET_RESULT, "succ");

+            sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_ready");

             /*at_next=malloc(AT_CMD_MAX);

             //PINÂëÉèÖóɹ¦£¬·¢AT+ZRAP?ÊÇΪÁ˸üÐÂPINÂëºÍpukÂëÊ£Óà´ÎÊý

             sprintf(at_next,"AT+ZRAP?\r\n");

@@ -3047,7 +3153,7 @@
             *next_len = strlen(at_next);

             psinfo.zrap_state = ZRAP_READ_SEC_CMD;

             return AT_CONTINUE;*/

-            buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

             rcv_clt_req_msg_proc(buf);

             free(buf);

             return AT_END;

@@ -3055,222 +3161,228 @@
         case MSG_CMD_VERIFY_PUK_REQ:

         {

             char modemState[50] = {0};

-			char pinProcess[50] = {0};

+            char pinProcess[50] = {0};

 

-			sc_cfg_set(NV_PINSET_RESULT,"succ");

-			sc_cfg_get(NV_PIN_PUK_PROCESS,pinProcess,sizeof(pinProcess));

-			if(strcmp(pinProcess,"begin") == 0)

-		    {

-		        sc_cfg_set(NV_PIN_PUK_PROCESS, "end");

-		    }

-            

-            sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-            if(strcmp("modem_init_complete",modemState))

+            sc_cfg_set(NV_PINSET_RESULT, "succ");

+            sc_cfg_get(NV_PIN_PUK_PROCESS, pinProcess, sizeof(pinProcess));

+            if (strcmp(pinProcess, "begin") == 0)

             {

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_ready");

+                sc_cfg_set(NV_PIN_PUK_PROCESS, "end");

             }

-            *next_req = normal_getclckset(2,"SC",2);

-			if(*next_req){

+

+            sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+            if (strcmp("modem_init_complete", modemState))

+            {

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_ready");

+            }

+            *next_req = normal_getclckset(2, "SC", 2);

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 return AT_CONTINUE;

-			}

-			break;

+            }

+            break;

         }

         case MSG_CMD_PIN_VERIFY_REQ:

         {

-            *next_req=malloc(10);

-			if(*next_req){

-                *next_len=10;

-                strcpy(*next_req,"0");

+            *next_req = malloc(10);

+            if (*next_req)

+            {

+                *next_len = 10;

+                strcpy(*next_req, "0");

                 return AT_END;

-			}

-			break;

+            }

+            break;

         }

     }

     return AT_END;

 }

 

-int cpin_set_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cpin_set_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         case MSG_CMD_VERIFY_PIN_REQ://PINÂëÑéÖ¤

         {

             char autoSimpin[50] = {0};

-            sc_cfg_get(NV_AUTO_SIMPIN,autoSimpin,sizeof(autoSimpin));

-            if(0 == strcmp(autoSimpin,"1"))

+            sc_cfg_get(NV_AUTO_SIMPIN, autoSimpin, sizeof(autoSimpin));

+            if (0 == strcmp(autoSimpin, "1"))

             {

-                sc_cfg_set(NV_AUTO_SIMPIN,"0");

+                sc_cfg_set(NV_AUTO_SIMPIN, "0");

             }

-            if(0 == strcmp(at_str, "16"))

+            if (0 == strcmp(at_str, "16"))

             {

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpin");

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpin");

             }

-            else if (0 == strcmp(at_str, "12"))	

+            else if (0 == strcmp(at_str, "12"))

             {

                 /*Êä´í3´Îpin£¬½«±äΪwaitpuk*/

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpuk");

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpuk");

             }

-            sc_cfg_set(NV_PINSET_RESULT,"fail");

+            sc_cfg_set(NV_PINSET_RESULT, "fail");

             *next_req = normal_getzrapread();

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 psinfo.zrap_state = ZRAP_READ_SEC_CMD;

                 return AT_CONTINUE;

-			}

+            }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M MISSING_BREAK

         }

         case MSG_CMD_VERIFY_PUK_REQ://PUKÂëÑéÖ¤

         {

             char modemState[50] = {0};

-            if (0 == strcmp(at_str, "16"))       

+            if (0 == strcmp(at_str, "16"))

             {

-                sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-                if(strcmp("modem_init_complete",modemState))

-        	    {

-                    sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpuk");

-        	    }		

+                sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+                if (strcmp("modem_init_complete", modemState))

+                {

+                    sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpuk");

+                }

             }

-			else if (0 == strcmp(at_str, "13"))

+            else if (0 == strcmp(at_str, "13"))

             {

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_sim_destroy");

-                at_print(AT_DEBUG,"modem_sim_destroy:%s\n",at_str);

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_sim_destroy");

+                at_print(AT_DEBUG, "modem_sim_destroy:%s\n", at_str);

             }

-        	sc_cfg_set(NV_PINSET_RESULT,"fail");

+            sc_cfg_set(NV_PINSET_RESULT, "fail");

             *next_req = normal_getzrapread();

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 psinfo.zrap_state = ZRAP_READ_SEC_CMD;

                 return AT_CONTINUE;

-			}

+            }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M MISSING_BREAK

         }

         case MSG_CMD_PIN_VERIFY_REQ://wifiÄ£¿é·¢¹ýÀ´µÄÏûÏ¢

         {

-            *next_req=malloc(10);

-			if(*next_req){

-                *next_len=10;

-                strcpy(*next_req,"1");

+            *next_req = malloc(10);

+            if (*next_req)

+            {

+                *next_len = 10;

+                strcpy(*next_req, "1");

                 return AT_END;

-			}

+            }

 

-			break;

+            break;

         }

     }

     return AT_END;

 }

 

 //ÀàËÆcopsÅжÏǰ׺£¬·À´íÎó´¦Àí

-int cpin_auto_act(char *at_paras ,int is_query_report)

+int cpin_auto_act(char *at_paras, int is_query_report)

 {

     /*ÏìӦΪReady£¬²»ÐèÒªPInÂëÑéÖ¤*/

     if (strcmp("READY", at_paras) == 0)

     {

         sc_cfg_set(NV_SIM_PIN, "0");

         sc_cfg_set(NV_SIM_PUK, "0");

-		//sc_cfg_set(NV_NEED_SIM_PIN,"");

+        //sc_cfg_set(NV_NEED_SIM_PIN,"");

     }

     /*Èç¹ûµ±Ç°ÃÜÂëÊäÈëÇëÇóΪPIN»òPIN2£¬ÔòÊäÈë+CPIN=<pin>½øÐÐУÑé*/

-    else if(strcmp("SIM PIN",at_paras) == 0 || strcmp("SIM PIN2",at_paras) == 0)

+    else if (strcmp("SIM PIN", at_paras) == 0 || strcmp("SIM PIN2", at_paras) == 0)

     {

         sc_cfg_set(NV_SIM_PIN, "1");

-        sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpin");

-		sc_cfg_set(NV_NEED_SIM_PIN,"yes");

+        sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpin");

+        sc_cfg_set(NV_NEED_SIM_PIN, "yes");

     }

     /*Èç¹ûµ±Ç°ÃÜÂëÊäÈëÇëÇóΪPUK»òPUK2£¬ÔòÊäÈë+CPIN=<pin>,<newpin>½øÐнâËø*/

-    else if(strcmp("SIM PUK",at_paras) == 0 || strcmp("SIM PUK2",at_paras) == 0)

+    else if (strcmp("SIM PUK", at_paras) == 0 || strcmp("SIM PUK2", at_paras) == 0)

     {

         sc_cfg_set(NV_SIM_PUK, "1");

-        sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_waitpuk");

-		sc_cfg_set(NV_NEED_SIM_PIN,"yes");

+        sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_waitpuk");

+        sc_cfg_set(NV_NEED_SIM_PIN, "yes");

     }

 

     return AT_END;

 }

 

 

-int  cgsn_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cgsn_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_GET_MAC_REQ:

         {

-#if 0        

-            *next_req=normal_getmacread();

-            *next_len=strlen(*next_req);

+#if 0

+            *next_req = normal_getmacread();

+            *next_len = strlen(*next_req);

             return AT_CONTINUE;

-#endif			

+#endif

         }

     }

     return AT_END;

 }

 

-int  cgsn_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cgsn_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_GET_MAC_REQ:

         {

-#if 0        

-            *next_req=normal_getmacread();

-            *next_len=strlen(*next_req);

+#if 0

+            *next_req = normal_getmacread();

+            *next_len = strlen(*next_req);

             return AT_CONTINUE;

-#endif			

+#endif

         }

     }

     return AT_END;

 }

 

-int cgsn_auto_act(char *at_paras ,int is_query_report)

+int cgsn_auto_act(char *at_paras, int is_query_report)

 {

-	at_print(AT_DEBUG,"cgsn_auto_act\n");	

-    sc_cfg_set(NV_IMEI,at_paras);

+    at_print(AT_DEBUG, "cgsn_auto_act\n");

+    sc_cfg_set(NV_IMEI, at_paras);

     return AT_END;

 }

 

-int ziccid_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int ziccid_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

-    {        

-		case MSG_CMD_MODEMREG_INFO_REQ:

-		{

-			*next_req = normal_getcimi();

-			if(*next_req){

-			*next_len = strlen(*next_req);

-			return AT_CONTINUE;

-			}

-		}

+    switch (context->msg_id)

+    {

+        case MSG_CMD_MODEMREG_INFO_REQ:

+        {

+            *next_req = normal_getcimi();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

+        }

     }

     return AT_END;

 }

 

-int ziccid_auto_act( char *at_paras ,int is_query_report)

+int ziccid_auto_act( char *at_paras, int is_query_report)

 {

     sc_cfg_set(NV_ZICCID, at_paras);

     return AT_END;

 }

 

-int  crsm_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  crsm_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"crsm_ok_act msg_id=%d\n",context->msg_id);

-    switch(context->msg_id)

+    at_print(AT_DEBUG, "crsm_ok_act msg_id=%d\n", context->msg_id);

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

             char strPlmn[70] = {0};

-            char *pRes=NULL;

+            char *pRes = NULL;

             char strPlmnLast[10] = {0};

             sc_cfg_get("crsm_plmn", strPlmn, sizeof(strPlmn));

             pRes = strstr(strPlmn, "144,0,");//±íʾÕýÈ·¶ÁÈ¡

-            if(0 == strlen(strPlmn) || NULL == pRes)

+            if (0 == strlen(strPlmn) || NULL == pRes)

             {

                 g_plmnLen = 5;

             }

-            strncpy(strPlmnLast, &strPlmn[strlen(strPlmn)-2], 2);

-            if(0 == strcmp("03", strPlmnLast))

+            strncpy(strPlmnLast, &strPlmn[strlen(strPlmn) - 2], 2);

+            if (0 == strcmp("03", strPlmnLast))

             {

                 g_plmnLen = 6;

             }

@@ -3278,40 +3390,43 @@
             {

                 g_plmnLen = 5;

             }

-            at_print(AT_DEBUG,"crsm_ok_act, g_plmnLen = %d \n", g_plmnLen);

+            at_print(AT_DEBUG, "crsm_ok_act, g_plmnLen = %d \n", g_plmnLen);

             *next_req = normal_getcimi();;

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 return  AT_CONTINUE;

-			}

-			break; // cov M MISSING_BREAK

+            }

+            break; // cov M MISSING_BREAK

         }

         case MSG_CMD_CRSM_REQ:

         {

-            if(crsmrsp == NULL){

-				softap_assert("");

-				return AT_END;

-			}

-            *next_req=crsmrsp;

-            *next_len=strlen(*next_req);

+            if (crsmrsp == NULL)

+            {

+                softap_assert("");

+                return AT_END;

+            }

+            *next_req = crsmrsp;

+            *next_len = strlen(*next_req);

             return AT_END;

         }

     }

     return AT_END;

 }

 

-int  crsm_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  crsm_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            at_print(AT_DEBUG,"Recv CrsmPlmnlen ERR.\n");

+            at_print(AT_DEBUG, "Recv CrsmPlmnlen ERR.\n");

             *next_req = normal_getcimi();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return  AT_CONTINUE;

-			}

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return  AT_CONTINUE;

+            }

         }

         case MSG_CMD_CRSM_REQ:

         {

@@ -3322,134 +3437,142 @@
 }

 

 

-int crsm_auto_act(char *at_paras ,int is_query_report)

-{  

+int crsm_auto_act(char *at_paras, int is_query_report)

+{

     struct at_context *context = (struct at_context *)is_query_report;

 

-    if(context == NULL)

-        return AT_END;   

-    

-    at_print(AT_DEBUG,"crsm_auto_act msg_id=%x,at_paras=%s!\n",context->msg_id,at_paras);

-    switch(context->msg_id)

+    if (context == NULL)

+    {

+        return AT_END;

+    }

+

+    at_print(AT_DEBUG, "crsm_auto_act msg_id=%x,at_paras=%s!\n", context->msg_id, at_paras);

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            sc_cfg_set("crsm_plmn",at_paras);

+            sc_cfg_set("crsm_plmn", at_paras);

             return AT_END;

         }

         case MSG_CMD_CRSM_REQ:

         {

-            crsmrsp=malloc(256);

-            if(crsmrsp == NULL){

-				softap_assert("");

-				return AT_END;

-			}

-            memset(crsmrsp,0,256);

-            //sprintf(crsmrsp,at_paras);

-			sprintf(crsmrsp,"%s",at_paras); //YOCTO_PRO ÁÙʱÐÞ¸Ä

-            return AT_END;

-        }

-    }

-    return AT_END;

-}

-

-int  cimi_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

-{

-    switch(context->msg_id)

-    {

-        case ATCTL_INNER_ZMSRI_MSG:

-        {

-            if(normal_locknetmatch(mccNum, mncNum) == TRUE)

+            crsmrsp = malloc(256);

+            if (crsmrsp == NULL)

             {

-	            /*struct timeval tp;

-	            if (0 != gettimeofday(&tp,NULL))

-	            {

-	                at_print(AT_DEBUG,"get time of system wrong");

-	                return AT_END;

-	            }

-	            *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

-				*next_req = normal_getmtnetset(mccNum);

-				if(*next_req){

-    	            *next_len = strlen(*next_req);

-    	            return AT_CONTINUE;

-				}

-	        }

-            else

-            {

-                sc_cfg_set("modem_main_state","modem_imsi_waitnck"); 

-                return  AT_END;

-            }

-

-			break; // cov M

-        }

-        case MSG_CMD_CIMI_REQ:

-        {

-            *next_req=malloc(50);

-			if(*next_req){

-                *next_len=50;

-                sc_cfg_get(NV_SIM_IMSI,*next_req,50);

+                softap_assert("");

                 return AT_END;

-			}

-

-			break; // cov M

+            }

+            memset(crsmrsp, 0, 256);

+            //sprintf(crsmrsp,at_paras);

+            sprintf(crsmrsp, "%s", at_paras); //YOCTO_PRO ÁÙʱÐÞ¸Ä

+            return AT_END;

         }

-		case MSG_CMD_MODEMREG_INFO_REQ:

-		{

-			*next_req = normal_CnumRead();

-			if(*next_req){

-                *next_len = strlen(*next_req);

-    			return AT_CONTINUE;

-			}

-

-			break; // cov M

-		}

     }

     return AT_END;

 }

 

-int  cimi_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cimi_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            if(normal_locknetmatch(mccNum, mncNum) == TRUE)

+            if (normal_locknetmatch(mccNum, mncNum) == TRUE)

             {

-	            /*struct timeval tp;

-	            if (0 != gettimeofday(&tp,NULL))

-	            {

-	                at_print(AT_DEBUG,"get time of system wrong");

-	                return AT_END;

-	            }

-	            *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

-				*next_req = normal_getmtnetset(mccNum);

-				if(*next_req){

-    	            *next_len = strlen(*next_req);

-    	            return AT_CONTINUE;

-				}

-	        }

+                /*struct timeval tp;

+                if (0 != gettimeofday(&tp,NULL))

+                {

+                    at_print(AT_DEBUG,"get time of system wrong");

+                    return AT_END;

+                }

+                *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

+                *next_req = normal_getmtnetset(mccNum);

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    return AT_CONTINUE;

+                }

+            }

             else

             {

-                sc_cfg_set("modem_main_state","modem_imsi_waitnck"); 

+                sc_cfg_set("modem_main_state", "modem_imsi_waitnck");

                 return  AT_END;

             }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M

+        }

+        case MSG_CMD_CIMI_REQ:

+        {

+            *next_req = malloc(50);

+            if (*next_req)

+            {

+                *next_len = 50;

+                sc_cfg_get(NV_SIM_IMSI, *next_req, 50);

+                return AT_END;

+            }

+

+            break; // cov M

+        }

+        case MSG_CMD_MODEMREG_INFO_REQ:

+        {

+            *next_req = normal_CnumRead();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

+

+            break; // cov M

+        }

+    }

+    return AT_END;

+}

+

+int  cimi_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

+{

+    switch (context->msg_id)

+    {

+        case ATCTL_INNER_ZMSRI_MSG:

+        {

+            if (normal_locknetmatch(mccNum, mncNum) == TRUE)

+            {

+                /*struct timeval tp;

+                if (0 != gettimeofday(&tp,NULL))

+                {

+                    at_print(AT_DEBUG,"get time of system wrong");

+                    return AT_END;

+                }

+                *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);*/

+                *next_req = normal_getmtnetset(mccNum);

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    return AT_CONTINUE;

+                }

+            }

+            else

+            {

+                sc_cfg_set("modem_main_state", "modem_imsi_waitnck");

+                return  AT_END;

+            }

+

+            break; // cov M MISSING_BREAK

         }

         case MSG_CMD_CIMI_REQ:

         {

             return AT_END;

         }

-		case MSG_CMD_MODEMREG_INFO_REQ:

-		{

-			*next_req = normal_CnumRead();

-			if(*next_req){

+        case MSG_CMD_MODEMREG_INFO_REQ:

+        {

+            *next_req = normal_CnumRead();

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

-    			return AT_CONTINUE;

-			}

+                return AT_CONTINUE;

+            }

 

-			break; // cov M MISSING_BREAK

-		}

+            break; // cov M MISSING_BREAK

+        }

     }

     return AT_END;

 }

@@ -3469,7 +3592,7 @@
         //}

         default:

             softap_assert("");

-        

+

     }

     return AT_END;

 }

@@ -3481,38 +3604,38 @@
 }

 */

 int cimi_auto_act(char *at_paras, int is_query_report)

-{  

+{

     char ccmncNum[10]         = {0};

     struct at_context *context = (struct at_context *)is_query_report;

-    

-    strncpy(imsi,at_paras,sizeof(imsi)-1);

-	imsi[49]=0;

+

+    strncpy(imsi, at_paras, sizeof(imsi) - 1);

+    imsi[49] = 0;

     strncpy(mccNum, imsi, 3);

-    at_print(AT_DEBUG,"mcc is %s", mccNum);

-#if (APP_OS_TYPE == APP_OS_LINUX)	

-    if(6 == g_plmnLen)

-	{

-		strncpy(mncNum, imsi+3, 3);

-	}

-	else

-	{

-		strncpy(mncNum, imsi+3, 2);

-	}

-    

-    snprintf(ccmncNum, 10-1, "%s%s", mccNum, mncNum);

-	sc_cfg_set(NV_SIM_IMSI, imsi);

-	sc_cfg_set("sim_plmn", ccmncNum);

-	normal_get_cardtype(ccmncNum);

-    switch(context->msg_id)

-    {		

-		case ATCTL_INNER_ZMSRI_MSG:

-		case MSG_CMD_CIMI_REQ:

-		{

-			normal_getautoapn(ccmncNum);

-			break;

-		}

-	  	default:

-        {           

+    at_print(AT_DEBUG, "mcc is %s", mccNum);

+#if (APP_OS_TYPE == APP_OS_LINUX)

+    if (6 == g_plmnLen)

+    {

+        strncpy(mncNum, imsi + 3, 3);

+    }

+    else

+    {

+        strncpy(mncNum, imsi + 3, 2);

+    }

+

+    snprintf(ccmncNum, 10 - 1, "%s%s", mccNum, mncNum);

+    sc_cfg_set(NV_SIM_IMSI, imsi);

+    sc_cfg_set("sim_plmn", ccmncNum);

+    normal_get_cardtype(ccmncNum);

+    switch (context->msg_id)

+    {

+        case ATCTL_INNER_ZMSRI_MSG:

+        case MSG_CMD_CIMI_REQ:

+        {

+            normal_getautoapn(ccmncNum);

+            break;

+        }

+        default:

+        {

             break;

         }

     }

@@ -3520,123 +3643,128 @@
     return AT_END;

 }

 

-int sysconfig_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int sysconfig_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_NET_SELECT_REQ:

         {

             *next_req = normal_getcfunset(ZAT_POWERON);

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 sc_cfg_set(NV_NET_SELECT_RESULT, "sucess");

                 return  AT_CONTINUE;

-			}

+            }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M MISSING_BREAK

         }

 

-		default:

-		{

-		    break;

-		}

+        default:

+        {

+            break;

+        }

     }

     return AT_END;

 }

 

-int sysconfig_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int sysconfig_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-     switch(context->msg_id)

-     {

+    switch (context->msg_id)

+    {

         case MSG_CMD_NET_SELECT_REQ:

         {

             *next_req = normal_getcfunset(ZAT_POWERON);

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 sc_cfg_set(NV_NET_SELECT_RESULT, "fail");

                 return  AT_CONTINUE;

-			}

+            }

 

-			break; // cov M MISSING_BREAK

+            break; // cov M MISSING_BREAK

         }

 

-		default:

-		{

-		    break;

-		}

-     }

-     return AT_END;

+        default:

+        {

+            break;

+        }

+    }

+    return AT_END;

 }

 

-int cfun_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cfun_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-	sc_cfg_set("cfun_work", "none");

-    switch(context->msg_id)

+    sc_cfg_set("cfun_work", "none");

+    switch (context->msg_id)

     {

         //¿ª»úÁ÷³ÌÖÐAT+CFUN=1

         case ATCTL_INNER_ZMSRI_MSG:

         {

             char modemState[50]  = {0};

             normal_cfunOkSet();

-            sc_cfg_get(NV_MODEM_MAIN_STATE,modemState,sizeof(modemState));

-            if(0 == strcmp("modem_syscfg_exption",modemState))

+            sc_cfg_get(NV_MODEM_MAIN_STATE, modemState, sizeof(modemState));

+            if (0 == strcmp("modem_syscfg_exption", modemState))

             {

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_destroy"); 

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_destroy");

             }

             else

             {

-                sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_init_complete");      

+                sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_init_complete");

             }

             //*next_req = normal_getcgregset("2");

             //psinfo.zrap_state = ZRAP_READ_FIR_CMD;

             //*next_req = normal_getzrapread();

-        //#ifdef GUODIAN

-            if(g_customer_type == CUSTOMER_GUODIAN || g_customer_type == CUSTOMER_NANDIAN)

+            //#ifdef GUODIAN

+            if (g_customer_type == CUSTOMER_GUODIAN || g_customer_type == CUSTOMER_NANDIAN)

             {

-			    return  AT_END;

+                return  AT_END;

             }

-		//#else

-		    else

-            {      

-    			*next_req = normal_getsysconfigread();

-				if(*next_req){

+            //#else

+            else

+            {

+                *next_req = normal_getsysconfigread();

+                if (*next_req)

+                {

                     *next_len = strlen(*next_req);

                     return  AT_CONTINUE;

-				}

+                }

             }

 

-			break; // cov M MISSING_BREAK

-		//#endif

+            break; // cov M MISSING_BREAK

+            //#endif

         }

         //×Ô¶¯ËÑÍø

         case MSG_CMD_NET_SELECT_REQ:

         {

-            if(cfun_state==4)

+            if (cfun_state == 4)

             {

                 *next_req = normal_getsysconfigset();

-				if(*next_req){

+                if (*next_req)

+                {

                     *next_len = strlen(*next_req);

                     return  AT_CONTINUE;

-				}

+                }

             }

-            else if(cfun_state==1)

+            else if (cfun_state == 1)

             {

                 char mMode[50] = {0};

-                sc_cfg_get(NV_M_NETSELECT_MODE,mMode,sizeof(mMode));

-                if(0 == strcmp("1", mMode))

+                sc_cfg_get(NV_M_NETSELECT_MODE, mMode, sizeof(mMode));

+                if (0 == strcmp("1", mMode))

                 {

-                    *next_req = normal_getcopsset(1,"0");

-					if(*next_req){

-                    *next_len = strlen(*next_req);

-                    return  AT_CONTINUE;

-					}

+                    *next_req = normal_getcopsset(1, "0");

+                    if (*next_req)

+                    {

+                        *next_len = strlen(*next_req);

+                        return  AT_CONTINUE;

+                    }

                 }

                 else

                 {

                     return AT_END;

                 }

             }

-			

+

             return AT_END;

         }

         case MSG_CMD_AIRMODE_SET_REQ:

@@ -3647,39 +3775,41 @@
     return AT_END;

 }

 

-int cfun_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cfun_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-	sc_cfg_set("cfun_work", "none");

-    switch(context->msg_id)

+    sc_cfg_set("cfun_work", "none");

+    switch (context->msg_id)

     {

         //¿ª»úÁ÷³ÌÖÐAT+CFUN=1

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            sc_cfg_set(NV_MODEM_MAIN_STATE,"modem_destroy");

+            sc_cfg_set(NV_MODEM_MAIN_STATE, "modem_destroy");

             return  AT_END;

         }

         //×Ô¶¯ËÑÍø

         case MSG_CMD_NET_SELECT_REQ:

         {

-            if(cfun_state==4)

+            if (cfun_state == 4)

             {

                 *next_req = normal_getsysconfigset();

-				if(*next_req){

+                if (*next_req)

+                {

                     *next_len = strlen(*next_req);

                     return  AT_CONTINUE;

-				}

+                }

             }

-            else if(cfun_state==1)

+            else if (cfun_state == 1)

             {

                 char mMode[50] = {0};

-                sc_cfg_get(NV_M_NETSELECT_MODE,mMode,sizeof(mMode));

-                if(0 == strcmp("1", mMode))

+                sc_cfg_get(NV_M_NETSELECT_MODE, mMode, sizeof(mMode));

+                if (0 == strcmp("1", mMode))

                 {

-                    *next_req = normal_getcopsset(1,"0");

-					if(*next_req){

-                    *next_len = strlen(*next_req);

-                    return  AT_CONTINUE;

-					}

+                    *next_req = normal_getcopsset(1, "0");

+                    if (*next_req)

+                    {

+                        *next_len = strlen(*next_req);

+                        return  AT_CONTINUE;

+                    }

                 }

                 else

                 {

@@ -3696,116 +3826,125 @@
     return AT_END;

 }

 

-int cgreg_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cgreg_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     *next_req = normal_getceregset("2");

-	if(*next_req)

-    *next_len = strlen(*next_req);

+    if (*next_req)

+    {

+        *next_len = strlen(*next_req);

+    }

     return  AT_CONTINUE;

 }

 

-int cgreg_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cgreg_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     *next_req = normal_getceregset("2");

-	if(*next_req)

-    *next_len = strlen(*next_req);

+    if (*next_req)

+    {

+        *next_len = strlen(*next_req);

+    }

     return  AT_CONTINUE;

 }

 

-int cereg_set_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cereg_set_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

 

     char *at_next = NULL;

-    

+

     //at_next=normal_getcgmr();

-    at_next=normal_getcrsmset("176,28589,0,0,4");

+    at_next = normal_getcrsmset("176,28589,0,0,4");

 

     *next_req = at_next;

     //*next_req = normal_getzsqrset("0");

-	if(*next_req)

-    *next_len = strlen(*next_req);

+    if (*next_req)

+    {

+        *next_len = strlen(*next_req);

+    }

     return  AT_CONTINUE;

 }

 

-int cereg_set_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cereg_set_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     char *at_next = NULL;

-    

+

     //at_next=normal_getcgmr();

-    at_next=normal_getcrsmset("176,28589,0,0,4");

-    

+    at_next = normal_getcrsmset("176,28589,0,0,4");

+

     *next_req = at_next;

     //*next_req = normal_getzsqrset("0");

-	if(*next_req)

-    *next_len = strlen(*next_req);

+    if (*next_req)

+    {

+        *next_len = strlen(*next_req);

+    }

     return  AT_CONTINUE;

 }

 

-int zsqr_auto_act(char *at_paras ,int is_query_report)

+int zsqr_auto_act(char *at_paras, int is_query_report)

 {

     char strBuf[10] = {0};

     T_zAt_CsqUnSolicite zsqrResPara = {0};

     sscanf(at_paras, "%ld,%ld,%ld", &zsqrResPara.rssi, &zsqrResPara.ber, &zsqrResPara.act);

 

 #if 1    // kw 3 SV.TAINTED.CALL.BINOP

-    if(zsqrResPara.rssi < 0 || zsqrResPara.rssi > LONG_MAX-1)

+    if (zsqrResPara.rssi < 0 || zsqrResPara.rssi > LONG_MAX - 1)

     {

         zsqrResPara.rssi = 0;

     }

 

-    if(zsqrResPara.ber < 0 || zsqrResPara.ber > LONG_MAX-1)

+    if (zsqrResPara.ber < 0 || zsqrResPara.ber > LONG_MAX - 1)

     {

         zsqrResPara.ber = 0;

     }

 

-    if(zsqrResPara.act < 0 || zsqrResPara.act > LONG_MAX-1)

+    if (zsqrResPara.act < 0 || zsqrResPara.act > LONG_MAX - 1)

     {

         zsqrResPara.act = 0;

-    }    

-#endif 

+    }

+#endif

 

-    snprintf(strBuf, sizeof(strBuf),"%ld", zsqrResPara.rssi);

+    snprintf(strBuf, sizeof(strBuf), "%ld", zsqrResPara.rssi);

     sc_cfg_set(NV_CSQ, strBuf);

-    if(zsqrResPara.act == 3) 

-	{

-		normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_GSM);

-		normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_GSM, zsqrResPara.rssi);

-	}

-	else if(zsqrResPara.act == 5)

-	{

-		normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_WCDMA);

-		normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_WCDMA, zsqrResPara.rssi);

-	}

-	else if(zsqrResPara.act == 15)

-	{

-		normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_TDS);

-		normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_TDS, zsqrResPara.rssi);

-	}

-	else if(zsqrResPara.act == 17)

-	{		

-		normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_LTE);

-		normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_LTE, zsqrResPara.rssi);

-	}

-    else if(zsqrResPara.act == 0)

+    if (zsqrResPara.act == 3)

+    {

+        normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_GSM);

+        normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_GSM, zsqrResPara.rssi);

+    }

+    else if (zsqrResPara.act == 5)

+    {

+        normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_WCDMA);

+        normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_WCDMA, zsqrResPara.rssi);

+    }

+    else if (zsqrResPara.act == 15)

+    {

+        normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_TDS);

+        normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_TDS, zsqrResPara.rssi);

+    }

+    else if (zsqrResPara.act == 17)

+    {

+        normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_LTE);

+        normal_calcsignalstrength(ZAT_SIGNALBAR_TYPE_LTE, zsqrResPara.rssi);

+    }

+    else if (zsqrResPara.act == 0)

     {

         normal_calcsignalbar(ZAT_SIGNALBAR_TYPE_NONE);

     }

     return AT_END;

 }

 

-int cops_set_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cops_set_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_QUERY_SYSINFO_REQ:

         {

             //*next_req = normal_getcgmr();

-			*next_req = normal_getcopsread();

-			if(*next_req){

+            *next_req = normal_getcopsread();

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 return AT_CONTINUE;

-			}

-			break; // cov M

+            }

+            break; // cov M

         }

         case MSG_CMD_NET_SELECT_REQ:

         {

@@ -3816,36 +3955,38 @@
         {

             char    rplmnTmp[50]  = {0};

             char    ratTmp[50]  = {0};

-            sc_cfg_get(NV_STR_NUM_RPLMN_TMP,rplmnTmp,sizeof(rplmnTmp));

-            sc_cfg_get(NV_CURRENT_RAT_TMP,ratTmp,sizeof(ratTmp));

+            sc_cfg_get(NV_STR_NUM_RPLMN_TMP, rplmnTmp, sizeof(rplmnTmp));

+            sc_cfg_get(NV_CURRENT_RAT_TMP, ratTmp, sizeof(ratTmp));

             sc_cfg_set(NV_M_NETSELECT_RESULT, "manual_success");

-            sc_cfg_set(NV_STR_NUM_RPLMN,rplmnTmp);

-            sc_cfg_set(NV_CURRENT_RAT,ratTmp);

+            sc_cfg_set(NV_STR_NUM_RPLMN, rplmnTmp);

+            sc_cfg_set(NV_CURRENT_RAT, ratTmp);

             sc_cfg_set(NV_M_NETSELECT_MODE, "1");

             *next_req = normal_getsysinfo();

-			if(*next_req){

+            if (*next_req)

+            {

                 *next_len = strlen(*next_req);

                 return AT_CONTINUE;

-			}

+            }

 

-			break; // cov M

+            break; // cov M

         }

     }

     return AT_END;

 }

 

-int cops_set_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cops_set_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_QUERY_SYSINFO_REQ:

         {

             //*next_req = normal_getcgmr();

-			*next_req = normal_getcopsread();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getcopsread();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

         case MSG_CMD_NET_SELECT_REQ:

         {

@@ -3855,180 +3996,222 @@
         {

             sc_cfg_set(NV_M_NETSELECT_RESULT, "manual_fail");

             *next_req = normal_getsysinfo();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

     }

     return AT_END;

 }

 

-int cops_read_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cops_read_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"cops_read_ok_act %x\n",context->msg_id);

-    switch(context->msg_id)

+    at_print(AT_DEBUG, "cops_read_ok_act %x\n", context->msg_id);

+    switch (context->msg_id)

     {

         case MSG_CMD_QUERY_SYSINFO_REQ:

         case MSG_CMD_NETWORK_SET_REQ:

         {

-            if(g_zUfi_firstCsq)

+            if (g_zUfi_firstCsq)

             {

                 g_zUfi_firstCsq = FALSE;

                 *next_req = normal_getcsq();

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                return  AT_CONTINUE;

-				}

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    return  AT_CONTINUE;

+                }

             }

             return AT_END;

         }

-	}

-    return AT_END;

-}

-

-int cops_read_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

-{

-    at_print(AT_DEBUG,"cops_read_ok_act %x\n",context->msg_id);

-    switch(context->msg_id)

-    {

-        case MSG_CMD_QUERY_SYSINFO_REQ:

-        {

-            if(g_zUfi_firstCsq)

-            {

-                g_zUfi_firstCsq = FALSE;

-                *next_req = normal_getcsq();

-				if(*next_req){

-                *next_len = strlen(*next_req);

-                return  AT_CONTINUE;

-				}

-            }

-            return AT_END;

-        }

-		case MSG_CMD_MODEMREG_INFO_REQ:

-		{

-			*next_req = normal_getcsq();

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return  AT_CONTINUE;

-			}

-		}

     }

     return AT_END;

 }

 

-int cops_test_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cops_read_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

+{

+    at_print(AT_DEBUG, "cops_read_ok_act %x\n", context->msg_id);

+    switch (context->msg_id)

+    {

+        case MSG_CMD_QUERY_SYSINFO_REQ:

+        {

+            if (g_zUfi_firstCsq)

+            {

+                g_zUfi_firstCsq = FALSE;

+                *next_req = normal_getcsq();

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    return  AT_CONTINUE;

+                }

+            }

+            return AT_END;

+        }

+        case MSG_CMD_MODEMREG_INFO_REQ:

+        {

+            *next_req = normal_getcsq();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return  AT_CONTINUE;

+            }

+        }

+    }

+    return AT_END;

+}

+

+int cops_test_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     sc_cfg_set("manual_search_network_status", "finished");

     return AT_END;

 }

 

-int cops_test_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cops_test_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     sc_cfg_set(NV_NET_NUM, "0");

     sc_cfg_set(NV_M_NETSELECT_STATUS, "manual_search_fail");

     return AT_END;

 }

 

-int cops_auto_act(char *at_paras ,int is_query_report)

+int cops_auto_act(char *at_paras, int is_query_report)

 {

     //at+cops=?·µ»ØÖµ

     //zdm ²»µ÷Óã¬Ò²Á¬½Ó²»¹ý

-    #if (APP_OS_TYPE == APP_OS_TOS)

-		softap_assert("");

-	#else

-    

+#if (APP_OS_TYPE == APP_OS_TOS)

+    softap_assert("");

+#else

+

     struct at_context *context = (struct at_context *)is_query_report;

 

-    if(context == NULL)

-        return AT_END;   

-

-    at_print(AT_DEBUG,"cops_auto_act prefix=%s!\n",context->at_cmd_prefix);

-    if(strstr(context->at_cmd_prefix,"=?"))

+    if (context == NULL)

     {

-#if (APP_OS_TYPE == APP_OS_LINUX)	

-		sc_timer_delete(CopstestTimerID);

-#elif (APP_OS_TYPE == APP_OS_TOS)	

-		zOss_StopTimer(CopstestTimerID);

+        return AT_END;

+    }

+

+    at_print(AT_DEBUG, "cops_auto_act prefix=%s!\n", context->at_cmd_prefix);

+    if (strstr(context->at_cmd_prefix, "=?"))

+    {

+#if (APP_OS_TYPE == APP_OS_LINUX)

+        sc_timer_delete(CopstestTimerID);

+#elif (APP_OS_TYPE == APP_OS_TOS)

+        zOss_StopTimer(CopstestTimerID);

 #endif

-        at_print(AT_DEBUG,"come in222!\n");

+        at_print(AT_DEBUG, "come in222!\n");

         normal_recvcopstestrsp(at_paras);

     }

-    else if(strstr(context->at_cmd_prefix,"?"))

+    else if (strstr(context->at_cmd_prefix, "?"))

     {

         normal_recvcopsreadrsp(at_paras);

     }

-	#endif

+#endif

     return AT_END;

 }

 

-int  zversion_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zversion_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"zversion_ok_act\n");

-/*

-    switch(context->msg_id)

-    {

-        case ATCTL_INNER_ZMSRI_MSG:

+    at_print(AT_DEBUG, "zversion_ok_act\n");

+    /*

+        switch(context->msg_id)

         {

-            struct timeval tp;

-            if (0 != gettimeofday(&tp,NULL))

+            case ATCTL_INNER_ZMSRI_MSG:

             {

-                at_print(AT_DEBUG,"get time of system wrong");

-                return AT_END;

+                struct timeval tp;

+                if (0 != gettimeofday(&tp,NULL))

+                {

+                    at_print(AT_DEBUG,"get time of system wrong");

+                    return AT_END;

+                }

+                *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);

+    			if(*next_req){

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+    			}

             }

-            *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

-        }

-	}

-*/	

+    	}

+    */

     return AT_END;

 }

 

-int  zversion_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zversion_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"zversion_err_act\n");

-/*

-    switch(context->msg_id)

-    {

-        case ATCTL_INNER_ZMSRI_MSG:

+    at_print(AT_DEBUG, "zversion_err_act\n");

+    /*

+        switch(context->msg_id)

         {

-            struct timeval tp;

-            if (0 != gettimeofday(&tp,NULL))

+            case ATCTL_INNER_ZMSRI_MSG:

             {

-                at_print(AT_DEBUG,"get time of system wrong");

-                return AT_END;

+                struct timeval tp;

+                if (0 != gettimeofday(&tp,NULL))

+                {

+                    at_print(AT_DEBUG,"get time of system wrong");

+                    return AT_END;

+                }

+                *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);

+    			if(*next_req){

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+    			}

             }

-            *next_req = normal_getsyctimeset(tp.tv_sec, tp.tv_usec);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

         }

+    */

+    return AT_END;

+}

+

+int zversion_auto_act(char *at_paras, int is_query_report)

+{

+    sc_cfg_set(NV_CR_INNER_VERSION, at_paras);

+    return AT_END;

+}

+

+int zudry_auto_act(char *at_paras, int is_query_report)

+{

+    int app_mode = -1;

+    int init_reault = -1;

+    char strTemp[12] = {0};

+    void *p[2] = {&app_mode, &init_reault};

+    at_print(AT_DEBUG, "zudry_auto_act at_paras=%s!\n", at_paras);

+    parse_param2("%d,%d", at_paras, p);

+    at_print(AT_DEBUG, "zudry_auto_act app_mode=%d,init_reault=%d!\n", app_mode, init_reault);

+

+    snprintf(strTemp, sizeof(strTemp), "%d", app_mode);

+    sc_cfg_set("zudry_appmode", strTemp);

+    memset(strTemp, 0, 12);

+    snprintf(strTemp, sizeof(strTemp), "%d", init_reault);

+    sc_cfg_set("zudry_initresult", strTemp);

+    return AT_END;

+}

+

+

+int zimsvmode_auto_act(char *at_paras, int is_query_report)

+{

+    char strTemp[12] = {0};

+    int len = strlen(at_paras);

+    if (len >= 10)

+    {

+        len = 10;

     }

-*/	

+    memcpy(strTemp, at_paras, len);

+    at_print(AT_DEBUG, "zimsvmode_auto_act ,strTemp=%s!\n", strTemp);

+

+    sc_cfg_set("zimsvmode", strTemp);

+

     return AT_END;

 }

 

-int zversion_auto_act(char *at_paras ,int is_query_report)

+int  syctime_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    sc_cfg_set(NV_CR_INNER_VERSION,at_paras);

-    return AT_END;

-}

-

-int  syctime_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

-{

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            *next_req = normal_getclckset(2,"SC",2);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getclckset(2, "SC", 2);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

         case MSG_CMD_SYCTIME_SET_REQ:

         {

@@ -4038,17 +4221,18 @@
     return AT_END;

 }

 

-int  syctime_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  syctime_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            *next_req = normal_getclckset(2,"SC",2);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getclckset(2, "SC", 2);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

         case MSG_CMD_SYCTIME_SET_REQ:

         {

@@ -4058,17 +4242,18 @@
     return AT_END;

 }

 

-int  zsetmtnet_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zsetmtnet_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            *next_req = normal_getclckset(2,"SC",2);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getclckset(2, "SC", 2);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

         default:

         {

@@ -4078,17 +4263,18 @@
     return AT_END;

 }

 

-int  zsetmtnet_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zsetmtnet_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case ATCTL_INNER_ZMSRI_MSG:

         {

-            *next_req = normal_getclckset(2,"SC",2);

-			if(*next_req){

-            *next_len = strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getclckset(2, "SC", 2);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

         default:

         {

@@ -4098,889 +4284,931 @@
     return AT_END;

 }

 

-int  mac_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  mac_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"mac_ok_act\n");

-    *next_req=normal_getmac2read();

-	if(*next_req)

-    *next_len=strlen(*next_req);

+    at_print(AT_DEBUG, "mac_ok_act\n");

+    *next_req = normal_getmac2read();

+    if (*next_req)

+    {

+        *next_len = strlen(*next_req);

+    }

     return AT_CONTINUE;

 }

 

-int  mac_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  mac_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_ERR,"mac_err_act\n");

-    if(mactozssid != NULL)

+    at_print(AT_ERR, "mac_err_act\n");

+    if (mactozssid != NULL)

+    {

         free(mactozssid);

-    mactozssid=NULL;

+    }

+    mactozssid = NULL;

     return AT_END;

 }

 

-int  mac2_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  mac2_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_DEBUG,"mac2_ok_act\n");

-    sc_cfg_set("at_wifi_mac",mactozssid);

-	sc_cfg_save();

+    at_print(AT_DEBUG, "mac2_ok_act\n");

+    sc_cfg_set("at_wifi_mac", mactozssid);

+    sc_cfg_save();

     free(mactozssid);

-    mactozssid=NULL;

+    mactozssid = NULL;

     return AT_END;

 }

 

-int  mac2_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  mac2_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    at_print(AT_ERR,"mac2_err_act\n");

-    if(mactozssid != NULL)

+    at_print(AT_ERR, "mac2_err_act\n");

+    if (mactozssid != NULL)

+    {

         free(mactozssid);

-    mactozssid=NULL;

+    }

+    mactozssid = NULL;

     return AT_END;

 }

 

-int  zltelc_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zltelc_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     long action = 0;

-    char actionLte[30]= {0};

-    sc_cfg_get(NV_ACTIONLTE,actionLte,sizeof(actionLte));

+    char actionLte[30] = {0};

+    sc_cfg_get(NV_ACTIONLTE, actionLte, sizeof(actionLte));

     action  = atoi(actionLte);

-    sc_cfg_set(NV_CELLLOCKSET,"CellSuccess");

-    if(1 == action)

+    sc_cfg_set(NV_CELLLOCKSET, "CellSuccess");

+    if (1 == action)

     {

-        sc_cfg_set(NV_CELLLOCKSTATE,"Locked");

+        sc_cfg_set(NV_CELLLOCKSTATE, "Locked");

     }

-    else if(0 == action)

+    else if (0 == action)

     {

-        sc_cfg_set(NV_CELLLOCKSTATE,"UnLocked");

+        sc_cfg_set(NV_CELLLOCKSTATE, "UnLocked");

     }

     return AT_END;

 }

 

-int  zltelc_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  zltelc_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    sc_cfg_set(NV_CELLLOCKSET,"CellFail");

+    sc_cfg_set(NV_CELLLOCKSET, "CellFail");

     return AT_END;

 }

 

-int  sysinfo_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  sysinfo_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    char netType[50]={0};

-	char needCopsNumFormt[10] = {0};

-    sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));

-    sc_cfg_get("need_cops_number_format",needCopsNumFormt,sizeof(needCopsNumFormt));

-	sysinfo_flag = 0;

-    if (0!=strcmp("No Service",netType)&&0!=strcmp("Limited Service",netType)

-        &&0!=strcmp(NETWORK_TYPE_INIT,netType))

+    char netType[50] = {0};

+    char needCopsNumFormt[10] = {0};

+    sc_cfg_get(NV_NETWORK_TYPE, netType, sizeof(netType));

+    sc_cfg_get("need_cops_number_format", needCopsNumFormt, sizeof(needCopsNumFormt));

+    sysinfo_flag = 0;

+    if (0 != strcmp("No Service", netType) && 0 != strcmp("Limited Service", netType)

+            && 0 != strcmp(NETWORK_TYPE_INIT, netType))

     {

-        if(0 == strcmp("yes", needCopsNumFormt) && context->msg_id != MSG_CMD_NETWORK_SET_REQ)//ÉèÖÃÔËÓªÉÌÐÅÏ¢¸ñʽ

+        if (0 == strcmp("yes", needCopsNumFormt) && context->msg_id != MSG_CMD_NETWORK_SET_REQ) //ÉèÖÃÔËÓªÉÌÐÅÏ¢¸ñʽ

         {

-            *next_req =normal_getcopsset(1,"3,2");

-			if(*next_req)

-			*next_len = strlen(*next_req);

+            *next_req = normal_getcopsset(1, "3,2");

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+            }

         }

         else

         {

             *next_req = normal_getcopsread();

-			if(*next_req)

-            *next_len = strlen(*next_req);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+            }

         }

         return AT_CONTINUE;

     }

     return AT_END;

 }

 

-int  sysinfo_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  sysinfo_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    char netType[50]={0};

-	char needCopsNumFormt[10] = {0};

-    sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));

-	sc_cfg_get("need_cops_number_format",needCopsNumFormt,sizeof(needCopsNumFormt));

-	sysinfo_flag = 0;

-    if (0!=strcmp("No Service",netType)&&0!=strcmp("Limited Service",netType)

-        &&0!=strcmp(NETWORK_TYPE_INIT,netType))

+    char netType[50] = {0};

+    char needCopsNumFormt[10] = {0};

+    sc_cfg_get(NV_NETWORK_TYPE, netType, sizeof(netType));

+    sc_cfg_get("need_cops_number_format", needCopsNumFormt, sizeof(needCopsNumFormt));

+    sysinfo_flag = 0;

+    if (0 != strcmp("No Service", netType) && 0 != strcmp("Limited Service", netType)

+            && 0 != strcmp(NETWORK_TYPE_INIT, netType))

     {

-        if(0 == strcmp("yes", needCopsNumFormt))//ÉèÖÃÔËÓªÉÌÐÅÏ¢¸ñʽ

+        if (0 == strcmp("yes", needCopsNumFormt)) //ÉèÖÃÔËÓªÉÌÐÅÏ¢¸ñʽ

         {

-            *next_req =normal_getcopsset(1,"3,2");

-			if(*next_req)

-			*next_len = strlen(*next_req);

+            *next_req = normal_getcopsset(1, "3,2");

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+            }

         }

         else

         {

             *next_req = normal_getcopsread();

-			if(*next_req)

-            *next_len = strlen(*next_req);

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+            }

         }

         return AT_CONTINUE;

     }

     return AT_END;

 }

 

-int  cusd_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cusd_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    sc_cfg_set("ussd_write_flag","4");

-    sc_cfg_set("ussd_cancel_flag","no");

+    sc_cfg_set("ussd_write_flag", "4");

+    sc_cfg_set("ussd_cancel_flag", "no");

     return AT_END;

 }

 

-int  clck_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  clck_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_PIN_MANAGE_REQ:

         {

-            if(psinfo.clck_state==CLCK_SET_CMD)

+            if (psinfo.clck_state == CLCK_SET_CMD)

             {

                 char clckMode[10] = {0};

-                sc_cfg_get(NV_CLCK_SET_MODE,clckMode,sizeof(clckMode));

-                if (0==strcmp(clckMode,"0"))

+                sc_cfg_get(NV_CLCK_SET_MODE, clckMode, sizeof(clckMode));

+                if (0 == strcmp(clckMode, "0"))

                 {

-                    sc_cfg_set(NV_NEED_SIM_PIN,"");

+                    sc_cfg_set(NV_NEED_SIM_PIN, "");

                 }

-                else if (0==strcmp(clckMode,"1"))

+                else if (0 == strcmp(clckMode, "1"))

                 {

-                    sc_cfg_set(NV_NEED_SIM_PIN,"yes");

+                    sc_cfg_set(NV_NEED_SIM_PIN, "yes");

                 }

                 sc_cfg_set(NV_PIN_MANAGE_RESULT, "0");

-                *next_req=normal_getclckset(2,"SC",2);

-				if(*next_req){

-                *next_len=strlen(*next_req);

-                psinfo.clck_state=CLCK_REQ_CMD;

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getclckset(2, "SC", 2);

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    psinfo.clck_state = CLCK_REQ_CMD;

+                    return AT_CONTINUE;

+                }

             }

-            else if(psinfo.clck_state==CLCK_REQ_CMD)

+            else if (psinfo.clck_state == CLCK_REQ_CMD)

             {

-                *next_req=normal_getzrapread();

-				if(*next_req){

-                *next_len=strlen(*next_req);

-                psinfo.clck_state=CLCK_OTHER_CMD;

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getzrapread();

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    psinfo.clck_state = CLCK_OTHER_CMD;

+                    return AT_CONTINUE;

+                }

             }

             return AT_END;

         }

         case MSG_CMD_VERIFY_PUK_REQ:

         {

-            MSG_BUF *buf=NULL;

-            buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

+            MSG_BUF *buf = NULL;

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

             rcv_clt_req_msg_proc(buf);

             free(buf);

             return AT_END;

         }

 #if (APP_OS_TYPE == APP_OS_LINUX)

-		case MSG_CMD_CLCK_REQ:

-		{

-//			return atCcapp_RecvOk(at_str,context,next_req,next_len);

-		}

-#endif		

+        case MSG_CMD_CLCK_REQ:

+        {

+            //			return atCcapp_RecvOk(at_str,context,next_req,next_len);

+        }

+#endif

     }

     return AT_END;

 }

 

-int  clck_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  clck_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_PIN_MANAGE_REQ:

         {

-            if(psinfo.clck_state==CLCK_SET_CMD)

+            if (psinfo.clck_state == CLCK_SET_CMD)

             {

                 sc_cfg_set(NV_PIN_MANAGE_RESULT, "1");

-                *next_req=normal_getzrapread();

-				if(*next_req){

-                *next_len=strlen(*next_req);

-                psinfo.clck_state=CLCK_OTHER_CMD;

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getzrapread();

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    psinfo.clck_state = CLCK_OTHER_CMD;

+                    return AT_CONTINUE;

+                }

             }

-            else if(psinfo.clck_state==CLCK_REQ_CMD)

+            else if (psinfo.clck_state == CLCK_REQ_CMD)

             {

                 sc_cfg_set(NV_PIN_MANAGE_RESULT, "1");

-                *next_req=normal_getzrapread();

-				if(*next_req){

-                *next_len=strlen(*next_req);

-                psinfo.clck_state=CLCK_OTHER_CMD;

-                return AT_CONTINUE;

-				}

+                *next_req = normal_getzrapread();

+                if (*next_req)

+                {

+                    *next_len = strlen(*next_req);

+                    psinfo.clck_state = CLCK_OTHER_CMD;

+                    return AT_CONTINUE;

+                }

             }

             return AT_END;

         }

-        

+

         case MSG_CMD_VERIFY_PUK_REQ:

         {

-            MSG_BUF *buf=NULL;

-            buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,ATCTL_INNER_ZMSRI_MSG,0,NULL);

+            MSG_BUF *buf = NULL;

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, ATCTL_INNER_ZMSRI_MSG, 0, NULL);

             rcv_clt_req_msg_proc(buf);

             return AT_END;

         }

 #if (APP_OS_TYPE == APP_OS_LINUX)

-		case MSG_CMD_CLCK_REQ:

-		{

-// for porting at_ctrl 

-// 			return atCcapp_RecvErr(at_str,context,next_req,next_len);

-		}

-#endif		

+        case MSG_CMD_CLCK_REQ:

+        {

+            // for porting at_ctrl

+            // 			return atCcapp_RecvErr(at_str,context,next_req,next_len);

+        }

+#endif

     }

     return AT_END;

 }

 

-int  cpwd_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cpwd_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_PIN_MANAGE_REQ:

         {

             sc_cfg_set(NV_PIN_MANAGE_RESULT, "0");

-            *next_req=normal_getzrapread();

-			if(*next_req){

-            *next_len=strlen(*next_req);

-            return AT_CONTINUE;

-			}

+            *next_req = normal_getzrapread();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

     }

     return AT_END;

 }

 

-int  cpwd_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cpwd_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-    switch(context->msg_id)

+    switch (context->msg_id)

     {

         case MSG_CMD_PIN_MANAGE_REQ:

         {

             sc_cfg_set(NV_PIN_MANAGE_RESULT, "1");

-            *next_req=normal_getzrapread();

-			if(*next_req){

-            *next_len=strlen(*next_req);

-            return AT_CONTINUE;

-			}	

+            *next_req = normal_getzrapread();

+            if (*next_req)

+            {

+                *next_len = strlen(*next_req);

+                return AT_CONTINUE;

+            }

         }

     }

     return AT_END;

 }

 

-int mode_auto_act(char *at_paras ,int is_query_report)

+int mode_auto_act(char *at_paras, int is_query_report)

 {

     T_zUfi_ModeInfoInd   tAtRes      = {0};

     char strTemp[10]    = {0};

     char cfunState[50] = {0};

-	char versionmode[2] = {0};

-    MSG_BUF *buf=NULL;

-    

-    at_print(AT_DEBUG,"atBase_RecvModeRsp MODE \n");

-    sc_cfg_get(NV_CFUN_STATE,cfunState,sizeof(cfunState));

-    if(!strcmp(cfunState,"0"))

+    char versionmode[2] = {0};

+    MSG_BUF *buf = NULL;

+

+    at_print(AT_DEBUG, "atBase_RecvModeRsp MODE \n");

+    sc_cfg_get(NV_CFUN_STATE, cfunState, sizeof(cfunState));

+    if (!strcmp(cfunState, "0"))

     {

         return AT_END;

     }

-	

+

     void *p[2] = {&tAtRes.sys_mode, &tAtRes.sys_submode};

-    at_print(AT_DEBUG,"mode_auto_act at_paras=%s!\n",at_paras);

+    at_print(AT_DEBUG, "mode_auto_act at_paras=%s!\n", at_paras);

     parse_param2("%d,%d", at_paras, p);

-    at_print(AT_DEBUG,"mode_auto_act sys_mode=%ld,sys_submode=%ld!\n",tAtRes.sys_mode,tAtRes.sys_submode);  

-    

-    snprintf(strTemp, sizeof(strTemp),"%ld", tAtRes.sys_mode);

+    at_print(AT_DEBUG, "mode_auto_act sys_mode=%ld,sys_submode=%ld!\n", tAtRes.sys_mode, tAtRes.sys_submode);

+

+    snprintf(strTemp, sizeof(strTemp), "%ld", tAtRes.sys_mode);

     sc_cfg_set(NV_SYS_MODE, strTemp);

     memset(strTemp, 0, 10);

-    snprintf(strTemp, sizeof(strTemp),"%ld", tAtRes.sys_submode);

+    snprintf(strTemp, sizeof(strTemp), "%ld", tAtRes.sys_submode);

     sc_cfg_set(NV_SYS_SUBMODE, strTemp);

-    

-    at_print(AT_DEBUG,"atBase_RecvModeRsp per=%d,cur=%ld!\n",g_zUfi_Mode,tAtRes.sys_mode);

-	//оƬÈÏÖ¤´úÂë

-	sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

-	if(0 == strcmp(versionmode, "0"))

-	{

-		if(g_zUfi_Mode != tAtRes.sys_mode || g_zUfi_SubMode != tAtRes.sys_submode)

-	    {

-	        g_zUfi_Mode = tAtRes.sys_mode;

-			g_zUfi_SubMode = tAtRes.sys_submode;

-			if(sysinfo_flag == 0)

-			{

-		        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-		        rcv_clt_req_msg_proc(buf);

-		        free(buf);

-				sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-			}

-	    }

-	}

+

+    at_print(AT_DEBUG, "atBase_RecvModeRsp per=%d,cur=%ld!\n", g_zUfi_Mode, tAtRes.sys_mode);

+    //оƬÈÏÖ¤´úÂë

+    sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

+    if (0 == strcmp(versionmode, "0"))

+    {

+        if (g_zUfi_Mode != tAtRes.sys_mode || g_zUfi_SubMode != tAtRes.sys_submode)

+        {

+            g_zUfi_Mode = tAtRes.sys_mode;

+            g_zUfi_SubMode = tAtRes.sys_submode;

+            if (sysinfo_flag == 0)

+            {

+                buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                rcv_clt_req_msg_proc(buf);

+                free(buf);

+                sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+            }

+        }

+    }

     return AT_END;

 }

 

-int cereg_auto_act(char *at_paras ,int is_query_report)

+int cereg_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_CeregRes tAtRes = {0};

-    MSG_BUF *buf=NULL;

-	int tac = 0, ci = 0;

+    MSG_BUF *buf = NULL;

+    int tac = 0, ci = 0;

     char strBuf[20] = {0};

-	char versionmode[2] = {0};

+    char versionmode[2] = {0};

 

-    void *p[5] = {&tAtRes.stat, tAtRes.tac, tAtRes.ci, &tAtRes.act,&tAtRes.subact};

-    at_print(AT_DEBUG,"atBase_RecvCeregRsp at_paras=%s!\n",at_paras);

+    void *p[5] = {&tAtRes.stat, tAtRes.tac, tAtRes.ci, &tAtRes.act, &tAtRes.subact};

+    at_print(AT_DEBUG, "atBase_RecvCeregRsp at_paras=%s!\n", at_paras);

     parse_param2("%d,%s,%s,%d,%d", at_paras, p);

-    at_print(AT_DEBUG,"atBase_RecvCeregRsp stat=%d,tac=%s,ci=%s,res=%d,sub=%d!\n",

-    tAtRes.stat, tAtRes.tac, tAtRes.ci, tAtRes.act,tAtRes.subact);  

+    at_print(AT_DEBUG, "atBase_RecvCeregRsp stat=%d,tac=%s,ci=%s,res=%d,sub=%d!\n",

+             tAtRes.stat, tAtRes.tac, tAtRes.ci, tAtRes.act, tAtRes.subact);

     sprintf(strBuf, "%d", tAtRes.stat);

     sc_cfg_set("cereg_stat", strBuf);

 

-	if(tAtRes.act == 7)

-	{

-		trans_Str2Value(tAtRes.tac, FALSE, &tac);

-		memset(strBuf, 0x00, 20);

-		sprintf(strBuf, "%d", tac);

-		sc_cfg_set(NV_TAC_CODE, strBuf);

-		

-		trans_Str2Value(tAtRes.ci, FALSE, &ci);

-		memset(strBuf, 0x00, 20);

-		sprintf(strBuf, "%d", ci);

-		sc_cfg_set(NV_CELL_ID, strBuf);

-	}

-	

-    /*×¢²áÁËÂþÓÎÍøÂç»ò±¾µØÍøÂç*/

-    if( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

+    if (tAtRes.act == 7)

     {

-		buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_CGCONTRDP_REQ,0,NULL);

-		rcv_clt_req_msg_proc(buf);

-		free(buf);

-        sc_cfg_set(NV_REG_STATUS,"ok");

-		//zhangfen 1106 EPSÍøÂç×¢²á³É¹¦½øÐÐPDP×Ô¶¯²¦ºÅ

-		if(g_modem_model)

-    	{

-			start_pdp_auto_dial();//Æô¶¯¶¨Ê±Æ÷½øÐÐpdp¼¤»î

-    	}

-		ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_CREG_IND, 0, NULL, IPC_NOWAIT);

+        trans_Str2Value(tAtRes.tac, FALSE, &tac);

+        memset(strBuf, 0x00, 20);

+        sprintf(strBuf, "%d", tac);

+        sc_cfg_set(NV_TAC_CODE, strBuf);

+

+        trans_Str2Value(tAtRes.ci, FALSE, &ci);

+        memset(strBuf, 0x00, 20);

+        sprintf(strBuf, "%d", ci);

+        sc_cfg_set(NV_CELL_ID, strBuf);

+    }

+

+    /*×¢²áÁËÂþÓÎÍøÂç»ò±¾µØÍøÂç*/

+    if ( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

+    {

+        buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_CGCONTRDP_REQ, 0, NULL);

+        rcv_clt_req_msg_proc(buf);

+        free(buf);

+        sc_cfg_set(NV_REG_STATUS, "ok");

+        //zhangfen 1106 EPSÍøÂç×¢²á³É¹¦½øÐÐPDP×Ô¶¯²¦ºÅ

+        if (g_modem_model)

+        {

+            start_pdp_auto_dial();//Æô¶¯¶¨Ê±Æ÷½øÐÐpdp¼¤»î

+        }

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_CREG_IND, 0, NULL, IPC_NOWAIT);

     }

     else

     {

-        sc_cfg_set(NV_REG_STATUS,"no");

+        sc_cfg_set(NV_REG_STATUS, "no");

     }

-    at_print(AT_DEBUG,"atBase_RecvCeregRsp per=%d,cur=%d!\n",g_zUfi_Stat,tAtRes.stat);

+    at_print(AT_DEBUG, "atBase_RecvCeregRsp per=%d,cur=%d!\n", g_zUfi_Stat, tAtRes.stat);

 

-	//оƬÈÏÖ¤´úÂë

-	sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

-	if(0 == strcmp(versionmode, "0"))

-	{

-		if(g_zUfi_Stat != tAtRes.stat)

-		{

-	        g_zUfi_Stat = tAtRes.stat;

-			if(sysinfo_flag == 0)

-			{

-		        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-		        rcv_clt_req_msg_proc(buf);

-		        free(buf);

-				sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-			}

-	    }

-		else

-		{

-			char networkType[50] = {0};

-        	sc_cfg_get(NV_NETWORK_TYPE,networkType,sizeof(networkType));

-			if((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service",networkType) || 0 == strcmp("Limited Service",networkType)))

-			{

-				if(sysinfo_flag == 0)

-				{

-			        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-			        rcv_clt_req_msg_proc(buf);

-			        free(buf);

-					sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-				}

-			}

-		}

-	}

+    //оƬÈÏÖ¤´úÂë

+    sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

+    if (0 == strcmp(versionmode, "0"))

+    {

+        if (g_zUfi_Stat != tAtRes.stat)

+        {

+            g_zUfi_Stat = tAtRes.stat;

+            if (sysinfo_flag == 0)

+            {

+                buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                rcv_clt_req_msg_proc(buf);

+                free(buf);

+                sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+            }

+        }

+        else

+        {

+            char networkType[50] = {0};

+            sc_cfg_get(NV_NETWORK_TYPE, networkType, sizeof(networkType));

+            if ((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service", networkType)

+                    || 0 == strcmp("Limited Service", networkType)))

+            {

+                if (sysinfo_flag == 0)

+                {

+                    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                    rcv_clt_req_msg_proc(buf);

+                    free(buf);

+                    sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+                }

+            }

+        }

+    }

     return AT_END;

 }

 

 int can_poweron_dail = 0;

 extern int apn_is_ims;

-int cgreg_auto_act(char *at_paras ,int is_query_report)

+int cgreg_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_CgregRes   tAtRes  = {0};

-    MSG_BUF *buf=NULL;

+    MSG_BUF *buf = NULL;

     char strBuf[10] = {0};

-	char versionmode[2] = {0};

+    char versionmode[2] = {0};

 

     void *p[6] = {&tAtRes.stat, tAtRes.lac, tAtRes.rac, &tAtRes.act, tAtRes.ci, &tAtRes.subact};

-    at_print(AT_DEBUG,"cgreg_auto_act at_paras=%s!\n",at_paras);

+    at_print(AT_DEBUG, "cgreg_auto_act at_paras=%s!\n", at_paras);

     parse_param2("%d,%s,%s,%d,%s,%d", at_paras, p);

-    at_print(AT_DEBUG,"cgreg_auto_act stat=%d,lac=%s,rac=%s,act=%d,ci=%s,subact=%d!\n",

-    tAtRes.stat, tAtRes.lac, tAtRes.rac, tAtRes.act, tAtRes.ci, tAtRes.subact);  

+    at_print(AT_DEBUG, "cgreg_auto_act stat=%d,lac=%s,rac=%s,act=%d,ci=%s,subact=%d!\n",

+             tAtRes.stat, tAtRes.lac, tAtRes.rac, tAtRes.act, tAtRes.ci, tAtRes.subact);

 

-    snprintf(strBuf,sizeof(strBuf),"%d", tAtRes.stat);

+    snprintf(strBuf, sizeof(strBuf), "%d", tAtRes.stat);

     sc_cfg_set("cgreg_stat", strBuf);

-	

-    if(cfun_state==0)

+

+    if (cfun_state == 0)

     {

-        at_print(AT_ERR,"query cgreg err!\n");

+        at_print(AT_ERR, "query cgreg err!\n");

         return AT_END;

     }

     /*×¢²áÁËÂþÓÎÍøÂç»ò±¾µØÍøÂç*/

-    if( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

+    if ( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

     {

-		MSG_BUF *msg_buf = NULL;

-		char ppp_status[20] = {0};

-		sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

-		//Ö»Óе±Ê״請úºó£¬Ö÷¿ØÔø¾­Ö÷¶¯·¢Æð¹ý²¦ºÅ²¢ÇÒûÓв¦ºÅ³É¹¦£¬´ËʱÔÚÓÐÍøÂçºó

-		//at_ctlÄ£Äâ³ÉÖ÷¿ØÖØÐ·¢Æðpdp¼¤»î

-		if((can_poweron_dail == 0) && (g_defcid_mng.modid == MODULE_ID_MAIN_CTRL) && (0 == strcmp(PPP_DISCONNECTED, ppp_status)))

-		{

-			can_poweron_dail = 1;

-			at_print(AT_ERR,"cgreg_auto_act begin dial!!!\n");

-			msg_buf=normal_getmsg(g_defcid_mng.modid ,MODULE_ID_AT_CTL,MSG_CMD_PDP_ACT_REQ, 0, NULL);

-			rcv_msg_proc(msg_buf);

-			free(msg_buf);

-			msg_buf = NULL;

-		}

-    	if(g_modem_model)

-    	{

-			start_pdp_auto_dial();

-    	}

-        sc_cfg_set(NV_TDREG_STATUS,"ok");

-		//apn_is_ims=-1;//4GºÍ2-3G¿ÉÄÜͬʱ´æÔÚEC:616000620973

+        MSG_BUF *msg_buf = NULL;

+        char ppp_status[20] = {0};

+        sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

+        //Ö»Óе±Ê״請úºó£¬Ö÷¿ØÔø¾­Ö÷¶¯·¢Æð¹ý²¦ºÅ²¢ÇÒûÓв¦ºÅ³É¹¦£¬´ËʱÔÚÓÐÍøÂçºó

+        //at_ctlÄ£Äâ³ÉÖ÷¿ØÖØÐ·¢Æðpdp¼¤»î

+        if ((can_poweron_dail == 0) && (g_defcid_mng.modid == MODULE_ID_MAIN_CTRL)

+                && (0 == strcmp(PPP_DISCONNECTED, ppp_status)))

+        {

+            can_poweron_dail = 1;

+            at_print(AT_ERR, "cgreg_auto_act begin dial!!!\n");

+            msg_buf = normal_getmsg(g_defcid_mng.modid, MODULE_ID_AT_CTL, MSG_CMD_PDP_ACT_REQ, 0, NULL);

+            rcv_msg_proc(msg_buf);

+            free(msg_buf);

+            msg_buf = NULL;

+        }

+        if (g_modem_model)

+        {

+            start_pdp_auto_dial();

+        }

+        sc_cfg_set(NV_TDREG_STATUS, "ok");

+        //apn_is_ims=-1;//4GºÍ2-3G¿ÉÄÜͬʱ´æÔÚEC:616000620973

     }

     else

     {

-        sc_cfg_set(NV_TDREG_STATUS,"no");

+        sc_cfg_set(NV_TDREG_STATUS, "no");

     }

-    at_print(AT_DEBUG,"atBase_RecvCgregRsp per=%d,cur=%d!\n",g_zUfi_Stat,tAtRes.stat);

+    at_print(AT_DEBUG, "atBase_RecvCgregRsp per=%d,cur=%d!\n", g_zUfi_Stat, tAtRes.stat);

 

-	//оƬÈÏÖ¤´úÂë

-	sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

-	if(0 == strcmp(versionmode, "0"))

-	{

-	    if(g_zUfi_Stat != tAtRes.stat && g_modem_model)

-	    {

-	        g_zUfi_Stat = tAtRes.stat;

-			if(sysinfo_flag == 0)

-			{

-		        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-		        rcv_clt_req_msg_proc(buf);

-		        free(buf);

-				sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-			}

-	    }

-		else

-		{

-			char networkType[50] = {0};

-        	sc_cfg_get(NV_NETWORK_TYPE,networkType,sizeof(networkType));

-			if((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service",networkType) || 0 == strcmp("Limited Service",networkType)))

-			{

-				if(sysinfo_flag == 0)

-				{

-			        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-			        rcv_clt_req_msg_proc(buf);

-			        free(buf);

-					sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-				}

-			}

-		}

-	}

+    //оƬÈÏÖ¤´úÂë

+    sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

+    if (0 == strcmp(versionmode, "0"))

+    {

+        if (g_zUfi_Stat != tAtRes.stat && g_modem_model)

+        {

+            g_zUfi_Stat = tAtRes.stat;

+            if (sysinfo_flag == 0)

+            {

+                buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                rcv_clt_req_msg_proc(buf);

+                free(buf);

+                sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+            }

+        }

+        else

+        {

+            char networkType[50] = {0};

+            sc_cfg_get(NV_NETWORK_TYPE, networkType, sizeof(networkType));

+            if ((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service", networkType)

+                    || 0 == strcmp("Limited Service", networkType)))

+            {

+                if (sysinfo_flag == 0)

+                {

+                    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                    rcv_clt_req_msg_proc(buf);

+                    free(buf);

+                    sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+                }

+            }

+        }

+    }

     return AT_END;

 }

 

 

-int creg_auto_act(char *at_paras ,int is_query_report)

+int creg_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_CregRes   tAtRes      = {0};

-    MSG_BUF *buf=NULL;

-	int lac = 0, ci = 0;

+    MSG_BUF *buf = NULL;

+    int lac = 0, ci = 0;

     char strBuf[20] = {0};

-	char versionmode[2] = {0};

-	

-    void *p[5] = {&tAtRes.stat, tAtRes.tac, tAtRes.ci, &tAtRes.act,&tAtRes.subact};

-    at_print(AT_DEBUG,"creg_auto_act at_paras=%s!\n",at_paras);

+    char versionmode[2] = {0};

+

+    void *p[5] = {&tAtRes.stat, tAtRes.tac, tAtRes.ci, &tAtRes.act, &tAtRes.subact};

+    at_print(AT_DEBUG, "creg_auto_act at_paras=%s!\n", at_paras);

     parse_param2("%d,%s,%s,%d,%d", at_paras, p);

-    at_print(AT_DEBUG,"creg_auto_act stat=%d,tac=%s,ci=%s,act=%d,subact=%d!\n",

-    tAtRes.stat, tAtRes.tac, tAtRes.ci, tAtRes.act, tAtRes.subact);  

+    at_print(AT_DEBUG, "creg_auto_act stat=%d,tac=%s,ci=%s,act=%d,subact=%d!\n",

+             tAtRes.stat, tAtRes.tac, tAtRes.ci, tAtRes.act, tAtRes.subact);

 

     sprintf(strBuf, "%d", tAtRes.stat);

     sc_cfg_set("creg_stat", strBuf);

 

-	if(tAtRes.act != 7)

-	{

-		trans_Str2Value(tAtRes.tac, FALSE, &lac);

-		memset(strBuf, 0x00, 20);

-		sprintf(strBuf, "%d", lac);

-		sc_cfg_set(NV_LAC_CODE, strBuf);

-		

-		trans_Str2Value(tAtRes.ci, FALSE, &ci);

-		memset(strBuf, 0x00, 20);

-		sprintf(strBuf, "%d", ci);

-		sc_cfg_set(NV_CELL_ID, strBuf);

-	}

-	

-    /*×¢²áÁËÂþÓÎÍøÂç»ò±¾µØÍøÂç*/

-    if( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

+    if (tAtRes.act != 7)

     {

-    	if(g_modem_model)

-    	{

-			start_pdp_auto_dial();

-    	}

-    	//zhangfen for PDP

-		//ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_NET_AUTO_DIAL, 0, NULL, 0);

-        sc_cfg_set(NV_REG_STATUS,"ok");

+        trans_Str2Value(tAtRes.tac, FALSE, &lac);

+        memset(strBuf, 0x00, 20);

+        sprintf(strBuf, "%d", lac);

+        sc_cfg_set(NV_LAC_CODE, strBuf);

 

-		ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_DMREG, MSG_CMD_CREG_IND, 0, NULL, 0);

+        trans_Str2Value(tAtRes.ci, FALSE, &ci);

+        memset(strBuf, 0x00, 20);

+        sprintf(strBuf, "%d", ci);

+        sc_cfg_set(NV_CELL_ID, strBuf);

+    }

+

+    /*×¢²áÁËÂþÓÎÍøÂç»ò±¾µØÍøÂç*/

+    if ( (5 == tAtRes.stat ) || ( 1 == tAtRes.stat ))

+    {

+        if (g_modem_model)

+        {

+            start_pdp_auto_dial();

+        }

+        //zhangfen for PDP

+        //ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_NET_AUTO_DIAL, 0, NULL, 0);

+        sc_cfg_set(NV_REG_STATUS, "ok");

+

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_DMREG, MSG_CMD_CREG_IND, 0, NULL, 0);

     }

     else

     {

-        sc_cfg_set(NV_REG_STATUS,"no");

+        sc_cfg_set(NV_REG_STATUS, "no");

     }

-    at_print(AT_DEBUG,"atBase_RecvCregRsp per=%d,cur=%d!\n",g_zUfi_Stat,tAtRes.stat);

-	

+    at_print(AT_DEBUG, "atBase_RecvCregRsp per=%d,cur=%d!\n", g_zUfi_Stat, tAtRes.stat);

+

     //оƬÈÏÖ¤´úÂë

-	sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

-	if(0 == strcmp(versionmode, "0"))

-	{

-	    if(g_zUfi_Stat != tAtRes.stat)

-	    {

-			if(cfun_state==0 && g_modem_model)

-		    {

-		        at_print(AT_ERR,"query creg err!\n");

-		        return AT_END;

-		    }

-	        g_zUfi_Stat = tAtRes.stat;

-			if(sysinfo_flag == 0)

-			{

-		        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-		        rcv_clt_req_msg_proc(buf);

-		        free(buf);

-				sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-			}

-	    }

-		else

-		{

-			char networkType[50] = {0};

-        	sc_cfg_get(NV_NETWORK_TYPE,networkType,sizeof(networkType));

-			if((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service",networkType) || 0 == strcmp("Limited Service",networkType)))

-			{

-				if(sysinfo_flag == 0)

-				{

-			        buf=normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_QUERY_SYSINFO_REQ,0,NULL);

-			        rcv_clt_req_msg_proc(buf);

-			        free(buf);

-					sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

-				}

-			}

-		}

-	}

+    sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

+    if (0 == strcmp(versionmode, "0"))

+    {

+        if (g_zUfi_Stat != tAtRes.stat)

+        {

+            if (cfun_state == 0 && g_modem_model)

+            {

+                at_print(AT_ERR, "query creg err!\n");

+                return AT_END;

+            }

+            g_zUfi_Stat = tAtRes.stat;

+            if (sysinfo_flag == 0)

+            {

+                buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                rcv_clt_req_msg_proc(buf);

+                free(buf);

+                sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+            }

+        }

+        else

+        {

+            char networkType[50] = {0};

+            sc_cfg_get(NV_NETWORK_TYPE, networkType, sizeof(networkType));

+            if ((5 == tAtRes.stat || 1 == tAtRes.stat) && (0 == strcmp("No Service", networkType)

+                    || 0 == strcmp("Limited Service", networkType)))

+            {

+                if (sysinfo_flag == 0)

+                {

+                    buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_QUERY_SYSINFO_REQ, 0, NULL);

+                    rcv_clt_req_msg_proc(buf);

+                    free(buf);

+                    sysinfo_flag = 1;//sysinfoÖ»·¢Ò»´Î

+                }

+            }

+        }

+    }

     return AT_END;

 }

 

 //»ñÈ¡ÍøÂçÐźÅ״̬£¬ÖÃNV

-int sysinfo_auto_act(char *at_paras ,int is_query_report)

+int sysinfo_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_SysinfoRes tPara                       = {0};

-	UINT32 signalbar = 0;

-	char needDispSearching[10] = {0};

-	char modemMainState[50] = {0};

-	char networkCategoryBasedOn[10] = {0};

-	char strSignalbar[10] = {0};

-	char perRoamStatus[10] = {0};

-	char curRoamStatus[10] = {0};

+    UINT32 signalbar = 0;

+    char needDispSearching[10] = {0};

+    char modemMainState[50] = {0};

+    char networkCategoryBasedOn[10] = {0};

+    char strSignalbar[10] = {0};

+    char perRoamStatus[10] = {0};

+    char curRoamStatus[10] = {0};

 

-    void *p[7] = {&tPara.srvStatus, &tPara.srvDomain,&tPara.roamStatus,&tPara.sysMode, &tPara.simState,&tPara.reserve,&tPara.sysSubmode};

-    at_print(AT_DEBUG,"sysinfo_auto_act at_paras=%s!\n",at_paras);

+    void *p[7] = {&tPara.srvStatus, &tPara.srvDomain, &tPara.roamStatus, &tPara.sysMode, &tPara.simState, &tPara.reserve, &tPara.sysSubmode};

+    at_print(AT_DEBUG, "sysinfo_auto_act at_paras=%s!\n", at_paras);

     parse_param2("%d,%d,%d,%d,%d,%d,%d", at_paras, p);

-    at_print(AT_DEBUG,"sysinfo_auto_act srvStatus=%ld,srvDomain=%ld,roamStatus=%ld,sysMode=%ld,simState=%ld,reserve=%ld,sysSubmode=%ld!\n",

-    tPara.srvStatus,tPara.srvDomain,tPara.roamStatus,tPara.sysMode,tPara.simState,tPara.reserve,tPara.sysSubmode);  

+    at_print(AT_DEBUG,

+             "sysinfo_auto_act srvStatus=%ld,srvDomain=%ld,roamStatus=%ld,sysMode=%ld,simState=%ld,reserve=%ld,sysSubmode=%ld!\n",

+             tPara.srvStatus, tPara.srvDomain, tPara.roamStatus, tPara.sysMode, tPara.simState, tPara.reserve, tPara.sysSubmode);

 

-	sc_cfg_get("need_display_searching_status", needDispSearching, sizeof(needDispSearching));

-	sc_cfg_get("modem_main_state", modemMainState, sizeof(modemMainState));

-	sc_cfg_get("network_category_based_on", networkCategoryBasedOn, sizeof(networkCategoryBasedOn));

-	if(0 == tPara.srvStatus)//ÎÞ·þÎñ

+    sc_cfg_get("need_display_searching_status", needDispSearching, sizeof(needDispSearching));

+    sc_cfg_get("modem_main_state", modemMainState, sizeof(modemMainState));

+    sc_cfg_get("network_category_based_on", networkCategoryBasedOn, sizeof(networkCategoryBasedOn));

+    if (0 == tPara.srvStatus) //ÎÞ·þÎñ

     {

-	    if(0 == strcmp("yes", needDispSearching))

-		{

-			if(g_isSearchingNetwork == TRUE)

-			{

-	            if(strcmp(modemMainState,"modem_init_complete") == 0)

-	            {

-					sc_cfg_set(NV_NETWORK_TYPE, NETWORK_TYPE_INIT);

-					sc_cfg_set(NV_SUB_NETWORK_TYPE, NETWORK_TYPE_INIT);

-	            }

-				else

-				{

-					sc_cfg_set(NV_NETWORK_TYPE, "No Service");

-					sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

-				}

-			}

-			else

-			{

-	        	sc_cfg_set(NV_NETWORK_TYPE, "No Service");

-				sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

-			}

-		}		

-		else

-		{

-			sc_cfg_set(NV_NETWORK_TYPE, "No Service");

-			sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

-		}  		

-		signalbar = 0;

-        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI,MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar), (UINT8 *)&signalbar,0);

-    }

-    else if( 1 == tPara.srvStatus )

-    {

-        if(0 == strcmp("yes", needDispSearching))

-		{

-			if(g_isSearchingNetwork == TRUE)

-			{

-				if(strcmp(modemMainState,"modem_init_complete") == 0)

-	            {

-					sc_cfg_set(NV_NETWORK_TYPE, NETWORK_TYPE_INIT);

-					sc_cfg_set(NV_SUB_NETWORK_TYPE, NETWORK_TYPE_INIT);

-	            }

-				else

-				{

-					sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

-					sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

+        if (0 == strcmp("yes", needDispSearching))

+        {

+            if (g_isSearchingNetwork == TRUE)

+            {

+                if (strcmp(modemMainState, "modem_init_complete") == 0)

+                {

+                    sc_cfg_set(NV_NETWORK_TYPE, NETWORK_TYPE_INIT);

+                    sc_cfg_set(NV_SUB_NETWORK_TYPE, NETWORK_TYPE_INIT);

                 }

-			}

-			else

-			{

-	 	       sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

-			   sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

- 			}

-		}		

-		else

-		{

-			sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

-			sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

-		}		

-		signalbar = 0;

-        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI,MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar), (UINT8 *)&signalbar,0);

+                else

+                {

+                    sc_cfg_set(NV_NETWORK_TYPE, "No Service");

+                    sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

+                }

+            }

+            else

+            {

+                sc_cfg_set(NV_NETWORK_TYPE, "No Service");

+                sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

+            }

+        }

+        else

+        {

+            sc_cfg_set(NV_NETWORK_TYPE, "No Service");

+            sc_cfg_set(NV_SUB_NETWORK_TYPE, "No Service");

+        }

+        signalbar = 0;

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar),

+                         (UINT8 *)&signalbar, 0);

+    }

+    else if ( 1 == tPara.srvStatus )

+    {

+        if (0 == strcmp("yes", needDispSearching))

+        {

+            if (g_isSearchingNetwork == TRUE)

+            {

+                if (strcmp(modemMainState, "modem_init_complete") == 0)

+                {

+                    sc_cfg_set(NV_NETWORK_TYPE, NETWORK_TYPE_INIT);

+                    sc_cfg_set(NV_SUB_NETWORK_TYPE, NETWORK_TYPE_INIT);

+                }

+                else

+                {

+                    sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

+                    sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

+                }

+            }

+            else

+            {

+                sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

+                sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

+            }

+        }

+        else

+        {

+            sc_cfg_set(NV_NETWORK_TYPE, "Limited Service");

+            sc_cfg_set(NV_SUB_NETWORK_TYPE, "Limited Service");

+        }

+        signalbar = 0;

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar),

+                         (UINT8 *)&signalbar, 0);

     }

     else

     {

-    	if(0 == strcmp("yes", needDispSearching))

-	    {

-			g_isSearchingNetwork = FALSE;

+        if (0 == strcmp("yes", needDispSearching))

+        {

+            g_isSearchingNetwork = FALSE;

         }

         char    netCategory[50]  = {0};

         char    connectLogic[50]  = {0};

-        sc_cfg_get(NV_NETWORK_CATEGORY_BASED_ON,netCategory,sizeof(netCategory));

-        sc_cfg_get(NV_CONNECT_LOGIC,connectLogic,sizeof(connectLogic));

-        

+        sc_cfg_get(NV_NETWORK_CATEGORY_BASED_ON, netCategory, sizeof(netCategory));

+        sc_cfg_get(NV_CONNECT_LOGIC, connectLogic, sizeof(connectLogic));

+

         //normal_sysinfosetdomainstat(tPara.srvDomain);

-        if(0 == strcmp("act", netCategory))

-		{

-			normal_sysinfosysmodecfgset(tPara.sysMode,tPara.sysSubmode);

-		}

+        if (0 == strcmp("act", netCategory))

+        {

+            normal_sysinfosysmodecfgset(tPara.sysMode, tPara.sysSubmode);

+        }

         else

         {

-			normal_sysinfonetworktypeSet(tPara.sysMode,tPara.sysSubmode);

-		}

-        

+            normal_sysinfonetworktypeSet(tPara.sysMode, tPara.sysSubmode);

+        }

+

         //if(0!=strcmp("cpe",connectLogic) && 0!=strcmp("five_times",connectLogic))

         //{

         //    normal_sysinfodomainpdpdail(tPara.srvDomain);

         //}

-		sc_cfg_get("signalbar", strSignalbar, sizeof(strSignalbar));

+        sc_cfg_get("signalbar", strSignalbar, sizeof(strSignalbar));

         signalbar = atoi(strSignalbar);

-        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI,MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar), (UINT8 *)&signalbar,0);

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_OUT_REG_GET_SIGNAL_NUM, sizeof(signalbar),

+                         (UINT8 *)&signalbar, 0);

 

-		//zhangfen for PDP

-		//ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_NET_AUTO_DIAL, 0, NULL, 0);

-				

-		if(g_modem_model)

-		{

-			//static int can_poweron_dail = 0;

-			MSG_BUF *msg_buf = NULL;

-			char ppp_status[20] = {0};

-			sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

-			//Ö»Óе±Ê״請úºó£¬Ö÷¿ØÔø¾­Ö÷¶¯·¢Æð¹ý²¦ºÅ²¢ÇÒûÓв¦ºÅ³É¹¦£¬´ËʱÔÚÓÐÍøÂçºó

-			//at_ctlÄ£Äâ³ÉÖ÷¿ØÖØÐ·¢Æðpdp¼¤»î

-			if((can_poweron_dail == 0) && (g_defcid_mng.modid == MODULE_ID_MAIN_CTRL) && (0 == strcmp(PPP_DISCONNECTED, ppp_status)))

-		    {

-				char creg_stat[20] = {0};

-				char cereg_stat[20] = {0};

-				

-				sc_cfg_get("cgreg_stat", creg_stat, sizeof(creg_stat));

-				sc_cfg_get("cereg_stat", cereg_stat, sizeof(cereg_stat));

-				at_print(AT_DEBUG,"@@@@@@@@@@@@@sysinfo_auto_act  creg stat=%s, cereg stat=%s!\n",creg_stat,cereg_stat);

-				//zpr 1218 GPRSS&EPSûע²áºÃ£¬²»·¢Æð

-				if(1 != atoi(creg_stat) && 5 != atoi(creg_stat) && 1 != atoi(cereg_stat) && 5 != atoi(cereg_stat))

-				{

-					//return 0;

-				}

-				else

-				{

-		        can_poweron_dail = 1;

-				#if 0

-		        struct pdp_act_req *pdpsetinfo=NULL;

-		        pdpsetinfo=malloc(sizeof(struct pdp_act_req));

-		        if(pdpsetinfo == NULL){softap_assert("");}

-		        memset(pdpsetinfo,0,sizeof(struct pdp_act_req));

-		        normal_getcurparam(pdpsetinfo);

-		        sc_cfg_set("auto_reconnect", "1");

-				#endif

-				

-				at_print(AT_ERR,"sysinfo_auto_act begin dial!!!\n");

-				msg_buf=normal_getmsg(g_defcid_mng.modid ,MODULE_ID_AT_CTL,MSG_CMD_PDP_ACT_REQ, 0, NULL);

-				rcv_msg_proc(msg_buf);

-				free(msg_buf);

-				msg_buf = NULL;

-				}

-		    }

-		}

-	}

+        //zhangfen for PDP

+        //ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_MAIN_CTRL, MSG_CMD_NET_AUTO_DIAL, 0, NULL, 0);

 

-	sc_cfg_get(NV_SIMCARD_ROAM, perRoamStatus, sizeof(perRoamStatus));

-    if(0 == tPara.roamStatus)

-    {

-		sc_cfg_set(NV_SIMCARD_ROAM,"Home");

-	}

-	else

-	{

-		if(TRUE == normal_checkroam(mccNum, mncNum))

-		{

-		    sc_cfg_set(NV_SIMCARD_ROAM,"Home");

-			tPara.roamStatus = 0;

-		}

-	    else

-		{

-		    sc_cfg_set(NV_SIMCARD_ROAM,"Internal"); 

-		}

+        if (g_modem_model)

+        {

+            //static int can_poweron_dail = 0;

+            MSG_BUF *msg_buf = NULL;

+            char ppp_status[20] = {0};

+            sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

+            //Ö»Óе±Ê״請úºó£¬Ö÷¿ØÔø¾­Ö÷¶¯·¢Æð¹ý²¦ºÅ²¢ÇÒûÓв¦ºÅ³É¹¦£¬´ËʱÔÚÓÐÍøÂçºó

+            //at_ctlÄ£Äâ³ÉÖ÷¿ØÖØÐ·¢Æðpdp¼¤»î

+            if ((can_poweron_dail == 0) && (g_defcid_mng.modid == MODULE_ID_MAIN_CTRL)

+                    && (0 == strcmp(PPP_DISCONNECTED, ppp_status)))

+            {

+                char creg_stat[20] = {0};

+                char cereg_stat[20] = {0};

+

+                sc_cfg_get("cgreg_stat", creg_stat, sizeof(creg_stat));

+                sc_cfg_get("cereg_stat", cereg_stat, sizeof(cereg_stat));

+                at_print(AT_DEBUG, "@@@@@@@@@@@@@sysinfo_auto_act  creg stat=%s, cereg stat=%s!\n", creg_stat, cereg_stat);

+                //zpr 1218 GPRSS&EPSûע²áºÃ£¬²»·¢Æð

+                if (1 != atoi(creg_stat) && 5 != atoi(creg_stat) && 1 != atoi(cereg_stat) && 5 != atoi(cereg_stat))

+                {

+                    //return 0;

+                }

+                else

+                {

+                    can_poweron_dail = 1;

+#if 0

+                    struct pdp_act_req *pdpsetinfo = NULL;

+                    pdpsetinfo = malloc(sizeof(struct pdp_act_req));

+                    if (pdpsetinfo == NULL)

+                    {

+                        softap_assert("");

+                    }

+                    memset(pdpsetinfo, 0, sizeof(struct pdp_act_req));

+                    normal_getcurparam(pdpsetinfo);

+                    sc_cfg_set("auto_reconnect", "1");

+#endif

+

+                    at_print(AT_ERR, "sysinfo_auto_act begin dial!!!\n");

+                    msg_buf = normal_getmsg(g_defcid_mng.modid, MODULE_ID_AT_CTL, MSG_CMD_PDP_ACT_REQ, 0, NULL);

+                    rcv_msg_proc(msg_buf);

+                    free(msg_buf);

+                    msg_buf = NULL;

+                }

+            }

+        }

     }

 

-	sc_cfg_get(NV_SIMCARD_ROAM, curRoamStatus, sizeof(curRoamStatus));

-	if(strcmp(perRoamStatus, curRoamStatus) != 0)

-	{

-		ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_DMREG, MSG_CMD_ROAM_STATUS_IND, 0, NULL, 0);

-	}

-	

-    if(0 == strcmp("yes", needDispSearching))

-	{

-	   if(g_isSearchingNetwork == FALSE)

-	   {

-			at_print(AT_DEBUG,"atBase_RecvSysInfoRsp, MSG_MMICHANNEL_NETWORK_MODE, tPara.srvStatus = %ld \n", tPara.srvStatus);

-		    ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI,MSG_CMD_CHANNEL_NETWORK_MODE, sizeof(tPara), (UCHAR *)&tPara,0);

-	   }

-	}   

-	else

+    sc_cfg_get(NV_SIMCARD_ROAM, perRoamStatus, sizeof(perRoamStatus));

+    if (0 == tPara.roamStatus)

     {

-        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI,MSG_CMD_CHANNEL_NETWORK_MODE, sizeof(tPara), (UCHAR *)&tPara,0);

+        sc_cfg_set(NV_SIMCARD_ROAM, "Home");

+    }

+    else

+    {

+        if (TRUE == normal_checkroam(mccNum, mncNum))

+        {

+            sc_cfg_set(NV_SIMCARD_ROAM, "Home");

+            tPara.roamStatus = 0;

+        }

+        else

+        {

+            sc_cfg_set(NV_SIMCARD_ROAM, "Internal");

+        }

+    }

+

+    sc_cfg_get(NV_SIMCARD_ROAM, curRoamStatus, sizeof(curRoamStatus));

+    if (strcmp(perRoamStatus, curRoamStatus) != 0)

+    {

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_DMREG, MSG_CMD_ROAM_STATUS_IND, 0, NULL, 0);

+    }

+

+    if (0 == strcmp("yes", needDispSearching))

+    {

+        if (g_isSearchingNetwork == FALSE)

+        {

+            at_print(AT_DEBUG, "atBase_RecvSysInfoRsp, MSG_MMICHANNEL_NETWORK_MODE, tPara.srvStatus = %ld \n", tPara.srvStatus);

+            ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_CHANNEL_NETWORK_MODE, sizeof(tPara), (UCHAR *)&tPara, 0);

+        }

+    }

+    else

+    {

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_MMI, MSG_CMD_CHANNEL_NETWORK_MODE, sizeof(tPara), (UCHAR *)&tPara, 0);

     }

     return AT_END;

 }

 

-int mac_auto_act(char *at_paras ,int is_query_report)

+int mac_auto_act(char *at_paras, int is_query_report)

 {

-    mactozssid=malloc(128);

-    if(mactozssid == NULL){

-		softap_assert("");

-		return AT_END;

-	}

-    memset(mactozssid, 0, 128);    

-    snprintf(mactozssid,128,"+MAC:%s",at_paras);

+    mactozssid = malloc(128);

+    if (mactozssid == NULL)

+    {

+        softap_assert("");

+        return AT_END;

+    }

+    memset(mactozssid, 0, 128);

+    snprintf(mactozssid, 128, "+MAC:%s", at_paras);

     return AT_END;

 }

 

-int mac2_auto_act(char *at_paras ,int is_query_report)

+int mac2_auto_act(char *at_paras, int is_query_report)

 {

-    if(mactozssid == NULL || strlen(mactozssid) >= 128){

-		softap_assert("");

-		return AT_END;

-	}

-    snprintf(mactozssid+strlen(mactozssid),128-strlen(mactozssid),";%s",at_paras);

+    if (mactozssid == NULL || strlen(mactozssid) >= 128)

+    {

+        softap_assert("");

+        return AT_END;

+    }

+    snprintf(mactozssid + strlen(mactozssid), 128 - strlen(mactozssid), ";%s", at_paras);

     return AT_END;

 }

 

-int clck_auto_act(char *at_paras ,int is_query_report)

+int clck_auto_act(char *at_paras, int is_query_report)

 {

     char strMode[10] = {0};

     T_zAt_ClckSet_RES clckRspPara = {0};

     int classVale = 0;

     int status = 0;

-    sscanf(at_paras, "%d,%d",&status,&classVale);

+    sscanf(at_paras, "%d,%d", &status, &classVale);

     clckRspPara.uclass  = (unsigned char)classVale;

     clckRspPara.status  = (unsigned char)status;

-    sprintf(strMode,"%d", clckRspPara.status);

-    at_print(AT_DEBUG,"clck_auto_act uclass=%d,status=%d\n",status,classVale);

+    sprintf(strMode, "%d", clckRspPara.status);

+    at_print(AT_DEBUG, "clck_auto_act uclass=%d,status=%d\n", status, classVale);

     /*0£ºÎ´¼¤»î, 1£º¼¤»î*/

     sc_cfg_set(NV_PIN_STATUS, strMode);

     return AT_END;

 }

 

-int zpbic_auto_act(char *at_paras ,int is_query_report)

+int zpbic_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_ZpbicRes AtRes = {0};

     char ismsSwitch[2] = {0};

     sscanf(at_paras, "%ld,%ld", &AtRes.result, &AtRes.opertype);

-    at_print(AT_DEBUG,"zpbic_auto_act str:%s,result:%ld,opertype:%ld\n",at_paras,AtRes.result, AtRes.opertype);

+    at_print(AT_DEBUG, "zpbic_auto_act str:%s,result:%ld,opertype:%ld\n", at_paras, AtRes.result, AtRes.opertype);

 

-    if((1 == AtRes.result) && (1 == AtRes.opertype))

+    if ((1 == AtRes.result) && (1 == AtRes.opertype))

     {

-    	sc_cfg_set("zpbic_pb", "ready");

-	    if(g_modem_model)

-	    {

-	    	g_smspb_init |= (1<<AtRes.opertype);

-			at_print(AT_NORMAL,"1.sms_pb init flag: %d\n", g_smspb_init);

-			if(((g_smspb_init & 0x03) == 0x03) && (g_need_smspb_init == 0))

-			{

-				char ppp_status[20] = {0};

-				sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

-				if(0 == strcmp("ppp_connected", ppp_status))

-					pbsms_init_msg_proc();//Èç¹ûÒѾ­²¦ºÅ³É¹¦£¬Ö±½Ó¸øpbºÍsmsÓ¦Ó÷¢Æð³õʼ»¯ÏûÏ¢

-				else

-					pbsms_init_timerout(&AtRes);//pbºÍsms¶¼³õʼ»¯Íê³Éºó²ÅÄÜÆð¶¨Ê±Æ÷

-			}

-	    }

-		

-		char versionmode[2] = {0};

-		MSG_BUF *buf = NULL;

-        //оƬÈÏÖ¤´úÂë

-		sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

-		if(0 == strcmp(versionmode, "0"))	

-		{

-	    	buf = normal_getmsg(MODULE_ID_AT_CTL,MODULE_ID_AT_CTL,MSG_CMD_MODEMREG_INFO_REQ,0,NULL);

-	    	rcv_clt_req_msg_proc(buf);

-	    	free(buf);

-		}

-

-        at_print(AT_DEBUG,"zpbic_auto_act cnum\n");

-    }

-    else if((1 == AtRes.result) && (0 == AtRes.opertype))

-    {

-        at_print(AT_DEBUG,"zpbic_auto_act sms\n");

-#if (APP_OS_TYPE == APP_OS_LINUX)			

-#if 1 

-        sc_cfg_get("isms_enable",ismsSwitch,sizeof(ismsSwitch));

-        if(1 == AtRes.result && 0==strcmp(ismsSwitch, "1"))

+        sc_cfg_set("zpbic_pb", "ready");

+        if (g_modem_model)

         {

-/*        	sc_cfg_set("isms_state", "0");

-            if(fork() == 0)

+            g_smspb_init |= (1 << AtRes.opertype);

+            at_print(AT_NORMAL, "1.sms_pb init flag: %d\n", g_smspb_init);

+            if (((g_smspb_init & 0x03) == 0x03) && (g_need_smspb_init == 0))

             {

-        		sc_cfg_set("isms_state", "1");

-                if(execv("/bin/zte_isms", NULL) < 0)

+                char ppp_status[20] = {0};

+                sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

+                if (0 == strcmp("ppp_connected", ppp_status))

                 {

-        			sc_cfg_set("isms_state", "2");

-                    at_print(AT_DEBUG,"execv error(%d)\n", errno);

-                    exit(0);

+                    pbsms_init_msg_proc();    //Èç¹ûÒѾ­²¦ºÅ³É¹¦£¬Ö±½Ó¸øpbºÍsmsÓ¦Ó÷¢Æð³õʼ»¯ÏûÏ¢

+                }

+                else

+                {

+                    pbsms_init_timerout(&AtRes);    //pbºÍsms¶¼³õʼ»¯Íê³Éºó²ÅÄÜÆð¶¨Ê±Æ÷

                 }

             }

-            

-        	sc_cfg_set("isms_state", "3");*/

-			if(system("/bin/zte_isms &") == 0)

-			{

-				sc_cfg_set("isms_state", "3");

-			}

-			else

-			{

-				sc_cfg_set("isms_state", "2");

-			}

+        }

+

+        char versionmode[2] = {0};

+        MSG_BUF *buf = NULL;

+        //оƬÈÏÖ¤´úÂë

+        sc_cfg_get("version_mode", versionmode, sizeof(versionmode));

+        if (0 == strcmp(versionmode, "0"))

+        {

+            buf = normal_getmsg(MODULE_ID_AT_CTL, MODULE_ID_AT_CTL, MSG_CMD_MODEMREG_INFO_REQ, 0, NULL);

+            rcv_clt_req_msg_proc(buf);

+            free(buf);

+        }

+

+        at_print(AT_DEBUG, "zpbic_auto_act cnum\n");

+    }

+    else if ((1 == AtRes.result) && (0 == AtRes.opertype))

+    {

+        at_print(AT_DEBUG, "zpbic_auto_act sms\n");

+#if (APP_OS_TYPE == APP_OS_LINUX)

+#if 1

+        sc_cfg_get("isms_enable", ismsSwitch, sizeof(ismsSwitch));

+        if (1 == AtRes.result && 0 == strcmp(ismsSwitch, "1"))

+        {

+            /*        	sc_cfg_set("isms_state", "0");

+                        if(fork() == 0)

+                        {

+                    		sc_cfg_set("isms_state", "1");

+                            if(execv("/bin/zte_isms", NULL) < 0)

+                            {

+                    			sc_cfg_set("isms_state", "2");

+                                at_print(AT_DEBUG,"execv error(%d)\n", errno);

+                                exit(0);

+                            }

+                        }

+

+                    	sc_cfg_set("isms_state", "3");*/

+            if (system("/bin/zte_isms &") == 0)

+            {

+                sc_cfg_set("isms_state", "3");

+            }

+            else

+            {

+                sc_cfg_set("isms_state", "2");

+            }

         }

 #endif

 #endif

-	    if(g_modem_model)

-	    {

-	    	g_smspb_init |= (1<<AtRes.opertype);

-	    	at_print(AT_NORMAL,"2.sms_pb init flag: %d\n", g_smspb_init);

-	    	if(((g_smspb_init & 0x03) == 0x03) && (g_need_smspb_init == 0))

-			{

-				char ppp_status[20] = {0};

-				sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

-				if(0 == strcmp("ppp_connected", ppp_status))

-					pbsms_init_msg_proc();//Èç¹ûÒѾ­²¦ºÅ³É¹¦£¬Ö±½Ó¸øpbºÍsmsÓ¦Ó÷¢Æð³õʼ»¯ÏûÏ¢

-				else

-					pbsms_init_timerout(&AtRes);//pbºÍsms¶¼³õʼ»¯Íê³Éºó²ÅÄÜÆð¶¨Ê±Æ÷

-			}

-	    }

+        if (g_modem_model)

+        {

+            g_smspb_init |= (1 << AtRes.opertype);

+            at_print(AT_NORMAL, "2.sms_pb init flag: %d\n", g_smspb_init);

+            if (((g_smspb_init & 0x03) == 0x03) && (g_need_smspb_init == 0))

+            {

+                char ppp_status[20] = {0};

+                sc_cfg_get(NV_PPP_STATUS, ppp_status, sizeof(ppp_status));

+                if (0 == strcmp("ppp_connected", ppp_status))

+                {

+                    pbsms_init_msg_proc();    //Èç¹ûÒѾ­²¦ºÅ³É¹¦£¬Ö±½Ó¸øpbºÍsmsÓ¦Ó÷¢Æð³õʼ»¯ÏûÏ¢

+                }

+                else

+                {

+                    pbsms_init_timerout(&AtRes);    //pbºÍsms¶¼³õʼ»¯Íê³Éºó²ÅÄÜÆð¶¨Ê±Æ÷

+                }

+            }

+        }

     }

     return AT_END;

 }

@@ -5015,14 +5243,14 @@
     UINT32  length                                  = 0;

     CHAR    *pSource                                = pParaLine;

     CHAR    *pDest                                  = NULL;

-    

+

     CHAR    *pStrDestMalloc = (CHAR *)malloc(ZAT_MAX_LEN);

-    if(NULL == pStrDestMalloc)

+    if (NULL == pStrDestMalloc)

     {

         return;

     }

-    memset(pStrDestMalloc, 0, ZAT_MAX_LEN); 

-    

+    memset(pStrDestMalloc, 0, ZAT_MAX_LEN);

+

     assert(pParaLine != NULL);

     pDest = pStrDestMalloc;

     length = strlen(pParaLine);

@@ -5031,11 +5259,11 @@
         free(pStrDestMalloc);

         return;

     }

-    for (i = 0; (i < length )&& (pDest - pStrDestMalloc < ZAT_MAX_LEN); i++)

+    for (i = 0; (i < length ) && (pDest - pStrDestMalloc < ZAT_MAX_LEN); i++)

     {

         if ('"' == *pSource)

         {

-            flg = (0 == flg)?1:0;                           /* Ë«ÒýºÅ ɾ³ý  */

+            flg = (0 == flg) ? 1 : 0;                       /* Ë«ÒýºÅ ɾ³ý  */

             if ('"' == *(pSource + 1))                      /* ÐǺźóÃæ½ô¸úÐǺţ¬²åÈë¿Õ´®Õ¼Î»·û */

             {

                 *pDest++ = (CHAR)ZAT_NULL_FILL;

@@ -5044,11 +5272,11 @@
         else if ((',' == *pSource) && (0 == flg))

         {

             *pDest++ = ' ';                                 /* Ë«ÒýºÅÍâÃæµÄ¶ººÅ£¬Ìæ»»³É¿Õ¸ñ */

-            if(',' == *(pSource + 1))                       /* ¶ººÅºóÃæ½ô¸ú¶ººÅ£¬»òÕßÒÔ¶ººÅ½á⣬²åÈë¿Õ´®Õ¼Î»·û */

+            if (',' == *(pSource + 1))                      /* ¶ººÅºóÃæ½ô¸ú¶ººÅ£¬»òÕßÒÔ¶ººÅ½á⣬²åÈë¿Õ´®Õ¼Î»·û */

             {

                 *pDest++ = '9';                             //±£Áô²ÎÊýÓÃ9ÔÝʱ´úÌæ

             }

-            else if('\0' == *(pSource + 1))                 /* ¶ººÅºóÃæ½ô¸ú¶ººÅ£¬»òÕßÒÔ¶ººÅ½á⣬²åÈë¿Õ´®Õ¼Î»·û */

+            else if ('\0' == *(pSource + 1))                /* ¶ººÅºóÃæ½ô¸ú¶ººÅ£¬»òÕßÒÔ¶ººÅ½á⣬²åÈë¿Õ´®Õ¼Î»·û */

             {

                 *pDest++ = (CHAR)ZAT_NULL_FILL;

             }

@@ -5056,31 +5284,31 @@
         else

         {

             //*pDest++ = ((' ' == *pSource) && (1 == flg))?(CHAR)ZAT_SPACE_REPLACE:((('\t' == *pSource) && (1 == flg))?(CHAR)ZAT_TAB_REPLACE:((('\n' == *pSource) && (1 == flg))?(CHAR)ZAT_LF_REPLACE:((('\r' == *pSource) && (1 == flg))?(CHAR)ZAT_CR_REPLACE:(*pSource))));

-            if((' ' == *pSource) && (1 == flg))

-			{

-				*pDest++ = (CHAR)ZAT_SPACE_REPLACE;

-			}

-			else if(('\t' == *pSource) && (1 == flg))

-			{

-				*pDest++ = (CHAR)ZAT_TAB_REPLACE;

-			}

-			else if(('\n' == *pSource) && (1 == flg))

-			{

-				*pDest++ = (CHAR)ZAT_LF_REPLACE;

-			}

-			else if(('\r' == *pSource) && (1 == flg))

-			{

-				*pDest++ = (CHAR)ZAT_CR_REPLACE;

-			}

-			else

-			{

-				*pDest++ = *pSource;

-			}

+            if ((' ' == *pSource) && (1 == flg))

+            {

+                *pDest++ = (CHAR)ZAT_SPACE_REPLACE;

+            }

+            else if (('\t' == *pSource) && (1 == flg))

+            {

+                *pDest++ = (CHAR)ZAT_TAB_REPLACE;

+            }

+            else if (('\n' == *pSource) && (1 == flg))

+            {

+                *pDest++ = (CHAR)ZAT_LF_REPLACE;

+            }

+            else if (('\r' == *pSource) && (1 == flg))

+            {

+                *pDest++ = (CHAR)ZAT_CR_REPLACE;

+            }

+            else

+            {

+                *pDest++ = *pSource;

+            }

         }

         pSource++;

     }

     memset(pParaLine, 0, paraSize);                           /* ½«Ô¤´¦ÀíºóµÄÄÚÈÝ¿½±´»Ø²ÎÊýÐÐÖÐ */

-    strncpy(pParaLine, pStrDestMalloc,paraSize-1);

+    strncpy(pParaLine, pStrDestMalloc, paraSize - 1);

     free(pStrDestMalloc);

 }

 

@@ -5092,13 +5320,13 @@
     CHAR*   pstrTemp    = 0;

     /* ²ÎÊý¼ì²é ¡¢ ³¤¶È¼ì²é*/

     assert(pStringPara != NULL);

-	

+

     length = (SINT32)strlen(pStringPara);

-	if ( 0 == length)

+    if ( 0 == length)

     {

         return;

     }

-	

+

     /* ¿Õ´®Õ¼Î»·û»Ö¸´ */

     if ((1 == length) && ((CHAR) ZAT_NULL_FILL == *pStringPara))

     {

@@ -5117,11 +5345,11 @@
         {

             *pstrTemp = '\t';

         }

-        else if((CHAR) ZAT_LF_REPLACE == *pstrTemp)

+        else if ((CHAR) ZAT_LF_REPLACE == *pstrTemp)

         {

             *pstrTemp = '\n';

         }

-        else if((CHAR) ZAT_CR_REPLACE == *pstrTemp)

+        else if ((CHAR) ZAT_CR_REPLACE == *pstrTemp)

         {

             *pstrTemp = '\r';

         }

@@ -5141,113 +5369,114 @@
     UINT16 value32 = (bDcs & 0x0C) >> 2;

     UINT16 value2  = (bDcs & 0x04) >> 2;

 

-    if((value74 == 0) || (value74 == 2) || (value74 == 3) || (value74 == 8) ||

-        (value74 == 10) || (value74 == 11) || (value74 == 12))

+    if ((value74 == 0) || (value74 == 2) || (value74 == 3) || (value74 == 8) ||

+            (value74 == 10) || (value74 == 11) || (value74 == 12))

     {

         return ZAT_GSM7BIT;

     }

-    else if((value74 == 1) && (value30 == 1))

+    else if ((value74 == 1) && (value30 == 1))

     {

         return ZAT_UCS2;

     }

-    else if((value74 == 1) && (value30 != 1))

+    else if ((value74 == 1) && (value30 != 1))

     {

         return ZAT_GSM7BIT;

     }

-    else if((value76 == 1) && ((value32 == 0) || (value32 == 3)))

+    else if ((value76 == 1) && ((value32 == 0) || (value32 == 3)))

     {

         return ZAT_GSM7BIT;

     }

-    else if((value76 == 1) && (value32 == 1))

+    else if ((value76 == 1) && (value32 == 1))

     {

         return ZAT_8BIT;

     }

-    else if((value76 == 1) && (value32 == 2))

+    else if ((value76 == 1) && (value32 == 2))

     {

         return ZAT_UCS2;

     }

-    else if((value74 == 9) && ((value32 == 0) || (value32 == 3)))

+    else if ((value74 == 9) && ((value32 == 0) || (value32 == 3)))

     {

         return ZAT_GSM7BIT;

     }

-    else if((value74 == 9) && (value32 == 1))

+    else if ((value74 == 9) && (value32 == 1))

     {

         return ZAT_8BIT;

     }

-    else if((value74 == 9) && (value32 == 2))

+    else if ((value74 == 9) && (value32 == 2))

     {

         return ZAT_UCS2;

     }

-    else if((value74 == 15) && (value2 == 0))

+    else if ((value74 == 15) && (value2 == 0))

     {

         return ZAT_GSM7BIT;

     }

-    else if((value74 == 15) && (value2 == 1))

+    else if ((value74 == 15) && (value2 == 1))

     {

         return ZAT_8BIT;

     }

     return ZAT_INVALID;

 }

 

-VOID atBase_ConvertAsciiToUCS2(const CHAR *dataStr,CHAR *convertDataStr,UINT16 dataLen)

+VOID atBase_ConvertAsciiToUCS2(const CHAR *dataStr, CHAR *convertDataStr, UINT16 dataLen)

 {

     UINT16 iDataLen = 0;

-    

-    if((dataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

+

+    if ((dataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

     {

         return;

     }

-    for(iDataLen = 0;iDataLen < dataLen;iDataLen++)

+    for (iDataLen = 0; iDataLen < dataLen; iDataLen++)

     {

-        snprintf(convertDataStr+strlen(convertDataStr),AT_USSD_DATA_TO_WEB_LEN,"%04x",dataStr[iDataLen]);

+        snprintf(convertDataStr + strlen(convertDataStr), AT_USSD_DATA_TO_WEB_LEN, "%04x", dataStr[iDataLen]);

     }

-    printf("%s\n",convertDataStr);

+    printf("%s\n", convertDataStr);

 }

 

-VOID atBase_Convert8BitToUCS2(const CHAR *dataStr,CHAR *convertDataStr,UINT16 dataLen)

+VOID atBase_Convert8BitToUCS2(const CHAR *dataStr, CHAR *convertDataStr, UINT16 dataLen)

 {

     UINT16 iDataLen = 0;

-    

-    if((dataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

+

+    if ((dataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

     {

         return;

     }

-    for(iDataLen = 0;iDataLen < dataLen;iDataLen++)

+    for (iDataLen = 0; iDataLen < dataLen; iDataLen++)

     {

-        if(iDataLen%2 == 0)

-	 {

-	      snprintf(convertDataStr+strlen(convertDataStr),AT_USSD_DATA_TO_WEB_LEN,"00%c",dataStr[iDataLen]);

-	 }

-	 else

-	 {

-	      snprintf(convertDataStr+strlen(convertDataStr),AT_USSD_DATA_TO_WEB_LEN,"%c",dataStr[iDataLen]);

-	 }

-     }

-     printf("%s\n",convertDataStr);

+        if (iDataLen % 2 == 0)

+        {

+            snprintf(convertDataStr + strlen(convertDataStr), AT_USSD_DATA_TO_WEB_LEN, "00%c", dataStr[iDataLen]);

+        }

+        else

+        {

+            snprintf(convertDataStr + strlen(convertDataStr), AT_USSD_DATA_TO_WEB_LEN, "%c", dataStr[iDataLen]);

+        }

+    }

+    printf("%s\n", convertDataStr);

 }

 

 

-BOOL atBase_ConvertUCS2SetNV(T_zAt_CBSCodeType cbsCodeType,const CHAR *cusdDataStr,CHAR *convertDataStr,UINT16 dataLen)

+BOOL atBase_ConvertUCS2SetNV(T_zAt_CBSCodeType cbsCodeType, const CHAR *cusdDataStr, CHAR *convertDataStr,

+                             UINT16 dataLen)

 {

-    if((cbsCodeType == ZAT_INVALID) || (cusdDataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

+    if ((cbsCodeType == ZAT_INVALID) || (cusdDataStr == NULL) || (convertDataStr == NULL) || (dataLen <= 0))

     {

         return FALSE;

     }

-    if(cbsCodeType == ZAT_GSM7BIT)

+    if (cbsCodeType == ZAT_GSM7BIT)

     {

-        atBase_ConvertAsciiToUCS2(cusdDataStr,convertDataStr,dataLen);

-        sc_cfg_set("ussd_content",convertDataStr);

+        atBase_ConvertAsciiToUCS2(cusdDataStr, convertDataStr, dataLen);

+        sc_cfg_set("ussd_content", convertDataStr);

         return TRUE;

     }

-    else if(cbsCodeType == ZAT_8BIT)

+    else if (cbsCodeType == ZAT_8BIT)

     {

-        atBase_Convert8BitToUCS2(cusdDataStr,convertDataStr,dataLen);

-        sc_cfg_set("ussd_content",convertDataStr);

+        atBase_Convert8BitToUCS2(cusdDataStr, convertDataStr, dataLen);

+        sc_cfg_set("ussd_content", convertDataStr);

         return TRUE;

     }

-    else if(cbsCodeType == ZAT_UCS2)

+    else if (cbsCodeType == ZAT_UCS2)

     {

-        sc_cfg_set("ussd_content",cusdDataStr);

+        sc_cfg_set("ussd_content", cusdDataStr);

         return TRUE;

     }

     else

@@ -5257,622 +5486,669 @@
     }

 }

 

-static int get_param_count_for_ussd(const char *str){//corem0418

+static int get_param_count_for_ussd(const char *str) //corem0418

+{

     int fmt_param_count = 0;

-    

-    for(; *str != '\0'; str++){

-        if(*str == ','){

+

+    for (; *str != '\0'; str++)

+    {

+        if (*str == ',')

+        {

             fmt_param_count++;

         }

     }

     return fmt_param_count;

 }

 

-int cusd_auto_act(char *at_paras ,int is_query_report)

+int cusd_auto_act(char *at_paras, int is_query_report)

 {

     T_zAt_CusdRes                    cusdParam = {0};

     T_zAt_CBSCodeType            cbsCodeType = ZAT_INVALID;

     CHAR convertDataStr[AT_USSD_DATA_TO_WEB_LEN] = {0};

     //static int flag = 0;

 

-	at_print(AT_ERR,"!!!!cusd_auto_act start.\n");

-    if(at_paras == NULL)

+    at_print(AT_ERR, "!!!!cusd_auto_act start.\n");

+    if (at_paras == NULL)

     {

         return AT_END;

     }

-	

 

-    at_print(AT_ERR,"!!!!cusd_auto_act Gets %s.\n", at_paras);

 

-//    void *p[3] = {&cusdParam.replyMsg,  cusdParam.cusdDataStr, &cusdParam.bDcs};

+    at_print(AT_ERR, "!!!!cusd_auto_act Gets %s.\n", at_paras);

 

-//    parse_param("%d %s %d", at_paras, p);

-	

-//    at_print(AT_DEBUG,"cusd_auto_act  replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg, cusdParam.cusdDataStr, cusdParam.bDcs);  	

-    

-    if(get_param_count_for_ussd(at_paras) > 0){//corem0418           

-           atBase_PreProcRes(at_paras, strlen(at_paras));

-	    at_print(AT_ERR,"!!!!cusd_auto_act Gets 3 para:%s\n", at_paras);

-	    sscanf(at_paras, "%hd %320s %hd",&cusdParam.replyMsg,cusdParam.cusdDataStr,&cusdParam.bDcs);

-	    

-    }else{

-           at_print(AT_ERR,"!!!!cusd_auto_act Gets 1 para:%s\n", at_paras);         

-	   sscanf(at_paras, "%hd",&cusdParam.replyMsg);

-    }

+    //    void *p[3] = {&cusdParam.replyMsg,  cusdParam.cusdDataStr, &cusdParam.bDcs};

 

-    at_print(AT_ERR,"cusd_auto_act before restore MSG  replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg, cusdParam.cusdDataStr, cusdParam.bDcs);  

+    //    parse_param("%d %s %d", at_paras, p);

 

-    atBase_RestoreString(cusdParam.cusdDataStr);

-	

-    at_print(AT_ERR,"cusd_auto_act after restore MSG replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg, cusdParam.cusdDataStr, cusdParam.bDcs);

-	

-    //printf("atBase_RecvCusdRsp :%d,%s,%d",cusdParam.replyMsg,cusdParam.cusdDataStr,cusdParam.bDcs);

-    if((cusdParam.replyMsg == 0) || (cusdParam.replyMsg == 1))

+    //    at_print(AT_DEBUG,"cusd_auto_act  replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg, cusdParam.cusdDataStr, cusdParam.bDcs);

+

+    if (get_param_count_for_ussd(at_paras) > 0) //corem0418

     {

-        cbsCodeType = atBase_CheckDataCodeType((SINT16)cusdParam.bDcs);

-        at_print(AT_ERR,"Code Type:%d\n",cbsCodeType);

-        if(atBase_ConvertUCS2SetNV(cbsCodeType,cusdParam.cusdDataStr,convertDataStr,(UINT16)strlen(cusdParam.cusdDataStr)))

-        {

-            sc_cfg_set("ussd_write_flag","16");

-            sc_cfg_set("ussd_dcs","72");

-            if(cusdParam.replyMsg == 0)

-            {

-                sc_cfg_set("ussd_mode","0");

-                sc_cfg_set("ussd_cancel_flag","no");

-            }

-            else

-            {

-                sc_cfg_set("ussd_mode","1");

-                sc_cfg_set("ussd_cancel_flag","yes");

-            }

-			//½«Êý¾Ý´æ´¢µ½Êý¾Ý¿â

-			//store_ussd_data_to_db(convertDataStr);//corem0625

-        }

-        else

-        {

-            sc_cfg_set("ussd_write_flag","99");

-            sc_cfg_set("ussd_cancel_flag","no");

-			return AT_END;

-        }

-    }

-    else if(cusdParam.replyMsg == 2)

-    {

-        sc_cfg_set("ussd_write_flag","13");

-        sc_cfg_set("ussd_cancel_flag","no");

-    }

-    else if(cusdParam.replyMsg == 3)

-    {

-        sc_cfg_set("ussd_write_flag","4");

-        sc_cfg_set("ussd_cancel_flag","no");

-    }

-    else if(cusdParam.replyMsg == 4)

-    {

-        sc_cfg_set("ussd_write_flag","99");

-        sc_cfg_set("ussd_cancel_flag","no");

-    }

-    else if(cusdParam.replyMsg == 5)

-    {

-        sc_cfg_set("ussd_write_flag","4");

-        sc_cfg_set("ussd_cancel_flag","no");

+        atBase_PreProcRes(at_paras, strlen(at_paras));

+        at_print(AT_ERR, "!!!!cusd_auto_act Gets 3 para:%s\n", at_paras);

+        sscanf(at_paras, "%hd %320s %hd", &cusdParam.replyMsg, cusdParam.cusdDataStr, &cusdParam.bDcs);

+

     }

     else

     {

-        sc_cfg_set("ussd_write_flag","99");

-        sc_cfg_set("ussd_cancel_flag","no");

+        at_print(AT_ERR, "!!!!cusd_auto_act Gets 1 para:%s\n", at_paras);

+        sscanf(at_paras, "%hd", &cusdParam.replyMsg);

     }

-	return AT_END;

+

+    at_print(AT_ERR, "cusd_auto_act before restore MSG  replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg,

+             cusdParam.cusdDataStr, cusdParam.bDcs);

+

+    atBase_RestoreString(cusdParam.cusdDataStr);

+

+    at_print(AT_ERR, "cusd_auto_act after restore MSG replyMsg=%d, cusdDataStr=%s, bDcs=%d!\n",  cusdParam.replyMsg,

+             cusdParam.cusdDataStr, cusdParam.bDcs);

+

+    //printf("atBase_RecvCusdRsp :%d,%s,%d",cusdParam.replyMsg,cusdParam.cusdDataStr,cusdParam.bDcs);

+    if ((cusdParam.replyMsg == 0) || (cusdParam.replyMsg == 1))

+    {

+        cbsCodeType = atBase_CheckDataCodeType((SINT16)cusdParam.bDcs);

+        at_print(AT_ERR, "Code Type:%d\n", cbsCodeType);

+        if (atBase_ConvertUCS2SetNV(cbsCodeType, cusdParam.cusdDataStr, convertDataStr, (UINT16)strlen(cusdParam.cusdDataStr)))

+        {

+            sc_cfg_set("ussd_write_flag", "16");

+            sc_cfg_set("ussd_dcs", "72");

+            if (cusdParam.replyMsg == 0)

+            {

+                sc_cfg_set("ussd_mode", "0");

+                sc_cfg_set("ussd_cancel_flag", "no");

+            }

+            else

+            {

+                sc_cfg_set("ussd_mode", "1");

+                sc_cfg_set("ussd_cancel_flag", "yes");

+            }

+            //½«Êý¾Ý´æ´¢µ½Êý¾Ý¿â

+            //store_ussd_data_to_db(convertDataStr);//corem0625

+        }

+        else

+        {

+            sc_cfg_set("ussd_write_flag", "99");

+            sc_cfg_set("ussd_cancel_flag", "no");

+            return AT_END;

+        }

+    }

+    else if (cusdParam.replyMsg == 2)

+    {

+        sc_cfg_set("ussd_write_flag", "13");

+        sc_cfg_set("ussd_cancel_flag", "no");

+    }

+    else if (cusdParam.replyMsg == 3)

+    {

+        sc_cfg_set("ussd_write_flag", "4");

+        sc_cfg_set("ussd_cancel_flag", "no");

+    }

+    else if (cusdParam.replyMsg == 4)

+    {

+        sc_cfg_set("ussd_write_flag", "99");

+        sc_cfg_set("ussd_cancel_flag", "no");

+    }

+    else if (cusdParam.replyMsg == 5)

+    {

+        sc_cfg_set("ussd_write_flag", "4");

+        sc_cfg_set("ussd_cancel_flag", "no");

+    }

+    else

+    {

+        sc_cfg_set("ussd_write_flag", "99");

+        sc_cfg_set("ussd_cancel_flag", "no");

+    }

+    return AT_END;

 }

 

 //add corem0620 end

 

-int cnum_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int cnum_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

     return AT_END;

 }

 //const char *at_paras

-int cnum_auto_act( char *at_paras ,int is_query_report)

+int cnum_auto_act( char *at_paras, int is_query_report)

 {

     T_zAt_CnumRes   tAtRes  = {0};

     CHAR tcnum[256] = {0};

     CHAR *mslsdm = NULL;

-    UINT32 len=0;

-	

-    void *p[3] = {tAtRes.alpha, tAtRes.number, &tAtRes.type};

-    at_print(AT_DEBUG,"cnum_auto_act at_paras=%s!\n",at_paras);

-    parse_param2("%s,%s,%d", at_paras, p);

-    at_print(AT_DEBUG,"cnum_auto_act alpha=%s,number=%s,type=%d!\n",

-    tAtRes.alpha, tAtRes.number, tAtRes.type); 

-	

-	if(strlen(tAtRes.number) == 0){//corem20201209

-		return AT_END;

-	}

+    UINT32 len = 0;

 

-    sc_cfg_get(NV_SIM_ICCID,tcnum,sizeof(tcnum));

-    if(0 == strcmp("", tcnum))

+    void *p[3] = {tAtRes.alpha, tAtRes.number, &tAtRes.type};

+    at_print(AT_DEBUG, "cnum_auto_act at_paras=%s!\n", at_paras);

+    parse_param2("%s,%s,%d", at_paras, p);

+    at_print(AT_DEBUG, "cnum_auto_act alpha=%s,number=%s,type=%d!\n",

+             tAtRes.alpha, tAtRes.number, tAtRes.type);

+

+    if (strlen(tAtRes.number) == 0) //corem20201209

+    {

+        return AT_END;

+    }

+

+    sc_cfg_get(NV_SIM_ICCID, tcnum, sizeof(tcnum));

+    if (0 == strcmp("", tcnum))

     {

         sc_cfg_set(NV_SIM_ICCID, tAtRes.number);

-		sc_cfg_set(NV_MSISDN, tAtRes.number);

+        sc_cfg_set(NV_MSISDN, tAtRes.number);

     }

     else

     {

-	    char *pos = strstr(tcnum, tAtRes.number);//corem20201209

-		if(pos != NULL && (*(pos + strlen(tAtRes.number)) == '\0' || *(pos + strlen(tAtRes.number)) == ',')){

-		    return AT_END;

-		}

-		

-        len = strlen(tcnum)+strlen(tAtRes.number)+strlen(", ")+1;

+        char *pos = strstr(tcnum, tAtRes.number);//corem20201209

+        if (pos != NULL && (*(pos + strlen(tAtRes.number)) == '\0' || *(pos + strlen(tAtRes.number)) == ','))

+        {

+            return AT_END;

+        }

+

+        len = strlen(tcnum) + strlen(tAtRes.number) + strlen(", ") + 1;

         mslsdm = malloc(len);

-	    if(mslsdm == NULL)

-	    {

-	        return AT_END;

-	    }

-        memset(mslsdm, 0, len); 

-        snprintf(mslsdm, len,"%s, %s", tcnum, tAtRes.number);

+        if (mslsdm == NULL)

+        {

+            return AT_END;

+        }

+        memset(mslsdm, 0, len);

+        snprintf(mslsdm, len, "%s, %s", tcnum, tAtRes.number);

         sc_cfg_set(NV_SIM_ICCID, mslsdm);

-		sc_cfg_set(NV_MSISDN, mslsdm);

+        sc_cfg_set(NV_MSISDN, mslsdm);

         free(mslsdm);

-	    mslsdm = NULL;

+        mslsdm = NULL;

     }

     return AT_END;

 }

 

-char* start_query_cnum(void *msg,struct at_context *context)

+char* start_query_cnum(void *msg, struct at_context *context)

 {

-    at_print(AT_DEBUG,"start_query_cnum\n");

+    at_print(AT_DEBUG, "start_query_cnum\n");

     return normal_CnumRead();

 }

 

 /* ЭÒéÕ»¹Ì¶¨ÐÅÏ¢»ñȡʼþÁ´ZICCID CIMI CNUM  */

-char *start_getmodeminfo(void *msg,struct at_context *context)

+char *start_getmodeminfo(void *msg, struct at_context *context)

 {

-	return normal_getziccid();

+    return normal_getziccid();

 }

 

 

-char* start_pdpact_cmd(void *msg,struct at_context *context)

+char* start_pdpact_cmd(void *msg, struct at_context *context)

 {

-	char creg_stat[20] = {0};

-	MSG_BUF *p_msg = (MSG_BUF *)msg;

+    char creg_stat[20] = {0};

+    MSG_BUF *p_msg = (MSG_BUF *)msg;

     struct pdp_act_req *pdpsetinfo = NULL;

-	char *pstr = NULL;

+    char *pstr = NULL;

 

-	sc_cfg_get("creg_stat", creg_stat, sizeof(creg_stat));

-	at_print(AT_DEBUG,"@@@@@@@@@@@@@start_pdpact_cmd creg stat=%s!\n",creg_stat);

+    sc_cfg_get("creg_stat", creg_stat, sizeof(creg_stat));

+    at_print(AT_DEBUG, "@@@@@@@@@@@@@start_pdpact_cmd creg stat=%s!\n", creg_stat);

 

-	/*¶ÔÓÚÍø¹ØÀàÓ¦Óã¬ÀýÈçwebui¡¢Ö÷¿Ø¡¢TR069£¬Æä½ö¿ØÖÆÆÕͨÉÏÍøÒµÎñµÄmodemÁªÍøÓë¶Ï¿ª£¬

-	ÔÚpdp¼¤»îÐÅÏ¢Öв»Ð¯´øÈκβÎÊý£¬pdp¼¤»î¾ßÌåʹÓõÄapn¡¢ip type¡¢Óû§Ãû¡¢ÃÜÂëµÈÐÅÏ¢

-	ÐèÒªÓÉat_ctl×Ô¼ºÈ·¶¨*/

-	if(p_msg->usDataLen == 0)

-	{	

-		//zhangfen for PDP		

-		sc_cfg_set("auto_reconnect", "1");		

-		

-	 	pdpsetinfo=malloc(sizeof(struct pdp_act_req));

-        if(pdpsetinfo == NULL){

-			softap_assert("");

-			return NULL;

-		}

-        memset(pdpsetinfo,0,sizeof(struct pdp_act_req));

-		//at_ctl¸ù¾Ý±£´æµÄĬÈÏpdp¼¤»îÐÅÏ¢£¬×é×°pdp¼¤»îÏûÏ¢ÄÚÈÝ£¬²¢Ìî³äµ½ÏûÏ¢ÖÐ

+    /*¶ÔÓÚÍø¹ØÀàÓ¦Óã¬ÀýÈçwebui¡¢Ö÷¿Ø¡¢TR069£¬Æä½ö¿ØÖÆÆÕͨÉÏÍøÒµÎñµÄmodemÁªÍøÓë¶Ï¿ª£¬

+    ÔÚpdp¼¤»îÐÅÏ¢Öв»Ð¯´øÈκβÎÊý£¬pdp¼¤»î¾ßÌåʹÓõÄapn¡¢ip type¡¢Óû§Ãû¡¢ÃÜÂëµÈÐÅÏ¢

+    ÐèÒªÓÉat_ctl×Ô¼ºÈ·¶¨*/

+    if (p_msg->usDataLen == 0)

+    {

+        //zhangfen for PDP

+        sc_cfg_set("auto_reconnect", "1");

+

+        pdpsetinfo = malloc(sizeof(struct pdp_act_req));

+        if (pdpsetinfo == NULL)

+        {

+            softap_assert("");

+            return NULL;

+        }

+        memset(pdpsetinfo, 0, sizeof(struct pdp_act_req));

+        //at_ctl¸ù¾Ý±£´æµÄĬÈÏpdp¼¤»îÐÅÏ¢£¬×é×°pdp¼¤»îÏûÏ¢ÄÚÈÝ£¬²¢Ìî³äµ½ÏûÏ¢ÖÐ

         normal_getcurparam(pdpsetinfo);

-		

-		set_default_apn(pdpsetinfo->comm_info.apn);

-		pdpsetinfo->default_flag = 1;//¿ÉÒÔʹÓÃĬÈϳÐÔØ

-		memcpy(p_msg->aucDataBuf, pdpsetinfo, sizeof(struct pdp_act_req));

-		p_msg->usDataLen = sizeof(struct pdp_act_req);

-		pstr = pdp_act_func(p_msg,context); 

-		free(pdpsetinfo);

-	#if 0

-		if(1 == atoi(creg_stat) || 5 == atoi(creg_stat))

-	    {      

-	    	//set_pppstatus(PPP_CONNECTING);

-	       

-	        memcpy(p_msg->aucDataBuf, pdpsetinfo, sizeof(struct pdp_act_req));

-			p_msg->usDataLen = sizeof(struct pdp_act_req);

-			pstr = pdp_act_func(p_msg,context); 	       

-	    }

-		else

-		{		  	

-			/*Ϊ¼õÉÙ²»±ØÒªµÄ²¦ºÅatÃüÁîÁ÷³Ì£¬Èç¹ûµ±Ç°²»Âú×㲦ºÅÌõ¼þ£¬ÔòÖ±½Ó±¨´í¸øÍø¹ØÓ¦Óã¬

-			֪ͨÆäµ±Ç°ÎÞ·¨²¦ºÅ*/

-			send_rsp_msg(context->source,context->msg_id,MSG_CMD_PDP_ACT_RSP,0,0);

-		}

+

+        set_default_apn(pdpsetinfo->comm_info.apn);

+        pdpsetinfo->default_flag = 1;//¿ÉÒÔʹÓÃĬÈϳÐÔØ

+        memcpy(p_msg->aucDataBuf, pdpsetinfo, sizeof(struct pdp_act_req));

+        p_msg->usDataLen = sizeof(struct pdp_act_req);

+        pstr = pdp_act_func(p_msg, context);

+        free(pdpsetinfo);

+#if 0

+        if (1 == atoi(creg_stat) || 5 == atoi(creg_stat))

+        {

+            //set_pppstatus(PPP_CONNECTING);

+

+            memcpy(p_msg->aucDataBuf, pdpsetinfo, sizeof(struct pdp_act_req));

+            p_msg->usDataLen = sizeof(struct pdp_act_req);

+            pstr = pdp_act_func(p_msg, context);

+        }

+        else

+        {

+            /*Ϊ¼õÉÙ²»±ØÒªµÄ²¦ºÅatÃüÁîÁ÷³Ì£¬Èç¹ûµ±Ç°²»Âú×㲦ºÅÌõ¼þ£¬ÔòÖ±½Ó±¨´í¸øÍø¹ØÓ¦Óã¬

+            ֪ͨÆäµ±Ç°ÎÞ·¨²¦ºÅ*/

+            send_rsp_msg(context->source, context->msg_id, MSG_CMD_PDP_ACT_RSP, 0, 0);

+        }

 #endif

-		

-	}

-	else

-	{

-		/*·ÇÍø¹ÜÀàÓ¦ÓõÄpdp¼¤»î£¬Óë±¾ÉíÒµÎñÓйأ¬²»ÊÜÍø¹Ø¿ØÖÆ£¬Í¬Ê±»áÖ¸¶¨apn¡¢ip typeµÈÐÅÏ¢£¬Òò´Ë

-		ÔÚpdp¼¤»îʱÐèÒª½«pdp¼¤»îÐÅϢЯ´ø¹ýÀ´£¬ÓÉat_ctlÖ±½Ó·¢Æðpdp¼¤»î*/

-		pstr = pdp_act_func(msg,context);	

-	}		

-	return pstr;   

+

+    }

+    else

+    {

+        /*·ÇÍø¹ÜÀàÓ¦ÓõÄpdp¼¤»î£¬Óë±¾ÉíÒµÎñÓйأ¬²»ÊÜÍø¹Ø¿ØÖÆ£¬Í¬Ê±»áÖ¸¶¨apn¡¢ip typeµÈÐÅÏ¢£¬Òò´Ë

+        ÔÚpdp¼¤»îʱÐèÒª½«pdp¼¤»îÐÅϢЯ´ø¹ýÀ´£¬ÓÉat_ctlÖ±½Ó·¢Æðpdp¼¤»î*/

+        pstr = pdp_act_func(msg, context);

+    }

+    return pstr;

 }

 

 extern struct defcid_mng_t g_defcid_mng;

 

-char* start_pdpdeact_cmd(void *msg,struct at_context *context)

+char* start_pdpdeact_cmd(void *msg, struct at_context *context)

 {

     char pppStatus[50] = {0};

-	MSG_BUF *p_msg = (MSG_BUF *)msg;

-	AT_PDP_DEACT_REQ_INFO req = {0};

-	char *pstr = NULL;

-	

-	/*¶ÔÓÚÍø¹ØÀàÓ¦Óã¬ÀýÈçwebui¡¢Ö÷¿Ø¡¢TR069£¬Æä¿ØÖÆÆÕͨÉÏÍøÒµÎñµÄmodemÁªÍøÓë¶Ï¿ª£¬

-	ÔÚpdpÈ¥¼¤»îʱ£¬½öָʾat_ctl¶Ï¿ªmodemÁªÍø£¬¾ßÌå¶Ï¿ªµÄcid£¬ÓÉat_ctl±£´æµÄĬÈÏcid¾ö¶¨*/

-	if(p_msg->usDataLen == 0)

-	{

-		sc_cfg_get("ppp_status", pppStatus, sizeof(pppStatus));

-	    if((strcmp("ppp_disconnecting", pppStatus)== 0) || (strcmp("ppp_disconnected", pppStatus) == 0))

-	    {

-	    	AT_PDP_DEACT_RSP_INFO rsp = {0};

-			rsp.result = AT_RSP_OK;

-			send_rsp_msg(context->source,context->msg_id,MSG_CMD_PDP_DEACT_RSP,sizeof(AT_PDP_DEACT_RSP_INFO),&rsp);

-	        return NULL;		

-	    }

-	    if(strcmp("ppp_connecting", pppStatus)== 0)

-	    {

-			at_print(AT_ERR,"start_pdpdeact_cmd is acting ,start timer to wait\n");

-			add_one_delayed_msg(msg);

-	        return NULL;		

-	    }

-		

-		set_pppstatus(PPP_DISCONNECTING);

-	

-		req.c_id = g_defcid_mng.cid;

-		memcpy(p_msg->aucDataBuf, &req, sizeof(AT_PDP_DEACT_REQ_INFO));

-		p_msg->usDataLen = sizeof(AT_PDP_DEACT_REQ_INFO);

-		pstr = pdp_deact_func(p_msg, context);

-	}

-	else

-	{

-		pstr = pdp_deact_func(msg, context);

-	}

-	return pstr;	

+    MSG_BUF *p_msg = (MSG_BUF *)msg;

+    AT_PDP_DEACT_REQ_INFO req = {0};

+    char *pstr = NULL;

+

+    /*¶ÔÓÚÍø¹ØÀàÓ¦Óã¬ÀýÈçwebui¡¢Ö÷¿Ø¡¢TR069£¬Æä¿ØÖÆÆÕͨÉÏÍøÒµÎñµÄmodemÁªÍøÓë¶Ï¿ª£¬

+    ÔÚpdpÈ¥¼¤»îʱ£¬½öָʾat_ctl¶Ï¿ªmodemÁªÍø£¬¾ßÌå¶Ï¿ªµÄcid£¬ÓÉat_ctl±£´æµÄĬÈÏcid¾ö¶¨*/

+    if (p_msg->usDataLen == 0)

+    {

+        sc_cfg_get("ppp_status", pppStatus, sizeof(pppStatus));

+        if ((strcmp("ppp_disconnecting", pppStatus) == 0) || (strcmp("ppp_disconnected", pppStatus) == 0))

+        {

+            AT_PDP_DEACT_RSP_INFO rsp = {0};

+            rsp.result = AT_RSP_OK;

+            send_rsp_msg(context->source, context->msg_id, MSG_CMD_PDP_DEACT_RSP, sizeof(AT_PDP_DEACT_RSP_INFO), &rsp);

+            return NULL;

+        }

+        if (strcmp("ppp_connecting", pppStatus) == 0)

+        {

+            at_print(AT_ERR, "start_pdpdeact_cmd is acting ,start timer to wait\n");

+            add_one_delayed_msg(msg);

+            return NULL;

+        }

+

+        set_pppstatus(PPP_DISCONNECTING);

+

+        req.c_id = g_defcid_mng.cid;

+        memcpy(p_msg->aucDataBuf, &req, sizeof(AT_PDP_DEACT_REQ_INFO));

+        p_msg->usDataLen = sizeof(AT_PDP_DEACT_REQ_INFO);

+        pstr = pdp_deact_func(p_msg, context);

+    }

+    else

+    {

+        pstr = pdp_deact_func(msg, context);

+    }

+    return pstr;

 }

 

 //ÒÔÏÂÊÇоƬÈÏÖ¤´úÂë

-char* start_zeact_cmd(void *msg,struct at_context *context)

+char* start_zeact_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-	

-	at_next=malloc(20);

-	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	snprintf(at_next,20,"AT+ZEACT=%s\r\n",((MSG_BUF*)msg)->aucDataBuf); 

-	return at_next;

-	

+    char *at_next = NULL;

+

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    snprintf(at_next, 20, "AT+ZEACT=%s\r\n", ((MSG_BUF*)msg)->aucDataBuf);

+    return at_next;

+

 }

 

-char* start_zmmi_cmd(void *msg,struct at_context *context)

+char* start_zmmi_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-	

-	at_next=malloc(20);

-	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	snprintf(at_next,20,"AT+ZMMI=%s\r\n",((MSG_BUF*)msg)->aucDataBuf); 

-	return at_next;

-	

+    char *at_next = NULL;

+

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    snprintf(at_next, 20, "AT+ZMMI=%s\r\n", ((MSG_BUF*)msg)->aucDataBuf);

+    return at_next;

+

 }

 

-char* start_zimsamrw_cmd(void *msg,struct at_context *context)

+char* start_zimsamrw_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-	

-	at_next=malloc(20);

-	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	snprintf(at_next,20,"AT+ZIMSAMRW=%s\r\n",((MSG_BUF*)msg)->aucDataBuf); 

-	return at_next;

-	

+    char *at_next = NULL;

+

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    snprintf(at_next, 20, "AT+ZIMSAMRW=%s\r\n", ((MSG_BUF*)msg)->aucDataBuf);

+    return at_next;

+

 }

 

-int  cmd_ok_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cmd_ok_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-	*next_req=malloc(10);

-	if(*next_req){

-    *next_len=10;

-    strcpy(*next_req,"1");

-	}

+    *next_req = malloc(10);

+    if (*next_req)

+    {

+        *next_len = 10;

+        strcpy(*next_req, "1");

+    }

     return AT_END;

 }

 

-int  cmd_err_act(char *at_str,struct at_context *context,void **next_req,int *next_len)

+int  cmd_err_act(char *at_str, struct at_context *context, void **next_req, int *next_len)

 {

-	*next_req=malloc(10);

-	if(*next_req){

-    *next_len=10;

-    strcpy(*next_req,"0");

-	}

+    *next_req = malloc(10);

+    if (*next_req)

+    {

+        *next_len = 10;

+        strcpy(*next_req, "0");

+    }

     return AT_END;

 }

 

 /**

  * @brief Æô¶¯×ÔÄܶÌÐŽø³Ì

- * @param 

- * @return 

- * @note   

- * @warning 

+ * @param

+ * @return

+ * @note

+ * @warning

  */

 void at_ctl_startisms(void)

 {

-	at_print(AT_NORMAL,"[TEST]at_ctl_startisms\n");

+    at_print(AT_NORMAL, "[TEST]at_ctl_startisms\n");

 #if (APP_OS_TYPE == APP_OS_LINUX)

-/*

-	if(fork() == 0)

-	{

-		if(execv("/bin/zte_isms", NULL) < 0)

-		{

-			at_print(AT_ERR,"[TEST]execv error(%d)\n", errno);

-			exit(0);

-		}

-	}

-*/

-	if(system("/bin/zte_isms &") != 0)

-	{

-		at_print(AT_ERR,"[TEST]execv error(%d)\n", errno);

-	}

-#endif	

+    /*

+    	if(fork() == 0)

+    	{

+    		if(execv("/bin/zte_isms", NULL) < 0)

+    		{

+    			at_print(AT_ERR,"[TEST]execv error(%d)\n", errno);

+    			exit(0);

+    		}

+    	}

+    */

+    if (system("/bin/zte_isms &") != 0)

+    {

+        at_print(AT_ERR, "[TEST]execv error(%d)\n", errno);

+    }

+#endif

 }

 

-int atd_req_rcv_act( char *at_paras,int at_fd,struct at_context *context)

+int atd_req_rcv_act( char *at_paras, int at_fd, struct at_context *context)

 {

-	if(is_ppp_dial_atd(at_paras, at_fd) == 0)

-		return AT_END;

-	else

-		return AT_CONTINUE;//ÆÕͨµÄATDÃüÁֱ½Óת·¢

+    if (is_ppp_dial_atd(at_paras, at_fd) == 0)

+    {

+        return AT_END;

+    }

+    else

+    {

+        return AT_CONTINUE;    //ÆÕͨµÄATDÃüÁֱ½Óת·¢

+    }

 }

 

-char* start_cvmod_cmd(void *msg,struct at_context *context)

+char* start_cvmod_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CVMOD=0\r\n");

-    

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CVMOD=0\r\n");

+

+    return at_next;

 }

 

-char* start_zchnelset_cmd(void *msg,struct at_context *context)

+char* start_zchnelset_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-    at_next=malloc(40);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,40);

-	sprintf(at_next,"AT+ZCHNELSET=0,37,38,39,40,41\r\n");

-    

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(40);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 40);

+    sprintf(at_next, "AT+ZCHNELSET=0,37,38,39,40,41\r\n");

+

+    return at_next;

 }

 

-char *start_querycgdcont_cmd(void *msg,struct at_context *context)

+char *start_querycgdcont_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-    at_next=malloc(20);

-    if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-    memset(at_next,0,20);

-	sprintf(at_next,"AT+CGDCONT?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(20);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, 20);

+    sprintf(at_next, "AT+CGDCONT?\r\n");

+    return at_next;

 }

 

 //bsim

 static int bs_aes_init_key(unsigned char *aes_key, int k_len)

 {

-	int efuse_fd = -1;

-	T_ZDrvEfuse_Secure efuse = {0};

-	

-	memset(&efuse, 0, sizeof(efuse));

-	efuse_fd = open("/dev/efuse", O_RDWR);

-	if (efuse_fd < 0) {

-		printf("wifi_aes_init_key efuse open errno=%d\n", errno);

-		return 0;

-	}

-	if(ioctl(efuse_fd , EFUSE_GET_DATA, &efuse) != 0) {

-		printf("wifi_aes_init_key efuse ioctl errno=%d\n", errno);

-		close(efuse_fd);

-		return 0;

-	}

-	close(efuse_fd);

-	memcpy(aes_key, efuse.pubKeyHash, k_len);

-	

-	return 1;

+    int efuse_fd = -1;

+    T_ZDrvEfuse_Secure efuse = {0};

+

+    memset(&efuse, 0, sizeof(efuse));

+    efuse_fd = open("/dev/efuse", O_RDWR);

+    if (efuse_fd < 0)

+    {

+        printf("wifi_aes_init_key efuse open errno=%d\n", errno);

+        return 0;

+    }

+    if (ioctl(efuse_fd, EFUSE_GET_DATA, &efuse) != 0)

+    {

+        printf("wifi_aes_init_key efuse ioctl errno=%d\n", errno);

+        close(efuse_fd);

+        return 0;

+    }

+    close(efuse_fd);

+    memcpy(aes_key, efuse.pubKeyHash, k_len);

+

+    return 1;

 }

 

 static int bs_aes_encrypt(char* in, int len, char* out, unsigned char* key, int key_len)

 {

-    if (!in || !out || !key || len <=0 || (len%AES_BLOCK_SIZE)!=0 || (key_len!=16 && key_len!=24 && key_len!=32)) {

-		printf("bs_aes_encrypt err in=%p out=%p key=%p len=%d key_len=%d\n",in,key,out,len,key_len);

+    if (!in || !out || !key || len <= 0 || (len % AES_BLOCK_SIZE) != 0 || (key_len != 16 && key_len != 24

+            && key_len != 32))

+    {

+        printf("bs_aes_encrypt err in=%p out=%p key=%p len=%d key_len=%d\n", in, key, out, len, key_len);

         return 0;

     }

- 

+

     AES_KEY aes = {0}; //cov h

-    if (AES_set_encrypt_key(key, key_len*8, &aes) < 0) {

-		printf("bs_aes_encrypt AES_set_encrypt_key err\n");

+    if (AES_set_encrypt_key(key, key_len * 8, &aes) < 0)

+    {

+        printf("bs_aes_encrypt AES_set_encrypt_key err\n");

         return 0;

     }

- 

+

     int en_len = 0;

-    while (en_len < len) {

+    while (en_len < len)

+    {

         AES_encrypt((unsigned char*)in, (unsigned char*)out, &aes);

         in	+= AES_BLOCK_SIZE;

         out += AES_BLOCK_SIZE;

         en_len += AES_BLOCK_SIZE;

     }

- 

+

     return 1;

 }

 

 static int bs_aes_decrypt(char* in, int len, char* out, char* key, int key_len)

 {

-    if (!in || !out || !key || len <=0 || (len%AES_BLOCK_SIZE)!=0 || (key_len!=16 && key_len!=24 && key_len!=32)) {

-		printf("bs_aes_decrypt err in=%p out=%p key=%p len=%d key_len=%d\n",in,key,out,len,key_len);

+    if (!in || !out || !key || len <= 0 || (len % AES_BLOCK_SIZE) != 0 || (key_len != 16 && key_len != 24

+            && key_len != 32))

+    {

+        printf("bs_aes_decrypt err in=%p out=%p key=%p len=%d key_len=%d\n", in, key, out, len, key_len);

         return 0;

     }

- 

+

     AES_KEY aes = {0}; //cov h

-    if (AES_set_decrypt_key((unsigned char*)key, key_len*8, &aes) < 0) {

-		printf("bs_aes_decrypt AES_set_decrypt_key err\n");

+    if (AES_set_decrypt_key((unsigned char*)key, key_len * 8, &aes) < 0)

+    {

+        printf("bs_aes_decrypt AES_set_decrypt_key err\n");

         return 0;

     }

- 

+

     int en_len = 0;

-    while (en_len < len) {

+    while (en_len < len)

+    {

         AES_decrypt((unsigned char*)in, (unsigned char*)out, &aes);

         in	+= AES_BLOCK_SIZE;

         out += AES_BLOCK_SIZE;

         en_len += AES_BLOCK_SIZE;

     }

- 

+

     return 1;

 }

 

 static int apn_encrypt_code(void)

 {

-	char w_code[PROFILE_APN_LEN] = {0};

-	char b_aes[PROFILE_APN_LEN] = {0};

-	char s_aes[PROFILE_APN_AES_LEN] = {0};

+    char w_code[PROFILE_APN_LEN] = {0};

+    char b_aes[PROFILE_APN_LEN] = {0};

+    char s_aes[PROFILE_APN_AES_LEN] = {0};

 

-	sc_cfg_get("ppp_passtmp", w_code, sizeof(w_code));

-	bs_aes_encrypt(w_code, PROFILE_APN_LEN - 1, b_aes, atctl_aes_key, sizeof(atctl_aes_key));

-	bytes2string(b_aes, s_aes, PROFILE_APN_LEN - 1); //libatutils

-	sc_cfg_set("ppp_passwd", s_aes);

-	printf("apn_encrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

+    sc_cfg_get("ppp_passtmp", w_code, sizeof(w_code));

+    bs_aes_encrypt(w_code, PROFILE_APN_LEN - 1, b_aes, atctl_aes_key, sizeof(atctl_aes_key));

+    bytes2string(b_aes, s_aes, PROFILE_APN_LEN - 1); //libatutils

+    sc_cfg_set("ppp_passwd", s_aes);

+    printf("apn_encrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

 

-	return 1;

+    return 1;

 }

 

 static int ipv6apn_encrypt_code(void)

 {

-	char w_code[PROFILE_APN_LEN] = {0};

-	char b_aes[PROFILE_APN_LEN] = {0};

-	char s_aes[PROFILE_APN_AES_LEN] = {0};

+    char w_code[PROFILE_APN_LEN] = {0};

+    char b_aes[PROFILE_APN_LEN] = {0};

+    char s_aes[PROFILE_APN_AES_LEN] = {0};

 

-	sc_cfg_get("ipv6_ppp_passtmp", w_code, sizeof(w_code));

-	bs_aes_encrypt(w_code, PROFILE_APN_LEN - 1, b_aes, atctl_aes_key, sizeof(atctl_aes_key));

-	bytes2string(b_aes, s_aes, PROFILE_APN_LEN - 1);

-	sc_cfg_set("ipv6_ppp_passwd", s_aes);

-	printf("ipv6apn_encrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

+    sc_cfg_get("ipv6_ppp_passtmp", w_code, sizeof(w_code));

+    bs_aes_encrypt(w_code, PROFILE_APN_LEN - 1, b_aes, atctl_aes_key, sizeof(atctl_aes_key));

+    bytes2string(b_aes, s_aes, PROFILE_APN_LEN - 1);

+    sc_cfg_set("ipv6_ppp_passwd", s_aes);

+    printf("ipv6apn_encrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

 

-	return 1;

+    return 1;

 }

 

 //2±íʾfota´ÓÀϰ汾ÍùÉÏÉý¼¶£¬ppp_password´æµÄÊÇÃ÷ÎÄÃÜÂ룬а汾ÊÇÃÜÎÄ

 static int apn_decrypt_code(void)

 {

-	char w_code[PROFILE_APN_LEN]= {0};

-	char b_aes[PROFILE_APN_LEN] = {0};

-	char s_aes[PROFILE_APN_AES_LEN] = {0};

-	int flag = 0;

+    char w_code[PROFILE_APN_LEN] = {0};

+    char b_aes[PROFILE_APN_LEN] = {0};

+    char s_aes[PROFILE_APN_AES_LEN] = {0};

+    int flag = 0;

 

-	sc_cfg_get("ppp_passwd", s_aes, sizeof(s_aes));

-	if (strlen(s_aes) == (PROFILE_APN_AES_LEN - 1)) {

-		string2bytes(s_aes, b_aes, PROFILE_APN_AES_LEN - 1);

-		bs_aes_decrypt(b_aes, PROFILE_APN_LEN - 1, w_code, atctl_aes_key, sizeof(atctl_aes_key));

-		sc_cfg_set("ppp_passtmp", w_code);

-//		printf("apn_decrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

-	} else if (strlen(s_aes) > 0){

-		sc_cfg_set("ppp_passtmp", s_aes);

-		return 2;

-	}

+    sc_cfg_get("ppp_passwd", s_aes, sizeof(s_aes));

+    if (strlen(s_aes) == (PROFILE_APN_AES_LEN - 1))

+    {

+        string2bytes(s_aes, b_aes, PROFILE_APN_AES_LEN - 1);

+        bs_aes_decrypt(b_aes, PROFILE_APN_LEN - 1, w_code, atctl_aes_key, sizeof(atctl_aes_key));

+        sc_cfg_set("ppp_passtmp", w_code);

+        //		printf("apn_decrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

+    }

+    else if (strlen(s_aes) > 0)

+    {

+        sc_cfg_set("ppp_passtmp", s_aes);

+        return 2;

+    }

 

-	return 1;

+    return 1;

 }

 

 static int ipv6apn_decrypt_code(void)

 {

-	char w_code[PROFILE_APN_LEN]= {0};

-	char b_aes[PROFILE_APN_LEN] = {0};

-	char s_aes[PROFILE_APN_AES_LEN] = {0};

-	int flag = 0;

+    char w_code[PROFILE_APN_LEN] = {0};

+    char b_aes[PROFILE_APN_LEN] = {0};

+    char s_aes[PROFILE_APN_AES_LEN] = {0};

+    int flag = 0;

 

-	sc_cfg_get("ipv6_ppp_passwd", s_aes, sizeof(s_aes));

-	if (strlen(s_aes) == (PROFILE_APN_AES_LEN - 1)) {

-		string2bytes(s_aes, b_aes, PROFILE_APN_AES_LEN - 1);

-		bs_aes_decrypt(b_aes, PROFILE_APN_LEN - 1, w_code, atctl_aes_key, sizeof(atctl_aes_key));

-		sc_cfg_set("ipv6_ppp_passtmp", w_code);

-//		printf("apn_decrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

-	} else if (strlen(s_aes) > 0){

-		sc_cfg_set("ipv6_ppp_passtmp", s_aes);

-		return 2;

-	}

+    sc_cfg_get("ipv6_ppp_passwd", s_aes, sizeof(s_aes));

+    if (strlen(s_aes) == (PROFILE_APN_AES_LEN - 1))

+    {

+        string2bytes(s_aes, b_aes, PROFILE_APN_AES_LEN - 1);

+        bs_aes_decrypt(b_aes, PROFILE_APN_LEN - 1, w_code, atctl_aes_key, sizeof(atctl_aes_key));

+        sc_cfg_set("ipv6_ppp_passtmp", w_code);

+        //		printf("apn_decrypt_code w_code=%s, s_aes=%s\n", w_code, s_aes);

+    }

+    else if (strlen(s_aes) > 0)

+    {

+        sc_cfg_set("ipv6_ppp_passtmp", s_aes);

+        return 2;

+    }

 

-	return 1;

+    return 1;

 }

 

 int atctl_aes_init(void)

 {

-	bs_aes_init_key(atctl_aes_key, sizeof(atctl_aes_key));

-	

-	if (2 == apn_decrypt_code())

-		apn_encrypt_code();

-	if (2 == ipv6apn_decrypt_code())

-		ipv6apn_encrypt_code();

+    bs_aes_init_key(atctl_aes_key, sizeof(atctl_aes_key));

 

-	return 1;

+    if (2 == apn_decrypt_code())

+    {

+        apn_encrypt_code();

+    }

+    if (2 == ipv6apn_decrypt_code())

+    {

+        ipv6apn_encrypt_code();

+    }

+

+    return 1;

 }

 

-int zcardswitch_auto_act(char *at_paras ,int is_query_report)

+int zcardswitch_auto_act(char *at_paras, int is_query_report)

 {

-	int Sim1Act = 0;

-	int Sim2Act = 0;

-	int SwitchStat = 0;

-	int ret = 0;

-	unsigned char result[2] = {0};

+    int Sim1Act = 0;

+    int Sim2Act = 0;

+    int SwitchStat = 0;

+    int ret = 0;

+    unsigned char result[2] = {0};

 

-	void *p[3] = {&Sim1Act, &Sim2Act, &SwitchStat};

-	ret = parse_param2("%d,%d,%d", at_paras, p);

-	at_print(AT_ERR,"zcardswitch_auto_act ret=%d sim1=%d sim2=%d stat=%d\n",ret,Sim1Act,Sim2Act,SwitchStat);

-	if(ret == 3 && Sim1Act != Sim2Act)

-	{

-		if(Sim2Act)

-			result[0] = 1;

-		result[1] = SwitchStat;

-		ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_ZCARDSWITCHIND_IND, sizeof(result), result, IPC_NOWAIT);

-	}

-	return AT_END;

+    void *p[3] = {&Sim1Act, &Sim2Act, &SwitchStat};

+    ret = parse_param2("%d,%d,%d", at_paras, p);

+    at_print(AT_ERR, "zcardswitch_auto_act ret=%d sim1=%d sim2=%d stat=%d\n", ret, Sim1Act, Sim2Act, SwitchStat);

+    if (ret == 3 && Sim1Act != Sim2Act)

+    {

+        if (Sim2Act)

+        {

+            result[0] = 1;

+        }

+        result[1] = SwitchStat;

+        ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_ZCARDSWITCHIND_IND, sizeof(result), result, IPC_NOWAIT);

+    }

+    return AT_END;

 }

 

-char *start_zsciscan_cmd(void *msg,struct at_context *context)

+char *start_zsciscan_cmd(void *msg, struct at_context *context)

 {

-	char *at_next=NULL;

-	at_next=malloc(AT_CMD_MAX);

-	if(at_next == NULL){

-		softap_assert("");

-		return NULL;

-	}

-	memset(at_next,0,AT_CMD_MAX);

-	sprintf(at_next,"AT+ZSCISCAN=?\r\n");

-	return at_next;

+    char *at_next = NULL;

+    at_next = malloc(AT_CMD_MAX);

+    if (at_next == NULL)

+    {

+        softap_assert("");

+        return NULL;

+    }

+    memset(at_next, 0, AT_CMD_MAX);

+    sprintf(at_next, "AT+ZSCISCAN=?\r\n");

+    return at_next;

 }

 

-typedef struct{

+typedef struct

+{

     unsigned short mcc;

     unsigned short mnc;

-	unsigned int tac;

-	unsigned int cell_id;

+    unsigned int tac;

+    unsigned int cell_id;

     unsigned short bandwidth;

     unsigned short pcid;//short  rxlev;

     unsigned int arfcn;

-}base_cell_info_t;//Hex format

+} base_cell_info_t; //Hex format

 

 

 typedef struct

@@ -5886,79 +6162,88 @@
     base_cell_info_t base_Scell_info;

 } lte_Scell_t;

 

-int zsciscan_auto_act(char *at_paras ,int is_query_report)

+int zsciscan_auto_act(char *at_paras, int is_query_report)

 {

-	int num = 0;

-	int ret = 0;

-	int i = 0;

-	char *cellinfo = at_paras;

-	lte_Scell_t cell[20] = {0};

-	void *p[1] = {&num};

-	ret = parse_param2("%d", at_paras, p);

-	at_print(AT_ERR,"zcardswitch_auto_act ret=%d num=%d\n",ret,num);

-	cellinfo = strstr(cellinfo,",\"");

-	for(i = 0; i < num && i < 20 && cellinfo; i++)

-	{

-		char plmn[8] = {0};

-		char mcc[4] = {0};

-		char mnc[4] = {0};

-		int rssi = 0;

-		void *p1[] = {plmn, &cell[i].base_Scell_info.arfcn, &cell[i].base_Scell_info.cell_id,

-			&rssi, &cell[i].rsrp, &cell[i].rsrq, &cell[i].SINR, &cell[i].base_Scell_info.tac,

-			&cell[i].base_Scell_info.pcid, &cell[i].band, &cell[i].base_Scell_info.bandwidth};

-		cellinfo++;

-		parse_param2("%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", cellinfo, p1);

-		if(cell[i].band < 33 || cell[i].band > 52)

-			cell[i].netMode = 1;

-		memcpy(mcc, plmn, 3);

-		memcpy(mnc, plmn+3, 3);

-		cell[i].base_Scell_info.mcc = atoi(mcc);

-		cell[i].base_Scell_info.mnc = atoi(mnc);

-		cellinfo = strstr(cellinfo,",\"");

-	}

-	ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_ZSCISCAN_IND, sizeof(lte_Scell_t)*20, cell, 0);

-	return AT_END;

+    int num = 0;

+    int ret = 0;

+    int i = 0;

+    char *cellinfo = at_paras;

+    lte_Scell_t cell[20] = {0};

+    void *p[1] = {&num};

+    ret = parse_param2("%d", at_paras, p);

+    at_print(AT_ERR, "zcardswitch_auto_act ret=%d num=%d\n", ret, num);

+    cellinfo = strstr(cellinfo, ",\"");

+    for (i = 0; i < num && i < 20 && cellinfo; i++)

+    {

+        char plmn[8] = {0};

+        char mcc[4] = {0};

+        char mnc[4] = {0};

+        int rssi = 0;

+        void *p1[] = {plmn, &cell[i].base_Scell_info.arfcn, &cell[i].base_Scell_info.cell_id,

+                      &rssi, &cell[i].rsrp, &cell[i].rsrq, &cell[i].SINR, &cell[i].base_Scell_info.tac,

+                      &cell[i].base_Scell_info.pcid, &cell[i].band, &cell[i].base_Scell_info.bandwidth

+                     };

+        cellinfo++;

+        parse_param2("%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", cellinfo, p1);

+        if (cell[i].band < 33 || cell[i].band > 52)

+        {

+            cell[i].netMode = 1;

+        }

+        memcpy(mcc, plmn, 3);

+        memcpy(mnc, plmn + 3, 3);

+        cell[i].base_Scell_info.mcc = atoi(mcc);

+        cell[i].base_Scell_info.mnc = atoi(mnc);

+        cellinfo = strstr(cellinfo, ",\"");

+    }

+    ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_ZSCISCAN_IND, sizeof(lte_Scell_t) * 20, cell, 0);

+    return AT_END;

 }

 

-int defapn_query_func(int at_fd, char *at_paras,void ** res_msg, int *res_msglen)

+int defapn_query_func(int at_fd, char *at_paras, void ** res_msg, int *res_msglen)

 {

-	char sql[128] = {0};

-	T_zAt_APN_PROFILE apnpara = {0};

-	DbResult result = DB_OK;

-	char *at_str = malloc(AT_CMD_MAX);

-	

-	if(at_str == NULL){

-		softap_assert("");

-		return AT_END;

-	}

-	memset(at_str, 0, AT_CMD_MAX);

-	strcpy(at_str+strlen(at_str), "\r\nERROR\r\n");

-	*res_msg = at_str;

-	*res_msglen = strlen(at_str);

-	if(at_paras == NULL){

-		at_print(AT_ERR,"defapn_query_func param null!\n");

-		return AT_END;

-	}

-	snprintf(sql,sizeof(sql),"select ConfigFileName,APN,LoginNumber,AuthType,UserName,Password,PDPType from apn_list where CCMNC='%s' limit 1",at_paras);

-	result = normal_execdbsql(ZAPN_DB_PATH,sql, normal_getautoapn_callback, &apnpara);

-	

-	at_print(AT_NORMAL,"defapn_query_func CCMNC:%s!\n",at_paras);

-	if(DB_OK != result){

-		at_print(AT_ERR,"defapn_query_func sql fail!\n");

-		return AT_END;

-	}

-	if(strlen(apnpara.profile_name) == 0){

-		at_print(AT_ERR,"defapn_query_func no item!\n");

-		return AT_END;

-	}

-	if(strlen(apnpara.pdp_type) == 0)

-	{

-		strncpy(apnpara.pdp_type, "IP", ZAT_PROFILE_MEMBER_LEN - 1);

-	}

-	sprintf(at_str, "\r\n+ZDEFAPN: %s,%s,%d,%s,%s\r\n", apnpara.pdp_type, 

-	apnpara.apn_name, normal_getauthtype(apnpara.ppp_auth_mode), apnpara.ppp_username, apnpara.ppp_passwd);

-	strcpy(at_str+strlen(at_str), "\r\nOK\r\n");

-	*res_msglen = strlen(at_str);

-	return AT_END;

+    char sql[128] = {0};

+    T_zAt_APN_PROFILE apnpara = {0};

+    DbResult result = DB_OK;

+    char *at_str = malloc(AT_CMD_MAX);

+

+    if (at_str == NULL)

+    {

+        softap_assert("");

+        return AT_END;

+    }

+    memset(at_str, 0, AT_CMD_MAX);

+    strcpy(at_str + strlen(at_str), "\r\nERROR\r\n");

+    *res_msg = at_str;

+    *res_msglen = strlen(at_str);

+    if (at_paras == NULL)

+    {

+        at_print(AT_ERR, "defapn_query_func param null!\n");

+        return AT_END;

+    }

+    snprintf(sql, sizeof(sql),

+             "select ConfigFileName,APN,LoginNumber,AuthType,UserName,Password,PDPType from apn_list where CCMNC='%s' limit 1",

+             at_paras);

+    result = normal_execdbsql(ZAPN_DB_PATH, sql, normal_getautoapn_callback, &apnpara);

+

+    at_print(AT_NORMAL, "defapn_query_func CCMNC:%s!\n", at_paras);

+    if (DB_OK != result)

+    {

+        at_print(AT_ERR, "defapn_query_func sql fail!\n");

+        return AT_END;

+    }

+    if (strlen(apnpara.profile_name) == 0)

+    {

+        at_print(AT_ERR, "defapn_query_func no item!\n");

+        return AT_END;

+    }

+    if (strlen(apnpara.pdp_type) == 0)

+    {

+        strncpy(apnpara.pdp_type, "IP", ZAT_PROFILE_MEMBER_LEN - 1);

+    }

+    sprintf(at_str, "\r\n+ZDEFAPN: %s,%s,%d,%s,%s\r\n", apnpara.pdp_type,

+            apnpara.apn_name, normal_getauthtype(apnpara.ppp_auth_mode), apnpara.ppp_username, apnpara.ppp_passwd);

+    strcpy(at_str + strlen(at_str), "\r\nOK\r\n");

+    *res_msglen = strlen(at_str);

+    return AT_END;

 }

 

diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_sms.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_sms.c
index b5d8722..55bd76b 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_sms.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_sms.c
@@ -557,7 +557,7 @@
 int atSms_RecvCmtRsp( char *at_str ,int is_query_report)

 {     

 	static int rsPlength = 0;

-	char    alpha[64] = {0};

+	char    alpha[36] = {0};

 	T_zSms_SmsInd tCmtRsp = {0};

 

 	//µ±cmgfµÄÖµÖÃΪ1ºó£¬ºóÃæËùÓжÌÐÅÏà¹ØµÄÖ÷¶¯Éϱ¨Ö±½Óת·¢£¬ÄÚ²¿²»½øÐÐÈκδ¦Àí£¬µôµç¹Ø»úºó»Ö¸´

@@ -568,7 +568,7 @@
 	{

         void *p[2] = {alpha, &rsPlength};

         //at_print(AT_ERR,"atSms_RecvCmtRsp at_paras=%s!\n",at_str);

-        parse_param2("%64s,%d", at_str, p);

+        parse_param2("%s,%d", at_str, p);

         at_print(AT_ERR,"atSms_RecvCmtRsp alpha=%s,rsPlength=%d!\n",alpha, rsPlength); 

 

 		bNewCmt = 1;

diff --git a/ap/app/zte_comm/nvserver/nvserver.c b/ap/app/zte_comm/nvserver/nvserver.c
index 4f5e460..9fa611e 100755
--- a/ap/app/zte_comm/nvserver/nvserver.c
+++ b/ap/app/zte_comm/nvserver/nvserver.c
@@ -31,74 +31,73 @@
 file,char*key,char*value);static int nvunset(char*file,char*key);static int 
 nvclear(char*file);static int nvreset(char*file);static int nvcommit(char*file);
 T_NV_NODE*nv_list;int nvserver_main(int argc,char*argv[]){int msgId=
-(0x133f+1096-0x1787);T_NV_MSG_INFO rcvBuf;T_NV_MSG_RESULT sndBuf;struct msqid_ds
- msgInfo;prctl(PR_SET_NAME,"\x6e\x76\x73\x65\x72\x76\x65\x72",
-(0x1ba8+243-0x1c9b),(0xa86+5426-0x1fb8),(0x267+2866-0xd99));memset(&rcvBuf,
-(0x91f+2034-0x1111),sizeof(rcvBuf));memset(&sndBuf,(0xcca+5997-0x2437),sizeof(
-sndBuf));memset(&msgInfo,(0x976+1531-0xf71),sizeof(msgInfo));msgId=msgget(
-MODULE_ID_NV,IPC_CREAT|(0x1728+2792-0x2090));if(-(0xe9f+4497-0x202f)==msgId){
-printf(
+(0xd36+3128-0x196e);T_NV_MSG_INFO rcvBuf;T_NV_MSG_RESULT sndBuf;struct msqid_ds 
+msgInfo;prctl(PR_SET_NAME,"\x6e\x76\x73\x65\x72\x76\x65\x72",(0x90c+6054-0x20b2)
+,(0x73+4086-0x1069),(0xe64+5132-0x2270));memset(&rcvBuf,(0x139c+3214-0x202a),
+sizeof(rcvBuf));memset(&sndBuf,(0x1a+1727-0x6d9),sizeof(sndBuf));memset(&msgInfo
+,(0x1eb2+1153-0x2333),sizeof(msgInfo));msgId=msgget(MODULE_ID_NV,IPC_CREAT|
+(0xe5d+650-0xf67));if(-(0x16e1+1469-0x1c9d)==msgId){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6d\x73\x67\x67\x65\x74\x20\x6d\x73\x67\x49\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
-,errno);return-(0x3f4+2873-0xf2c);}if(-(0xeda+2925-0x1a46)!=msgctl(msgId,
-IPC_STAT,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0xc06+1979-0x13c0)==msgctl(
+,errno);return-(0xa83+3015-0x1649);}if(-(0x1102+2280-0x19e9)!=msgctl(msgId,
+IPC_STAT,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0x1f20+732-0x21fb)==msgctl(
 msgId,IPC_SET,&msgInfo))printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6d\x73\x67\x63\x74\x6c\x20\x6d\x73\x67\x49\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
-,errno);}if(nvDirInit()!=(0x71+1755-0x74c)){printf(
+,errno);}if(nvDirInit()!=(0x15f0+897-0x1971)){printf(
 "\x6e\x76\x44\x69\x72\x49\x6e\x69\x74\x20\x66\x61\x69\x6c\x65\x21" "\n");return-
-(0x3f0+1133-0x85c);}nvConfig();nvInit();while((0x1f55+427-0x20ff)){if(-
-(0x98f+6077-0x214b)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
-MSG_TYPE_NV,(0x24c+9081-0x25c5))){printf(
+(0xb9+1934-0x846);}nvConfig();nvInit();while((0x1642+728-0x1919)){if(-
+(0x7c3+7789-0x262f)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
+MSG_TYPE_NV,(0xb36+6986-0x2680))){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6d\x73\x67\x72\x63\x76\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
-,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0x447+820-0x77a)==msgsnd(msgId,
-&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x1a78+104-0x1ae0))){printf(
+,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0x2b0+5590-0x1885)==msgsnd(
+msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x1b0d+992-0x1eed))){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6d\x73\x67\x73\x6e\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
-,errno);continue;}}return((0x480+4075-0x146b));}static void configdir(char*dir){
+,errno);continue;}}return((0x153+9249-0x2574));}static void configdir(char*dir){
 DIR*dp;int ret;struct dirent*entry;struct stat statbuf;if((dp=opendir(dir))==
 NULL){fprintf(stderr,
 "\x63\x61\x6e\x6e\x6f\x74\x20\x6f\x70\x65\x6e\x20\x64\x69\x72\x65\x63\x74\x6f\x72\x79\x3a\x20\x25\x73" "\n"
 ,dir);return;}chdir(dir);while((entry=readdir(dp))!=NULL){ret=lstat(entry->
-d_name,&statbuf);if(ret<(0x3a7+1353-0x8f0)){fprintf(stderr,
+d_name,&statbuf);if(ret<(0x82f+3720-0x16b7)){fprintf(stderr,
 "\x6c\x73\x74\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x20\x25\x73" "\n",strerror(
 errno));chdir("\x2e\x2e");closedir(dp);return;}if(!S_ISDIR(statbuf.st_mode)){if(
-strcmp("\x2e",entry->d_name)==(0x74a+2592-0x116a)||strcmp("\x2e\x2e",entry->
-d_name)==(0xc92+5592-0x226a))continue;if(!isNvConfiged(entry->d_name)){if(
+strcmp("\x2e",entry->d_name)==(0x282+4431-0x13d1)||strcmp("\x2e\x2e",entry->
+d_name)==(0x20c+5038-0x15ba))continue;if(!isNvConfiged(entry->d_name)){if(
 addConfigFile(entry->d_name,NULL)!=RESULT_SUCCESS)printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x63\x6f\x6e\x66\x69\x67\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x21" "\n"
 ,entry->d_name);}}}chdir("\x2e\x2e");closedir(dp);}static void nvConfig(){char*
-val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x160a+3421-0x2367)};fp=
-fopen(NV_CONFIG_FILE,"\x72\x6f");if(!fp){printf(
+val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x40f+4911-0x173e)};fp=fopen
+(NV_CONFIG_FILE,"\x72\x6f");if(!fp){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
 ,NV_CONFIG_FILE,errno);return;}while(fgets(buf,NV_MAX_CONFIG_LEN,fp)){if(buf[
-(0x8b0+7567-0x263f)]=='\n'||buf[(0xfcf+5657-0x25e8)]==
-((char)(0x7e7+2372-0x1108)))continue;val=strchr(buf,((char)(0x126+680-0x391)));
-if(!val){printf(
+(0x127d+2998-0x1e33)]=='\n'||buf[(0x1b9c+1791-0x229b)]==
+((char)(0x125+2115-0x945)))continue;val=strchr(buf,((char)(0x1a78+2031-0x222a)))
+;if(!val){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x20\x73\x74\x72\x20\x3d\x20\x25\x73\x21" "\n"
-,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0x603+2139-0xe5d)]='\0';*val++=
+,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0x644+3845-0x1548)]='\0';*val++=
 '\0';if(!isCfgConfiged(buf)){if(addConfigFile(val,buf)!=RESULT_SUCCESS)printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x63\x6f\x6e\x66\x69\x67\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x21" "\n"
 ,buf);}}fclose(fp);configdir(NV_FS_MAIN_PATH);}static int nvDirInit(){if(access(
-NV_FS_PATH,F_OK)!=(0x83d+6713-0x2276)){if(mkdir(NV_FS_PATH,(0x18a9+1796-0x1dc0))
-!=(0x1580+1-0x1581)){printf(
+NV_FS_PATH,F_OK)!=(0xd07+1833-0x1430)){if(mkdir(NV_FS_PATH,(0x9e9+4176-0x184c))
+!=(0x130a+1784-0x1a02)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_PATH,errno);return-(0x16a6+3141-0x22ea);}if(mkdir(NV_FS_MAIN_PATH,
-(0xf3d+857-0x10a9))!=(0x53c+7804-0x23b8)){printf(
+,NV_FS_PATH,errno);return-(0x99a+470-0xb6f);}if(mkdir(NV_FS_MAIN_PATH,
+(0xedf+6254-0x2560))!=(0xe12+3746-0x1cb4)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_MAIN_PATH,errno);return-(0x821+1150-0xc9e);}if(mkdir(NV_FS_BACKUP_PATH,
-(0x410+5270-0x16b9))!=(0x1137+5282-0x25d9)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0x12cf+895-0x164d);}if(mkdir(NV_FS_BACKUP_PATH,
+(0x967+4521-0x1923))!=(0xe42+6320-0x26f2)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_BACKUP_PATH,errno);return-(0xb19+921-0xeb1);}}else{if(access(
-NV_FS_MAIN_PATH,F_OK)!=(0x10c6+4658-0x22f8)){if(mkdir(NV_FS_MAIN_PATH,
-(0xcc6+1585-0x110a))!=(0x1933+91-0x198e)){printf(
+,NV_FS_BACKUP_PATH,errno);return-(0x19c+3152-0xdeb);}}else{if(access(
+NV_FS_MAIN_PATH,F_OK)!=(0xa52+214-0xb28)){if(mkdir(NV_FS_MAIN_PATH,
+(0xecc+4698-0x1f39))!=(0x959+2796-0x1445)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_MAIN_PATH,errno);return-(0x320+871-0x686);}}if(access(NV_FS_BACKUP_PATH,
-F_OK)!=(0x1c5+3565-0xfb2)){if(mkdir(NV_FS_BACKUP_PATH,(0x1b4f+1025-0x1d63))!=
-(0xdbf+237-0xeac)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0xea+2345-0xa12);}}if(access(NV_FS_BACKUP_PATH,
+F_OK)!=(0x1e7+6321-0x1a98)){if(mkdir(NV_FS_BACKUP_PATH,(0x296+8209-0x20ba))!=
+(0x15f+6474-0x1aa9)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_BACKUP_PATH,errno);return-(0x124+3162-0xd7d);}}}return(0x70a+5372-0x1c06)
-;}static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
-(0x16bf+223-0x179e)};char nvBackupFile[NV_PATH_LEN]={(0xd58+5431-0x228f)};
+,NV_FS_BACKUP_PATH,errno);return-(0xbea+435-0xd9c);}}}return(0x655+4303-0x1724);
+}static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
+(0x480+5877-0x1b75)};char nvBackupFile[NV_PATH_LEN]={(0x965+222-0xa43)};
 #ifdef FOTA_AB
-T_FLAGS_INFO flags_info={(0x181+9238-0x2597)};int ret=(0xa12+7136-0x25f2);
+T_FLAGS_INFO flags_info={(0x3d3+8847-0x2662)};int ret=(0xce4+1110-0x113a);
 #endif
 for(list=nv_list;list;list=list->next){snprintf(nvMainFile,NV_PATH_LEN,
 "\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,list->nvFile);snprintf(nvBackupFile,
@@ -106,74 +105,74 @@
 nvMainFile)){if(!checkNvFs(nvBackupFile))restoreNvFs(nvBackupFile,nvMainFile);}
 else if(checkNvFs(nvBackupFile)){restoreNvFs(nvMainFile,nvBackupFile);}else{
 loadFactroyParam(list);nvcommit(list->nvFile);continue;}loadNvFs(list->nvFile);
-if(!strcmp(list->nvFile,NV_CFG)&&get_update_status()==(0x4fb+3746-0x139b)){
+if(!strcmp(list->nvFile,NV_CFG)&&get_update_status()==(0x1414+2986-0x1fbc)){
 reloadFactroyParam(list);delete_not_needed(list);nvcommit(list->nvFile);
 #ifdef FOTA_AB
 ret=flags_get(&flags_info);flags_info.boot_fota_flag.fota_status=
-(0x194+5882-0x188e);ret=flags_set(&flags_info);
+(0x8e4+4025-0x189d);ret=flags_set(&flags_info);
 #endif
-}}}uint hash(const char*s){uint hash=(0x15b7+3958-0x252d);while(*s){hash=
+}}}uint hash(const char*s){uint hash=(0x159b+3924-0x24ef);while(*s){hash=
 NV_HASH_MUL*hash+*s++;}return hash;}static int loadFactroyParam(T_NV_NODE*list){
 char*val=NULL;FILE*fp=NULL;T_NV_CONFIG*config=NULL;char buf[NV_MAX_ITEM_LEN]={
-(0x1b24+1988-0x22e8)};for(config=list->fileList;config;config=config->next){fp=
+(0xb43+5595-0x211e)};for(config=list->fileList;config;config=config->next){fp=
 fopen(config->configFile,"\x72\x6f");if(!fp){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
 ,config->configFile,errno);return RESULT_FILE_OPEN_FAIL;}while(fgets(buf,
-NV_MAX_ITEM_LEN,fp)){if(buf[(0x354+1271-0x84b)]=='\n'||buf[(0x198c+702-0x1c4a)]
-==((char)(0xbe8+6521-0x253e)))continue;val=strchr(buf,
-((char)(0x1a0f+197-0x1a97)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x1ddf+2338-0x2701)]=='\n'||buf[(0x786+3488-0x1526)
+]==((char)(0x1822+248-0x18f7)))continue;val=strchr(buf,
+((char)(0x7df+1795-0xea5)));if(!val){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x73\x74\x72\x69\x6e\x67\x20\x3d\x20\x25\x73" "\n"
-,config->configFile,buf);continue;}if(buf[strlen(buf)-(0xeeb+4656-0x211a)]=='\n'
-)buf[strlen(buf)-(0xde6+5744-0x2455)]='\0';*val++='\0';nvset(list->nvFile,buf,
-val,(0x36b+8379-0x2425));}printf(
+,config->configFile,buf);continue;}if(buf[strlen(buf)-(0x1302+2821-0x1e06)]==
+'\n')buf[strlen(buf)-(0x282+4287-0x1340)]='\0';*val++='\0';nvset(list->nvFile,
+buf,val,(0xd82+5730-0x23e3));}printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x25\x73\x21" "\n"
 ,config->configFile);fclose(fp);}return RESULT_SUCCESS;}static bool checkNvFs(
-char*file){int len=(0x26d+9064-0x25d5);int cnt=(0xc80+5494-0x21f6);FILE*fp=NULL;
-char*buf=NULL;struct stat statbuff={(0x3e2+7581-0x217f)};if(stat(file,&statbuff)
-<(0x164+6032-0x18f4))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
+char*file){int len=(0x50a+5470-0x1a68);int cnt=(0x111+6981-0x1c56);FILE*fp=NULL;
+char*buf=NULL;struct stat statbuff={(0x832+2420-0x11a6)};if(stat(file,&statbuff)
+<(0x2103+633-0x237c))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
 return false;fp=fopen(file,"\x72\x6f");if(!fp)return false;buf=(char*)malloc(len
-);if(!buf){fclose(fp);return false;}cnt=(0x9ca+1937-0x115b);while(cnt<len){cnt=
-cnt+fread(buf+cnt,(0x4cf+6569-0x1e77),len-cnt,fp);if(ferror(fp)){clearerr(fp);
+);if(!buf){fclose(fp);return false;}cnt=(0x1863+283-0x197e);while(cnt<len){cnt=
+cnt+fread(buf+cnt,(0x100f+205-0x10db),len-cnt,fp);if(ferror(fp)){clearerr(fp);
 free(buf);fclose(fp);return false;}}if(len!=cnt){free(buf);fclose(fp);return 
 false;}if(getSum(buf,len-NV_CHECK_SIZE)+NV_FILE_FLAG!=*(uint*)(buf+len-
 NV_CHECK_SIZE)){free(buf);fclose(fp);return false;}free(buf);fclose(fp);return 
 true;}static int copyfile(const char*from,const char*to){int fd_to;int fd_from;
-char buf[4096];ssize_t nread;int ret=-(0x6d4+5231-0x1b42);fd_from=open(from,
-O_RDONLY);if(fd_from<(0x8ec+7207-0x2513))return-(0xc1f+1389-0x118a);fd_to=open(
-to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,(0xf57+3709-0x1c34));if(fd_to<
-(0x894+6039-0x202b)){ret=-(0x2f3+6573-0x1c9d);goto out_error;}while(
-(0x151c+4133-0x2540)){char*out_ptr;ssize_t nwritten;nread=read(fd_from,buf,
-sizeof(buf));if(nread==(0x1380+3993-0x2319)){break;}else{if(nread<
-(0x1056+2398-0x19b4)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
-(0xd8d+1145-0x1202);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
-out_ptr,nread);if(nwritten>(0x5da+7443-0x22ed)){nread-=nwritten;out_ptr+=
-nwritten;}else{if(nwritten<(0x62c+53-0x661)){if(errno==EINTR||errno==EAGAIN){
-continue;}else{ret=-(0x263b+198-0x26fc);goto out_error;}}}}while(nread>
-(0x900+4609-0x1b01));}ret=fsync(fd_to);if(ret<(0xbf1+5402-0x210b)){printf(
+char buf[(0x1f60+2659-0x19c3)];ssize_t nread;int ret=-(0x61b+118-0x690);fd_from=
+open(from,O_RDONLY);if(fd_from<(0xf5d+5190-0x23a3))return-(0x8d4+1218-0xd94);
+fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,(0x125d+679-0x1364));if(fd_to<
+(0x538+5840-0x1c08)){ret=-(0x6b7+2144-0xf14);goto out_error;}while(
+(0x11fb+3785-0x20c3)){char*out_ptr;ssize_t nwritten;nread=read(fd_from,buf,
+sizeof(buf));if(nread==(0xdb4+5296-0x2264)){break;}else{if(nread<
+(0x12dc+2971-0x1e77)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
+(0x190d+242-0x19fb);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
+out_ptr,nread);if(nwritten>(0xa29+6584-0x23e1)){nread-=nwritten;out_ptr+=
+nwritten;}else{if(nwritten<(0x76d+1983-0xf2c)){if(errno==EINTR||errno==EAGAIN){
+continue;}else{ret=-(0xf70+1124-0x13cf);goto out_error;}}}}while(nread>
+(0x616+5351-0x1afd));}ret=fsync(fd_to);if(ret<(0x21ef+11-0x21fa)){printf(
 "\x53\x79\x6e\x63\x20\x46\x61\x69\x6c\x65\x64\x3a\x25\x73\x2c\x20\x66\x69\x6c\x65\x20\x70\x61\x74\x68\x3a\x25\x73"
-,strerror(errno),to);goto out_error;}if(close(fd_to)<(0xdb5+4755-0x2048)){fd_to=
--(0x96f+4558-0x1b3c);ret=-(0x141b+698-0x16cf);goto out_error;}close(fd_from);
-return(0x67c+364-0x7e8);out_error:printf(
+,strerror(errno),to);goto out_error;}if(close(fd_to)<(0x89b+3413-0x15f0)){fd_to=
+-(0xb0b+2826-0x1614);ret=-(0x25f+3323-0xf54);goto out_error;}close(fd_from);
+return(0x7ca+3259-0x1485);out_error:printf(
 "\x63\x6f\x70\x79\x66\x69\x6c\x65\x20\x25\x73\x20\x74\x6f\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x3a\x25\x64" "\n"
-,from,to,ret);close(fd_from);if(fd_to>=(0x95a+2163-0x11cd))close(fd_to);return 
+,from,to,ret);close(fd_from);if(fd_to>=(0xbcf+4192-0x1c2f))close(fd_to);return 
 ret;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,
-dstFile)!=(0xb3c+3238-0x17e2))return RESULT_FAIL;return RESULT_SUCCESS;}static 
-int loadNvFs(char*file){int len=(0xf1a+826-0x1254);int cnt=(0x7d9+2617-0x1212);
-FILE*fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct 
-stat statbuff={(0x46f+7480-0x21a7)};char nvFile[NV_PATH_LEN]={
-(0x1a38+749-0x1d25)};sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file)
-;if(stat(nvFile,&statbuff)<(0xdd2+1243-0x12ad))return RESULT_FAIL;len=statbuff.
+dstFile)!=(0x499+8254-0x24d7))return RESULT_FAIL;return RESULT_SUCCESS;}static 
+int loadNvFs(char*file){int len=(0x2245+1139-0x26b8);int cnt=(0x406+4477-0x1583)
+;FILE*fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct 
+stat statbuff={(0x91f+2966-0x14b5)};char nvFile[NV_PATH_LEN]={
+(0x316+8271-0x2365)};sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file)
+;if(stat(nvFile,&statbuff)<(0x1799+3401-0x24e2))return RESULT_FAIL;len=statbuff.
 st_size;if(NV_CHECK_SIZE>len)return RESULT_FAIL;fp=fopen(nvFile,"\x72\x6f");if(!
 fp)return RESULT_FILE_OPEN_FAIL;len=len-NV_CHECK_SIZE;buf=(char*)malloc(len+
-(0x154f+2766-0x201c));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
-(0x71+2225-0x922),len+(0x9c7+138-0xa50));cnt=(0x911+1744-0xfe1);while(cnt<len){
-cnt=cnt+fread(buf+cnt,(0x1538+4358-0x263d),len-cnt,fp);if(ferror(fp)){clearerr(
-fp);fclose(fp);free(buf);return RESULT_FILE_READ_FAIL;}}if(cnt!=len){fclose(fp);
-free(buf);return RESULT_FILE_READ_FAIL;}buf[len]='\0';name=buf;while(*name){if(!
-(eq=strchr(name,((char)(0x1445+156-0x14a4))))){break;}*eq='\0';value=eq+
-(0x1765+265-0x186d);nvset(file,name,value,(0x120c+4181-0x2260));*eq=
-((char)(0x1292+4621-0x2462));name=value+strlen(value)+(0x1555+2491-0x1f0f);}free
-(buf);fclose(fp);return RESULT_SUCCESS;}static void analyMsg(T_NV_MSG_INFO*
+(0x8a+4955-0x13e4));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
+(0x225+7662-0x2013),len+(0x1f9d+33-0x1fbd));cnt=(0x97a+5479-0x1ee1);while(cnt<
+len){cnt=cnt+fread(buf+cnt,(0x1ff1+1279-0x24ef),len-cnt,fp);if(ferror(fp)){
+clearerr(fp);fclose(fp);free(buf);return RESULT_FILE_READ_FAIL;}}if(cnt!=len){
+fclose(fp);free(buf);return RESULT_FILE_READ_FAIL;}buf[len]='\0';name=buf;while(
+*name){if(!(eq=strchr(name,((char)(0xdd1+3356-0x1ab0))))){break;}*eq='\0';value=
+eq+(0x2191+557-0x23bd);nvset(file,name,value,(0xf84+4202-0x1fed));*eq=
+((char)(0x726+7678-0x24e7));name=value+strlen(value)+(0x1d8+9088-0x2557);}free(
+buf);fclose(fp);return RESULT_SUCCESS;}static void analyMsg(T_NV_MSG_INFO*
 msgrecv,T_NV_MSG_RESULT*msgsnd){switch(msgrecv->nvType){case MSG_GET:msgsnd->
 result=nvget(msgrecv->file,msgrecv->key,msgsnd->value);break;case MSG_SET:msgsnd
 ->result=nvset(msgrecv->file,msgrecv->key,msgrecv->value,msgrecv->saveflag);
@@ -188,104 +187,104 @@
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x70\x61\x72\x61\x6d\x20\x69\x6c\x6c\x65\x67\x61\x6c\x21" "\n"
 );return RESULT_INVAL;}if(configFile){newConfig=(T_NV_CONFIG*)malloc(sizeof(
 T_NV_CONFIG));if(!newConfig)return RESULT_MALLOC_FAIL;strncpy(newConfig->
-configFile,configFile,NV_PATH_LEN-(0x1ca+5409-0x16ea));newConfig->configFile[
-NV_PATH_LEN-(0x191+8715-0x239b)]='\0';newConfig->next=NULL;}for(list=nv_list;
-list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x3b+5302-0x14f1))break;}
-if(!list){newList=(T_NV_NODE*)malloc(sizeof(T_NV_NODE));if(!newList){if(
+configFile,configFile,NV_PATH_LEN-(0x39d+8995-0x26bf));newConfig->configFile[
+NV_PATH_LEN-(0xa9c+6159-0x22aa)]='\0';newConfig->next=NULL;}for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x915+2007-0x10ec))break;
+}if(!list){newList=(T_NV_NODE*)malloc(sizeof(T_NV_NODE));if(!newList){if(
 newConfig)free(newConfig);return RESULT_MALLOC_FAIL;}newList->next=NULL;strncpy(
-newList->nvFile,nvFile,NV_PATH_LEN-(0x858+5283-0x1cfa));newList->nvFile[
-NV_PATH_LEN-(0x1168+478-0x1345)]='\0';memset(newList->nvTable,
-(0x75d+7380-0x2431),NV_HASH_LEN*(0x10ec+3723-0x1f73));newList->fileList=
-newConfig;if(!nv_list)nv_list=newList;else{newList->next=nv_list->next;nv_list->
-next=newList;}}else if(!list->fileList)list->fileList=newConfig;else{if(
-newConfig==NULL)return RESULT_FAIL;newConfig->next=list->fileList->next;list->
-fileList->next=newConfig;}return RESULT_SUCCESS;}static bool isCfgConfiged(char*
-configFile){T_NV_NODE*list=NULL;T_NV_CONFIG*config=NULL;for(list=nv_list;list;
-list=list->next){for(config=list->fileList;config;config=config->next){if(!
-strcmp(config->configFile,configFile))return true;}}return false;}static bool 
-isNvConfiged(char*nvFile){T_NV_NODE*list=NULL;for(list=nv_list;list;list=list->
-next){if(!strcmp(list->nvFile,nvFile))return true;}return false;}static uint 
-getSum(const char*s,int len){uint sum=(0x5d6+3636-0x140a);char*data=(char*)s;
-while(len-- >(0x1087+4375-0x219e)){sum+=(*data++);}return sum;}static int 
-saveNvFs(char*nvName,char*nvFile){int i=(0x1e6f+1358-0x23bd);int sum=
-(0x438+8699-0x2633);int bufSize=(0x1b3d+1381-0x20a2);int itemSize=
-(0x256+7220-0x1e8a);int ret=(0x1415+1220-0x18d9);int fp=(0x1773+1678-0x1e01);
-char*buf=NULL;T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;list;list
-=list->next){if(strcmp(list->nvFile,nvName))continue;fp=open(nvFile,O_SYNC|
-O_RDWR|O_CREAT|O_TRUNC,(0x1faa+1162-0x2294));if(fp==-(0x3a4+3977-0x132c)){printf
-(
+newList->nvFile,nvFile,NV_PATH_LEN-(0x216+4427-0x1360));newList->nvFile[
+NV_PATH_LEN-(0x1742+874-0x1aab)]='\0';memset(newList->nvTable,
+(0xdcf+1745-0x14a0),NV_HASH_LEN*(0xfc7+1769-0x16ac));newList->fileList=newConfig
+;if(!nv_list)nv_list=newList;else{newList->next=nv_list->next;nv_list->next=
+newList;}}else if(!list->fileList)list->fileList=newConfig;else{if(newConfig==
+NULL)return RESULT_FAIL;newConfig->next=list->fileList->next;list->fileList->
+next=newConfig;}return RESULT_SUCCESS;}static bool isCfgConfiged(char*configFile
+){T_NV_NODE*list=NULL;T_NV_CONFIG*config=NULL;for(list=nv_list;list;list=list->
+next){for(config=list->fileList;config;config=config->next){if(!strcmp(config->
+configFile,configFile))return true;}}return false;}static bool isNvConfiged(char
+*nvFile){T_NV_NODE*list=NULL;for(list=nv_list;list;list=list->next){if(!strcmp(
+list->nvFile,nvFile))return true;}return false;}static uint getSum(const char*s,
+int len){uint sum=(0x2225+1084-0x2661);char*data=(char*)s;while(len-- >
+(0xc59+2541-0x1646)){sum+=(*data++);}return sum;}static int saveNvFs(char*nvName
+,char*nvFile){int i=(0x116a+4658-0x239c);int sum=(0xd49+6560-0x26e9);int bufSize
+=(0x17db+2074-0x1ff5);int itemSize=(0xfb4+1923-0x1737);int ret=
+(0x6c9+7134-0x22a7);int fp=(0x83b+4997-0x1bc0);char*buf=NULL;T_NV_NODE*list=NULL
+;T_NV_ITEM*item=NULL;for(list=nv_list;list;list=list->next){if(strcmp(list->
+nvFile,nvName))continue;fp=open(nvFile,O_SYNC|O_RDWR|O_CREAT|O_TRUNC,
+(0x16d2+1633-0x1b93));if(fp==-(0x147f+691-0x1731)){printf(
 "\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x61\x69\x6c\x2c\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,nvFile,errno);return RESULT_FILE_OPEN_FAIL;}buf=(char*)malloc(NV_BLOCK_SIZE);if
-(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0xe83+3124-0x1ab7);i<
+(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0xc69+6638-0x2657);i<
 NV_HASH_LEN;i++){for(item=list->nvTable[i];item;item=item->next){if(strcmp(
 nvFile,NV_FS_SHOW)&&!item->saveFlag)continue;itemSize=strlen(item->key)+strlen(
-item->value)+(0x226+9326-0x2692);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp,
-buf,bufSize)<(0x643+895-0x9c2)){printf(
+item->value)+(0x1d3f+630-0x1fb3);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp,
+buf,bufSize)<(0x1c18+932-0x1fbc)){printf(
 "\x65\x72\x72\x6f\x72\x20\x25\x73\x20\x25\x64\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,__FILE__,__LINE__,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}sum
-+=getSum(buf,bufSize);bufSize=(0x5da+3149-0x1227);}sprintf(buf+bufSize,
++=getSum(buf,bufSize);bufSize=(0xe00+5527-0x2397);}sprintf(buf+bufSize,
 "\x25\x73\x3d\x25\x73",item->key,item->value);bufSize+=itemSize;}}if(bufSize!=
-(0xc77+3011-0x183a)){if(write(fp,buf,bufSize)<(0x765+5302-0x1c1b)){printf(
+(0x1cc+3665-0x101d)){if(write(fp,buf,bufSize)<(0x14+7316-0x1ca8)){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}sum+=getSum(buf,
-bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0x797+5024-0x1b37))
-{printf(
+bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0x1d9+819-0x50c)){
+printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}ret=fsync(fp);free(
-buf);close(fp);if(ret<(0xc87+384-0xe07)){printf(
+buf);close(fp);if(ret<(0x547+6420-0x1e5b)){printf(
 "\x53\x79\x6e\x63\x20\x46\x61\x69\x6c\x65\x64\x3a\x25\x73\x2c\x20\x66\x69\x6c\x65\x20\x70\x61\x74\x68\x3a\x25\x73"
 ,strerror(errno),nvFile);return ret;}return RESULT_SUCCESS;}return 
 RESULT_NO_FILE;}static int nvget(char*file,char*key,char*value){int index=
-(0x243c+58-0x2476);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;list
-;list=list->next){if(strcmp(list->nvFile,file))continue;index=hash(key)%
+(0xe34+5698-0x2476);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,file))continue;index=hash(key)%
 NV_HASH_LEN;for(item=list->nvTable[index];item;item=item->next){if(strcmp(item->
-key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0xbf2+4930-0x1f33));
-value[NV_MAX_VAL_LEN-(0x11c2+152-0x1259)]='\0';return RESULT_SUCCESS;}}return 
+key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0x115+9033-0x245d));
+value[NV_MAX_VAL_LEN-(0x1385+4341-0x2479)]='\0';return RESULT_SUCCESS;}}return 
 RESULT_NO_ITEM;}static int nvset(char*file,const char*key,const char*value,int 
-saveFlag){int index=(0x6f0+4535-0x18a7);int ret=(0x19cc+2115-0x220f);int 
-key_buf_len=(0x13f5+3997-0x2392);int value_buf_len=(0x921+3524-0x16e5);T_NV_NODE
+saveFlag){int index=(0x1e3+6539-0x1b6e);int ret=(0x1bba+654-0x1e48);int 
+key_buf_len=(0x130c+2829-0x1e19);int value_buf_len=(0x72f+6674-0x2141);T_NV_NODE
 *list=NULL;T_NV_ITEM*item=NULL;T_NV_ITEM*newItem=NULL;if(NULL==key||NULL==value)
-return RESULT_FAIL;key_buf_len=strlen(key)+(0x1109+4431-0x2257);value_buf_len=
-strlen(value)+(0x11b5+2780-0x1c90);for(list=nv_list;list;list=list->next){if(
+return RESULT_FAIL;key_buf_len=strlen(key)+(0x383+7336-0x202a);value_buf_len=
+strlen(value)+(0x161+6558-0x1afe);for(list=nv_list;list;list=list->next){if(
 strcmp(list->nvFile,file))continue;index=hash(key)%NV_HASH_LEN;for(item=list->
 nvTable[index];item;item=item->next){if(strcmp(item->key,key))continue;if(
 saveFlag)item->saveFlag=saveFlag;if(!strcmp(item->value,value))return 
 RESULT_SUCCESS;free(item->value);item->value=(char*)malloc(value_buf_len);if(!
 item->value)return RESULT_MALLOC_FAIL;strncpy(item->value,value,value_buf_len-
-(0xa5d+5498-0x1fd6));item->value[value_buf_len-(0x22c+4070-0x1211)]='\0';return 
+(0xe1f+2406-0x1784));item->value[value_buf_len-(0x146+9599-0x26c4)]='\0';return 
 RESULT_SUCCESS;}newItem=(T_NV_ITEM*)malloc(sizeof(T_NV_ITEM));if(!newItem)return
  RESULT_MALLOC_FAIL;newItem->key=(char*)malloc(key_buf_len);if(!newItem->key){
 free(newItem);return RESULT_MALLOC_FAIL;}newItem->value=(char*)malloc(
 value_buf_len);if(!newItem->value){free(newItem->key);free(newItem);return 
-RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,key_buf_len-(0x154b+2284-0x1e36));
-newItem->key[key_buf_len-(0x16dd+1345-0x1c1d)]='\0';strncpy(newItem->value,value
-,value_buf_len-(0x73+7942-0x1f78));newItem->value[value_buf_len-
-(0x462+1887-0xbc0)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem->
-update_flag=(0x12a4+4956-0x2600);if(!list->nvTable[index])list->nvTable[index]=
+RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,key_buf_len-(0x1520+575-0x175e));
+newItem->key[key_buf_len-(0xd98+3230-0x1a35)]='\0';strncpy(newItem->value,value,
+value_buf_len-(0xcd6+306-0xe07));newItem->value[value_buf_len-
+(0x175f+289-0x187f)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem
+->update_flag=(0x802+6800-0x2292);if(!list->nvTable[index])list->nvTable[index]=
 newItem;else{newItem->next=list->nvTable[index]->next;list->nvTable[index]->next
 =newItem;}return RESULT_SUCCESS;}ret=addConfigFile(file,NULL);if(ret==
 RESULT_SUCCESS)return nvset(file,key,value,saveFlag);else return ret;}static int
- nvunset(char*file,char*key){int index=(0x4ef+4495-0x167e);T_NV_NODE*list=NULL;
+ nvunset(char*file,char*key){int index=(0xd81+1366-0x12d7);T_NV_NODE*list=NULL;
 T_NV_ITEM*item=NULL;T_NV_ITEM*prev=NULL;for(list=nv_list;list;list=list->next){
 if(strcmp(list->nvFile,file))continue;index=hash(key)%NV_HASH_LEN;for(item=list
 ->nvTable[index];item;prev=item,item=item->next){if(strcmp(item->key,key))
 continue;if(!prev)list->nvTable[index]=item->next;else prev->next=item->next;
 free(item->key);free(item->value);free(item);return RESULT_SUCCESS;}}return 
-RESULT_NO_ITEM;}static int nvreset(char*file){int ret=(0x3ac+6714-0x1de6);
+RESULT_NO_ITEM;}static int nvreset(char*file){int ret=(0x18d1+980-0x1ca5);
 T_NV_NODE*list=NULL;for(list=nv_list;list;list=list->next){if(strcmp(list->
 nvFile,file))continue;ret=nvclear(file);if(ret!=RESULT_SUCCESS)return ret;if(
 loadFactroyParam(list)!=RESULT_SUCCESS)return RESULT_FAIL;return nvcommit(file);
-}return RESULT_NO_FILE;}static int nvclear(char*file){int i=(0xac6+380-0xc42);
-T_NV_NODE*list=NULL;T_NV_ITEM*cur=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;list
-;list=list->next){if(strcmp(list->nvFile,file))continue;for(i=(0x655+480-0x835);
-i<NV_HASH_LEN;i++){for(item=list->nvTable[i];item;){cur=item;item=item->next;
-free(cur->key);free(cur->value);free(cur);}list->nvTable[i]=NULL;}return 
-RESULT_SUCCESS;}return RESULT_NO_FILE;}static int nvcommit(char*file){int ret=
-(0xa20+4851-0x1d13);char nvMainFile[NV_PATH_LEN]={(0x1520+476-0x16fc)};char 
-nvBackupFile[NV_PATH_LEN]={(0x91b+5083-0x1cf6)};sprintf(nvMainFile,
-"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);sprintf(nvBackupFile,
-"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=saveNvFs(file,nvMainFile);if(
-ret!=RESULT_SUCCESS)return ret;return restoreNvFs(nvBackupFile,nvMainFile);}
+}return RESULT_NO_FILE;}static int nvclear(char*file){int i=(0x1051+1122-0x14b3)
+;T_NV_NODE*list=NULL;T_NV_ITEM*cur=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,file))continue;for(i=
+(0x1330+4044-0x22fc);i<NV_HASH_LEN;i++){for(item=list->nvTable[i];item;){cur=
+item;item=item->next;free(cur->key);free(cur->value);free(cur);}list->nvTable[i]
+=NULL;}return RESULT_SUCCESS;}return RESULT_NO_FILE;}static int nvcommit(char*
+file){int ret=(0x78b+6791-0x2212);char nvMainFile[NV_PATH_LEN]={
+(0x253+3847-0x115a)};char nvBackupFile[NV_PATH_LEN]={(0x1783+2848-0x22a3)};
+sprintf(nvMainFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);sprintf(
+nvBackupFile,"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=saveNvFs(file,
+nvMainFile);if(ret!=RESULT_SUCCESS)return ret;return restoreNvFs(nvBackupFile,
+nvMainFile);}
 #ifdef __cplusplus
 }
 #endif
diff --git a/ap/app/zte_comm/nvserver/nvupdate.c b/ap/app/zte_comm/nvserver/nvupdate.c
index 73d8ac2..46565f8 100755
--- a/ap/app/zte_comm/nvserver/nvupdate.c
+++ b/ap/app/zte_comm/nvserver/nvupdate.c
@@ -23,84 +23,84 @@
 #endif
 extern T_NV_NODE*nv_list;
 #ifdef FOTA_AB
-int get_update_status(void){T_FLAGS_INFO flags_info={(0x3ea+6266-0x1c64)};
-unsigned int status=(0x30a+6769-0x1d7b);int ret=(0xda6+791-0x10bd);ret=flags_get
-(&flags_info);status=flags_info.boot_fota_flag.fota_status;if(status==
-(0xf37+1122-0x1398))return(0x1b33+1323-0x205c);else return(0x54f+3819-0x143a);}
+int get_update_status(void){T_FLAGS_INFO flags_info={(0x143a+1964-0x1be6)};
+unsigned int status=(0x663+612-0x8c7);int ret=(0x195c+474-0x1b36);ret=flags_get(
+&flags_info);status=flags_info.boot_fota_flag.fota_status;if(status==
+(0x740+7441-0x2450))return(0x16d9+3508-0x248b);else return(0x15e4+4022-0x259a);}
 #else
-int get_update_status(void){int update_status;FILE*fd=(0x245+3575-0x103c);int 
+int get_update_status(void){int update_status;FILE*fd=(0x1fe7+737-0x22c8);int 
 ret;char*filename=NULL;if(access(FOTA_UPDATE_STATUS_FILE_OLD,R_OK)==
-(0xc21+2001-0x13f2)){filename=FOTA_UPDATE_STATUS_FILE_OLD;}else{filename=
+(0x1808+2242-0x20ca)){filename=FOTA_UPDATE_STATUS_FILE_OLD;}else{filename=
 FOTA_UPDATE_STATUS_FILE;}printf(
 "get_update_status, read_update_status from %s\n",filename);fd=fopen(filename,
 "\x72\x62\x2b");if(fd==NULL){printf(
 "\x5b\x6e\x76\x73\x65\x72\x76\x65\x72\x5d\x75\x70\x64\x61\x74\x65\x5f\x73\x74\x61\x74\x75\x73\x20\x6f\x70\x65\x6e\x20\x20\x65\x72\x72\x6f\x72\x3a\x25\x73" "\n"
 ,strerror(errno));goto error0;}ret=fscanf(fd,"\x25\x64",(int*)&update_status);if
-(ret<(0x1883+2402-0x21e5)){printf(
+(ret<(0xa61+4828-0x1d3d)){printf(
 "\x67\x65\x74\x20\x69\x6e\x66\x6f\x20\x66\x72\x6f\x6d\x20\x66\x69\x6c\x65\x20\x65\x72\x72\x6f\x72\x3a\x25\x73" "\n"
 ,strerror(errno));fclose(fd);goto error0;}printf(
 "\x75\x70\x64\x61\x74\x65\x5f\x73\x74\x61\x74\x75\x73\x3d\x25\x64" "\n",
-update_status);fclose(fd);return update_status;error0:return-(0x38a+5531-0x1924)
-;}
+update_status);fclose(fd);return update_status;error0:return-(0xf6a+854-0x12bf);
+}
 #endif
 int nvupdate(char*nv_file,char*config_file,const char*key,const char*value,int 
-saveFlag){int index=(0x3fb+5875-0x1aee);int key_buf_len=(0x1bc2+619-0x1e2d);int 
-value_buf_len=(0x6a6+655-0x935);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;
+saveFlag){int index=(0x1af9+1683-0x218c);int key_buf_len=(0x555+1941-0xcea);int 
+value_buf_len=(0x186b+2309-0x2170);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;
 T_NV_ITEM*newItem=NULL;if(NULL==key||NULL==value)return RESULT_FAIL;printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6e\x76\x75\x70\x64\x61\x74\x65\x20\x6e\x76\x5f\x66\x69\x6c\x65\x3a\x25\x73\x20\x6b\x65\x79\x3a\x25\x73\x20\x76\x61\x6c\x75\x65\x3a\x25\x73" "\n"
-,nv_file,key,value);key_buf_len=strlen(key)+(0x7e0+6449-0x2110);value_buf_len=
-strlen(value)+(0x4dc+8647-0x26a2);for(list=nv_list;list;list=list->next){if(
+,nv_file,key,value);key_buf_len=strlen(key)+(0x1aa3+663-0x1d39);value_buf_len=
+strlen(value)+(0x18f+9358-0x261c);for(list=nv_list;list;list=list->next){if(
 strcmp(list->nvFile,nv_file))continue;index=hash(key)%NV_HASH_LEN;for(item=list
 ->nvTable[index];item;item=item->next){if(strcmp(item->key,key))continue;if(
 saveFlag)item->saveFlag=saveFlag;if(!strcmp(item->value,value)){item->
-update_flag=(0x11d4+4309-0x22a8);printf(
+update_flag=(0x10b8+342-0x120d);printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6e\x76\x75\x70\x64\x61\x74\x65\x20\x73\x61\x6d\x65\x73\x6b\x69\x70\x3a\x69\x74\x65\x6d\x2d\x3e\x6b\x65\x79\x3a\x25\x73\x20\x69\x74\x65\x6d\x2d\x3e\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x63\x6f\x6e\x66\x69\x67\x5f\x66\x69\x6c\x65\x3a\x25\x73" "\n"
 ,item->key,item->value,value,config_file);return RESULT_SUCCESS;}if(strstr(
-config_file,"\x75\x73\x65\x72")){if((0x521+945-0x8d1)==item->update_flag){printf
+config_file,"\x75\x73\x65\x72")){if((0x5c8+835-0x90a)==item->update_flag){printf
 (
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6e\x76\x75\x70\x64\x61\x74\x65\x20\x73\x65\x63\x6f\x6e\x64\x20\x63\x68\x61\x6e\x67\x65\x3a\x69\x74\x65\x6d\x2d\x3e\x6b\x65\x79\x3a\x25\x73\x20\x69\x74\x65\x6d\x2d\x3e\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x63\x6f\x6e\x66\x69\x67\x5f\x66\x69\x6c\x65\x3a\x25\x73" "\n"
 ,item->key,item->value,value,config_file);}else{item->update_flag=
-(0xd3a+1607-0x1380);printf(
+(0x74c+636-0x9c7);printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6e\x76\x75\x70\x64\x61\x74\x65\x20\x75\x73\x65\x72\x73\x6b\x69\x70\x3a\x69\x74\x65\x6d\x2d\x3e\x6b\x65\x79\x3a\x25\x73\x20\x69\x74\x65\x6d\x2d\x3e\x76\x61\x6c\x75\x65\x31\x3a\x25\x73\x20\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x63\x6f\x6e\x66\x69\x67\x5f\x66\x69\x6c\x65\x3a\x25\x73" "\n"
 ,item->key,item->value,value,config_file);return RESULT_SUCCESS;}}printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6b\x65\x79\x3d\x25\x73\x20\x63\x68\x61\x6e\x67\x65\x20\x76\x61\x6c\x75\x65\x3a\x25\x73\x20\x74\x6f\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x20" "\n"
 ,item->key,item->value,value);free(item->value);item->value=(char*)malloc(
 value_buf_len);if(!item->value)return RESULT_MALLOC_FAIL;strncpy(item->value,
-value,value_buf_len-(0x1aff+695-0x1db5));item->value[value_buf_len-
-(0xea8+6036-0x263b)]='\0';item->update_flag=(0x879+1845-0xfad);return 
+value,value_buf_len-(0x1745+619-0x19af));item->value[value_buf_len-
+(0x1ffc+469-0x21d0)]='\0';item->update_flag=(0x1224+1037-0x1630);return 
 RESULT_SUCCESS;}newItem=(T_NV_ITEM*)malloc(sizeof(T_NV_ITEM));if(!newItem){
 printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x52\x45\x53\x55\x4c\x54\x5f\x4d\x41\x4c\x4c\x4f\x43\x5f\x46\x41\x49\x4c\x31\x20" "\n"
 );return RESULT_MALLOC_FAIL;}newItem->key=(char*)malloc(strlen(key)+
-(0xea0+3487-0x1c3e));if(!newItem->key){free(newItem);printf(
+(0x1659+1613-0x1ca5));if(!newItem->key){free(newItem);printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x52\x45\x53\x55\x4c\x54\x5f\x4d\x41\x4c\x4c\x4f\x43\x5f\x46\x41\x49\x4c\x32" "\n"
 );return RESULT_MALLOC_FAIL;}newItem->value=(char*)malloc(value_buf_len);if(!
 newItem->value){free(newItem->key);free(newItem);printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x52\x45\x53\x55\x4c\x54\x5f\x4d\x41\x4c\x4c\x4f\x43\x5f\x46\x41\x49\x4c\x33\x20" "\n"
 );return RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,key_buf_len-
-(0x76b+971-0xb35));newItem->key[key_buf_len-(0x1879+1786-0x1f72)]='\0';strncpy(
-newItem->value,value,value_buf_len-(0x12e0+3021-0x1eac));newItem->value[
-value_buf_len-(0x5d0+2605-0xffc)]='\0';newItem->next=NULL;newItem->saveFlag=
-saveFlag;newItem->update_flag=(0x323+2608-0xd52);printf(
+(0x1f92+1019-0x238c));newItem->key[key_buf_len-(0x1fb+279-0x311)]='\0';strncpy(
+newItem->value,value,value_buf_len-(0x5bb+3024-0x118a));newItem->value[
+value_buf_len-(0x87a+311-0x9b0)]='\0';newItem->next=NULL;newItem->saveFlag=
+saveFlag;newItem->update_flag=(0x210d+472-0x22e4);printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x61\x64\x64\x20\x6b\x65\x79\x3d\x25\x73\x2c\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x20" "\n"
 ,newItem->key,newItem->value);if(!list->nvTable[index])list->nvTable[index]=
 newItem;else{newItem->next=list->nvTable[index]->next;list->nvTable[index]->next
 =newItem;}return RESULT_SUCCESS;}return RESULT_FAIL;}int reloadFactroyParam(
 T_NV_NODE*list){char*val=NULL;FILE*fp=NULL;T_NV_CONFIG*config=NULL;char buf[
-NV_MAX_ITEM_LEN]={(0xa51+4895-0x1d70)};printf(
+NV_MAX_ITEM_LEN]={(0x70a+1556-0xd1e)};printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x72\x65\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x6e\x76\x46\x69\x6c\x65\x3a\x25\x73" "\n"
 ,list->nvFile);for(config=list->fileList;config;config=config->next){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x72\x65\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x63\x6f\x6e\x66\x69\x67\x46\x69\x6c\x65\x20\x73\x74\x61\x72\x74\x3a\x25\x73\x21" "\n"
 ,config->configFile);fp=fopen(config->configFile,"\x72\x6f");if(!fp){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
 ,config->configFile,errno);return RESULT_FILE_OPEN_FAIL;}while(fgets(buf,
-NV_MAX_ITEM_LEN,fp)){if(buf[(0x1664+1600-0x1ca4)]=='\n'||buf[(0x226+9425-0x26f7)
-]==((char)(0x2b5+8290-0x22f4)))continue;val=strchr(buf,
-((char)(0x2138+685-0x23a8)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x1100+717-0x13cd)]=='\n'||buf[(0xb44+5762-0x21c6)]
+==((char)(0x111+4889-0x1407)))continue;val=strchr(buf,
+((char)(0x327+6366-0x1bc8)));if(!val){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x73\x74\x72\x69\x6e\x67\x20\x3d\x20\x25\x73" "\n"
-,config->configFile,buf);continue;}buf[strlen(buf)-(0xba8+1734-0x126d)]='\0';*
-val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0x228f+523-0x2499))
-;}printf(
+,config->configFile,buf);continue;}buf[strlen(buf)-(0x1832+671-0x1ad0)]='\0';*
+val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0x1693+1037-0x1a9f)
+);}printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x72\x65\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x63\x6f\x6e\x66\x69\x67\x46\x69\x6c\x65\x20\x65\x6e\x64\x3a\x25\x73\x21" "\n"
 ,config->configFile);fclose(fp);}return RESULT_SUCCESS;}void dump_list(T_NV_ITEM
 *list){if(list==NULL){printf(
@@ -108,11 +108,11 @@
 list->next;while(p!=NULL){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x64\x75\x6d\x70\x20\x6b\x65\x79\x3d\x25\x73\x2c\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x2c\x20\x70\x3d\x30\x78\x25\x78" "\n"
 ,p->key,p->value,((unsigned int)p));p=p->next;}}int delete_not_needed(T_NV_NODE*
-list){int index=(0xa92+6356-0x2366);T_NV_ITEM*item=NULL;T_NV_ITEM head={
-(0xb8d+6668-0x2599)};T_NV_ITEM*prev=&head;printf(
+list){int index=(0xff2+1821-0x170f);T_NV_ITEM*item=NULL;T_NV_ITEM head={
+(0x1062+5597-0x263f)};T_NV_ITEM*prev=&head;printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x64\x65\x6c\x65\x74\x65\x5f\x6e\x6f\x74\x5f\x6e\x65\x65\x64\x65\x64\x20\x65\x6e\x74\x65\x72\x20\x2a\x2a\x2a" "\n"
-);for(index=(0x964+2713-0x13fd);index<NV_HASH_LEN;index++){head.next=list->
-nvTable[index];prev=&head;for(item=prev->next;item;){if((0x472+8859-0x270c)==
+);for(index=(0xb61+2216-0x1409);index<NV_HASH_LEN;index++){head.next=list->
+nvTable[index];prev=&head;for(item=prev->next;item;){if((0x1c20+418-0x1dc1)==
 item->update_flag){prev=item;item=item->next;}else{printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x64\x65\x6c\x65\x74\x65\x20\x6b\x65\x79\x3d\x25\x73\x2c\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x20" "\n"
 ,item->key,item->value);prev->next=item->next;free(item->key);free(item->value);
diff --git a/ap/app/zte_comm/phonebook/src/pb_db.c b/ap/app/zte_comm/phonebook/src/pb_db.c
index 301b47b..801a0a1 100755
--- a/ap/app/zte_comm/phonebook/src/pb_db.c
+++ b/ap/app/zte_comm/phonebook/src/pb_db.c
@@ -1,8 +1,8 @@
 
 #include "pb_com.h"

 T_zPb_DbResult atPb_CreatDb(){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0xcd0+4216-0x1d48)};UINT32 count=(0x19c+7601-0x1f4d);result=
-atPb_ExecDbSql(ZPB_CREATE_PBM_TABLE,NULL,NULL);if(ZPB_DB_OK!=result){slog(
+ZPB_MAX_BYTES_DB]={(0x975+2842-0x148f)};UINT32 count=(0x1a6f+1895-0x21d6);result
+=atPb_ExecDbSql(ZPB_CREATE_PBM_TABLE,NULL,NULL);if(ZPB_DB_OK!=result){slog(
 PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x63\x72\x65\x61\x74\x65\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65\x20\x72\x65\x73\x75\x6c\x74\x20\x69\x73\x20\x25\x64" "\n"
 ,result);return result;}result=atPb_ExecDbSql(
@@ -18,18 +18,18 @@
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM);result=atPb_ExecDbSql(sql,NULL,NULL);if(
 ZPB_DB_OK!=result){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x63\x72\x65\x61\x74\x65\x20\x70\x62\x6d\x5f\x64\x65\x76\x69\x63\x65\x5f\x63\x61\x70\x61\x62\x69\x6c\x69\x74\x79\x20\x74\x61\x62\x6c\x65\x20\x72\x65\x73\x75\x6c\x74\x20\x69\x73\x20\x25\x64" "\n"
-,result);return result;}memset(sql,(0x13b8+2624-0x1df8),sizeof(sql));snprintf(
-sql,sizeof(sql)-(0x2115+690-0x23c6),
+,result);return result;}memset(sql,(0x56c+7495-0x22b3),sizeof(sql));snprintf(sql
+,sizeof(sql)-(0x98a+2877-0x14c6),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73"
 ,ZPB_DB_SIM_CAPABILITY_TABLE);(VOID)atPb_ExecDbSql(sql,atPb_DbCountTableLineCb,&
-count);if((0xef2+4653-0x211f)<count){memset(sql,(0x1c14+1613-0x2261),sizeof(sql)
-);snprintf(sql,sizeof(sql)-(0x19a1+349-0x1afd),
+count);if((0x371+1634-0x9d3)<count){memset(sql,(0xa07+509-0xc04),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0xaeb+2640-0x153a),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x53\x69\x6d\x5f\x74\x79\x70\x65\x3e\x3d\x30"
 ,ZPB_DB_SIM_CAPABILITY_TABLE);result=atPb_ExecDbSql(sql,NULL,NULL);if(ZPB_DB_OK
 !=result){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x53\x65\x74\x53\x69\x6d\x43\x61\x70\x61\x63\x69\x74\x79\x54\x61\x62\x6c\x65\x3a\x66\x61\x69\x6c\x21" "\n"
 );return result;}}return ZPB_DB_OK;}T_zPb_DbResult atPb_DropDb(){T_zPb_DbResult 
-result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xedc+4168-0x1f24)};result=
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x6b6+3712-0x1536)};result=
 atPb_ExecDbSql(ZTE_DROP_PBM_SQL,NULL,NULL);if(ZPB_DB_OK!=result){slog(PB_PRINT,
 SLOG_ERR,
 "\x61\x74\x50\x62\x5f\x44\x72\x6f\x70\x44\x62\x3a\x64\x65\x6c\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65\x20\x72\x65\x73\x75\x6c\x74\x20\x69\x73\x20\x25\x64" "\n"
@@ -51,7 +51,7 @@
 );return ZPB_DB_ERROR_INVALIDPTR;}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x73\x71\x6c\x69\x74\x65\x33\x5f\x6f\x70\x65\x6e\x20\x63\x61\x6c\x6c"
 );
-#if (0x668+8261-0x26ad)

+#if (0xe9c+1566-0x14ba)

 if(!fopen(ZPB_DB_PATH,"\x72")){file=fopen(ZPB_DB_PATH,"\x77");if(!file){printf(
 "\x75\x6e\x61\x62\x6c\x65\x20\x74\x6f\x20\x6f\x70\x65\x6e\x20\x20\x66\x69\x6c\x65\x20\x65\x74\x63\x5f\x72\x77\x2f\x70\x62\x6d\x2e\x64\x62" "\n"
 );}else{printf(
@@ -68,32 +68,32 @@
 "\x70\x62\x3a\x70\x62\x6d\x3a\x63\x61\x6e\x20\x6e\x6f\x74\x20\x63\x6c\x6f\x73\x65\x20\x64\x62"
 );return ZPB_DB_ERROR;}
 #ifdef WEBS_SECURITY

-if(access(ZPB_TMP_PATH,F_OK)==(0x495+8289-0x24f6)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZPB_TMP_PATH,F_OK)==(0x1454+1012-0x1848)){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x74\x6d\x70\x20\x64\x62\x20\x73\x74\x61\x79");if(
-remove(ZPB_TMP_PATH)!=(0x12f8+2070-0x1b0e)){slog(PB_PRINT,SLOG_ERR,
+remove(ZPB_TMP_PATH)!=(0x1243+2570-0x1c4d)){slog(PB_PRINT,SLOG_ERR,
 "\x72\x65\x6d\x6f\x76\x65\x20\x5a\x50\x42\x5f\x54\x4d\x50\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}}if(rename(ZPB_SEC_PATH,ZPB_TMP_PATH)!=(0xc5d+508-0xe59)){slog(PB_PRINT,
+);}}if(rename(ZPB_SEC_PATH,ZPB_TMP_PATH)!=(0xe59+660-0x10ed)){slog(PB_PRINT,
 SLOG_ERR,
 "\x72\x65\x6e\x61\x6d\x65\x20\x5a\x50\x42\x5f\x53\x45\x43\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}{char rnum_buf[(0x812+3434-0x1564)]={(0x787+701-0xa44)};char cmd[
-(0xca0+1786-0x131a)]={(0xf46+4906-0x2270)};sc_cfg_get(
+);}{char rnum_buf[(0xd47+5540-0x22d3)]={(0x41b+4704-0x167b)};char cmd[
+(0xfe0+1303-0x1477)]={(0x1831+1826-0x1f53)};sc_cfg_get(
 "\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(rnum_buf));snprintf(cmd,sizeof(
 cmd),
 "\x2f\x62\x69\x6e\x2f\x6f\x70\x65\x6e\x73\x73\x6c\x20\x65\x6e\x63\x20\x2d\x65\x20\x2d\x61\x65\x73\x32\x35\x36\x20\x2d\x73\x61\x6c\x74\x20\x2d\x69\x6e\x20\x25\x73\x20\x2d\x6f\x75\x74\x20\x25\x73\x20\x2d\x70\x61\x73\x73\x20\x70\x61\x73\x73\x3a\x25\x73"
 ,ZPB_DB_PATH,ZPB_SEC_PATH,rnum_buf);zxic_system(cmd);if(access(ZPB_SEC_PATH,F_OK
-)==(0x772+893-0xaef)){if(remove(ZPB_TMP_PATH)!=(0x1901+269-0x1a0e)){slog(
+)==(0x1142+5097-0x252b)){if(remove(ZPB_TMP_PATH)!=(0x504+6291-0x1d97)){slog(
 PB_PRINT,SLOG_ERR,
 "\x72\x65\x6d\x6f\x76\x65\x20\x5a\x50\x42\x5f\x54\x4d\x50\x5f\x50\x41\x54\x48\x31\x20\x66\x61\x69\x6c"
 );}}}
 #endif	

 return ZPB_DB_OK;}static check_sql_cmd(const char*pSql){if(pSql!=NULL){if(strstr
-(pSql,"\x3b")||strstr(pSql,"\x2d\x2d")){return(0x126+2169-0x99f);}return
-(0x18af+3376-0x25de);}return(0x617+4540-0x17d3);}T_zPb_DbResult atPb_ExecDbSql(
+(pSql,"\x3b")||strstr(pSql,"\x2d\x2d")){return(0xa6c+5617-0x205d);}return
+(0x17cf+1691-0x1e69);}return(0x33a+253-0x437);}T_zPb_DbResult atPb_ExecDbSql(
 const char*pSql,sqlite3_callback callback,VOID*pFvarg){sqlite3*pDb=NULL;CHAR 
-dbErrMsg[(0x3b2+7724-0x215e)]={(0x7a4+515-0x9a7)};if(NULL==pSql){return 
+dbErrMsg[(0x153b+1390-0x1a29)]={(0xe70+3127-0x1aa7)};if(NULL==pSql){return 
 ZPB_DB_ERROR_INVALIDPTR;}
 #ifdef WEBS_SECURITY

-if(check_sql_cmd(pSql)==(0xbd9+2906-0x1733)){slog(PB_PRINT,SLOG_ERR,
+if(check_sql_cmd(pSql)==(0x4a2+1585-0xad3)){slog(PB_PRINT,SLOG_ERR,
 "\x21\x21\x61\x74\x50\x62\x5f\x45\x78\x65\x63\x44\x62\x53\x71\x6c\x3a\x78\x73\x73\x20\x25\x73" "\n"
 ,pSql);return ZPB_DB_ERROR_INVALIDPTR;}
 #endif	

@@ -102,34 +102,33 @@
 );return ZPB_DB_ERROR_NOTOPENDB;}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x45\x78\x65\x63\x44\x62\x53\x71\x6c\x3a\x25\x73" "\n"
 ,pSql);if(sqlite3_exec(pDb,pSql,callback,pFvarg,NULL)){strncpy(dbErrMsg,
-sqlite3_errmsg(pDb),sizeof(dbErrMsg)-(0x1c3a+1688-0x22d1));slog(PB_PRINT,
-SLOG_ERR,
+sqlite3_errmsg(pDb),sizeof(dbErrMsg)-(0x57f+3453-0x12fb));slog(PB_PRINT,SLOG_ERR
+,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x63\x61\x6e\x20\x6e\x6f\x74\x20\x65\x78\x65\x63\x20\x73\x71\x6c\x2c\x73\x71\x6c\x69\x74\x65\x33\x5f\x65\x72\x72\x6d\x73\x67\x3a\x25\x73\x2e"
 ,dbErrMsg);(VOID)sqlite3_close(pDb);return ZPB_DB_ERROR;}(VOID)atPb_DbClose(pDb)
 ;return ZPB_DB_OK;}SINT32 atPb_InitApIndexCb(VOID*fvarg,int line,char**zresult,
-char**lname){SINT32 index=(0x1580+3250-0x2232);if((0x3d0+2889-0xf18)>line){slog(
-PB_PRINT,SLOG_ERR,
+char**lname){SINT32 index=(0x160d+2984-0x21b5);if((0x105c+2697-0x1ae4)>line){
+slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x49\x6e\x69\x74\x41\x70\x49\x6e\x64\x65\x78\x43\x62\x3a\x72\x65\x63\x6f\x72\x64\x20\x6e\x6f\x20\x64\x61\x74\x61\x2e" "\n"
-);return-(0x76d+6354-0x203e);}index=atoi(zresult[(0x1974+1619-0x1fc7)]);if(index
->ZPB_AP_MAX_RECORD){slog(PB_PRINT,SLOG_ERR,
+);return-(0x21a3+212-0x2276);}index=atoi(zresult[(0x4a7+340-0x5fb)]);if(index>
+ZPB_AP_MAX_RECORD){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x49\x6e\x69\x74\x41\x70\x49\x6e\x64\x65\x78\x43\x62\x3a\x69\x6e\x64\x65\x78\x20\x6f\x76\x65\x72\x66\x6c\x6f\x77\x2e" "\n"
-);return-(0x10b9+4216-0x2130);}slog(PB_PRINT,SLOG_DEBUG,
+);return-(0x9d0+1880-0x1127);}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x49\x6e\x69\x74\x41\x70\x49\x6e\x64\x65\x78\x43\x62\x3a\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3d\x25\x64" "\n"
-,index);g_zPb_ApIndex[index]=PBM_SUCCESS;return(0x1da6+140-0x1e32);}
-T_zPb_DbResult atPb_InitApIndex(){CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x533+8221-0x2550)};SINT32 i=(0xfc+7481-0x1e34);g_zPb_ApIndex[
-(0x398+1568-0x9b8)]=ZPB_AP_MAX_RECORD;for(i=(0x42d+7842-0x22ce);i<=g_zPb_ApIndex
-[(0xda4+6464-0x26e4)];i++){g_zPb_ApIndex[i]=PBM_ERROR_NOT_FOUND;}snprintf(sql,
-sizeof(sql),
+,index);g_zPb_ApIndex[index]=PBM_SUCCESS;return(0xef6+3595-0x1d01);}
+T_zPb_DbResult atPb_InitApIndex(){CHAR sql[ZPB_MAX_BYTES_DB]={(0xf18+352-0x1078)
+};SINT32 i=(0x11b+650-0x3a4);g_zPb_ApIndex[(0xf3b+2476-0x18e7)]=
+ZPB_AP_MAX_RECORD;for(i=(0xbb7+1445-0x115b);i<=g_zPb_ApIndex[(0x140+5773-0x17cd)
+];i++){g_zPb_ApIndex[i]=PBM_ERROR_NOT_FOUND;}snprintf(sql,sizeof(sql),
 "\x73\x65\x6c\x65\x63\x74\x20\x50\x62\x6d\x5f\x69\x6e\x64\x65\x78\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_AP);return atPb_ExecDbSql(sql,atPb_InitApIndexCb,
-ZUFI_NULL);}INT zte_pbm_check_and_creat_dir(char*path){if(-(0x1e10+453-0x1fd4)==
-access(path,(0xf90+3435-0x1cfb))){slog(PB_PRINT,SLOG_DEBUG,
+ZUFI_NULL);}INT zte_pbm_check_and_creat_dir(char*path){if(-(0x15d8+2988-0x2183)
+==access(path,(0x4b5+2731-0xf60))){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x25\x73\x20\x64\x6f\x65\x73\x20\x6e\x6f\x74\x20\x65\x78\x69\x73\x74\x2c\x73\x6f\x63\x72\x65\x61\x74\x65\x20\x69\x74\x2e" "\n"
-,ZPB_DB_DIR);if(-(0x9d2+5477-0x1f36)==mkdir(path,(0x1546+4406-0x247d))){slog(
+,ZPB_DB_DIR);if(-(0x1079+2816-0x1b78)==mkdir(path,(0x117b+4584-0x2164))){slog(
 PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x3a\x66\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x63\x72\x65\x61\x74\x65\x20\x64\x62\x20\x64\x69\x72\x2e" "\n"
-);return-(0x12e7+2106-0x1b20);}}return(0x60b+5666-0x1c2d);}UINT8 
+);return-(0x6e5+3517-0x14a1);}}return(0x1085+1221-0x154a);}UINT8 
 zte_pbm_check_web_pbm_dir(VOID){
 #ifdef _MBB_OS_UCLINUX

 (VOID)zte_pbm_check_and_creat_dir(
@@ -143,21 +142,21 @@
 "\x2f\x65\x74\x63\x5f\x72\x77\x2f\x63\x6f\x6e\x66\x69\x67");
 #endif

 return ZUFI_SUCC;}T_zPb_DbResult atPb_DelSimRecFromPbTable(SINT32 index){
-T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x6fc+6995-0x224f)}
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x22ba+595-0x250d)}
 ;snprintf(sql,sizeof(sql),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x20\x61\x6e\x64\x20\x50\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM,index);result=atPb_ExecDbSql(sql,NULL,NULL);
 if(ZPB_DB_OK==result){g_zPb_SimIndex[index]=PBM_ERROR_NOT_FOUND;}return result;}
 T_zPb_DbResult atPb_LoadARecToPbmTable(T_zPb_WebContact*pbPara){T_zPb_DbResult 
-result=ZPB_DB_ERROR;CHAR sql[ZPB_MAX_BYTES_DB]={(0x444+723-0x717)};if(NULL==
+result=ZPB_DB_ERROR;CHAR sql[ZPB_MAX_BYTES_DB]={(0x18ac+335-0x19fb)};if(NULL==
 pbPara){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x4c\x6f\x61\x64\x41\x52\x65\x63\x54\x6f\x50\x62\x6d\x54\x61\x62\x6c\x65\x3a\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74"
 );return ZPB_DB_ERROR_INVALIDPTR;}snprintf(sql,sizeof(sql),"insert into %s (Pbm_index,Location,Number,Type,Name,Anr,Anr1,Email,Sne) \

 			values(\'%d\',\'%d\',\'%s\',\'%d\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\')",ZPB_DB_PBM_TABLE,pbPara->pbIndex,pbPara->pbLocation,pbPara->mobilNumber,pbPara
 ->pbType,pbPara->name,pbPara->homeNumber,pbPara->officeNumber,pbPara->email,
 pbPara->sne);result=atPb_ExecDbSql(sql,NULL,NULL);if(ZPB_DB_OK==result){CHAR 
-pbMax[(0x479+1752-0xb1f)]={(0x34c+1278-0x84a)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,
-pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x74d+1519-0xd3b))&&(pbPara->pbIndex
+pbMax[(0x458+6354-0x1cf8)]={(0xf19+4598-0x210f)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,
+pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x530+5632-0x1b2f))&&(pbPara->pbIndex
 <=atoi(pbMax))){g_zPb_SimIndex[pbPara->pbIndex]=PBM_SUCCESS;}(VOID)sc_cfg_set(
 ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
 ZPB_NEW_ERROR);}slog(PB_PRINT,SLOG_DEBUG,
@@ -174,17 +173,17 @@
 pbmPara->pbType,pbmPara->name,pbmPara->homeNumber,pbmPara->officeNumber,pbmPara
 ->email,pbmPara->sne,pbmPara->group,pbmPara->pbId);}}T_zPb_DbResult 
 atPb_DbGetParamCb(VOID*fvarg,int line,char**zresult,char**lname){T_zPb_Header 
-para={(0x1705+983-0x1adc)};if((0x243c+473-0x2614)>line){slog(PB_PRINT,SLOG_ERR,
+para={(0x93c+2047-0x113b)};if((0xb48+4277-0x1bfc)>line){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x44\x62\x47\x65\x74\x50\x61\x72\x61\x6d\x43\x62\x3a\x72\x65\x63\x6f\x72\x64\x20\x6e\x6f\x20\x64\x61\x74\x61\x2e"
-);return ZPB_DB_ERROR;}para.pbIndex=atoi(zresult[(0xcf1+1585-0x1322)]);para.
-pbLocation=atoi(zresult[(0x656+5381-0x1b5a)]);slog(PB_PRINT,SLOG_DEBUG,
+);return ZPB_DB_ERROR;}para.pbIndex=atoi(zresult[(0xf15+2902-0x1a6b)]);para.
+pbLocation=atoi(zresult[(0xbff+6501-0x2563)]);slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x44\x62\x47\x65\x74\x50\x61\x72\x61\x6d\x43\x62\x3a\x20\x69\x6e\x64\x65\x78\x3d\x25\x64\x2c\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,para.pbIndex,para.pbLocation);memcpy(fvarg,&para,sizeof(para));return ZPB_DB_OK
 ;}T_zPb_DbResult atPb_GetIndexLocationById(T_zPb_Header*pbPara){CHAR sql[
-ZPB_MAX_BYTES_DB]={(0x1812+2905-0x236b)};snprintf(sql,sizeof(sql)-
-(0x357+2833-0xe67),
+ZPB_MAX_BYTES_DB]={(0x1036+1905-0x17a7)};snprintf(sql,sizeof(sql)-
+(0xdc5+395-0xf4f),
 "\x73\x65\x6c\x65\x63\x74\x20\x50\x62\x6d\x5f\x69\x6e\x64\x65\x78\x2c\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x69\x64\x3d\x25\x64"
-,ZPB_DB_PBM_TABLE,pbPara->pbId);memset(pbPara,(0xe9a+122-0xf14),sizeof(
+,ZPB_DB_PBM_TABLE,pbPara->pbId);memset(pbPara,(0xe49+1242-0x1323),sizeof(
 T_zPb_Header));return atPb_ExecDbSql(sql,atPb_DbGetParamCb,pbPara);}VOID 
 atPb_SqlNewOneRec(T_zPb_WebContact*pbmPara,CHAR*sql,int len){if(
 ZPB_LOCATION_USIM==pbmPara->pbLocation){snprintf(sql,len,"insert into %s (Pbm_index,Location,Number,Type,Name,Anr,Anr1,Email,Sne)\

@@ -196,8 +195,8 @@
 pbmPara->pbType,pbmPara->name,pbmPara->homeNumber,pbmPara->officeNumber,pbmPara
 ->email,pbmPara->sne,pbmPara->group);}}T_zPb_DbResult 
 atPb_WriteContactToPbmTable(T_zPb_WebContact*pPbRecord,BOOL pbNewFlag){
-T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x10a8+5161-0x24d1)
-};if(NULL==pPbRecord){slog(PB_PRINT,SLOG_ERR,
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1cc+5749-0x1841)}
+;if(NULL==pPbRecord){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x57\x72\x69\x74\x65\x43\x6f\x6e\x74\x61\x63\x74\x54\x6f\x50\x62\x6d\x54\x61\x62\x6c\x65\x3a\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74"
 );return ZPB_DB_ERROR_INVALIDPTR;}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x57\x72\x69\x74\x65\x43\x6f\x6e\x74\x61\x63\x74\x54\x6f\x50\x62\x6d\x54\x61\x62\x6c\x65\x3a\x69\x6e\x70\x75\x74\x20\x69\x6e\x64\x65\x78\x20\x69\x73\x20\x25\x64\x2c\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64" "\n"
@@ -207,75 +206,75 @@
 ZPB_LOCATION_USIM==pPbRecord->pbLocation){g_zPb_SimIndex[(pPbRecord->pbIndex)]=
 PBM_SUCCESS;}else if(ZPB_LOCATION_AP==pPbRecord->pbLocation){g_zPb_ApIndex[(
 pPbRecord->pbIndex)]=PBM_SUCCESS;}}return result;}SINT32 atPb_DbCountTableLineCb
-(VOID*fvarg,int line,char**zresult,char**lname){if((0xea9+3232-0x1b48)>line){
+(VOID*fvarg,int line,char**zresult,char**lname){if((0x1c13+1240-0x20ea)>line){
 slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x72\x65\x63\x6f\x72\x64\x20\x6e\x6f\x20\x64\x61\x74\x61\x2e"
-);return-(0x4e2+3495-0x1288);}*(int*)fvarg=atoi(zresult[(0x162+2244-0xa26)]);
-return(0x1191+4797-0x244e);}T_zPb_DbResult atPb_SetSimCapacityTable(
+);return-(0x2ec+17-0x2fc);}*(int*)fvarg=atoi(zresult[(0x975+2096-0x11a5)]);
+return(0x13fa+2923-0x1f65);}T_zPb_DbResult atPb_SetSimCapacityTable(
 T_zPb_UsimCapacity pbPara){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0xefa+217-0xfd3)};UINT32 count=(0xdc8+2094-0x15f6);snprintf(
-sql,sizeof(sql)-(0x1e31+1092-0x2274),
+ZPB_MAX_BYTES_DB]={(0x35a+7764-0x21ae)};UINT32 count=(0x98b+3388-0x16c7);
+snprintf(sql,sizeof(sql)-(0xc23+5388-0x212e),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73"
 ,ZPB_DB_SIM_CAPABILITY_TABLE);(VOID)atPb_ExecDbSql(sql,atPb_DbCountTableLineCb,&
-count);if((0x5+1418-0x58f)<count){memset(sql,(0x1815+3764-0x26c9),sizeof(sql));
-snprintf(sql,sizeof(sql)-(0xbd6+5094-0x1fbb),
+count);if((0x366+1247-0x845)<count){memset(sql,(0x398+3056-0xf88),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0x12fc+1281-0x17fc),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x53\x69\x6d\x5f\x74\x79\x70\x65\x3e\x3d\x30"
 ,ZPB_DB_SIM_CAPABILITY_TABLE);result=atPb_ExecDbSql(sql,NULL,NULL);if(ZPB_DB_OK
 !=result){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x53\x65\x74\x53\x69\x6d\x43\x61\x70\x61\x63\x69\x74\x79\x54\x61\x62\x6c\x65\x3a\x66\x61\x69\x6c\x21" "\n"
-);return result;}}memset(sql,(0x102b+1773-0x1718),sizeof(sql));snprintf(sql,
-sizeof(sql)-(0x1cc+2307-0xace),"insert into %s (Sim_type,Max_record_number,Used_record_number,Max_number_len,Max_name_len,Max_anr_len,Max_anr1_len, \

+);return result;}}memset(sql,(0xd81+1694-0x141f),sizeof(sql));snprintf(sql,
+sizeof(sql)-(0x9dc+1126-0xe41),"insert into %s (Sim_type,Max_record_number,Used_record_number,Max_number_len,Max_name_len,Max_anr_len,Max_anr1_len, \

 	          Max_email_len,Max_sne_len) values(\'%d\',\'%d\',\'%d\',\'%d\',\'%d\',\'%d\',\'%d\',\'%d\',\'%d\')",ZPB_DB_SIM_CAPABILITY_TABLE,pbPara.simType,pbPara.maxRecordNum,pbPara.
 usedRecordNum,pbPara.maxNumberLen,pbPara.maxNameLen,pbPara.maxAnrLen,pbPara.
 maxAnr1Len,pbPara.maxEmailLen,pbPara.maxSneLen);slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x53\x65\x74\x53\x69\x6d\x43\x61\x70\x61\x63\x69\x74\x79\x54\x61\x62\x6c\x65\x3a\x6f\x6b\x21" "\n"
 );return atPb_ExecDbSql(sql,NULL,NULL);}T_zPb_DbResult atPb_SetApCapacityTable()
-{T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x717+5420-0x1c43)
-};SINT32 count=(0xb4f+2901-0x16a4);T_zPb_ApCapacity pbPara={(0x93d+5895-0x2044)}
-;snprintf(sql,sizeof(sql)-(0x1eb+8188-0x21e6),
+{T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x2471+605-0x26ce)
+};SINT32 count=(0x59f+771-0x8a2);T_zPb_ApCapacity pbPara={(0x11d9+163-0x127c)};
+snprintf(sql,sizeof(sql)-(0x2309+712-0x25d0),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73"
 ,ZPB_DB_DEVICE_CAPABILITY_TABLE);(VOID)atPb_ExecDbSql(sql,
-atPb_DbCountTableLineCb,&count);if((0x4e9+5762-0x1b6b)<count){memset(sql,
-(0xf9d+5803-0x2648),sizeof(sql));snprintf(sql,sizeof(sql)-(0x21cf+571-0x2409),
+atPb_DbCountTableLineCb,&count);if((0xc93+6392-0x258b)<count){memset(sql,
+(0x1a2+4701-0x13ff),sizeof(sql));snprintf(sql,sizeof(sql)-(0x104f+3963-0x1fc9),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73",
 ZPB_DB_DEVICE_CAPABILITY_TABLE);result=atPb_ExecDbSql(sql,NULL,NULL);if(
 ZPB_DB_OK!=result){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x53\x65\x74\x41\x70\x43\x61\x70\x61\x63\x69\x74\x79\x54\x61\x62\x6c\x65\x3a\x66\x61\x69\x6c\x21" "\n"
-);return result;}}memset(sql,(0x9e2+993-0xdc3),sizeof(sql));snprintf(sql,sizeof(
-sql)-(0xe2c+2175-0x16aa),
+);return result;}}memset(sql,(0x64+3006-0xc22),sizeof(sql));snprintf(sql,sizeof(
+sql)-(0x1c79+542-0x1e96),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_AP);result=atPb_ExecDbSql(sql,
 atPb_DbCountTableLineCb,&count);if(ZPB_DB_OK==result){pbPara.usedRecordNum=count
 ;pbPara.maxRecordNum=ZPB_AP_MAX_RECORD;}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x6d\x61\x78\x5f\x72\x65\x63\x5f\x6e\x75\x6d\x3d\x25\x64\x2c\x75\x73\x65\x64\x3d\x25\x64"
-,pbPara.maxRecordNum,pbPara.usedRecordNum);memset(sql,(0x944+1349-0xe89),sizeof(
-sql));snprintf(sql,sizeof(sql)-(0x978+6508-0x22e3),
+,pbPara.maxRecordNum,pbPara.usedRecordNum);memset(sql,(0x10e4+1044-0x14f8),
+sizeof(sql));snprintf(sql,sizeof(sql)-(0xd1f+3442-0x1a90),
 "\x69\x6e\x73\x65\x72\x74\x20\x69\x6e\x74\x6f\x20\x25\x73\x20\x28\x4d\x61\x78\x5f\x72\x65\x63\x6f\x72\x64\x5f\x6e\x75\x6d\x62\x65\x72\x2c\x55\x73\x65\x64\x5f\x72\x65\x63\x6f\x72\x64\x5f\x6e\x75\x6d\x62\x65\x72\x29\x20\x76\x61\x6c\x75\x65\x73\x28" "\'" "\x25\x64" "\'" "\x2c" "\'" "\x25\x64" "\'" "\x29"
 ,ZPB_DB_DEVICE_CAPABILITY_TABLE,pbPara.maxRecordNum,pbPara.usedRecordNum);return
  atPb_ExecDbSql(sql,NULL,NULL);}T_zPb_DbResult atPb_DbGetIndexByGroupCb(VOID*
 fvarg,int line,char**zresult,char**lname){T_zPb_ApIndex*pbIndex=NULL;int i=
-(0x919+5547-0x1ec4);if((0x15b+1087-0x599)>line){return ZPB_DB_ERROR;}pbIndex=(
+(0x1b70+2459-0x250b);if((0x4f6+2626-0xf37)>line){return ZPB_DB_ERROR;}pbIndex=(
 T_zPb_ApIndex*)fvarg;i=pbIndex->count;slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x44\x62\x47\x65\x74\x49\x6e\x64\x65\x78\x42\x79\x47\x72\x6f\x75\x70\x43\x62\x20\x65\x6e\x74\x65\x72\x2c\x69\x3d\x25\x64" "\n"
-,i);pbIndex->apIndex[i+(0x1562+3785-0x242a)]=atoi(zresult[(0x118f+4164-0x21d3)])
-;slog(PB_PRINT,SLOG_DEBUG,
+,i);pbIndex->apIndex[i+(0x5a0+8366-0x264d)]=atoi(zresult[(0xb81+927-0xf20)]);
+slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x67\x65\x74\x5f\x69\x6e\x64\x65\x78\x5f\x62\x79\x5f\x67\x72\x6f\x75\x70\x5f\x63\x62\x3a\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3d\x25\x64"
-,pbIndex->apIndex[i+(0x1a12+1022-0x1e0f)]);pbIndex->count=i+(0x200+515-0x402);
+,pbIndex->apIndex[i+(0xef1+4044-0x1ebc)]);pbIndex->count=i+(0x10b2+4270-0x215f);
 slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x67\x65\x74\x5f\x69\x6e\x64\x65\x78\x5f\x62\x79\x5f\x67\x72\x6f\x75\x70\x5f\x63\x62\x3a\x70\x62\x6d\x20\x63\x6f\x75\x6e\x74\x20\x69\x73\x20\x25\x64"
 ,pbIndex->count);return ZPB_DB_OK;}T_zPb_DbResult atPb_DelRecFromPbmTableByGroup
 (T_zPb_ApIndex*index){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]
-={(0x121+7649-0x1f02)};SINT32 countByGroup=(0x130+5295-0x15df);CHAR pbGroup[
-ZPB_PARAM_SIZE20]={(0x13f6+4112-0x2406)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
-pbGroup));snprintf(sql,sizeof(sql)-(0x1105+2679-0x1b7b),
+={(0x2165+513-0x2366)};SINT32 countByGroup=(0xbb0+2025-0x1399);CHAR pbGroup[
+ZPB_PARAM_SIZE20]={(0x57d+6916-0x2081)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
+pbGroup));snprintf(sql,sizeof(sql)-(0x1d5c+744-0x2043),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x20\x61\x6e\x64\x20\x28\x50\x62\x6d\x5f\x67\x72\x6f\x75\x70\x3d" "\"" "\x25\x73" "\"" "\x29"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_AP,pbGroup);(VOID)atPb_ExecDbSql(sql,
-atPb_DbCountTableLineCb,&countByGroup);memset(sql,(0x330+1974-0xae6),sizeof(sql)
-);snprintf(sql,sizeof(sql)-(0xef8+5859-0x25da),
+atPb_DbCountTableLineCb,&countByGroup);memset(sql,(0x430+5418-0x195a),sizeof(sql
+));snprintf(sql,sizeof(sql)-(0xb7b+1785-0x1273),
 "\x73\x65\x6c\x65\x63\x74\x20\x50\x62\x6d\x5f\x69\x6e\x64\x65\x78\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x20\x61\x6e\x64\x20\x28\x50\x62\x6d\x5f\x67\x72\x6f\x75\x70\x3d" "\"" "\x25\x73" "\"" "\x29"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_AP,pbGroup);result=atPb_ExecDbSql(sql,
 atPb_DbGetIndexByGroupCb,index);if(countByGroup==index->count){memset(sql,
-(0xe82+4909-0x21af),sizeof(sql));snprintf(sql,sizeof(sql)-(0x672+7345-0x2322),
+(0x221+5595-0x17fc),sizeof(sql));snprintf(sql,sizeof(sql)-(0x8b4+451-0xa76),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x20\x61\x6e\x64\x20\x28\x50\x62\x6d\x5f\x67\x72\x6f\x75\x70\x3d" "\"" "\x25\x73" "\"" "\x29"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_AP,pbGroup);if(ZPB_DB_OK==atPb_ExecDbSql(sql,NULL
 ,NULL)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);}slog(PB_PRINT,
@@ -283,7 +282,7 @@
 "\x70\x62\x3a\x70\x62\x6d\x3a\x65\x78\x65\x63\x20\x74\x61\x62\x6c\x65\x20\x25\x73\x20\x72\x65\x73\x75\x6c\x74\x20\x25\x64" "\n"
 ,ZPB_DB_PBM_TABLE,result);}else{return ZPB_DB_ERROR;}(VOID)sc_cfg_set(
 ZPB_NV_GROUP,"");return result;}VOID atPb_GetLocationIndexForDel(T_zPb_DelInfo*
-recData,SINT32 delTime){T_zPb_Header pbHeader={(0x4b6+4490-0x1640)};if(NULL==
+recData,SINT32 delTime){T_zPb_Header pbHeader={(0x357+2698-0xde1)};if(NULL==
 recData){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x47\x65\x74\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x49\x6e\x64\x65\x78\x46\x6f\x72\x44\x65\x6c\x2d\x2d\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74" "\n"
 );return;}pbHeader.pbId=recData->delId[delTime];if(ZPB_DB_OK!=
@@ -294,30 +293,30 @@
 "\x70\x62\x3a\x70\x62\x6d\x3a\x64\x65\x6c\x20\x69\x6e\x64\x65\x78\x3d\x25\x64\x2c\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x2c\x64\x65\x6c\x5f\x70\x62\x6d\x5f\x74\x69\x6d\x65\x3d\x25\x64"
 ,recData->delIndex[delTime],recData->delLocation,delTime);}T_zPb_DbResult 
 atPb_DelARecFromPbmTable(T_zPb_DelInfo*pbPara,SINT32 delTime){T_zPb_DbResult 
-result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x976+1066-0xda0)};if(NULL==pbPara
-){slog(PB_PRINT,SLOG_ERR,
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x420+8520-0x2568)};if(NULL==
+pbPara){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x70\x62\x6d\x3a\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74"
 );return ZPB_DB_ERROR_INVALIDPTR;}atPb_GetLocationIndexForDel(pbPara,delTime);
 slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x44\x65\x6c\x41\x52\x65\x63\x46\x72\x6f\x6d\x50\x62\x6d\x54\x61\x62\x6c\x65\x20\x65\x6e\x74\x65\x72\x2c\x64\x65\x6c\x54\x69\x6d\x65\x3d\x25\x64\x2c\x69\x64\x3d\x25\x64" "\n"
-,delTime,pbPara->delId[delTime]);snprintf(sql,sizeof(sql)-(0x21d8+416-0x2377),
+,delTime,pbPara->delId[delTime]);snprintf(sql,sizeof(sql)-(0x133c+2853-0x1e60),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x69\x64\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,pbPara->delId[delTime]);result=atPb_ExecDbSql(sql,NULL,NULL);
 if(ZPB_DB_OK==result){if(ZPB_LOCATION_AP==pbPara->delLocation){g_zPb_ApIndex[(
 pbPara->delIndex[delTime])]=PBM_ERROR_NOT_FOUND;}else if(ZPB_LOCATION_USIM==
 pbPara->delLocation){g_zPb_SimIndex[(pbPara->delIndex[delTime])]=
 PBM_ERROR_NOT_FOUND;}}return result;}VOID atPb_ClearSimPbmIndexArray(VOID){
-SINT32 i=(0x19c+7875-0x205e);for(i=(0xe4f+1690-0x14e8);(i<=g_zPb_SimIndex[
-(0xc5a+729-0xf33)])&&(i<(ZPB_SIM_MAX_RECORD+(0xa10+3234-0x16b1)));i++){
+SINT32 i=(0x1b9+1726-0x876);for(i=(0x11c3+3826-0x20b4);(i<=g_zPb_SimIndex[
+(0x174+7414-0x1e6a)])&&(i<(ZPB_SIM_MAX_RECORD+(0x7f8+1379-0xd5a)));i++){
 g_zPb_SimIndex[i]=PBM_ERROR_NOT_FOUND;}}VOID atPb_ClearApPbmIndexArray(VOID){
-SINT32 i=(0x455+7799-0x22cb);for(i=(0xf70+536-0x1187);(i<=g_zPb_ApIndex[
-(0x41f+3011-0xfe2)])&&(i<(ZPB_AP_MAX_RECORD+(0xb47+88-0xb9e)));i++){
+SINT32 i=(0x1d2+9214-0x25cf);for(i=(0x1f28+1922-0x26a9);(i<=g_zPb_ApIndex[
+(0x162b+3239-0x22d2)])&&(i<(ZPB_AP_MAX_RECORD+(0x454+340-0x5a7)));i++){
 g_zPb_ApIndex[i]=PBM_ERROR_NOT_FOUND;}}T_zPb_DbResult 
 atPb_DelAllRecsFromPbmTable(T_zPb_DelInfo*pbPara){T_zPb_DbResult result=
-ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xf41+5972-0x2695)};if(NULL==pbPara){slog
+ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1010+448-0x11d0)};if(NULL==pbPara){slog
 (PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x44\x65\x6c\x41\x6c\x6c\x52\x65\x63\x73\x46\x72\x6f\x6d\x50\x62\x6d\x54\x61\x62\x6c\x65\x3a\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74" "\n"
-);return ZPB_DB_ERROR_INVALIDPTR;}snprintf(sql,sizeof(sql)-(0xd52+1368-0x12a9),
+);return ZPB_DB_ERROR_INVALIDPTR;}snprintf(sql,sizeof(sql)-(0x5fc+4099-0x15fe),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,pbPara->delLocation);result=atPb_ExecDbSql(sql,NULL,NULL);slog
 (PB_PRINT,SLOG_DEBUG,
diff --git a/ap/app/zte_comm/phonebook/src/pb_main.c b/ap/app/zte_comm/phonebook/src/pb_main.c
index 1b5ce63..f9c4ad9 100755
--- a/ap/app/zte_comm/phonebook/src/pb_main.c
+++ b/ap/app/zte_comm/phonebook/src/pb_main.c
@@ -7,9 +7,9 @@
 VOID(*func_ptr)(UINT8*pDatabuf);BOOL need_block;}T_zPbHandleTable;VOID 
 atWeb_AddOneContact(UINT8*pDatabuf);VOID atWeb_DelOneContact(UINT8*pDatabuf);
 VOID atWeb_DelMultiContact(UINT8*pDatabuf);VOID atWeb_DelAllContact(UINT8*
-pDatabuf);T_zPb_optRsp g_PbOptRsp={(0x1e2+8116-0x2196)};sem_t g_Pb_sem_id={
-(0x21dd+27-0x21f8)};int g_zPb_MsqId=-(0x5c4+5602-0x1ba5);int g_zPb_LocalMsqId=-
-(0x1672+2698-0x20fb);VOID atWeb_AddOneContact(UINT8*pDatabuf){T_zPb_WebContact*
+pDatabuf);T_zPb_optRsp g_PbOptRsp={(0x759+6806-0x21ef)};sem_t g_Pb_sem_id={
+(0x1713+2274-0x1ff5)};int g_zPb_MsqId=-(0x12b+1961-0x8d3);int g_zPb_LocalMsqId=-
+(0x17e0+463-0x19ae);VOID atWeb_AddOneContact(UINT8*pDatabuf){T_zPb_WebContact*
 webPbContact=NULL;if(pDatabuf==NULL){printf(
 "\x5b\x70\x62\x5d\x2c\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x43\x6f\x6e\x74\x61\x63\x74\x20\x70\x61\x72\x61\x20\x69\x73\x20\x6e\x75\x6c\x6c" "\n"
 );return;}webPbContact=(T_zPb_WebContact*)pDatabuf;atWeb_AddOnePb(webPbContact,
@@ -35,21 +35,23 @@
 zPb_RecvZpbicInd(UINT8*pDatabuf){T_zAt_ZpbicRes*ptPara=ZUFI_NULL;if(pDatabuf==
 NULL){return;}ptPara=(T_zAt_ZpbicRes*)(pDatabuf);printf(
 "\x7a\x50\x62\x5f\x52\x65\x63\x76\x5a\x70\x62\x69\x63\x49\x6e\x64\x20\x70\x61\x72\x61\x2c\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2c\x20\x74\x79\x70\x65\x3a\x25\x64" "\n"
-,ptPara->result,ptPara->opertype);if(((0x14e0+3581-0x22dc)==ptPara->result)&&(
-(0x3d6+8579-0x2558)==ptPara->opertype)){CHAR needPb[(0x505+4677-0x1718)]={
-(0x3d5+7751-0x221c)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
-(0x620+7307-0x22ab)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
-MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0x142+3776-0x1002),NULL,(0xa0+626-0x312));}
-}}VOID zPb_RecvZuslotInd(UINT8*pDatabuf){T_zAt_ZuslotRes*ptPara=ZUFI_NULL;if(
-pDatabuf==NULL){return;}ptPara=(T_zAt_ZuslotRes*)(pDatabuf);printf(
+,ptPara->result,ptPara->opertype);if(((0x17a1+1296-0x1cb0)==ptPara->result)&&(
+(0xc09+5753-0x2281)==ptPara->opertype)){CHAR needPb[(0x328+6323-0x1ba9)]={
+(0x160c+169-0x16b5)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
+(0x8b7+6906-0x23b1)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
+MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0x2041+1085-0x247e),NULL,
+(0x1f93+450-0x2155));}}}VOID zPb_RecvZuslotInd(UINT8*pDatabuf){T_zAt_ZuslotRes*
+ptPara=ZUFI_NULL;if(pDatabuf==NULL){return;}ptPara=(T_zAt_ZuslotRes*)(pDatabuf);
+printf(
 "\x7a\x50\x62\x5f\x52\x65\x63\x76\x5a\x70\x62\x69\x63\x49\x6e\x64\x20\x70\x61\x72\x61\x2c\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2c\x20\x74\x79\x70\x65\x3a\x25\x64" "\n"
-,ptPara->slot,ptPara->slot_state);if(ptPara->slot_state==(0xe11+993-0x11f2)){
-CHAR needPb[(0x11df+3705-0x2026)]={(0xa13+6299-0x22ae)};sc_cfg_get(
-NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if((0x24fa+492-0x26e6)!=strcmp(needPb,
+,ptPara->slot,ptPara->slot_state);if(ptPara->slot_state==(0x1119+2859-0x1c44)){
+CHAR needPb[(0x193f+669-0x1baa)]={(0xaa7+969-0xe70)};sc_cfg_get(
+NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if((0x781+5876-0x1e75)!=strcmp(needPb,
 "\x6e\x6f")){atPb_CfgPbNvInit();atPb_DelAllRecsSimDb();}}}VOID zPb_RecvPbInitRst
-(UINT8*pDatabuf){int pbReadRet=-(0x71f+601-0x977);memcpy(&g_PbOptRsp,pDatabuf,
-sizeof(T_zPb_optRsp));if(g_PbOptRsp.result==-(0x73c+6144-0x1f3b)){atPb_IintPbErr
-(NULL);return;}pbReadRet=atPb_SendScpbrSet_repeat(g_Pb_sem_id);printf(
+(UINT8*pDatabuf){int pbReadRet=-(0x166c+506-0x1865);memcpy(&g_PbOptRsp,pDatabuf,
+sizeof(T_zPb_optRsp));if(g_PbOptRsp.result==-(0x1846+3131-0x2480)){
+atPb_IintPbErr(NULL);return;}pbReadRet=atPb_SendScpbrSet_repeat(g_Pb_sem_id);
+printf(
 "\x7a\x50\x62\x5f\x52\x65\x63\x76\x50\x62\x49\x6e\x69\x74\x52\x73\x74\x20\x72\x65\x73\x75\x6c\x74\x3a\x25\x64" "\n"
 ,pbReadRet);sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);}void zPbLocalHandleWebMsg(
 MSG_BUF*ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
@@ -64,18 +66,18 @@
 ,ptMsgBuf->usMsgCmd);switch(ptMsgBuf->usMsgCmd){case MSG_CMD_WRITE_PB:case 
 MSG_CMD_DEL_A_PB:case MSG_CMD_DEL_MUTI_PB:case MSG_CMD_DEL_ALL_PB:
 ipc_send_message(MODULE_ID_PB,MODULE_ID_PB_LOCAL,ptMsgBuf->usMsgCmd,ptMsgBuf->
-usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,(0x1e58+990-0x2236));break;
+usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,(0x1a51+1598-0x208f));break;
 default:break;}}UINT8 zPbMsgCreat(VOID){g_zPb_MsqId=msgget(MODULE_ID_PB,
-IPC_CREAT|(0x12a2+4033-0x20e3));if(g_zPb_MsqId==-(0x814+6354-0x20e5)){return 
+IPC_CREAT|(0x554+8688-0x25c4));if(g_zPb_MsqId==-(0xb5d+218-0xc36)){return 
 ZUFI_FAIL;}g_zPb_LocalMsqId=msgget(MODULE_ID_PB_LOCAL,IPC_CREAT|
-(0xf5c+2212-0x1680));if(g_zPb_LocalMsqId==-(0x427+6497-0x1d87)){return ZUFI_FAIL
-;}sem_init(&g_Pb_sem_id,(0xd0c+476-0xee8),(0x53+5430-0x1589));return ZUFI_SUCC;}
-void detect_modem_state(void){CHAR state[(0x10c5+5144-0x24ab)]={
-(0x1608+4236-0x2694)};sc_cfg_get(
+(0x1da6+1688-0x22be));if(g_zPb_LocalMsqId==-(0xe13+2048-0x1612)){return 
+ZUFI_FAIL;}sem_init(&g_Pb_sem_id,(0x25f+5306-0x1719),(0x1ecf+1878-0x2625));
+return ZUFI_SUCC;}void detect_modem_state(void){CHAR state[(0x11bf+3351-0x1ea4)]
+={(0x3d2+8465-0x24e3)};sc_cfg_get(
 "\x6d\x6f\x64\x65\x6d\x5f\x6d\x61\x69\x6e\x5f\x73\x74\x61\x74\x65",state,sizeof(
-state));if((0x700+4376-0x1818)==strcmp(state,
+state));if((0xb97+3910-0x1add)==strcmp(state,
 "\x6d\x6f\x64\x65\x6d\x5f\x73\x69\x6d\x5f\x75\x6e\x64\x65\x74\x65\x63\x74\x65\x64"
-)||(0x1388+2156-0x1bf4)==strcmp(state,
+)||(0xcc1+2073-0x14da)==strcmp(state,
 "\x6d\x6f\x64\x65\x6d\x5f\x73\x69\x6d\x5f\x64\x65\x73\x74\x72\x6f\x79")){
 sc_cfg_set("\x70\x62\x6d\x5f\x69\x6e\x69\x74\x5f\x66\x6c\x61\x67","\x30");}}void
  zPbLocalHandleAtctlMsg(MSG_BUF*ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
@@ -94,28 +96,28 @@
 MSG_CMD_ZUSLOT_IND:zPb_RecvZuslotInd(ptMsgBuf->aucDataBuf);break;case 
 MSG_CMD_PBINIT_RSP:ipc_send_message(MODULE_ID_PB,MODULE_ID_PB_LOCAL,ptMsgBuf->
 usMsgCmd,ptMsgBuf->usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,
-(0x6d+7424-0x1d6d));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR 
-clearPb[(0x4c5+4872-0x179b)]={(0x5ff+6867-0x20d2)};sc_cfg_get(
+(0x1707+2799-0x21f6));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR 
+clearPb[(0x622+5198-0x1a3e)]={(0xc43+5961-0x238c)};sc_cfg_get(
 NV_CLEAR_PB_WHEN_RESTORE,clearPb,sizeof(clearPb));printf(
 "\x61\x74\x57\x65\x62\x5f\x52\x65\x73\x74\x6f\x72\x65\x46\x61\x63\x74\x6f\x72\x79\x53\x65\x74\x74\x69\x6e\x67\x20\x65\x6e\x74\x65\x72\x65\x64\x21\x20" "\n"
 );printf(
 "\x63\x6c\x65\x61\x72\x5f\x70\x62\x5f\x77\x68\x65\x6e\x5f\x72\x65\x73\x74\x6f\x72\x65\x3d\x25\x73\x20" "\n"
-,clearPb);if(strcmp(clearPb,"\x79\x65\x73")==(0x1542+3413-0x2297)){atPb_DropDb()
-;}ipc_send_message(MODULE_ID_PB,MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,
-(0xb9a+309-0xccf),NULL,(0x16b5+1002-0x1a9f));}void zPbHandleMainCtrlMsg(MSG_BUF*
+,clearPb);if(strcmp(clearPb,"\x79\x65\x73")==(0x1f2+2356-0xb26)){atPb_DropDb();}
+ipc_send_message(MODULE_ID_PB,MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,
+(0x165+737-0x446),NULL,(0x13cb+1074-0x17fd));}void zPbHandleMainCtrlMsg(MSG_BUF*
 ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
 "\x50\x62\x20\x72\x65\x63\x76\x20\x6d\x61\x69\x6e\x20\x63\x74\x72\x6c\x20\x6d\x73\x67\x20\x63\x6d\x64\x3a\x25\x64" "\n"
 ,ptMsgBuf->usMsgCmd);switch(ptMsgBuf->usMsgCmd){case MSG_CMD_RESET_NOTIFY:
 zPbHandleResetToFactory(ptMsgBuf->aucDataBuf);break;default:break;}}void 
-pb_msg_thread_proc(void*arg){int iRet=(0xde1+2805-0x18d6);MSG_BUF stMsg={
-(0x1cf2+1013-0x20e7)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
+pb_msg_thread_proc(void*arg){int iRet=(0x423+2708-0xeb7);MSG_BUF stMsg={
+(0xf36+1592-0x156e)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
 int*)arg);prctl(PR_SET_NAME,"\x70\x62\x5f\x6c\x6f\x63\x61\x6c",
-(0x372+3609-0x118b),(0xacf+1681-0x1160),(0x1070+3804-0x1f4c));while(
-(0xbbd+6562-0x255e)){iRet=(0x1393+2331-0x1cae);memset(&stMsg,(0xec7+3211-0x1b52)
-,sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x834+1187-0xcd7),
-(0x1331+4566-0x2507));printf(
+(0xf92+3963-0x1f0d),(0xf51+2683-0x19cc),(0x108b+2611-0x1abe));while(
+(0x75c+3309-0x1448)){iRet=(0x10e9+5098-0x24d3);memset(&stMsg,(0x2a+7950-0x1f38),
+sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x10bf+2196-0x1953),
+(0xdeb+5345-0x22cc));printf(
 "\x70\x62\x5f\x6d\x73\x67\x5f\x74\x68\x72\x65\x61\x64\x5f\x70\x72\x6f\x63\x3a\x25\x78\x2c\x25\x78\x20\x4d\x4f\x44\x55\x4c\x45\x5f\x49\x44\x5f\x41\x54\x5f\x43\x54\x4c\x3d\x25\x78" "\n"
-,stMsg.src_id,stMsg.usMsgCmd,MODULE_ID_AT_CTL);if(iRet>=(0x1002+1798-0x1708)){
+,stMsg.src_id,stMsg.usMsgCmd,MODULE_ID_AT_CTL);if(iRet>=(0x18aa+3683-0x270d)){
 switch(stMsg.src_id){case MODULE_ID_WEB_CGI:{zPbHandleWebMsg(&stMsg);break;}case
  MODULE_ID_AT_CTL:{zPbHandleAtctlMsg(&stMsg);break;}case MODULE_ID_PB:{
 zPbLocalHandleWebMsg(&stMsg);zPbLocalHandleAtctlMsg(&stMsg);break;}case 
@@ -123,28 +125,29 @@
 printf(
 "\x5b\x70\x62\x5d\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x2c\x20\x65\x72\x72\x6d\x73\x67\x20\x3d\x20\x25\x73" "\n"
 ,errno,strerror(errno));}}}int phonebook_main(int argc,char*argv[]){pthread_t 
-recv_thread_tid=(0xcd7+5655-0x22ee);MSG_BUF msgBuf={(0x1ac4+213-0x1b99)};CHAR 
-needPb[(0x1955+24-0x193b)]={(0x762+1244-0xc3e)};prctl(PR_SET_NAME,
-"\x70\x62\x5f\x6d\x61\x69\x6e",(0x11e5+2757-0x1caa),(0x2c3+4722-0x1535),
-(0x99+6451-0x19cc));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(
-needPb));if((0x826+132-0x8aa)!=strcmp(needPb,"\x6e\x6f")){
+recv_thread_tid=(0x28f+5865-0x1978);MSG_BUF msgBuf={(0x8c5+2521-0x129e)};CHAR 
+needPb[(0xa39+7029-0x257c)]={(0x1d07+902-0x208d)};prctl(PR_SET_NAME,
+"\x70\x62\x5f\x6d\x61\x69\x6e",(0x9c7+3967-0x1946),(0x450+6144-0x1c50),
+(0x1a30+2029-0x221d));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,
+sizeof(needPb));if((0x1e3a+1048-0x2252)!=strcmp(needPb,"\x6e\x6f")){
 #ifdef WEBS_SECURITY

-if(access(ZPB_DB_PATH,F_OK)!=(0x263+2249-0xb2c)){if(access(ZPB_TMP_PATH,F_OK)==
-(0xde2+778-0x10ec)){if(remove(ZPB_SEC_PATH)!=(0x20c6+1506-0x26a8)){slog(PB_PRINT
-,SLOG_ERR,
+if(access(ZPB_DB_PATH,F_OK)!=(0x136f+702-0x162d)){if(access(ZPB_TMP_PATH,F_OK)==
+(0xd1a+1170-0x11ac)){if(remove(ZPB_SEC_PATH)!=(0x3d9+2507-0xda4)){slog(PB_PRINT,
+SLOG_ERR,
 "\x72\x65\x6d\x6f\x76\x65\x20\x5a\x50\x42\x5f\x53\x45\x43\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}if(rename(ZPB_TMP_PATH,ZPB_SEC_PATH)!=(0x721+2116-0xf65)){slog(PB_PRINT,
+);}if(rename(ZPB_TMP_PATH,ZPB_SEC_PATH)!=(0x1705+65-0x1746)){slog(PB_PRINT,
 SLOG_ERR,
 "\x72\x65\x6e\x61\x6d\x65\x20\x5a\x50\x42\x5f\x54\x4d\x50\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}}if(access(ZPB_SEC_PATH,F_OK)==(0x1eb8+796-0x21d4)){char rnum_buf[
-(0xfb+2046-0x8e1)]={(0x1d64+976-0x2134)};char cmd[(0x519+8172-0x2485)]={
-(0x12d6+3231-0x1f75)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZPB_SEC_PATH,F_OK)==(0x12b4+2275-0x1b97)){char rnum_buf[
+(0x289+8118-0x2227)]={(0x14a+3294-0xe28)};char cmd[(0x51f+8628-0x2653)]={
+(0x7d4+5692-0x1e10)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
 rnum_buf));snprintf(cmd,sizeof(cmd),
 "\x2f\x62\x69\x6e\x2f\x6f\x70\x65\x6e\x73\x73\x6c\x20\x65\x6e\x63\x20\x2d\x64\x20\x2d\x61\x65\x73\x32\x35\x36\x20\x2d\x73\x61\x6c\x74\x20\x2d\x69\x6e\x20\x25\x73\x20\x2d\x6f\x75\x74\x20\x25\x73\x20\x2d\x70\x61\x73\x73\x20\x70\x61\x73\x73\x3a\x25\x73"
 ,ZPB_SEC_PATH,ZPB_DB_PATH,rnum_buf);zxic_system(cmd);}}
 #endif		

-zPbMsgCreat();atPb_Init();}else{return-(0x66a+5905-0x1d7a);}printf(
+zPbMsgCreat();atPb_Init();}else{return-(0x19af+2590-0x23cc);}printf(
 "\x50\x62\x20\x61\x70\x70\x20\x69\x6e\x69\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64\x2c\x20\x77\x69\x6c\x6c\x20\x74\x6f\x20\x72\x65\x63\x65\x69\x76\x65\x20\x6d\x73\x67\x2c\x20\x6d\x73\x67\x69\x64\x3a\x25\x64" "\n"
 ,g_zPb_MsqId);if(pthread_create(&recv_thread_tid,NULL,pb_msg_thread_proc,(void*)
-(&g_zPb_LocalMsqId))==-(0x14c4+226-0x15a5)){assert((0x18a1+1906-0x2013));}
-detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x23a9+22-0x23bf);}
+(&g_zPb_LocalMsqId))==-(0x1181+3547-0x1f5b)){assert((0x19ba+1339-0x1ef5));}
+detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x142f+3919-0x237e)
+;}
diff --git a/ap/app/zte_comm/phonebook/src/pb_proc.c b/ap/app/zte_comm/phonebook/src/pb_proc.c
index e2948a9..0b4446d 100755
--- a/ap/app/zte_comm/phonebook/src/pb_proc.c
+++ b/ap/app/zte_comm/phonebook/src/pb_proc.c
@@ -3,84 +3,84 @@
 #include <semaphore.h>

 #include <limits.h>

 #include "pb_com.h"

-#define ZPB_UCS2                    (0x15df+76-0x162a)

-#define ZPB_UCS2_PREFIX             (0x665+6347-0x1eb0)

-#define ZPB_UCS2_PREFIX_LEN         (0xfc0+5253-0x2443)

-#define ZPB_NON_GSM                     (0x12b0+3919-0x21df)

-#define ZPB_GSM_CHARACTER_SET_SIZE      (0x1abc+594-0x1c8e)

-#define ZPB_INIT_LOAD_RECORD_NUM    (0xcb7+2341-0x15aa)

+#define ZPB_UCS2                    (0x72c+2056-0xf33)

+#define ZPB_UCS2_PREFIX             (0x1058+849-0x1329)

+#define ZPB_UCS2_PREFIX_LEN         (0x8ea+6203-0x2123)

+#define ZPB_NON_GSM                     (0xe9+325-0x20e)

+#define ZPB_GSM_CHARACTER_SET_SIZE      (0x277+7050-0x1d81)

+#define ZPB_INIT_LOAD_RECORD_NUM    (0x777+7498-0x248f)

 VOID atPb_CvtChCode(UINT16 basePointer,UINT8 srcData,UINT8*chMsb,UINT8*chLsb);
 BOOL atPb_CvtU82ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*destData,UINT32 
 destLen);BOOL atPb_CvtU81ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*destData,
 UINT32 destLen);extern VOID atPb_ClearSimPbmIndexArray(VOID);extern sem_t 
 g_Pb_sem_id;extern T_zPb_optRsp g_PbOptRsp;UINT32 g_zPb_DelIndex=
-(0x25f+5091-0x1642);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+
-(0x128d+1672-0x1914)]={(0x9e0+6006-0x2156)};SINT32 g_zPb_ApIndex[
-ZPB_AP_MAX_RECORD+(0x26c+6865-0x1d3c)]={(0x1e3a+1957-0x25df)};
-T_zPb_DelStatusMultiOrAll g_zPb_DelStatusUsim={(0x900+5160-0x1d28)};const 
-unsigned char G_ZPB_NEWUCS2TOGSM[ZPB_GSM_CHARACTER_SET_SIZE*(0xbd5+5168-0x2003)]
-={ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,(0xb43+723-0xe0c),ZPB_NON_GSM,
-ZPB_NON_GSM,(0x4aa+3698-0x130f),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,(0xa59+3450-0x17b3),(0x292+9093-0x25f6),
-(0x163+9459-0x2634),(0xe85+3463-0x1be9),(0x1fb0+1886-0x270c),(0xdea+3285-0x1a9a)
-,(0x135+3419-0xe6a),(0x3a8+8478-0x249f),(0x1858+2622-0x226e),(0xdea+814-0x10ef),
-(0x135c+3436-0x209e),(0x1519+3039-0x20cd),(0x4db+4018-0x1461),
-(0xf59+1051-0x1347),(0x871+1536-0xe43),(0xc18+2393-0x1542),(0x111c+4731-0x2367),
-(0x581+5529-0x1ae9),(0x1404+1661-0x1a4f),(0x16f4+2443-0x204c),
-(0xef3+5252-0x2343),(0x12b3+4218-0x22f8),(0xf07+2348-0x17fd),(0x1e9f+341-0x1fbd)
-,(0x108b+3964-0x1fcf),(0x11f7+4902-0x24e4),(0x1266+215-0x1303),
-(0x30c+5448-0x1819),(0x15c7+463-0x175a),(0x5a4+3657-0x13b0),(0x141a+1342-0x191a)
-,(0x15ed+1414-0x1b34),(0x74+9739-0x267f),(0x554+2553-0xf0c),(0xaba+1562-0x1092),
-(0xef2+1719-0x1566),(0x16b0+2267-0x1f47),(0x654+5501-0x1b8c),(0x4af+8007-0x23b0)
-,(0x6db+7193-0x22ad),(0x127+2320-0x9ef),(0x7c2+978-0xb4b),(0x4fc+5673-0x1adb),
-(0x1ccb+417-0x1e21),(0x1a19+2803-0x24c0),(0xc64+5990-0x237d),(0xbb5+5376-0x2067)
-,(0x1797+490-0x1932),(0x22b+8623-0x238a),(0x196b+1169-0x1dab),
-(0x1840+2683-0x2269),(0x5ba+4359-0x166e),(0x193+2404-0xaa3),(0xb1d+843-0xe13),
-(0x43f+1887-0xb48),(0x8af+5178-0x1c92),(0x1423+1354-0x1915),(0x1540+949-0x189c),
-(0x118a+2275-0x1a13),(0x113+7362-0x1d7a),ZPB_NON_GSM,(0xf14+5315-0x237a),
-ZPB_NON_GSM,(0xad1+1195-0xf6b),ZPB_NON_GSM,(0x260+1710-0x8ad),
-(0x1f7c+947-0x22cd),(0xbb4+5045-0x1f06),(0xd87+3623-0x1b4a),(0x8d0+46-0x899),
-(0x631+1458-0xb7d),(0x31b+1718-0x96a),(0xe0b+4318-0x1e81),(0x1af1+1723-0x2143),
-(0x1303+1548-0x18a5),(0xa0b+6497-0x2301),(0xd75+3605-0x1b1e),(0x759+8097-0x268d)
-,(0x5cf+7435-0x226c),(0xff7+3902-0x1ec6),(0x1f65+2038-0x26eb),(0x1a0+2168-0x9a7)
-,(0xe5f+1124-0x1251),(0x8e2+1385-0xdd8),(0xed9+3168-0x1ac5),(0x1820+3435-0x2516)
-,(0x992+1221-0xde1),(0x9c5+5095-0x1d35),(0xb4+5395-0x154f),(0x85+1144-0x484),
-(0x1076+3468-0x1d88),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM
+(0x10b4+5297-0x2565);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+
+(0x9c4+4193-0x1a24)]={(0x16d4+3484-0x2470)};SINT32 g_zPb_ApIndex[
+ZPB_AP_MAX_RECORD+(0xb87+6062-0x2334)]={(0x1ba2+1554-0x21b4)};
+T_zPb_DelStatusMultiOrAll g_zPb_DelStatusUsim={(0x583+5375-0x1a82)};const 
+unsigned char G_ZPB_NEWUCS2TOGSM[ZPB_GSM_CHARACTER_SET_SIZE*(0x4a1+1858-0xbe1)]=
+{ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,(0xe5b+1690-0x14eb),ZPB_NON_GSM,
+ZPB_NON_GSM,(0x1312+2041-0x1afe),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM
 ,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,(0x1626+3717-0x248b),(0x176c+1089-0x1b8c),
+(0x16bd+2779-0x2176),(0x56+2470-0x9d9),(0x54d+4700-0x17a7),(0x862+1996-0x1009),
+(0x1281+4385-0x237c),(0x54d+1337-0xa5f),(0xdb4+5197-0x21d9),(0xe8c+2725-0x1908),
+(0x33f+4427-0x1460),(0xdc1+5508-0x231a),(0x799+7070-0x230b),(0x1d6a+707-0x2000),
+(0x13d4+3498-0x2150),(0x1ab+1269-0x671),(0x205f+1692-0x26cb),
+(0x12a5+1264-0x1764),(0x47d+3548-0x1227),(0x633+7904-0x24e0),
+(0x13cd+1185-0x183a),(0xb34+2542-0x14ed),(0x144a+3722-0x229e),
+(0xddb+4469-0x1f19),(0x40d+8043-0x2340),(0x125a+1291-0x172c),(0x3ab+4071-0x1358)
+,(0xe22+5835-0x24b2),(0x46f+2386-0xd85),(0xd1d+3799-0x1bb7),(0xe19+1940-0x156f),
+(0x3d3+6858-0x1e5e),(0x127b+357-0x13e0),(0x43+1681-0x693),(0x71+7531-0x1d9a),
+(0x18e1+313-0x19d7),(0x1068+1862-0x176a),(0x22b+2177-0xa67),(0x9f9+3811-0x1896),
+(0xed6+753-0x1180),(0xc0c+1829-0x12e9),(0x1c6b+1443-0x21c5),(0xfdf+2244-0x1859),
+(0x352+187-0x3c2),(0x19df+1678-0x2021),(0xf11+5704-0x250c),(0xd2c+2287-0x15cd),
+(0x36d+994-0x700),(0x1741+467-0x18c4),(0x696+7380-0x2319),(0x1508+2027-0x1ca1),
+(0xf7b+1686-0x15be),(0x1920+2485-0x2281),(0xd17+2868-0x17f6),(0x1a2f+155-0x1a74)
+,(0x128a+4224-0x22b3),(0x4b6+797-0x77b),(0x4d6+5578-0x1a47),(0x192+4499-0x12cb),
+(0x3a1+6565-0x1ceb),ZPB_NON_GSM,(0x7c1+3350-0x147a),ZPB_NON_GSM,
+(0xaa4+1820-0x11af),ZPB_NON_GSM,(0x4a9+6454-0x1d7e),(0x9aa+1551-0xf57),
+(0xda4+3245-0x19ee),(0xeaa+5707-0x2491),(0x580+5632-0x1b1b),(0xcba+925-0xff1),
+(0x892+713-0xaf4),(0x158+9580-0x265c),(0xa74+99-0xa6e),(0x146c+2328-0x1d1a),
+(0x12b8+1892-0x19b1),(0x6b5+1260-0xb35),(0x16e6+2058-0x1e83),
+(0x1011+3350-0x1cb9),(0x1364+2976-0x1e95),(0x1405+3176-0x1ffd),
+(0x862+6689-0x2212),(0x1059+3200-0x1c67),(0x8c0+4499-0x19e0),(0x90f+7122-0x246d)
+,(0xa81+3476-0x17a0),(0xb67+4481-0x1c72),(0x3aa+7541-0x20a8),(0x106a+268-0x10fe)
+,(0x6f5+1717-0xd31),(0xcdd+4976-0x1fd3),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,(0x434+7208-0x201c),ZPB_NON_GSM,
-(0x3c3+8343-0x2459),(0x402+2906-0xf38),(0x1f09+417-0x20a7),ZPB_NON_GSM,
-(0xe19+6406-0x26c0),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,(0x1898+1616-0x1ea8)
+,ZPB_NON_GSM,(0xb0a+2237-0x13c6),(0x1bf2+591-0x1e1d),(0x10e8+2716-0x1b81),
+ZPB_NON_GSM,(0x24b+7357-0x1ea9),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
 ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-(0x148c+1690-0x1ac6),(0x26d+409-0x3c5),(0x493+3265-0x1113),(0x113c+729-0x13d4),
-(0xe75+587-0x107f),(0x262+2939-0xd82),(0x831+373-0x998),(0x109+3475-0xe80),
-(0x18c+5675-0x17ae),(0x599+1605-0xb99),(0xd15+3265-0x19b7),(0x7ec+3072-0x13a7),
-(0x16e9+2810-0x219e),(0x11ba+2518-0x1b47),(0x2f7+1895-0xa15),(0x143+21-0x10f),
-(0xcbf+292-0xd9a),ZPB_NON_GSM,(0x560+7847-0x23aa),(0xed+8351-0x213d),
-(0x8f6+7161-0x24a0),(0x2466+509-0x2614),(0x2047+593-0x2249),(0x121f+2600-0x1beb)
-,ZPB_NON_GSM,(0x711+7217-0x2337),(0x71b+7506-0x2418),(0xbd2+6649-0x2576),
-(0x5bd+1985-0xd29),(0x4bf+8481-0x2582),(0x13d2+1750-0x1a4f),ZPB_NON_GSM,
-(0x1922+1769-0x1fed),(0x420+7068-0x1f3d),(0x93c+3094-0x14f1),
-(0x1b8b+1423-0x20b9),(0xa3+7057-0x1bd3),(0x1788+2786-0x21ef),(0x793+4281-0x183d)
-,(0x1a6+8950-0x247f),(0xe9b+792-0x11aa),(0x1dfd+1802-0x2503),
-(0x16d3+1208-0x1b86),(0x3f2+3438-0x10fb),(0x1ebd+2094-0x2686),
-(0x7ad+7228-0x23e2),(0x8f4+6700-0x22b7),(0x45a+4756-0x1685),(0x2e2+6506-0x1be3),
-ZPB_NON_GSM,(0x324+3339-0xfb2),(0x17b8+593-0x1a01),(0xa9c+6219-0x2278),
-(0xaa2+5002-0x1dbd),(0x108b+5504-0x259c),(0x1000+706-0x1246),ZPB_NON_GSM,
-(0x914+2139-0x1163),(0x173c+1795-0x1e39),(0x9e5+3446-0x16e6),(0xd2a+3241-0x195e)
-,(0xe39+5204-0x220f),(0xb54+1231-0xfaa),ZPB_NON_GSM,(0xbf1+48-0xba8)};VOID 
-atPb_Init(VOID){UINT32 pbCount=(0x85a+5632-0x1e5a);g_zPb_SimIndex[
-(0x5d9+1122-0xa3b)]=(0x1f71+867-0x22d4);sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);(
-VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(pbCount=
-(0xa9d+1625-0x10f5);pbCount<=ZPB_SIM_MAX_RECORD;pbCount++){g_zPb_SimIndex[
+ZPB_NON_GSM,(0x1349+1472-0x18a9),(0xf78+2025-0x1720),(0x598+4481-0x16d8),
+(0x1180+5419-0x266a),(0x7b3+2755-0x1235),(0x24cc+129-0x24f2),
+(0x19fc+2064-0x21fe),(0x15b8+81-0x15ed),(0x356+4742-0x15d3),(0x3ec+8228-0x23cb),
+(0x16fc+1441-0x1c7e),(0x19e4+2091-0x21ca),(0xbd6+1732-0x1255),
+(0xa59+2452-0x13a4),(0x1f22+429-0x2086),(0x150+4615-0x130e),(0x1592+825-0x1882),
+ZPB_NON_GSM,(0x30f+2961-0xe43),(0xec+1455-0x64c),(0x180+8689-0x2322),
+(0x627+4555-0x17a3),(0x320+5765-0x1956),(0x642+1584-0xc16),ZPB_NON_GSM,
+(0x1bdf+2256-0x24a4),(0x1c57+2560-0x2602),(0x422+7803-0x2248),(0xac+4266-0x1101)
+,(0xf49+2427-0x1866),(0x2cc+2270-0xb51),ZPB_NON_GSM,(0x13f6+2243-0x1c9b),
+(0x1272+175-0x12a2),(0xeac+4116-0x1e5f),(0xd1f+4481-0x1e3f),(0x1276+4293-0x22da)
+,(0x503+4943-0x17d7),(0x1e93+188-0x1f40),(0x1471+4060-0x2430),
+(0x200c+1786-0x26fd),(0x624+4419-0x1763),(0x1787+1805-0x1e8f),(0xe88+342-0xf79),
+(0x1e4c+741-0x20cc),(0x1896+657-0x1b20),(0x4c7+4867-0x1761),(0x7b6+6226-0x1f9f),
+(0xb1d+3012-0x1678),ZPB_NON_GSM,(0x2161+727-0x23bb),(0x1027+2519-0x19f6),
+(0x712+7062-0x2239),(0x75a+8176-0x26db),(0x9b9+6446-0x2278),(0x234b+1085-0x270c)
+,ZPB_NON_GSM,(0x18f5+2892-0x2435),(0x121c+4233-0x229f),(0x96c+3977-0x1880),
+(0x13dd+3316-0x205c),(0x69f+6540-0x1fad),(0xd46+519-0xed4),ZPB_NON_GSM,
+(0xca1+3559-0x1a0f)};VOID atPb_Init(VOID){UINT32 pbCount=(0xaf1+6054-0x2297);
+g_zPb_SimIndex[(0x377+390-0x4fd)]=(0x165b+1146-0x1ad5);sc_cfg_set(ZPB_NV_INIT,
+ZPB_LOADING);(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(pbCount=
+(0x12ef+999-0x16d5);pbCount<=ZPB_SIM_MAX_RECORD;pbCount++){g_zPb_SimIndex[
 pbCount]=PBM_ERROR_NOT_FOUND;}if(ZPB_DB_OK!=atPb_CreatDb()){slog(PB_PRINT,
 SLOG_ERR,"pb:atPb_Init:create pbm table failed\n");return;}if(ZPB_DB_OK!=
 atPb_InitApIndex()){slog(PB_PRINT,SLOG_ERR,
@@ -88,101 +88,101 @@
 );return;}(VOID)atPb_SetApCapacityTable();}VOID atPb_CfgPbNvInit(VOID){(VOID)
 sc_cfg_set(ZPB_NV_USIMINDEXMIN,"\x30");(VOID)sc_cfg_set(ZPB_NV_USIMINDEXMAX,
 "\x30");(VOID)sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x6e\x6f");}int 
-atpb_CvtUcs2ToAlphaField(char*src,int srcLen,char*dest){int i=(0xe3+2736-0xb93);
-int min=32767;int max=(0xdb9+6295-0x2650);int temp=(0xff9+4603-0x21f4);int 
-outOff=(0xd47+409-0xee0);printf(
+atpb_CvtUcs2ToAlphaField(char*src,int srcLen,char*dest){int i=
+(0x27f+8403-0x2352);int min=32767;int max=(0x138c+3934-0x22ea);int temp=
+(0x4a4+5346-0x1986);int outOff=(0x1ad6+3004-0x2692);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x73\x72\x63\x4c\x65\x6e\x3d\x25\x64" "\n"
-,srcLen);if(srcLen<=(0x94c+4078-0x193a)||src==NULL||dest==NULL){return-
-(0x8b2+7209-0x24da);}if(srcLen<=(0x8b9+5893-0x1fbc)){dest[(0xe8b+5897-0x2594)]=
-(0x18e6+3144-0x24ae);memcpy(dest+(0xef2+1247-0x13d0),src,srcLen);printf(
+,srcLen);if(srcLen<=(0x8ea+3364-0x160e)||src==NULL||dest==NULL){return-
+(0x17e6+3543-0x25bc);}if(srcLen<=(0x1e6c+1193-0x2313)){dest[(0x12b9+4592-0x24a9)
+]=(0x45f+4194-0x1441);memcpy(dest+(0xb27+6871-0x25fd),src,srcLen);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x75\x73\x65\x20\x38\x30\x20\x63\x6f\x64\x65\x2c\x20\x6c\x65\x6e\x20\x3d\x25\x64" "\n"
-,srcLen+(0x1443+723-0x1715));return srcLen+(0x86b+7253-0x24bf);}for(i=
-(0x1260+1154-0x16e2);i<srcLen;i+=(0x1c5+7235-0x1e06)){if(src[i]!=
-(0x1bb2+254-0x1cb0)){temp=(int)(((src[i]<<(0xde3+1910-0x1551))&65280)|(src[i+
-(0x3fb+3731-0x128d)]&(0x24e9+0-0x23ea)));
-#if (0x6fb+2936-0x1273) 
-if(temp<(0x10e6+5217-0x2547)){max=min+(0xfa5+395-0x10ae);break;}
+,srcLen+(0x11bf+4898-0x24e0));return srcLen+(0xb89+2286-0x1476);}for(i=
+(0x57c+7764-0x23d0);i<srcLen;i+=(0xf35+1623-0x158a)){if(src[i]!=
+(0x1f32+166-0x1fd8)){temp=(int)(((src[i]<<(0x3f3+3194-0x1065))&65280)|(src[i+
+(0x183f+3473-0x25cf)]&(0x56a+13-0x478)));
+#if (0xc6f+3411-0x19c2) 
+if(temp<(0x873+6475-0x21be)){max=min+(0x1bd4+117-0x1bc7);break;}
 #endif            

 if(min>temp){min=temp;}if(max<temp){max=temp;}}}printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x6d\x69\x6e\x3d\x25\x64\x2c\x20\x6d\x61\x78\x3d\x25\x64" "\n"
-,min,max);if((max-min)<(0xb15+2123-0x12df)){if((unsigned char)(min&
-(0x16f+8745-0x2318))==(unsigned char)(max&(0x106+4465-0x11f7))){dest[
-(0x1484+2811-0x1f7e)]=(unsigned char)(srcLen/(0x14af+3536-0x227d));dest[
-(0x587+3967-0x1506)]=(unsigned char)(0xec4+940-0x11ef);min=(int)(min&32640);dest
-[(0x1fc4+1691-0x265d)]=(unsigned char)((min>>(0x1bc2+541-0x1dd8))&
-(0x16b2+1372-0x1b0f));outOff=(0x130c+632-0x1581);printf(
+,min,max);if((max-min)<(0x6b6+6599-0x1ffc)){if((unsigned char)(min&
+(0xbd1+3160-0x17a9))==(unsigned char)(max&(0x1999+2013-0x20f6))){dest[
+(0x122c+2890-0x1d75)]=(unsigned char)(srcLen/(0x105c+2359-0x1991));dest[
+(0x598+6213-0x1ddd)]=(unsigned char)(0x1f44+830-0x2201);min=(int)(min&32640);
+dest[(0x2e9+2824-0xdef)]=(unsigned char)((min>>(0xb64+2823-0x1664))&
+(0x1772+1274-0x1b6d));outOff=(0x77f+2704-0x120c);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x75\x73\x65\x20\x38\x31\x20\x63\x6f\x64\x65" "\n"
-);}else{dest[(0x282+8763-0x24bc)]=(unsigned char)(srcLen/(0x19c7+1370-0x1f1f));
-dest[(0x11e6+2458-0x1b80)]=(unsigned char)(0x100c+543-0x11a9);dest[
-(0x660+7924-0x2552)]=(unsigned char)((min>>(0xabc+3633-0x18e5))&
-(0x103+7258-0x1c5e));dest[(0xf41+5424-0x246e)]=(unsigned char)(min&
-(0x1221+2509-0x1aef));outOff=(0x20e0+1308-0x25f8);printf(
+);}else{dest[(0x173a+2288-0x2029)]=(unsigned char)(srcLen/(0xec9+3340-0x1bd3));
+dest[(0xa97+6823-0x253e)]=(unsigned char)(0x3b9+2069-0xb4c);dest[
+(0x21f+3339-0xf28)]=(unsigned char)((min>>(0x3c9+3169-0x1022))&
+(0x11ef+1355-0x163b));dest[(0x15e4+1323-0x1b0c)]=(unsigned char)(min&
+(0x593+5507-0x1a17));outOff=(0x1391+2832-0x1e9d);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x75\x73\x65\x20\x38\x32\x20\x63\x6f\x64\x65" "\n"
-);}for(i=(0x6d0+4199-0x1737);i<srcLen;i+=(0x1df+6645-0x1bd2)){if(src[i]==
-(0xc63+5022-0x2001)){dest[outOff]=(unsigned char)(src[i+(0x1837+321-0x1977)]&
-(0x1dc+1853-0x89a));}else{temp=(int)((((src[i]<<(0x11c2+2319-0x1ac9))&65280)|(
-src[i+(0xbe3+2905-0x173b)]&(0x1d10+1906-0x2383)))-min);dest[outOff]=(unsigned 
-char)(temp|(0x915+7000-0x23ed));}outOff++;}printf(
+);}for(i=(0x62b+7340-0x22d7);i<srcLen;i+=(0x16c7+158-0x1763)){if(src[i]==
+(0x169+7625-0x1f32)){dest[outOff]=(unsigned char)(src[i+(0xc77+3620-0x1a9a)]&
+(0x83a+6166-0x1fd1));}else{temp=(int)((((src[i]<<(0x533+2130-0xd7d))&65280)|(src
+[i+(0x1376+4884-0x2689)]&(0x87f+7327-0x241f)))-min);dest[outOff]=(unsigned char)
+(temp|(0xcaf+1873-0x1380));}outOff++;}printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x20\x6f\x75\x74\x4f\x66\x66\x3d\x25\x64\x2c\x64\x65\x73\x74\x5b\x25\x64\x5d\x3d\x25\x78" "\n"
-,outOff,outOff,dest[outOff]);return outOff;}dest[(0x1e1+2445-0xb6e)]=
-(0x317+6522-0x1c11);memcpy(dest+(0x2ac+6264-0x1b23),src,srcLen);printf(
+,outOff,outOff,dest[outOff]);return outOff;}dest[(0x1c68+1092-0x20ac)]=
+(0x1590+4048-0x24e0);memcpy(dest+(0x4bc+6977-0x1ffc),src,srcLen);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x70\x62\x5f\x43\x76\x74\x55\x63\x73\x32\x54\x6f\x41\x6c\x70\x68\x61\x46\x69\x65\x6c\x64\x2c\x20\x75\x73\x65\x20\x38\x30\x20\x63\x6f\x64\x65\x2c\x20\x6c\x65\x6e\x20\x3d\x25\x64" "\n"
-,srcLen+(0x4e3+7833-0x237b));return srcLen+(0x8bd+1934-0x104a);}int 
+,srcLen+(0x157a+3201-0x21fa));return srcLen+(0x107d+2624-0x1abc);}int 
 atPb_GetU80Code(const UINT8*srcCode,UINT32 srcCodeLen,UINT8*destCode,UINT32 
 destCodeLen){assert(destCode!=NULL&&srcCode!=NULL);if(srcCodeLen==
-(0xb2+7665-0x1ea3)||destCodeLen==(0x2f6+8346-0x2390)||destCodeLen<srcCodeLen){
-return-(0xc7f+4693-0x1ed3);}memset(destCode,(0xefb+4735-0x217a),destCodeLen);
-destCode[(0x208f+1142-0x2505)]=(0x723+5346-0x1b85);printf(
+(0x8aa+4688-0x1afa)||destCodeLen==(0xdf2+3839-0x1cf1)||destCodeLen<srcCodeLen){
+return-(0x680+963-0xa42);}memset(destCode,(0x17b+5412-0x169f),destCodeLen);
+destCode[(0x553+1302-0xa69)]=(0x526+7470-0x21d4);printf(
 "\x63\x68\x65\x6e\x6a\x69\x65\x20\x2d\x2d\x2d\x2d\x2d\x61\x74\x50\x62\x5f\x47\x65\x74\x55\x38\x30\x43\x6f\x64\x65\x2d\x2d\x2d\x2d\x2d\x73\x72\x63\x43\x6f\x64\x65\x5b\x30\x5d\x20\x3d\x20\x25\x64" "\n"
-,srcCode[(0x1dc+4546-0x139e)]);switch(srcCode[(0xb78+2648-0x15d0)]){case
-(0x8a4+3137-0x1465):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}case
-(0x6e0+2073-0xe78):{atPb_CvtU81ToU80(srcCode+(0xc27+2450-0x15b8),srcCodeLen-
-(0x10c1+799-0x13df),destCode+(0x1673+3935-0x25d1),destCodeLen-
-(0x1608+4076-0x25f3));return srcCode[(0x87b+5092-0x1c5e)]*(0x759+5351-0x1c3e)+
-(0x167b+3423-0x23d9);}case(0x12f0+1387-0x17d9):{atPb_CvtU82ToU80(srcCode+
-(0xec2+5995-0x262c),srcCodeLen-(0xb78+4734-0x1df5),destCode+(0x1569+3214-0x21f6)
-,destCodeLen-(0x219+867-0x57b));return srcCode[(0x1048+2052-0x184b)]*
-(0xf72+4554-0x213a)+(0x19d2+2937-0x254a);}default:{return-(0x83b+7574-0x25d0);}}
-}BOOL atPb_CvtU82ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*destData,UINT32 
-destLen){UINT8 chNum=(0x599+5278-0x1a37);UINT16 basePointer=(0xf44+1298-0x1456);
-UINT8 iCurChar=(0x121c+2804-0x1d10);UINT32 iCurSrc=(0xb71+5477-0x20d6);chNum=(
-UINT32)srcData[(0x4b7+5733-0x1b1c)];basePointer=(UINT16)srcData[
-(0x1235+4246-0x22ca)];basePointer=basePointer<<(0x11b7+1484-0x177b);basePointer=
-basePointer+srcData[(0xe27+6250-0x268f)];if(chNum*(0x92+1637-0x6f5)>destLen){
-return FALSE;}for(iCurSrc=(0x2f6+2911-0xe52);iCurSrc<srcLen&&iCurChar<chNum;
-iCurSrc++,iCurChar++){UINT8*curDest=destData+(0x1747+3338-0x244f)*iCurChar;
-atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,curDest+(0xc12+3212-0x189d))
-;}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*
-destData,UINT32 destLen){UINT8 chNum=(0xa68+5304-0x1f20);UINT16 basePointer=
-(0x1044+379-0x11bf);UINT8 iCurChar=(0x19e8+2550-0x23de);UINT32 iCurSrc=
-(0x181+8549-0x22e6);chNum=srcData[(0x5eb+8000-0x252b)];basePointer=((UINT16)
-srcData[(0x290+6791-0x1d16)])<<(0xf2d+4709-0x218b);if(chNum*(0xec+5696-0x172a)>
-destLen){return FALSE;}for(iCurSrc=(0x6b2+1268-0xba4);iCurSrc<srcLen&&iCurChar<
-chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+(0xffd+2253-0x18c8)*iCurChar;
-atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,curDest+(0x1bc5+539-0x1ddf))
-;}return TRUE;}VOID atPb_CvtChCode(UINT16 basePointer,UINT8 srcData,UINT8*chMsb,
-UINT8*chLsb){UINT16 curChar=(0x22e0+1005-0x26cd);assert(chMsb!=NULL&&chLsb!=NULL
-);if((srcData&(0x6b2+874-0x99c))==(0x28a+4838-0x1570)){curChar=srcData;}else{
-curChar=basePointer+(srcData&(0x144f+4462-0x253e));}*chMsb=(UINT8)(curChar>>
-(0x1edd+1785-0x25ce));*chLsb=(UINT8)((curChar<<(0xf4c+3239-0x1beb))>>
-(0x47b+5195-0x18be));return;}int atPb_String2Bytes(const char*pSrc,unsigned char
-*pDst,int nSrcLength){int i=(0xb80+4681-0x1dc9);if(pSrc==NULL||pDst==NULL||
-nSrcLength<(0xd1+6442-0x19fb)){return-(0x5b4+2586-0xfcd);}for(i=
-(0x1138+4268-0x21e4);i<nSrcLength;i+=(0x7d4+1571-0xdf5)){if(*pSrc>=
-((char)(0x38c+3038-0xf3a))&&*pSrc<=((char)(0x13a7+159-0x140d))){*pDst=(*pSrc-
-((char)(0xc6f+4292-0x1d03)))<<(0xafa+6477-0x2443);}else{*pDst=((toupper(*pSrc)-
-((char)(0x101+5327-0x158f)))+(0x122+1742-0x7e6))<<(0xc46+2105-0x147b);}pSrc++;if
-(*pSrc>=((char)(0x9c7+2182-0x121d))&&*pSrc<=((char)(0x36b+5937-0x1a63))){*pDst|=
-*pSrc-((char)(0x880+7637-0x2625));}else{*pDst|=(toupper(*pSrc)-
-((char)(0xc39+2981-0x179d)))+(0x697+1274-0xb87);}pSrc++;pDst++;}return 
-nSrcLength/(0x1ae3+2990-0x268f);}int atPb_Bytes2String(const unsigned char*pSrc,
+,srcCode[(0x15a5+887-0x191c)]);switch(srcCode[(0x10bf+4206-0x212d)]){case
+(0xd66+3381-0x1a1b):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}case
+(0x6d1+4320-0x1730):{atPb_CvtU81ToU80(srcCode+(0x12f5+2846-0x1e12),srcCodeLen-
+(0x1adb+2558-0x24d8),destCode+(0xffc+468-0x11cf),destCodeLen-(0xbd1+4050-0x1ba2)
+);return srcCode[(0x57a+915-0x90c)]*(0x1794+3411-0x24e5)+(0x146a+1468-0x1a25);}
+case(0x9ea+5092-0x1d4c):{atPb_CvtU82ToU80(srcCode+(0xe13+3208-0x1a9a),srcCodeLen
+-(0x1a42+2579-0x2454),destCode+(0x456+789-0x76a),destCodeLen-(0x4cd+4625-0x16dd)
+);return srcCode[(0x973+827-0xcad)]*(0x11f3+4360-0x22f9)+(0x15f0+2231-0x1ea6);}
+default:{return-(0xba5+5942-0x22da);}}}BOOL atPb_CvtU82ToU80(const UINT8*srcData
+,UINT32 srcLen,UINT8*destData,UINT32 destLen){UINT8 chNum=(0x1218+972-0x15e4);
+UINT16 basePointer=(0x1c60+785-0x1f71);UINT8 iCurChar=(0x1d6+4454-0x133c);UINT32
+ iCurSrc=(0x1702+2681-0x217b);chNum=(UINT32)srcData[(0xc75+3175-0x18dc)];
+basePointer=(UINT16)srcData[(0x3fa+7314-0x208b)];basePointer=basePointer<<
+(0x11d5+2242-0x1a8f);basePointer=basePointer+srcData[(0x963+7163-0x255c)];if(
+chNum*(0xd33+4079-0x1d20)>destLen){return FALSE;}for(iCurSrc=(0x5e1+1154-0xa60);
+iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+
+(0xba3+895-0xf20)*iCurChar;atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,
+curDest+(0x431+7518-0x218e));}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*
+srcData,UINT32 srcLen,UINT8*destData,UINT32 destLen){UINT8 chNum=
+(0xecf+2438-0x1855);UINT16 basePointer=(0x1a9f+2492-0x245b);UINT8 iCurChar=
+(0xb77+2533-0x155c);UINT32 iCurSrc=(0xe24+3237-0x1ac9);chNum=srcData[
+(0x18f0+1351-0x1e37)];basePointer=((UINT16)srcData[(0x8c4+3417-0x161c)])<<
+(0x2335+531-0x2541);if(chNum*(0x27a+2318-0xb86)>destLen){return FALSE;}for(
+iCurSrc=(0x247+3965-0x11c2);iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++)
+{UINT8*curDest=destData+(0x162c+933-0x19cf)*iCurChar;atPb_CvtChCode(basePointer,
+srcData[iCurSrc],curDest,curDest+(0x1370+1337-0x18a8));}return TRUE;}VOID 
+atPb_CvtChCode(UINT16 basePointer,UINT8 srcData,UINT8*chMsb,UINT8*chLsb){UINT16 
+curChar=(0xc4b+4571-0x1e26);assert(chMsb!=NULL&&chLsb!=NULL);if((srcData&
+(0x1b67+481-0x1cc8))==(0x2541+283-0x265c)){curChar=srcData;}else{curChar=
+basePointer+(srcData&(0xb48+776-0xdd1));}*chMsb=(UINT8)(curChar>>
+(0x8fa+2382-0x1240));*chLsb=(UINT8)((curChar<<(0x662+5944-0x1d92))>>
+(0xe8+7688-0x1ee8));return;}int atPb_String2Bytes(const char*pSrc,unsigned char*
+pDst,int nSrcLength){int i=(0x1161+342-0x12b7);if(pSrc==NULL||pDst==NULL||
+nSrcLength<(0x1f8+4994-0x157a)){return-(0x1d1+7476-0x1f04);}for(i=
+(0xd06+220-0xde2);i<nSrcLength;i+=(0x1873+283-0x198c)){if(*pSrc>=
+((char)(0x7fd+1661-0xe4a))&&*pSrc<=((char)(0x4d1+4689-0x16e9))){*pDst=(*pSrc-
+((char)(0x1760+1454-0x1cde)))<<(0x906+539-0xb1d);}else{*pDst=((toupper(*pSrc)-
+((char)(0x8f3+5908-0x1fc6)))+(0xdfb+128-0xe71))<<(0xb3+8086-0x2045);}pSrc++;if(*
+pSrc>=((char)(0x1820+74-0x183a))&&*pSrc<=((char)(0x57f+825-0x87f))){*pDst|=*pSrc
+-((char)(0xfa4+2958-0x1b02));}else{*pDst|=(toupper(*pSrc)-
+((char)(0x140+7843-0x1fa2)))+(0xd1+9585-0x2638);}pSrc++;pDst++;}return 
+nSrcLength/(0x112f+3991-0x20c4);}int atPb_Bytes2String(const unsigned char*pSrc,
 char*pDst,int nSrcLength){const char tab[]=
 "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x41\x42\x43\x44\x45\x46";int i=
-(0x7f6+6078-0x1fb4);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x77c+4331-0x1867)){
-return-(0x5ad+3099-0x11c7);}for(i=(0xf0b+3747-0x1dae);i<nSrcLength;i++){*pDst++=
-tab[*pSrc>>(0x247+7900-0x211f)];*pDst++=tab[*pSrc&(0x659+3465-0x13d3)];pSrc++;}*
-pDst='\0';return nSrcLength*(0xb2a+1016-0xf20);}static VOID atPb_WebRecodeShow(
-T_zPb_WebContact const*pFromweb){slog(PB_PRINT,SLOG_DEBUG,
+(0x7a+9287-0x24c1);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x8a4+2153-0x110d)){
+return-(0x7b4+4027-0x176e);}for(i=(0xced+1018-0x10e7);i<nSrcLength;i++){*pDst++=
+tab[*pSrc>>(0x6f7+6503-0x205a)];*pDst++=tab[*pSrc&(0x1593+1789-0x1c81)];pSrc++;}
+*pDst='\0';return nSrcLength*(0x1541+1263-0x1a2e);}static VOID 
+atPb_WebRecodeShow(T_zPb_WebContact const*pFromweb){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x66\x72\x6f\x6d\x77\x65\x62\x2e\x49\x6e\x64\x65\x78\x3d\x25\x64" "\n"
 ,pFromweb->pbIndex);slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x66\x72\x6f\x6d\x77\x65\x62\x2e\x4e\x61\x6d\x65\x3d\x25\x73" "\n",
@@ -201,21 +201,20 @@
 ){sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x50\x62\x5f\x53\x65\x6e\x64\x53\x63\x70\x62\x72\x53\x65\x74\x20\x61\x74\x42\x61\x73\x65\x5f\x49\x69\x6e\x74\x50\x62\x4f\x6b\x20" "\n"
 );}VOID atPb_RecvCpbsReadRsp(T_zPb_AtCpbsReadRes*cpbsInd){CHAR resInfo[
-(0x968+5854-0x2032)]={(0x19a6+125-0x1a23)};if(strncmp(cpbsInd->locType,
-"\x53\x4d",(0x1d57+370-0x1ec7))==(0x1c9d+1361-0x21ee)){(VOID)snprintf(resInfo,
-(0x395+2181-0xc06),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
-NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x2e5+5715-0x1938),
-(0xfa6+4458-0x20fc));(VOID)snprintf(resInfo,(0x1a0f+644-0x1c7f),"\x25\x64",
-cpbsInd->totalEntries);(VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);
-g_zPb_SimIndex[(0x1e5a+549-0x207f)]=(UINT32)(cpbsInd->totalEntries);}else{printf
-(
+(0x46+8379-0x20ed)]={(0x48a+2051-0xc8d)};if(strncmp(cpbsInd->locType,"\x53\x4d",
+(0x84f+5506-0x1dcf))==(0x17c9+3608-0x25e1)){(VOID)snprintf(resInfo,
+(0xf8+1813-0x7f9),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
+NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x6e1+844-0xa2d),(0x1bbb+2531-0x258a)
+);(VOID)snprintf(resInfo,(0x12d5+646-0x1547),"\x25\x64",cpbsInd->totalEntries);(
+VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);g_zPb_SimIndex[(0x397+5546-0x1941)]=
+(UINT32)(cpbsInd->totalEntries);}else{printf(
 "\x61\x74\x50\x62\x5f\x52\x65\x63\x76\x43\x70\x62\x73\x52\x65\x61\x64\x52\x73\x70\x20\x6e\x6f\x74\x20\x53\x4d\x3a\x25\x73" "\n"
 ,cpbsInd->locType);}}static VOID atPb_SetScpbrResToNv(CHAR const*pbNvKeyWord,
-UINT32 len){char converted[(0x1c0d+2291-0x24f6)]={(0xd85+4945-0x20d6)};assert(
-pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0x8c5+6477-0x2208),"\x25\x64",
-len);(VOID)sc_cfg_set(pbNvKeyWord,converted);}VOID atPb_ScpbrTestRsp(
-T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0xc3c+5707-0x2287)};
-CHAR pbUsed[(0x1287+4275-0x2308)]={(0x738+5077-0x1b0d)};sc_cfg_get(
+UINT32 len){char converted[(0x315+7921-0x21fc)]={(0x228+603-0x483)};assert(
+pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0x18fc+2186-0x217c),"\x25\x64"
+,len);(VOID)sc_cfg_set(pbNvKeyWord,converted);}VOID atPb_ScpbrTestRsp(
+T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0xd61+5313-0x2222)};
+CHAR pbUsed[(0x1523+622-0x175f)]={(0x179+9317-0x25de)};sc_cfg_get(
 NV_PB_USEDENTRIES,pbUsed,sizeof(pbUsed));g_zPb_DelIndex=(UINT32)scpbsInd->
 minIndex;pbPara.simType=ZPB_USIM;pbPara.maxRecordNum=scpbsInd->maxIndex;pbPara.
 usedRecordNum=atoi(pbUsed);pbPara.maxNumberLen=scpbsInd->maxNumberLen;pbPara.
@@ -224,23 +223,23 @@
 atPb_SetScpbrResToNv(ZPB_NV_USIMINDEXMIN,(UINT32)scpbsInd->minIndex);
 atPb_SetScpbrResToNv(ZPB_NV_USIMINDEXMAX,(UINT32)scpbsInd->maxIndex);(VOID)
 atPb_SetSimCapacityTable(pbPara);}int atPb_SendScpbrSet_repeat(sem_t tSemId){int
- min=(0x34d+8664-0x2525);int max=(0x1a68+735-0x1d47);int res=(0x527+1902-0xc95);
-int index=(0x9a+6775-0x1b11);CHAR pbMin[(0x28a+8131-0x221b)]={
-(0xc5a+6665-0x2663)};CHAR pbMax[(0xf07+4754-0x2167)]={(0x2ec+4720-0x155c)};int 
-indexmin=(0x230+1587-0x863);int indexmax=(0x16d5+1781-0x1dca);T_zPb_ScpbrReadRes
- scpbrReadInfo={(0x184f+147-0x18e2)};sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof
-(pbMin));sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));(VOID)sc_cfg_set(
-ZPB_NV_INIT,ZPB_LOADING);if(strcmp(pbMin,"\x30")==(0xbd9+3765-0x1a8e)||strcmp(
-pbMax,"\x30")==(0x699+5047-0x1a50)){sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);
-printf(
+ min=(0xab+4301-0x1178);int max=(0x1acc+1442-0x206e);int res=
+(0x1400+3123-0x2033);int index=(0xe3c+5627-0x2437);CHAR pbMin[(0xa63+666-0xccb)]
+={(0x9ca+5755-0x2045)};CHAR pbMax[(0x162d+2226-0x1ead)]={(0xc6f+234-0xd59)};int 
+indexmin=(0xedd+3533-0x1caa);int indexmax=(0x1896+3068-0x2492);
+T_zPb_ScpbrReadRes scpbrReadInfo={(0x136+7655-0x1f1d)};sc_cfg_get(
+ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
+sizeof(pbMax));(VOID)sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);if(strcmp(pbMin,"\x30")
+==(0x211+9020-0x254d)||strcmp(pbMax,"\x30")==(0x16a0+3248-0x2350)){sc_cfg_set(
+ZPB_NV_INIT,ZPB_OPERATE_SUC);printf(
 "\x61\x74\x50\x62\x5f\x53\x65\x6e\x64\x53\x63\x70\x62\x72\x53\x65\x74\x20\x63\x61\x72\x64\x20\x75\x6e\x73\x75\x70\x70\x6f\x72\x74\x20\x70\x62" "\n"
-);return-(0x1478+2016-0x1c57);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
-"\x25\x64",&max);if((min<(0x5a8+3983-0x1537)||min>INT_MAX-(0x910+6375-0x21f6))||
-(max<(0xe5a+1989-0x161f)||max>INT_MAX-(0x7f4+3588-0x15f7))){printf(
+);return-(0xd47+2840-0x185e);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
+"\x25\x64",&max);if((min<(0xbfd+4227-0x1c80)||min>INT_MAX-(0xe71+2984-0x1a18))||
+(max<(0xe24+6164-0x2638)||max>INT_MAX-(0xa64+4323-0x1b46))){printf(
 "\x61\x74\x50\x62\x5f\x53\x65\x6e\x64\x53\x63\x70\x62\x72\x53\x65\x74\x20\x70\x62\x20\x6e\x75\x6d\x20\x65\x72\x72\x20\x6d\x69\x6e\x3a\x25\x64\x2c\x20\x6d\x61\x78\x3a\x25\x64" "\n"
-,min,max);return-(0x49b+8157-0x2477);}while((0x81+9767-0x26a7)){if(indexmin<min)
-{indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0x825+57-0x85d);if(indexmax
->max){indexmax=max;break;}printf(
+,min,max);return-(0xa44+7113-0x260c);}while((0xe09+538-0x1022)){if(indexmin<min)
+{indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0xddb+3563-0x1bc5);if(
+indexmax>max){indexmax=max;break;}printf(
 "\x5b\x50\x42\x5d\x20\x31\x31\x31\x20\x69\x6e\x64\x65\x78\x6d\x69\x6e\x3d\x25\x64\x2c\x20\x69\x6e\x64\x65\x78\x6d\x61\x78\x3d\x25\x64\x2c\x28\x25\x64\x2d\x25\x64\x29" "\n"
 ,indexmin,indexmax,min,max);}else{indexmin=indexmin+ZPB_INIT_LOAD_RECORD_NUM;if(
 indexmin>max){printf(
@@ -251,17 +250,17 @@
 ,indexmin,indexmax,min,max);}scpbrReadInfo.minIndex=indexmin;scpbrReadInfo.
 maxIndex=indexmax;res=ipc_send_message(MODULE_ID_PB,MODULE_ID_AT_CTL,
 MSG_CMD_READ_PB_REQ,sizeof(T_zPb_ScpbrReadRes),&scpbrReadInfo,
-(0xded+5369-0x22e6));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
-(0x23+3073-0xc23)){break;}}return g_PbOptRsp.result;}
-#if (0x17b+5378-0x167d)

+(0x1326+656-0x15b6));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
+(0x639+7783-0x249f)){break;}}return g_PbOptRsp.result;}
+#if (0xcc4+4925-0x2001)

 int atPb_SendScpbrSet(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){UINT32 
-indexmin=(0x9+8851-0x229c);UINT32 indexmax=(0x10ac+2635-0x1af7);CHAR atcmdMsg[
-(0x72c+3503-0x1495)]={(0x1142+611-0x13a5)};int res=(0xa99+1058-0xebb);CHAR pbMin
-[(0x1431+52-0x1433)]={(0xd96+1276-0x1292)};CHAR pbMax[(0x897+4699-0x1ac0)]={
-(0xe0+2713-0xb79)};sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+indexmin=(0x42+3574-0xe38);UINT32 indexmax=(0x194a+1225-0x1e13);CHAR atcmdMsg[
+(0xd63+2189-0x15aa)]={(0x1654+2263-0x1f2b)};int res=(0x13cf+2002-0x1ba1);CHAR 
+pbMin[(0x1346+2583-0x1d2b)]={(0x295+6359-0x1b6c)};CHAR pbMax[(0x91+9183-0x243e)]
+={(0x81d+5864-0x1f05)};sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
 sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));(VOID)sc_cfg_set(ZPB_NV_INIT
-,ZPB_LOADING);if(strcmp(pbMin,"\x30")==(0x10c0+2375-0x1a07)||strcmp(pbMax,"\x30"
-)==(0x369+564-0x59d)){printf(
+,ZPB_LOADING);if(strcmp(pbMin,"\x30")==(0x23d+5945-0x1976)||strcmp(pbMax,"\x30")
+==(0x290+4450-0x13f2)){printf(
 "\x61\x74\x50\x62\x5f\x53\x65\x6e\x64\x53\x63\x70\x62\x72\x53\x65\x74\x20\x63\x61\x72\x64\x20\x75\x6e\x73\x75\x70\x70\x6f\x72\x74\x20\x70\x62" "\n"
 );return ZAT_RESULT_OK;}sscanf(pbMin,"\x25\x64",&indexmin);sscanf(pbMax,
 "\x25\x64",&indexmax);(VOID)snprintf(atcmdMsg,sizeof(atcmdMsg),
@@ -270,45 +269,45 @@
 atcmdMsg,cid,pAtRst,atRstSize);pthread_mutex_unlock(&smsdb_mutex);return res;}
 #endif

 UINT8 atPb_EncodeText(CHAR*pbDst,CHAR const*pbTextSrc,UINT32 dstLen){UINT8 i=
-(0x4db+1798-0xbe1);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0xf93+5206-0x23e9)};if(
-pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0x7a7+2388-0x10f7)+
-ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0x903+2137-0x115c)],
-sizeof(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0x1e2b+1544-0x2433)
-;(i<strlen(pbTextSrc))&&(i*(0xd43+5571-0x2302)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
-snprintf(strTarget+i*(0x409+6277-0x1c8a)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-i
-*(0x1d52+1935-0x24dd)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i
-]);}strncpy(pbDst,strTarget,dstLen-(0x10ba+2823-0x1bc0));return ZUFI_SUCC;}}
-return ZUFI_FAIL;}VOID atPb_ScpbrSetRsp(T_zPb_ScpbrSetRes*atRes){
-T_zPb_WebContact pbRecord={(0xdd0+5633-0x23d1)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]=
-{(0x1d70+2291-0x2663)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0x1a6c+1785-0x2165)};int
- text_len=(0x1437+4079-0x2426);int tmp_len=(0x261+1455-0x810);CHAR tmp[
-ZPB_TEXT_SIZE_BYTES]={(0x2e5+5163-0x1710)};if(atRes->coding!=ZPB_UCS2){if(
+(0x890+3601-0x16a1);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0x192+5182-0x15d0)};if
+(pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0x8bd+5121-0x1cba)+
+ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0x1748+2858-0x2272)],
+sizeof(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0x37f+6585-0x1d38);
+(i<strlen(pbTextSrc))&&(i*(0x599+6515-0x1f08)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
+snprintf(strTarget+i*(0x872+2904-0x13c6)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-i
+*(0x3f8+121-0x46d)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i]);
+}strncpy(pbDst,strTarget,dstLen-(0x53b+8618-0x26e4));return ZUFI_SUCC;}}return 
+ZUFI_FAIL;}VOID atPb_ScpbrSetRsp(T_zPb_ScpbrSetRes*atRes){T_zPb_WebContact 
+pbRecord={(0x19e0+871-0x1d47)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]={
+(0x8d0+1648-0xf40)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0xa8+4125-0x10c5)};int 
+text_len=(0x878+4444-0x19d4);int tmp_len=(0x273+8055-0x21ea);CHAR tmp[
+ZPB_TEXT_SIZE_BYTES]={(0x107f+3298-0x1d61)};if(atRes->coding!=ZPB_UCS2){if(
 atPb_EncodeText(pbDst,atRes->text,ZPB_TEXT_SIZE_BYTES)==ZUFI_SUCC){strncpy(atRes
-->text,pbDst+(0xa28+2660-0x148a),sizeof(atRes->text)-(0x1a+3610-0xe33));}else{
+->text,pbDst+(0x1073+351-0x11d0),sizeof(atRes->text)-(0x535+5785-0x1bcd));}else{
 slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x53\x63\x70\x62\x72\x53\x65\x74\x52\x73\x70\x65\x6e\x63\x6f\x64\x65\x20\x65\x72\x72\x21\x2e" "\n"
 );return;}}else{text_len=atPb_String2Bytes(&atRes->text,&text,strlen(atRes->text
 ));tmp_len=atPb_GetU80Code(&text,text_len,&tmp,ZPB_TEXT_SIZE_BYTES);if(tmp_len<
-(0x973+2768-0x1443))return;memset(&text,(0x6bb+3864-0x15d3),ZPB_TEXT_SIZE_BYTES)
-;text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0x13d+1774-0x829)){
-memset(&atRes->text,(0x1234+1424-0x17c4),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->
-text,text+(0xaca+286-0xbe6),strlen(text)-(0xf8+7101-0x1cb3));}}pbRecord.pbId=-
-(0x8b7+3168-0x1516);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord.name,
-atRes->text,sizeof(pbRecord.name)-(0xbb+6227-0x190d));strncpy(pbRecord.
-mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0x152+701-0x40e));
+(0x6ec+3329-0x13ed))return;memset(&text,(0x7dd+7950-0x26eb),ZPB_TEXT_SIZE_BYTES)
+;text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0xac4+1418-0x104c))
+{memset(&atRes->text,(0x259+2267-0xb34),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->text
+,text+(0x703+7797-0x2576),strlen(text)-(0x51+3346-0xd61));}}pbRecord.pbId=-
+(0xb82+4372-0x1c95);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord.name,
+atRes->text,sizeof(pbRecord.name)-(0xedc+978-0x12ad));strncpy(pbRecord.
+mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0x164+7518-0x1ec1));
 strncpy(pbRecord.officeNumber,atRes->number2,sizeof(pbRecord.officeNumber)-
-(0x12f4+1203-0x17a6));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord
-.homeNumber)-(0x8ef+4692-0x1b42));strncpy(pbRecord.email,atRes->email,sizeof(
-pbRecord.email)-(0x87+8872-0x232e));pbRecord.pbLocation=ZPB_LOCATION_USIM;(VOID)
-atPb_LoadARecToPbmTable(&pbRecord);}VOID atPb_SetDelStatusMultOrAll(){if(
-g_zPb_DelStatusUsim.dealFailNum>(0x14da+1371-0x1a35)){if(g_zPb_DelStatusUsim.
-dealSuccNum>(0x893+193-0x954)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
+(0x185b+1951-0x1ff9));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord
+.homeNumber)-(0x15b+7102-0x1d18));strncpy(pbRecord.email,atRes->email,sizeof(
+pbRecord.email)-(0x1f3b+1743-0x2609));pbRecord.pbLocation=ZPB_LOCATION_USIM;(
+VOID)atPb_LoadARecToPbmTable(&pbRecord);}VOID atPb_SetDelStatusMultOrAll(){if(
+g_zPb_DelStatusUsim.dealFailNum>(0xf40+5417-0x2469)){if(g_zPb_DelStatusUsim.
+dealSuccNum>(0x3a3+1006-0x791)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
 ZPB_MUL_DEL_PART_SUC);}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);}}
 else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);}}
-#if (0x1301+429-0x14ae)

+#if (0x20af+227-0x2192)

 VOID atPb_RecvScpbwAddErr(UINT8*pErrCode){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
-ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0xc5a+643-0xedb))==
-(0xbec+2168-0x1464))){(VOID)sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x79\x65\x73");
+ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0x532+5308-0x19ec))
+==(0x1085+995-0x1468))){(VOID)sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x79\x65\x73");
 printf(
 "\x70\x62\x3a\x52\x65\x63\x76\x20\x43\x4d\x45\x20\x45\x72\x72\x43\x6f\x64\x65\x3a\x20\x32\x30\x2e" "\n"
 );}else{printf(
@@ -319,85 +318,85 @@
 ZPB_NEW_ERROR);printf(
 "\x70\x62\x3a\x52\x65\x63\x76\x20\x41\x74\x20\x53\x63\x70\x62\x77\x20\x6d\x6f\x64\x69\x66\x79\x20\x65\x72\x72\x2e" "\n"
 );}VOID pb_AsctoHex(UINT16*pcHex,SINT32 iDstLen,UINT8 const*pcASC,SINT32 iSrcLen
-){UINT32 iOddOrEven=(0xae5+6563-0x2488);UINT8 iTemp=(0x9ba+6791-0x2441);SINT32 i
-=(0x90b+3366-0x1631);if((NULL==pcHex)||(NULL==pcASC)||((0x9e5+7176-0x25ed)==
-iDstLen)||(iDstLen<(iSrcLen/(0x16a+4865-0x1469)+(0x1e6b+2006-0x2640)))){return;}
-for(i=(0x734+148-0x7c8);i<iSrcLen;i++){if(iOddOrEven%(0x8d5+5911-0x1fea)==
-(0x32+3369-0xd5b)){iTemp=*(pcASC+i);if((iTemp>=((char)(0xa76+3566-0x1834)))&&(
-iTemp<=((char)(0x6e7+3851-0x15b9)))){*(pcHex+i/(0x9dd+6522-0x2355))|=(UINT8)(
-iTemp-(0x1047+5389-0x2524))<<(0x1491+3224-0x2125);}else{*(pcHex+i/
-(0x131a+3490-0x20ba))|=(UINT8)(iTemp-(0x1d50+879-0x2088))<<(0x4dd+6598-0x1e9f);}
-}else{iTemp=*(pcASC+i);if((iTemp>=((char)(0x624+4671-0x1833)))&&(iTemp<=
-((char)(0x1311+4817-0x25a9)))){*(pcHex+i/(0x1fb4+1206-0x2468))|=iTemp-
-(0x3ef+864-0x71f);}else{*(pcHex+i/(0xa86+6141-0x2281))|=iTemp-
-(0x10d+5066-0x14a0);}}iOddOrEven++;}}SINT32 atPb_IfUcs2IsSMS7(UINT16*psUcs2,
-SINT32 iLength){int iRetVal=(0x66b+972-0xa36);char cTemp;int i=
-(0xc74+5138-0x2086);if(NULL==psUcs2){return-(0xbe6+261-0xcea);}for(i=
-(0x391+2046-0xb8f);i<iLength;i++){if((0x10e4+572-0x1220)>psUcs2[i]){switch(
-psUcs2[i]){case(0xe14+5477-0x236d):case(0x85d+4637-0x1a1f):case
-(0x128d+3763-0x20e4):case(0x11b4+1667-0x17da):case(0x86b+7225-0x2446):case
-(0x236c+624-0x2561):case(0x1321+2764-0x1d71):case(0x9f3+7516-0x26d2):case
-(0x183d+248-0x18b7):case(0xb8b+1475-0x10aa):case(0x169+5397-0x165e):{break;}
+){UINT32 iOddOrEven=(0x1c40+825-0x1f79);UINT8 iTemp=(0x628+544-0x848);SINT32 i=
+(0x170d+1556-0x1d21);if((NULL==pcHex)||(NULL==pcASC)||((0x3d1+3170-0x1033)==
+iDstLen)||(iDstLen<(iSrcLen/(0xef8+1230-0x13c4)+(0x14f+6575-0x1afd)))){return;}
+for(i=(0x1618+671-0x18b7);i<iSrcLen;i++){if(iOddOrEven%(0xc91+53-0xcc4)==
+(0x50a+4900-0x182e)){iTemp=*(pcASC+i);if((iTemp>=((char)(0x1154+4830-0x2402)))&&
+(iTemp<=((char)(0x1120+191-0x11a6)))){*(pcHex+i/(0x1396+557-0x15c1))|=(UINT8)(
+iTemp-(0x2d4+4905-0x15cd))<<(0x51d+1490-0xaeb);}else{*(pcHex+i/
+(0x24c6+283-0x25df))|=(UINT8)(iTemp-(0x183c+1199-0x1cb4))<<(0x916+438-0xac8);}}
+else{iTemp=*(pcASC+i);if((iTemp>=((char)(0xe64+4386-0x1f56)))&&(iTemp<=
+((char)(0x738+2707-0x1192)))){*(pcHex+i/(0x1a3+2290-0xa93))|=iTemp-
+(0xe99+3342-0x1b77);}else{*(pcHex+i/(0x13af+281-0x14c6))|=iTemp-
+(0x887+3934-0x17ae);}}iOddOrEven++;}}SINT32 atPb_IfUcs2IsSMS7(UINT16*psUcs2,
+SINT32 iLength){int iRetVal=(0x459+7804-0x22d4);char cTemp;int i=
+(0x927+251-0xa22);if(NULL==psUcs2){return-(0xe85+5305-0x233d);}for(i=
+(0x4f2+2100-0xd26);i<iLength;i++){if((0x94d+7393-0x252e)>psUcs2[i]){switch(
+psUcs2[i]){case(0xeb1+4888-0x21bd):case(0xcd4+2843-0x1794):case
+(0x563+7617-0x22c8):case(0x9e7+2723-0x142d):case(0x55b+1086-0x93b):case
+(0xf69+2785-0x19cf):case(0x7e2+5750-0x1ddc):case(0x17a6+2628-0x216d):case
+(0xea6+4643-0x204b):case(0x2ad+1189-0x6ae):case(0x791+4346-0x186b):{break;}
 default:{cTemp=(char)G_ZPB_NEWUCS2TOGSM[psUcs2[i]];if(ZPB_NON_GSM==cTemp){
-iRetVal=(0x332+2663-0xd99);}break;}}}else{switch(psUcs2[i]){case
-(0xcdf+5214-0x1da9):case(0x59a+507-0x3ef):case(0x1087+419-0xe97):case
-(0x1276+1282-0x13dd):case(0x4ef+7278-0x1db4):case(0x1a08+1015-0x1a5f):case
-(0x1346+1511-0x1565):case(0x949+328-0x6ee):case(0x22f6+520-0x2146):case 926:{
-break;}default:{iRetVal=(0xa6+9818-0x2700);break;}}}if((0x3b7+7084-0x1f63)==
-iRetVal){break;}}return iRetVal;}static UINT8 atPb_EncodeNameToUcs2(char*pbDst,
-UINT32 iDstLen,char const*pbSrc){UINT16 acHex[(0x21c1+866-0x2423)]={
-(0x56b+87-0x5c2)};SINT32 srclen=(0x861+6424-0x2179);SINT32 rest=
-(0x7aa+6062-0x1f58);assert(pbDst!=NULL&&pbSrc!=NULL);srclen=(SINT32)strlen(pbSrc
-);slog(PB_PRINT,SLOG_DEBUG,
+iRetVal=(0x1965+2552-0x235d);}break;}}}else{switch(psUcs2[i]){case
+(0xea2+5938-0x2240):case(0x9df+2252-0xf05):case(0x10e6+3281-0x1a24):case
+(0x1c15+2211-0x211d):case(0xb72+3647-0x1608):case(0xd39+5146-0x1db3):case
+(0x154d+3565-0x1f72):case(0x1652+1739-0x197a):case(0xe55+2508-0x1469):case
+(0x1c13+2503-0x223c):{break;}default:{iRetVal=(0x1afd+1864-0x2245);break;}}}if(
+(0x24a1+137-0x252a)==iRetVal){break;}}return iRetVal;}static UINT8 
+atPb_EncodeNameToUcs2(char*pbDst,UINT32 iDstLen,char const*pbSrc){UINT16 acHex[
+(0x20c+8082-0x209e)]={(0x6f7+6222-0x1f45)};SINT32 srclen=(0x983+935-0xd2a);
+SINT32 rest=(0x23c+8677-0x2421);assert(pbDst!=NULL&&pbSrc!=NULL);srclen=(SINT32)
+strlen(pbSrc);slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x50\x62\x5f\x45\x6e\x63\x6f\x64\x65\x4e\x61\x6d\x65\x54\x6f\x55\x63\x73\x32\x20\x69\x6e\x70\x75\x74\x20\x70\x73\x53\x72\x63\x3d\x25\x73\x2c\x69\x53\x72\x63\x4c\x65\x6e\x3d\x25\x64" "\n"
-,pbSrc,srclen);pb_AsctoHex(acHex,(0x18b2+52-0x17e6),(UINT8*)pbSrc,srclen);rest=
-atPb_IfUcs2IsSMS7(acHex,srclen/(0x180+6020-0x1900));if(rest==(0x16c+6536-0x1af3)
-){return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest==(0x358+6376-0x1c40)
-){if(strlen(pbSrc)+(0xf61+716-0x122b)<iDstLen){memcpy(pbDst,"\x38\x30",
-(0x1969+2141-0x21c4));memcpy(pbDst+(0x42+5801-0x16e9),pbSrc,srclen);return 
-ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(T_zPb_WebContact const*
-pbRecv,BOOL pbNewFlag){SINT32 count=(0x7b4+4727-0x1a2a);SINT32 total=
-(0x1dad+963-0x2170);SINT32*IndexType=NULL;if((NULL==pbRecv)){slog(PB_PRINT,
-SLOG_ERR,
+,pbSrc,srclen);pb_AsctoHex(acHex,(0x1ddc+314-0x1e16),(UINT8*)pbSrc,srclen);rest=
+atPb_IfUcs2IsSMS7(acHex,srclen/(0x6dd+7801-0x2552));if(rest==
+(0x1f54+1873-0x26a4)){return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest
+==(0x785+6903-0x227c)){if(strlen(pbSrc)+(0xadf+3355-0x17f8)<iDstLen){memcpy(
+pbDst,"\x38\x30",(0x1799+2817-0x2298));memcpy(pbDst+(0x76d+3856-0x167b),pbSrc,
+srclen);return ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(
+T_zPb_WebContact const*pbRecv,BOOL pbNewFlag){SINT32 count=(0x1590+1808-0x1c9f);
+SINT32 total=(0x2e4+4377-0x13fd);SINT32*IndexType=NULL;if((NULL==pbRecv)){slog(
+PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x66\x69\x6e\x64\x5f\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3a\x74\x68\x65\x20\x70\x61\x72\x61\x20\x6f\x66\x20\x66\x69\x6e\x64\x5f\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x20\x61\x72\x65\x20\x4e\x55\x4c\x4c" "\n"
-);return-(0x1165+4601-0x235d);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv
-->pbLocation){total=g_zPb_SimIndex[(0x17d5+3035-0x23b0)];IndexType=
+);return-(0x1023+3016-0x1bea);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv
+->pbLocation){total=g_zPb_SimIndex[(0x125f+2823-0x1d66)];IndexType=
 g_zPb_SimIndex;}else if(ZPB_LOCATION_AP==pbRecv->pbLocation){total=g_zPb_ApIndex
-[(0x5c8+6360-0x1ea0)];IndexType=g_zPb_ApIndex;}for(;count<=total;count++){if((
+[(0x7d0+3026-0x13a2)];IndexType=g_zPb_ApIndex;}for(;count<=total;count++){if((
 NULL!=IndexType)&&(IndexType[count]==PBM_ERROR_NOT_FOUND)){break;}}if(count>
 total){slog(PB_PRINT,SLOG_ERR,
 "\x70\x62\x3a\x66\x69\x6e\x64\x5f\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3a\x63\x61\x6e\x20\x6e\x6f\x74\x20\x66\x69\x6e\x64\x20\x69\x6e\x64\x65\x78\x5f\x69\x64\x2c\x69\x6e\x64\x65\x78\x5f\x69\x64\x3d\x25\x64" "\n" "\x2e"
-,count);return-(0x1029+3593-0x1e31);}slog(PB_PRINT,SLOG_DEBUG,
+,count);return-(0xb88+1974-0x133d);}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x66\x69\x6e\x64\x5f\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x3a\x20\x69\x6e\x64\x65\x78\x5f\x69\x64\x3d\x25\x64\x2c\x20\x74\x6f\x74\x61\x6c\x20\x69\x73\x20\x25\x64" "\n"
 ,count,total);return count;}else{return pbRecv->pbIndex;}}BOOL atPb_GetASCII(
-CHAR*pSrc,CHAR*pDst,SINT32 len){SINT32 j=(0x17d7+3514-0x2591);SINT32 i=
-(0x22c3+130-0x2345);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0xe92+2648-0x18ea)};CHAR str
-[(0x14fa+372-0x166b)]={(0xc2c+3751-0x1ad3)};SINT32 length=(0x238+1455-0x7e7);
-length=atPb_String2Bytes(pSrc,buf,len);for(i=(0x66b+6974-0x21a9);i<length;i+=
-(0xb3c+6083-0x22fd)){if(buf[i]!=(0x1234+873-0x159d)||buf[i+(0x7f4+291-0x916)]>
-(0x877+3017-0x13c1)){return FALSE;}pDst[j++]=buf[i+(0x1656+2111-0x1e94)];}return
- TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL 
-pbNewFlag,sem_t semId){int atRes=(0x135a+2358-0x1c90);CHAR pbName[
-ZPB_TEXT_SIZE_BYTES+(0x1350+1578-0x1977)]={(0x157a+2657-0x1fdb)};CHAR buf_src[
-ZPB_TEXT_SIZE_BYTES+(0xb8b+6782-0x2606)]={(0x176f+535-0x1986)};CHAR buf_dest[
-ZPB_TEXT_SIZE_BYTES+(0x139c+3575-0x2190)]={(0x1620+2124-0x1e6c)};
-T_zPb_ScpbwParam scpbwParam={(0x85b+2061-0x1068)};int len=(0x2d5+4248-0x136d);
-atPb_WebRecodeShow(pWebPbContact);if(atPb_GetASCII(pWebPbContact->name,pbName,
-strlen(pWebPbContact->name))){scpbwParam.coding=(0x329+914-0x6bb);}else{len=
-atPb_String2Bytes(pWebPbContact->name,buf_src,strlen(pWebPbContact->name));len=
-atpb_CvtUcs2ToAlphaField(buf_src,len,buf_dest);atPb_Bytes2String(buf_dest,pbName
-,len);scpbwParam.coding=(0x1650+3035-0x222a);}scpbwParam.pbIndex=pWebPbContact->
-pbIndex;strncpy(scpbwParam.name,pbName,sizeof(scpbwParam.name)-
-(0x66b+7249-0x22bb));strncpy(scpbwParam.mobilNumber,pWebPbContact->mobilNumber,
-sizeof(scpbwParam.mobilNumber)-(0xa1d+2166-0x1292));strncpy(scpbwParam.
-officeNumber,pWebPbContact->officeNumber,sizeof(scpbwParam.officeNumber)-
-(0xa83+1839-0x11b1));strncpy(scpbwParam.homeNumber,pWebPbContact->homeNumber,
-sizeof(scpbwParam.homeNumber)-(0xa03+6821-0x24a7));strncpy(scpbwParam.email,
-pWebPbContact->email,sizeof(scpbwParam.email)-(0x153+2248-0xa1a));
-ipc_send_message(MODULE_ID_PB,MODULE_ID_AT_CTL,MSG_CMD_ADD_MODIFY_PB_REQ,sizeof(
-T_zPb_ScpbwParam),(unsigned char*)&scpbwParam,(0x139+4416-0x1279));sem_wait(&
-g_Pb_sem_id);if(g_PbOptRsp.result!=(0x23+2285-0x90f)){(VOID)sc_cfg_set(
-ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);if(TRUE==pbNewFlag){printf(
+CHAR*pSrc,CHAR*pDst,SINT32 len){SINT32 j=(0xbd4+4400-0x1d04);SINT32 i=
+(0x328+3178-0xf92);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0xdf0+6033-0x2581)};CHAR str[
+(0xe0b+474-0xfe2)]={(0x1225+2127-0x1a74)};SINT32 length=(0x227b+314-0x23b5);
+length=atPb_String2Bytes(pSrc,buf,len);for(i=(0xdc4+1295-0x12d3);i<length;i+=
+(0xa9b+542-0xcb7)){if(buf[i]!=(0x886+3026-0x1458)||buf[i+(0x8d2+3684-0x1735)]>
+(0x1123+706-0x1366)){return FALSE;}pDst[j++]=buf[i+(0x96a+1777-0x105a)];}return 
+TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL pbNewFlag
+,sem_t semId){int atRes=(0x4f4+7989-0x2429);CHAR pbName[ZPB_TEXT_SIZE_BYTES+
+(0x944+7318-0x25d7)]={(0xf21+487-0x1108)};CHAR buf_src[ZPB_TEXT_SIZE_BYTES+
+(0x221b+1180-0x26b4)]={(0x9d4+7125-0x25a9)};CHAR buf_dest[ZPB_TEXT_SIZE_BYTES+
+(0x13f+8895-0x23fb)]={(0x1194+3082-0x1d9e)};T_zPb_ScpbwParam scpbwParam={
+(0x21f+492-0x40b)};int len=(0x5e3+1480-0xbab);atPb_WebRecodeShow(pWebPbContact);
+if(atPb_GetASCII(pWebPbContact->name,pbName,strlen(pWebPbContact->name))){
+scpbwParam.coding=(0xe32+1589-0x1467);}else{len=atPb_String2Bytes(pWebPbContact
+->name,buf_src,strlen(pWebPbContact->name));len=atpb_CvtUcs2ToAlphaField(buf_src
+,len,buf_dest);atPb_Bytes2String(buf_dest,pbName,len);scpbwParam.coding=
+(0x21dd+1030-0x25e2);}scpbwParam.pbIndex=pWebPbContact->pbIndex;strncpy(
+scpbwParam.name,pbName,sizeof(scpbwParam.name)-(0x765+6515-0x20d7));strncpy(
+scpbwParam.mobilNumber,pWebPbContact->mobilNumber,sizeof(scpbwParam.mobilNumber)
+-(0x191+1070-0x5be));strncpy(scpbwParam.officeNumber,pWebPbContact->officeNumber
+,sizeof(scpbwParam.officeNumber)-(0x1252+3686-0x20b7));strncpy(scpbwParam.
+homeNumber,pWebPbContact->homeNumber,sizeof(scpbwParam.homeNumber)-
+(0x10ff+808-0x1426));strncpy(scpbwParam.email,pWebPbContact->email,sizeof(
+scpbwParam.email)-(0x18d+6349-0x1a59));ipc_send_message(MODULE_ID_PB,
+MODULE_ID_AT_CTL,MSG_CMD_ADD_MODIFY_PB_REQ,sizeof(T_zPb_ScpbwParam),(unsigned 
+char*)&scpbwParam,(0x4a3+2392-0xdfb));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.
+result!=(0x5f9+7625-0x23c1)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);
+if(TRUE==pbNewFlag){printf(
 "\x70\x62\x3a\x61\x64\x64\x20\x53\x63\x70\x62\x77\x20\x65\x72\x72\x6f\x72\x2e" "\n"
 );}else{printf(
 "\x70\x62\x3a\x6d\x6f\x64\x69\x66\x79\x20\x53\x63\x70\x62\x77\x20\x65\x72\x72\x6f\x72\x2e" "\n"
@@ -409,17 +408,17 @@
 );}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
 "\x70\x62\x3a\x57\x72\x69\x74\x65\x43\x6f\x6e\x74\x61\x63\x74\x54\x6f\x50\x62\x6d\x54\x61\x62\x6c\x65\x20\x65\x72\x72\x6f\x72\x2e" "\n"
 );}}VOID atWeb_AddOnePb(T_zPb_WebContact*webPbContact,sem_t semId){SINT32 
-idleIndex=(0x16a3+2115-0x1ee5);T_zPb_Header pbHeader={(0x488+1661-0xb05)};BOOL 
-pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0x686+635-0x901)};CHAR ptFlag[
-(0x604+1979-0xdab)]={(0x1955+85-0x19aa)};printf(
+idleIndex=(0xc59+3432-0x19c0);T_zPb_Header pbHeader={(0x205c+907-0x23e7)};BOOL 
+pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0xaf9+499-0xcec)};CHAR ptFlag[
+(0x3ca+6063-0x1b65)]={(0x1fea+1496-0x25c2)};printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x2c\x20\x70\x62\x49\x64\x3d\x25\x64\x21" "\n"
-,webPbContact->pbId);if(-(0xe06+3983-0x1d94)==webPbContact->pbId){slog(PB_PRINT,
+,webPbContact->pbId);if(-(0x461+2267-0xd3b)==webPbContact->pbId){slog(PB_PRINT,
 SLOG_DEBUG,
 "\x70\x62\x3a\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x20\x6e\x65\x77\x2e" "\n"
 );pbNewFlag=TRUE;idleIndex=atPb_FindIdleIndex(webPbContact,pbNewFlag);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x20\x69\x64\x6c\x65\x49\x6e\x64\x65\x78\x3d\x25\x64\x2e" "\n"
-,idleIndex);if(idleIndex!=-(0x583+7144-0x216a)){webPbContact->pbIndex=idleIndex;
-}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
+,idleIndex);if(idleIndex!=-(0xec+3284-0xdbf)){webPbContact->pbIndex=idleIndex;}
+else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
 "\x5b\x50\x42\x5d\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x66\x75\x6c\x6c\x2c\x20\x63\x61\x6e\x20\x6e\x6f\x74\x20\x61\x64\x64\x20\x72\x65\x63\x6f\x64\x65\x20\x61\x6e\x79\x20\x6d\x6f\x72\x65\x2e" "\n"
 );return;}}else{printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x20\x6d\x6f\x64\x69\x66\x79\x2e" "\n"
@@ -437,27 +436,27 @@
 );(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_LOCATION_IS_NULL);}printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x20\x64\x65\x6c\x5f\x69\x64\x3d\x25\x64\x2e" "\n"
 ,webPbContact->del_id);sc_cfg_get(ZPB_NV_WRITE_FLAG,ptFlag,sizeof(ptFlag));if(
-(0x137a+481-0x155b)==strcmp("\x30",ptFlag)&&-(0x1b0a+2574-0x2517)!=webPbContact
-->del_id){delRecord.delId[(0xdac+792-0x10c4)]=webPbContact->del_id;
-atWeb_DelOnepb(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,
-sem_t semId){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x1619+1196-0x1ac5)};int atRes
-=(0x46a+3379-0x119d);SINT32 delTime=(0xc58+4803-0x1f1b);
-atPb_GetLocationIndexForDel(delRecord,delTime);printf(
+(0x6b2+4546-0x1874)==strcmp("\x30",ptFlag)&&-(0x1b9+6475-0x1b03)!=webPbContact->
+del_id){delRecord.delId[(0xbdc+5978-0x2336)]=webPbContact->del_id;atWeb_DelOnepb
+(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,sem_t semId){
+CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x51f+8283-0x257a)};int atRes=
+(0x8a7+1131-0xd12);SINT32 delTime=(0x1511+68-0x1555);atPb_GetLocationIndexForDel
+(delRecord,delTime);printf(
 "\x5b\x50\x42\x5d\x20\x64\x65\x6c\x5f\x61\x5f\x70\x62\x6d\x5f\x72\x65\x63\x6f\x72\x64\x2d\x2d\x64\x65\x6c\x20\x69\x6e\x64\x65\x78\x3d\x25\x64\x2c\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64" "\n"
-,delRecord->delIndex[(0x692+6446-0x1fc0)],delRecord->delLocation);if(
+,delRecord->delIndex[(0x793+5834-0x1e5d)],delRecord->delLocation);if(
 ZPB_LOCATION_AP==delRecord->delLocation){if(ZPB_DB_OK==atPb_DelARecFromPbmTable(
 delRecord,delTime)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x44\x65\x6c\x4f\x6e\x65\x70\x62\x2d\x2d\x64\x65\x6c\x20\x41\x50\x20\x73\x75\x63\x63\x65\x73\x73" "\n"
 );return;}slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x3a\x64\x65\x6c\x5f\x61\x5f\x70\x62\x6d\x5f\x72\x65\x63\x6f\x72\x64\x3a\x72\x65\x6d\x6f\x76\x65\x20\x72\x65\x63\x20\x66\x72\x6f\x6d\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65\x20\x66\x61\x69\x6c\x65\x64" "\n"
 );(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);}else if(ZPB_LOCATION_USIM==
-delRecord->delLocation){CHAR pbMax[(0xda7+2294-0x166b)]={(0x182+4661-0x13b7)};
+delRecord->delLocation){CHAR pbMax[(0xe2d+1501-0x13d8)]={(0x1fc+5876-0x18f0)};
 sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));if((delRecord->delIndex[
-(0x74+6353-0x1945)]>=(0x16c6+1910-0x1e3b))&&(delRecord->delIndex[
-(0x796+5351-0x1c7d)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
+(0x393+8973-0x26a0)]>=(0x1c11+1893-0x2375))&&(delRecord->delIndex[
+(0xc2+8611-0x2265)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
 MODULE_ID_AT_CTL,MSG_CMD_DELETE_PB_REQ,sizeof(int),(unsigned char*)&delRecord->
-delIndex[(0xe39+2247-0x1700)],(0x2064+542-0x2282));sem_wait(&g_Pb_sem_id);if(
-g_PbOptRsp.result!=(0x20e0+1257-0x25c8)){sc_cfg_set(ZPB_NV_WRITE_FLAG,
+delIndex[(0x979+4981-0x1cee)],(0xb37+6762-0x25a1));sem_wait(&g_Pb_sem_id);if(
+g_PbOptRsp.result!=(0xf22+3445-0x1c96)){sc_cfg_set(ZPB_NV_WRITE_FLAG,
 ZPB_DEL_ERROR);}sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x6e\x6f");}if(ZPB_DB_OK==
 atPb_DelARecFromPbmTable(delRecord,delTime)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
 ZPB_OPERATE_SUC);printf(
@@ -467,9 +466,9 @@
 "\x70\x62\x3a\x64\x65\x6c\x5f\x61\x5f\x70\x62\x6d\x5f\x72\x65\x63\x6f\x72\x64\x3a\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x69\x73\x20\x4e\x55\x4c\x4c" "\n"
 );(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_LOCATION_IS_NULL);}}VOID 
 atWeb_DelMultPb(T_zPb_DelInfo*delRecord,sem_t semId){CHAR errCode[
-ZSVR_AT_RES_CODE_LEN]={(0x669+3232-0x1309)};int atRes=(0xf90+3246-0x1c3e);SINT32
- delCount=(0x1a26+239-0x1b15);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
-g_zPb_DelStatusUsim,(0x1b98+1510-0x217e),sizeof(T_zPb_DelStatusMultiOrAll));
+ZSVR_AT_RES_CODE_LEN]={(0xba4+2140-0x1400)};int atRes=(0x8dc+5025-0x1c7d);SINT32
+ delCount=(0x121+5926-0x1847);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
+g_zPb_DelStatusUsim,(0x695+5240-0x1b0d),sizeof(T_zPb_DelStatusMultiOrAll));
 g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_MULTI_RECORD_USIM;for(;delCount<delRecord->
 delTotal;delCount++){slog(PB_PRINT,SLOG_DEBUG,
 "\x70\x62\x33\x3a\x64\x65\x6c\x49\x64\x5b\x25\x64\x5d\x3d\x25\x64\x2c\x64\x65\x6c\x5f\x70\x62\x6d\x5f\x69\x6e\x64\x65\x78\x5b\x25\x64\x5d\x3d\x25\x64" "\n"
@@ -480,14 +479,14 @@
 "\x70\x62\x3a\x70\x62\x6d\x3a\x72\x65\x6d\x6f\x76\x65\x20\x74\x68\x65\x20\x69\x28\x25\x64\x29\x20\x72\x65\x63\x20\x66\x72\x6f\x6d\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65\x20\x66\x61\x69\x6c\x65\x64" "\n"
 ,delCount);g_zPb_DelStatusUsim.dealFailNum++;continue;}g_zPb_DelStatusUsim.
 dealSuccNum++;}else if(ZPB_LOCATION_USIM==delRecord->delLocation){CHAR pbMax[
-(0x6d2+6590-0x205e)]={(0x464+6102-0x1c3a)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
-sizeof(pbMax));if((delRecord->delIndex[delCount]>=(0x8a9+897-0xc29))&&(delRecord
-->delIndex[delCount]<=atoi(pbMax))){printf(
+(0x306+4238-0x1362)]={(0x160d+553-0x1836)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
+sizeof(pbMax));if((delRecord->delIndex[delCount]>=(0x499+3354-0x11b2))&&(
+delRecord->delIndex[delCount]<=atoi(pbMax))){printf(
 "\x70\x62\x39\x3a\x61\x74\x57\x65\x62\x5f\x44\x65\x6c\x4d\x75\x6c\x74\x50\x62\x3a\x72\x65\x6d\x6f\x76\x65\x20\x74\x68\x65\x20\x69\x6e\x64\x65\x78\x28\x25\x64\x29\x20\x72\x65\x63\x20\x66\x72\x6f\x6d\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65" "\n"
 ,delRecord->delIndex[delCount]);ipc_send_message(MODULE_ID_PB,MODULE_ID_AT_CTL,
 MSG_CMD_DELETE_PB_REQ,sizeof(int),(unsigned char*)&delRecord->delIndex[delCount]
-,(0x158+5829-0x181d));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0xa7f+7122-0x2650)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+,(0x171d+990-0x1afb));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0xcc4+6153-0x24cc)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
 ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);}else{g_zPb_DelStatusUsim.dealSuccNum++;
 sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x6e\x6f");}}else{continue;}(VOID)
 atPb_DelSimRecFromPbTable(delRecord->delIndex[delCount]);}else{slog(PB_PRINT,
@@ -495,14 +494,14 @@
 "\x70\x62\x3a\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x69\x73\x20\x4e\x55\x4c\x4c" "\n"
 );(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_LOCATION_IS_NULL);}}
 atPb_SetDelStatusMultOrAll();}T_zPb_DbResult atPb_DelRecByGroup(VOID){
-T_zPb_DbResult result=ZPB_DB_OK;T_zPb_ApIndex index={(0x4f9+6069-0x1cae)};SINT32
- i=(0x13d8+2145-0x1c38);result=atPb_DelRecFromPbmTableByGroup(&index);if(
+T_zPb_DbResult result=ZPB_DB_OK;T_zPb_ApIndex index={(0x662+1694-0xd00)};SINT32 
+i=(0x1a5b+2956-0x25e6);result=atPb_DelRecFromPbmTableByGroup(&index);if(
 ZPB_DB_OK!=result){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);return 
 result;}(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(i=
-(0x18ba+482-0x1a9b);i<=ZPB_AP_MAX_RECORD;i++){if((0x2d2+2153-0xb3b)!=index.
+(0x150a+595-0x175c);i<=ZPB_AP_MAX_RECORD;i++){if((0x17e7+3099-0x2402)!=index.
 apIndex[i]){g_zPb_ApIndex[(index.apIndex[i])]=PBM_ERROR_NOT_FOUND;}}return 
 result;}VOID atPb_DelAllRecsSimDb(VOID){CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x1619+3436-0x2385)};snprintf(sql,sizeof(sql)-(0x5d9+7743-0x2417),
+(0x643+1282-0xb45)};snprintf(sql,sizeof(sql)-(0x16+7531-0x1d80),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM);if(ZPB_DB_OK==atPb_ExecDbSql(sql,NULL,NULL)
 ){atPb_ClearSimPbmIndexArray();if(ZPB_DB_OK!=atPb_ExecDbSql(
@@ -511,28 +510,28 @@
 );(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);return;}(VOID)sc_cfg_set(
 ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
 ZPB_DEL_ERROR);}}VOID atPb_DelAllRecsSim(T_zPb_DelInfo*pdelRecord,sem_t semId){
-CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x18a5+1511-0x1e8c)};int atRes=
-(0x11c+3476-0xeb0);UINT32 i=(0x1c11+724-0x1ee5);CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x975+3178-0x15df)};UINT32 count=(0x1a96+2848-0x25b6);if(pdelRecord!=NULL){
-memset(&g_zPb_DelStatusUsim,(0x732+1527-0xd29),sizeof(T_zPb_DelStatusMultiOrAll)
-);g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_ALL_RECORD_USIM;snprintf(sql,sizeof(sql)-
-(0x354+4053-0x1328),
+CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x79b+3029-0x1370)};int atRes=
+(0x17f6+2818-0x22f8);UINT32 i=(0x1984+2692-0x2408);CHAR sql[ZPB_MAX_BYTES_DB]={
+(0xe57+4413-0x1f94)};UINT32 count=(0x1b63+266-0x1c6d);if(pdelRecord!=NULL){
+memset(&g_zPb_DelStatusUsim,(0x16c2+1457-0x1c73),sizeof(
+T_zPb_DelStatusMultiOrAll));g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_ALL_RECORD_USIM
+;snprintf(sql,sizeof(sql)-(0x1bb3+911-0x1f41),
 "\x73\x65\x6c\x65\x63\x74\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM);(VOID)atPb_ExecDbSql(sql,
-atPb_DbCountTableLineCb,&count);if((0x53d+5793-0x1bde)<count){CHAR pbMin[
-(0x59c+7344-0x221a)]={(0xabf+1632-0x111f)};CHAR pbMax[(0x1917+1052-0x1d01)]={
-(0xbb3+791-0xeca)};UINT32 i_pbMin=(0x1ac+2877-0xce9);UINT32 i_pbMax=
-(0x2013+1384-0x257b);sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+atPb_DbCountTableLineCb,&count);if((0x11dc+3185-0x1e4d)<count){CHAR pbMin[
+(0x1c9a+758-0x1f5e)]={(0xfc8+4405-0x20fd)};CHAR pbMax[(0x1eea+318-0x1ff6)]={
+(0x1306+2405-0x1c6b)};UINT32 i_pbMin=(0x568+1900-0xcd4);UINT32 i_pbMax=
+(0x2139+838-0x247f);sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
 sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));i_pbMin=atoi(pbMin);i_pbMax=
 atoi(pbMax);if(i_pbMin>ZPB_SIM_MAX_RECORD||i_pbMax>ZPB_SIM_MAX_RECORD){printf(
 "\x5b\x50\x42\x5d\x20\x61\x74\x50\x62\x5f\x44\x65\x6c\x41\x6c\x6c\x52\x65\x63\x73\x53\x69\x6d\x20\x73\x69\x6d\x20\x69\x6e\x64\x65\x78\x20\x74\x6f\x6f\x20\x6c\x61\x72\x67\x65" "\n"
 );return;}for(i=i_pbMin;i<=i_pbMax;i++){ipc_send_message(MODULE_ID_PB,
 MODULE_ID_AT_CTL,MSG_CMD_DELETE_PB_REQ,sizeof(int),(unsigned char*)&i,
-(0xa76+3926-0x19cc));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0xdb4+456-0xf7b)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+(0xa36+4693-0x1c8b));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0x556+7825-0x23e6)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
 ZPB_NV_WRITE_FLAG,ZPB_DEL_ERROR);}else{g_zPb_DelStatusUsim.dealSuccNum++;
 sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x6e\x6f");}}snprintf(sql,sizeof(sql)-
-(0x1438+341-0x158c),
+(0xa20+6681-0x2438),
 "\x64\x65\x6c\x65\x74\x65\x20\x66\x72\x6f\x6d\x20\x25\x73\x20\x77\x68\x65\x72\x65\x20\x4c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64"
 ,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM);if(ZPB_DB_OK==atPb_ExecDbSql(sql,NULL,NULL)
 ){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);atPb_ClearSimPbmIndexArray
diff --git a/ap/app/zte_comm/rtc-service/rtc-service.c b/ap/app/zte_comm/rtc-service/rtc-service.c
index 891af85..fb159e5 100755
--- a/ap/app/zte_comm/rtc-service/rtc-service.c
+++ b/ap/app/zte_comm/rtc-service/rtc-service.c
@@ -23,7 +23,7 @@
  ******************************************************************************/
 int g_rtc_fd = 0;
 struct list_head rtc_timer_list;
-struct list_head rtc_alarm_list; 
+struct list_head rtc_alarm_list;
 #define RTC_ALARM_TIMEOUT_MSG  "PMIC RTC ALARM IRQ COME"
 #define RTC_TIMER_TIMEOUT_MSG  "PMIC RTC TIMER IRQ COME"
 
@@ -62,209 +62,230 @@
 static void convert_time(time_t timeSec, struct tm * tmTime, TIME_CONVERT_TYPE type)
 {
     time_t tmpTime = 0;
-    if(tmTime == NULL) {
+    if (tmTime == NULL)
+    {
         slog(RTC_PRINT, SLOG_ERR, "rtc-service: wrong input param, check it! \n");
         return ;
     }
     tmpTime = timeSec;
-    
-    if(type == CONVERT_TYPE_RTC) {
+
+    if (type == CONVERT_TYPE_RTC)
+    {
         gmtime_r((time_t*)&tmpTime, tmTime);
     }
-    else {
+    else
+    {
         localtime_r((time_t*)&tmpTime, tmTime);
     }
-  
-    slog(RTC_PRINT, SLOG_DEBUG, "Time:%ld, tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_sec:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d \n", 
-        mktime(tmTime), tmTime->tm_year, tmTime->tm_mon, tmTime->tm_hour, tmTime->tm_min, tmTime->tm_sec, tmTime->tm_yday, tmTime->tm_mday, tmTime->tm_wday);
+
+    slog(RTC_PRINT, SLOG_DEBUG,
+         "Time:%ld, tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_sec:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d \n",
+         mktime(tmTime), tmTime->tm_year, tmTime->tm_mon, tmTime->tm_hour, tmTime->tm_min, tmTime->tm_sec, tmTime->tm_yday,
+         tmTime->tm_mday, tmTime->tm_wday);
 
 }
 
 static long get_RtcTime()
 {
-    long curRtcTime = 0;    
+    long curRtcTime = 0;
     struct rtc_time rtc_tm = {0};
     struct tm tmp = {0};
-    if(g_rtc_fd <= 0) {
+    if (g_rtc_fd <= 0)
+    {
         slog(RTC_PRINT, SLOG_ERR, "rtc-service: g_rtc_fd: %d , invalid fd. \n", g_rtc_fd);
         return -1;
     }
-    
-	if(ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm) < 0)  // cov M CHECKED_RETURN
-	{
-	    slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
-	}	
+
+    if (ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm) < 0) // cov M CHECKED_RETURN
+    {
+        slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
+    }
     tmp.tm_sec = rtc_tm.tm_sec;
-    tmp.tm_min= rtc_tm.tm_min;
-    tmp.tm_hour= rtc_tm.tm_hour;
-    tmp.tm_mon= rtc_tm.tm_mon;
-    tmp.tm_year= rtc_tm.tm_year;
-    tmp.tm_mday= rtc_tm.tm_mday;
-    tmp.tm_wday= rtc_tm.tm_wday;
-    tmp.tm_yday= rtc_tm.tm_yday;
-    tmp.tm_isdst= rtc_tm.tm_isdst;
-        
+    tmp.tm_min = rtc_tm.tm_min;
+    tmp.tm_hour = rtc_tm.tm_hour;
+    tmp.tm_mon = rtc_tm.tm_mon;
+    tmp.tm_year = rtc_tm.tm_year;
+    tmp.tm_mday = rtc_tm.tm_mday;
+    tmp.tm_wday = rtc_tm.tm_wday;
+    tmp.tm_yday = rtc_tm.tm_yday;
+    tmp.tm_isdst = rtc_tm.tm_isdst;
+
     curRtcTime = mktime(&tmp);
     slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: curRtcTime: %ld . \n", curRtcTime);
     return curRtcTime;
 }
 static void write_lockfile(char *filepath, char *setbuf)
 {
-	int f, len = 0;
+    int f, len = 0;
 
-	f = open(filepath, O_RDWR);
-	if (f == -1) {
-		return;
-	}
+    f = open(filepath, O_RDWR);
+    if (f == -1)
+    {
+        return;
+    }
 
-	len = strlen(setbuf);
-	if (write(f, setbuf, len) != len) {
-	} else {
-	}
-	close(f);
+    len = strlen(setbuf);
+    if (write(f, setbuf, len) != len)
+    {
+    }
+    else
+    {
+    }
+    close(f);
 }
 
 
 static void wake_rtc_lock()
 {
-	write_lockfile("/sys/power/wake_lock", "rtc_lock");
+    write_lockfile("/sys/power/wake_lock", "rtc_lock");
 }
 
 static void wake_rtc_unlock()
 {
-	write_lockfile("/sys/power/wake_unlock", "rtc_lock");
+    write_lockfile("/sys/power/wake_unlock", "rtc_lock");
 }
 
 static void wake_rtc_io_lock()
 {
-	write_lockfile("/sys/power/wake_lock", "rtc_io_lock");
+    write_lockfile("/sys/power/wake_lock", "rtc_io_lock");
 }
 
 static void wake_rtc_io_unlock()
 {
-	write_lockfile("/sys/power/wake_unlock", "rtc_io_lock");
+    write_lockfile("/sys/power/wake_unlock", "rtc_io_lock");
 }
 
 static void wake_timeout_lock(char *lockname, unsigned long interval)
 {
-	char cmd[100] = {0};
-	sprintf(cmd, "echo %s %lu > /sys/power/wake_lock", lockname, interval);
-	soft_system(cmd);
+    char cmd[100] = {0};
+    sprintf(cmd, "echo %s %lu > /sys/power/wake_lock", lockname, interval);
+    soft_system(cmd);
 }
 
 static int init_rtc_alarm(void)
 {
-	FILE* fp = NULL;
-	int gap_start = 0;
-	int gap_end = 0;
-	size_t size = 0;
-	long cur_rtc_time = 0;
-	ALARM_T* iter = NULL;
-	RTC_DATA_BUF  buf = {0};
-	int ret = -1;
+    FILE* fp = NULL;
+    int gap_start = 0;
+    int gap_end = 0;
+    size_t size = 0;
+    long cur_rtc_time = 0;
+    ALARM_T* iter = NULL;
+    RTC_DATA_BUF  buf = {0};
+    int ret = -1;
 
-//	cur_rtc_time = get_RtcTime();
-	cur_rtc_time = time(0);
-	if ((fp = (FILE*)fopen(RTC_ALARM_DATA, "rb")) == NULL)
-	{
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: failed to open %s \n", RTC_ALARM_DATA);
-		return -1;
-	}
+    //	cur_rtc_time = get_RtcTime();
+    cur_rtc_time = time(0);
+    if ((fp = (FILE*)fopen(RTC_ALARM_DATA, "rb")) == NULL)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: failed to open %s \n", RTC_ALARM_DATA);
+        return -1;
+    }
 
-	while(1)
-	{
-		size = fread(&gap_start, sizeof(int), 1, fp);//0xa5a5
-		if(0 == size || gap_start != DATA_S ||feof(fp) != 0 )
-			break;
+    while (1)
+    {
+        size = fread(&gap_start, sizeof(int), 1, fp);//0xa5a5
+        if (0 == size || gap_start != DATA_S || feof(fp) != 0 )
+        {
+            break;
+        }
 
-		iter = (ALARM_T*)malloc(sizeof(ALARM_T));
-		if(iter)
-			memset(iter,0,sizeof(ALARM_T));
-		else
-		{
-			fclose(fp);
-			return -1;
-		}
+        iter = (ALARM_T*)malloc(sizeof(ALARM_T));
+        if (iter)
+        {
+            memset(iter, 0, sizeof(ALARM_T));
+        }
+        else
+        {
+            fclose(fp);
+            return -1;
+        }
 
-		size = fread(iter, sizeof(ALARM_T), 1, fp);//struct
-		if(0 ==size||feof(fp) != 0)//check the end of the file
-		{
-			memset(iter, 0, sizeof(ALARM_T));//kw
-			free(iter);
-			break;
-		}
+        size = fread(iter, sizeof(ALARM_T), 1, fp);//struct
+        if (0 == size || feof(fp) != 0) //check the end of the file
+        {
+            memset(iter, 0, sizeof(ALARM_T));//kw
+            free(iter);
+            break;
+        }
 
-		size = fread(&gap_end, sizeof(int), 1, fp);//0x5a5a
-		if(0 == size || gap_end != DATA_E  ||feof(fp) != 0)
-		{
-			memset(iter, 0, sizeof(ALARM_T));//kw
-			free(iter);
-			break;
-		}
+        size = fread(&gap_end, sizeof(int), 1, fp);//0x5a5a
+        if (0 == size || gap_end != DATA_E  || feof(fp) != 0)
+        {
+            memset(iter, 0, sizeof(ALARM_T));//kw
+            free(iter);
+            break;
+        }
 
-        if(iter->interval < 0 || iter->interval > LONG_MAX-1)
+        if (iter->interval < 0 || iter->interval > LONG_MAX - 1)
         {
             iter->interval = 0 ;
         }
 
 
-        if(iter->time_val < 0 || iter->time_val > LONG_MAX-1)
+        if (iter->time_val < 0 || iter->time_val > LONG_MAX - 1)
         {
             iter->time_val = 0 ;
         }
 
-        
-		if(cur_rtc_time > iter->interval + iter->time_val)
-		{
-			buf.module = iter->rtc_id;
-            buf.time_val = iter->time_val + iter->interval;
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_timeout: target:0x%x, rtc_id:0x%x, utc:%d, cur_rtc_time:%ld \n", iter->module_id, buf.module, iter->is_utc, cur_rtc_time);
-			ret = ipc_send_message2(MODULE_ID_RTC_SERVICE, iter->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected\n");
-			}
-		}
-		list_add_tail(&iter->list, &rtc_alarm_list);
-		if(feof(fp) != 0)//check the end of the file
-			break;
-	}
-	fclose(fp);
 
-	return 0;
+        if (cur_rtc_time > iter->interval + iter->time_val)
+        {
+            buf.module = iter->rtc_id;
+            buf.time_val = iter->time_val + iter->interval;
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_timeout: target:0x%x, rtc_id:0x%x, utc:%d, cur_rtc_time:%ld \n",
+                 iter->module_id, buf.module, iter->is_utc, cur_rtc_time);
+            ret = ipc_send_message2(MODULE_ID_RTC_SERVICE, iter->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF),
+                                    (unsigned char*)&buf, 0);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected\n");
+            }
+        }
+        list_add_tail(&iter->list, &rtc_alarm_list);
+        if (feof(fp) != 0) //check the end of the file
+        {
+            break;
+        }
+    }
+    fclose(fp);
+
+    return 0;
 }
 
 static int save_rtc_alarm(void)
 {
-	FILE* fp = NULL;
-	int gap_start = DATA_S;
-	int gap_end = DATA_E;
-	ALARM_T *temp = NULL;
+    FILE* fp = NULL;
+    int gap_start = DATA_S;
+    int gap_end = DATA_E;
+    ALARM_T *temp = NULL;
 
-	if ((fp = (FILE*)fopen(RTC_ALARM_DATA, "wb")) == NULL)
-	{
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: failed to open %s \n", RTC_ALARM_DATA);
-		return -1;
-	}
+    if ((fp = (FILE*)fopen(RTC_ALARM_DATA, "wb")) == NULL)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: failed to open %s \n", RTC_ALARM_DATA);
+        return -1;
+    }
 
-	if (!list_empty(&rtc_alarm_list)) {
-		list_for_each_entry(temp, &rtc_alarm_list, list) {
-			if(temp->wakeup)
-			{
-				fwrite(&gap_start, sizeof(int), 1, fp);
-				fwrite(temp, sizeof(ALARM_T), 1, fp);
-				fwrite(&gap_end, sizeof(int), 1, fp);
-			}
-		}
-	}
+    if (!list_empty(&rtc_alarm_list))
+    {
+        list_for_each_entry(temp, &rtc_alarm_list, list)
+        {
+            if (temp->wakeup)
+            {
+                fwrite(&gap_start, sizeof(int), 1, fp);
+                fwrite(temp, sizeof(ALARM_T), 1, fp);
+                fwrite(&gap_end, sizeof(int), 1, fp);
+            }
+        }
+    }
 
-	fflush(fp);
-	if(fsync(fileno(fp)) < 0)
+    fflush(fp);
+    if (fsync(fileno(fp)) < 0)
     {
         // todo: cov M
-    }   
-	fclose(fp);
+    }
+    fclose(fp);
 
-	return 0;
+    return 0;
 }
 
 /********************************************
@@ -272,15 +293,16 @@
  *******************************************/
 static int open_rtc(void)
 {
-	int fd = 0;
-	fd = open(RTC_DEV_NAME, O_RDWR);
+    int fd = 0;
+    fd = open(RTC_DEV_NAME, O_RDWR);
 
-	if (fd < 0) {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: Open %s error!\n", RTC_DEV_NAME);
-		return fd;
-	}
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: Open %s OK!\n", RTC_DEV_NAME);
-	return fd;
+    if (fd < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: Open %s error!\n", RTC_DEV_NAME);
+        return fd;
+    }
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: Open %s OK!\n", RTC_DEV_NAME);
+    return fd;
 }
 
 /********************************************
@@ -288,11 +310,12 @@
  *******************************************/
 static void close_rtc(int fd)
 {
-	if (fd < 0) {
-		return;
-	}
+    if (fd < 0)
+    {
+        return;
+    }
 
-	close(fd);
+    close(fd);
 }
 
 
@@ -302,37 +325,39 @@
  *******************************************/
 static int handle_get_time(MSG_BUF *pmsg_buf)
 {
-	struct rtc_time rtc_tm = {0};
-	int ret = 0;
-	RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
-	
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_get_time NOOPS.\n");
+    struct rtc_time rtc_tm = {0};
+    int ret = 0;
+    RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
 
-	if(buf->cpu == RTC_CPU_CAP)
-	{
-		int cmd = RTC_MSG_GET_TIME;
-		RTC_DATA_BUF  sendbuf = {0};
-		unsigned long cur_sec =0;
-		
-		ret = ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm);
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_get_time tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d.\n",
-		rtc_tm.tm_year, rtc_tm.tm_mon, rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_yday, rtc_tm.tm_mday, rtc_tm.tm_wday);
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_get_time src_id:0x%x, buf->cpu:%d.\n",buf->srcModule,buf->cpu);
-		
-		cur_sec = mktime(&rtc_tm);
-		sendbuf.srcModule = buf->srcModule;
-		sendbuf.cpu = RTC_CPU_AP;
-		sendbuf.ulSec = cur_sec;
-	
-		slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_get_time: send to cap cmd:0x%x, srcMod:0x%x, cur_sec:%lu \n", cmd, sendbuf.srcModule, sendbuf.ulSec);
-		ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&sendbuf);
-		if (ret != 0)
-		{
-			slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n",ret);;
-		}
-	}
-	
-	return 0;
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_get_time NOOPS.\n");
+
+    if (buf->cpu == RTC_CPU_CAP)
+    {
+        int cmd = RTC_MSG_GET_TIME;
+        RTC_DATA_BUF  sendbuf = {0};
+        unsigned long cur_sec = 0;
+
+        ret = ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm);
+        slog(RTC_PRINT, SLOG_NORMAL,
+             "rtc-service: handle_get_time tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d.\n",
+             rtc_tm.tm_year, rtc_tm.tm_mon, rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_yday, rtc_tm.tm_mday, rtc_tm.tm_wday);
+        slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_get_time src_id:0x%x, buf->cpu:%d.\n", buf->srcModule, buf->cpu);
+
+        cur_sec = mktime(&rtc_tm);
+        sendbuf.srcModule = buf->srcModule;
+        sendbuf.cpu = RTC_CPU_AP;
+        sendbuf.ulSec = cur_sec;
+
+        slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_get_time: send to cap cmd:0x%x, srcMod:0x%x, cur_sec:%lu \n", cmd,
+             sendbuf.srcModule, sendbuf.ulSec);
+        ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&sendbuf);
+        if (ret != 0)
+        {
+            slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n", ret);;
+        }
+    }
+
+    return 0;
 }
 
 /********************************************
@@ -340,28 +365,30 @@
  *******************************************/
 static int handle_set_time(MSG_BUF *pmsg_buf)
 {
-       time_t os_time = 0;
-       struct tm tmTime = {0};
-	struct rtc_time rtc_tm = {0};
-	int ret = 0;
+    time_t os_time = 0;
+    struct tm tmTime = {0};
+    struct rtc_time rtc_tm = {0};
+    int ret = 0;
 
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_set_time enter.\n");
-	memcpy(&os_time, pmsg_buf->aucDataBuf, sizeof(time_t));
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_set_time enter: set time: %ld \n", os_time);
-        convert_time(os_time, &tmTime, CONVERT_TYPE_RTC);
-        memcpy(&rtc_tm, &tmTime, sizeof(struct rtc_time));
-    slog(RTC_PRINT, SLOG_ERR, "Time:%ld, tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_sec:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d \n", 
-        mktime(&tmTime), rtc_tm.tm_year, rtc_tm.tm_mon, rtc_tm.tm_hour, rtc_tm.tm_min, tmTime.tm_sec, rtc_tm.tm_yday, rtc_tm.tm_mday, rtc_tm.tm_wday);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_set_time enter.\n");
+    memcpy(&os_time, pmsg_buf->aucDataBuf, sizeof(time_t));
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_set_time enter: set time: %ld \n", os_time);
+    convert_time(os_time, &tmTime, CONVERT_TYPE_RTC);
+    memcpy(&rtc_tm, &tmTime, sizeof(struct rtc_time));
+    slog(RTC_PRINT, SLOG_ERR,
+         "Time:%ld, tm_year:%d, tm_mon:%d, tm_hour:%d, tm_min:%d, tm_sec:%d, tm_yday:%d, tm_mday:%d, tm_wday:%d \n",
+         mktime(&tmTime), rtc_tm.tm_year, rtc_tm.tm_mon, rtc_tm.tm_hour, rtc_tm.tm_min, tmTime.tm_sec, rtc_tm.tm_yday,
+         rtc_tm.tm_mday, rtc_tm.tm_wday);
 
-        ret = ioctl(g_rtc_fd, RTC_SET_TIME, &rtc_tm);
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: RTC_SET_TIME ioctl ret = %d  exit.\n", ret);
-	{
-		char buf[32] = {0};
-		snprintf(buf,32,"AT+ZMMI=2,%d,%d\r\n",1900 + rtc_tm.tm_year,1 + rtc_tm.tm_mon);
-		ret = get_modem_info(buf, NULL,  NULL);
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_set_time ret=%d %s\n",ret,buf);
-	}
-	return 0;
+    ret = ioctl(g_rtc_fd, RTC_SET_TIME, &rtc_tm);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: RTC_SET_TIME ioctl ret = %d  exit.\n", ret);
+    {
+        char buf[32] = {0};
+        snprintf(buf, 32, "AT+ZMMI=2,%d,%d\r\n", 1900 + rtc_tm.tm_year, 1 + rtc_tm.tm_mon);
+        ret = get_modem_info(buf, NULL,  NULL);
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_set_time ret=%d %s\n", ret, buf);
+    }
+    return 0;
 }
 
 /********************************************
@@ -370,18 +397,18 @@
 static int handle_sntp_update(MSG_BUF *pmsg_buf)
 {
     time_t os_time = 0;
-	struct timeval time_tv = {0};
-	int ret = 0;
+    struct timeval time_tv = {0};
+    int ret = 0;
 
-	memcpy(&os_time, pmsg_buf->aucDataBuf, sizeof(time_t));
+    memcpy(&os_time, pmsg_buf->aucDataBuf, sizeof(time_t));
 
-	time_tv.tv_sec = os_time;
-	ret = settimeofday(&time_tv,NULL);
-	if(ret!=0)
-	{
-		slog(RTC_PRINT, SLOG_ERR, "handle_sntp_update is fail,ret:%d \n",ret);
-	}
-	return 0;
+    time_tv.tv_sec = os_time;
+    ret = settimeofday(&time_tv, NULL);
+    if (ret != 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "handle_sntp_update is fail,ret:%d \n", ret);
+    }
+    return 0;
 }
 
 /********************************************
@@ -389,96 +416,112 @@
  *******************************************/
 static int handle_alarm_add(MSG_BUF *pmsg_buf)
 {
-	//long cur_rtc_time = 0;
+    //long cur_rtc_time = 0;
 
-	struct rtc_time rtc_tm = {0};
-	ALARM_T *pAlarm = 0;
+    struct rtc_time rtc_tm = {0};
+    ALARM_T *pAlarm = 0;
 
-	RTC_DATA_BUF *buf = pmsg_buf->aucDataBuf;
-	ALARM_T *temp = NULL;
-	int mark = 0;
+    RTC_DATA_BUF *buf = pmsg_buf->aucDataBuf;
+    ALARM_T *temp = NULL;
+    int mark = 0;
 
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_add enter.\n");
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_add enter.\n");
 
-	if (buf->ulSec <= 0) {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add invalid interval.\n");
-		return -1;
-	}
+    if (buf->ulSec <= 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add invalid interval.\n");
+        return -1;
+    }
 
-	pAlarm = malloc(sizeof(ALARM_T));
-	if (pAlarm == NULL) {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add no memory.\n");
-		return -1;
-	}
+    pAlarm = malloc(sizeof(ALARM_T));
+    if (pAlarm == NULL)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add no memory.\n");
+        return -1;
+    }
 
-	//»ñÈ¡µ±Ç°Ê±¼ä second
-	if(ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm) < 0)  // cov M CHECKED_RETURN
-	{
-	    slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
-	}
-	memcpy(&pAlarm->rtc_tm, &rtc_tm, sizeof(rtc_tm));
+    //»ñÈ¡µ±Ç°Ê±¼ä second
+    if (ioctl(g_rtc_fd, RTC_RD_TIME, &rtc_tm) < 0) // cov M CHECKED_RETURN
+    {
+        slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
+    }
+    memcpy(&pAlarm->rtc_tm, &rtc_tm, sizeof(rtc_tm));
 
-	pAlarm->rtc_id = buf->module;
-	pAlarm->module_id = buf->srcModule;
-	pAlarm->interval = buf->ulSec ;   //  count down time
-	pAlarm->remain_time = buf->ulSec; // remain count down time
-	pAlarm->wakeup = buf->wakeup;
-	pAlarm->is_utc = buf->is_utc;
-	pAlarm->cpu = buf->cpu;
-	pAlarm->time_val = buf->time_val;// cur_rtc_time is mktime(&local_tm)
-	//pAlarm->time_val = get_RtcTime();// cur_rtc_time is mktime(&local_tm)
+    pAlarm->rtc_id = buf->module;
+    pAlarm->module_id = buf->srcModule;
+    pAlarm->interval = buf->ulSec ;   //  count down time
+    pAlarm->remain_time = buf->ulSec; // remain count down time
+    pAlarm->wakeup = buf->wakeup;
+    pAlarm->is_utc = buf->is_utc;
+    pAlarm->cpu = buf->cpu;
+    pAlarm->time_val = buf->time_val;// cur_rtc_time is mktime(&local_tm)
+    //pAlarm->time_val = get_RtcTime();// cur_rtc_time is mktime(&local_tm)
 
-	slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_add pAlarm->interval is %ld ,pAlarm->time_val() is %ld, is_utc:%d.\n", 
-        pAlarm->interval, pAlarm->time_val, pAlarm->is_utc);
-/*
-	if (pAlarm->time_val + pAlarm->remain_time < cur_rtc_time) {
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service handle_alarm_add error, pAlarm->remain_time = %ld, pAlarm->time_val = %ld, current= %ld\n", pAlarm->remain_time, pAlarm->time_val, cur_rtc_time);
-	}
-*/
+    slog(RTC_PRINT, SLOG_NORMAL,
+         "rtc-service: handle_alarm_add pAlarm->interval is %ld ,pAlarm->time_val() is %ld, is_utc:%d.\n",
+         pAlarm->interval, pAlarm->time_val, pAlarm->is_utc);
+    /*
+    	if (pAlarm->time_val + pAlarm->remain_time < cur_rtc_time) {
+    		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service handle_alarm_add error, pAlarm->remain_time = %ld, pAlarm->time_val = %ld, current= %ld\n", pAlarm->remain_time, pAlarm->time_val, cur_rtc_time);
+    	}
+    */
 
 #ifdef PRODUCT_NOT_USE_RTC
-	pAlarm->is_utc = 0; //´Ëģʽ϶¼°´timerÉèÖö¨Ê±Æ÷£¬²»Ö§³Öutc
-	pAlarm->wakeup = 0;
+    pAlarm->is_utc = 0; //´Ëģʽ϶¼°´timerÉèÖö¨Ê±Æ÷£¬²»Ö§³Öutc
+    pAlarm->wakeup = 0;
 #endif
 
-	if (pAlarm->is_utc == 0) {
-		if (!list_empty(&rtc_timer_list)) {
-			//update_timer_remain(pAlarm->remain_time);
-			list_for_each_entry(temp, &rtc_timer_list, list) {
-				if (temp->remain_time > pAlarm->remain_time) {
-					mark = 1;
-					list_add(&pAlarm->list, temp->list.prev);
-					break;
-				}
-			}
-		}
-		if (mark == 0) {
-			list_add_tail(&pAlarm->list, &rtc_timer_list);
-		}
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: add rtc timer\n");
-		alarm_restart(&rtc_timer_list);
-	} else {
-		if (!list_empty(&rtc_alarm_list)) {
-			list_for_each_entry(temp, &rtc_alarm_list, list) {
-				if (temp->interval + temp->time_val > pAlarm->interval + pAlarm->time_val) {
-					mark = 1;
-					list_add(&pAlarm->list, temp->list.prev);
-					break;
-				}
-			}
-		}
-		if (mark == 0) {
-			list_add_tail(&pAlarm->list, &rtc_alarm_list);
-		}
+    if (pAlarm->is_utc == 0)
+    {
+        if (!list_empty(&rtc_timer_list))
+        {
+            //update_timer_remain(pAlarm->remain_time);
+            list_for_each_entry(temp, &rtc_timer_list, list)
+            {
+                if (temp->remain_time > pAlarm->remain_time)
+                {
+                    mark = 1;
+                    list_add(&pAlarm->list, temp->list.prev);
+                    break;
+                }
+            }
+        }
+        if (mark == 0)
+        {
+            list_add_tail(&pAlarm->list, &rtc_timer_list);
+        }
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: add rtc timer\n");
+        alarm_restart(&rtc_timer_list);
+    }
+    else
+    {
+        if (!list_empty(&rtc_alarm_list))
+        {
+            list_for_each_entry(temp, &rtc_alarm_list, list)
+            {
+                if (temp->interval + temp->time_val > pAlarm->interval + pAlarm->time_val)
+                {
+                    mark = 1;
+                    list_add(&pAlarm->list, temp->list.prev);
+                    break;
+                }
+            }
+        }
+        if (mark == 0)
+        {
+            list_add_tail(&pAlarm->list, &rtc_alarm_list);
+        }
 
-		if(pAlarm->wakeup)
-			save_rtc_alarm();
-		
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: add rtc alarm \n");
-		alarm_restart(&rtc_alarm_list);
-	}
+        if (pAlarm->wakeup)
+        {
+            save_rtc_alarm();
+        }
 
-	return 0;
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: add rtc alarm \n");
+        alarm_restart(&rtc_alarm_list);
+    }
+
+    return 0;
 }
 
 /********************************************
@@ -486,35 +529,41 @@
  *******************************************/
 static void update_timer_remain(int new_remian)
 {
-	if (list_empty(&rtc_timer_list)) {
-		return;
-	}
-	int ret, remain_time;
-	ALARM_T *pTmp;
-	//list_entry(pTmp, &rtc_timer_list, list);
-	pTmp = list_entry(rtc_timer_list.next, ALARM_T, list);
+    if (list_empty(&rtc_timer_list))
+    {
+        return;
+    }
+    int ret, remain_time;
+    ALARM_T *pTmp;
+    //list_entry(pTmp, &rtc_timer_list, list);
+    pTmp = list_entry(rtc_timer_list.next, ALARM_T, list);
 
 #ifdef PRODUCT_NOT_USE_RTC
-	time_t cur = time(NULL);
-	remain_time = g_set_softtime + pTmp->remain_time - cur;
-	if ((remain_time > pTmp->remain_time) || (remain_time <= 0)) {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: cur:%u, set:%u, remain:%u, inveral:%u\n", cur, g_set_softtime, remain_time, pTmp->remain_time);
-		//ʱ¼ä·¢Éú¹ýÖØÖõȣ¬Ö±½ÓÉèÖö¨Ê±Æ÷µ½£¬¸÷Ä£¿éÓ¦ÔÚÊÕµ½RTC_MSG_TIME_CHANGEDÏûϢʱ¼°Ê±¸üж¨Ê±Æ÷
-		remain_time = 0;
-	}
+    time_t cur = time(NULL);
+    remain_time = g_set_softtime + pTmp->remain_time - cur;
+    if ((remain_time > pTmp->remain_time) || (remain_time <= 0))
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: cur:%u, set:%u, remain:%u, inveral:%u\n", cur, g_set_softtime, remain_time,
+             pTmp->remain_time);
+        //ʱ¼ä·¢Éú¹ýÖØÖõȣ¬Ö±½ÓÉèÖö¨Ê±Æ÷µ½£¬¸÷Ä£¿éÓ¦ÔÚÊÕµ½RTC_MSG_TIME_CHANGEDÏûϢʱ¼°Ê±¸üж¨Ê±Æ÷
+        remain_time = 0;
+    }
 #else
-	ret = ioctl(g_rtc_fd, ZX234290_GET_TIMER_REMAIN, &remain_time);
+    ret = ioctl(g_rtc_fd, ZX234290_GET_TIMER_REMAIN, &remain_time);
 #endif
-	if (ret < 0) {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add no free alarm remain_time %d  %s errno.\n", errno, strerror(errno));
-		//  return -1;
-	}
-	//if(remain_time > new_remian)
-	{
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: pTmp->remain_time: %d, rtc remain_time: %d \n", pTmp->remain_time, remain_time);
-		alarm_adjust_value(pTmp->remain_time - remain_time);
-		alarm_fix_value(&rtc_timer_list);
-	}
+    if (ret < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: handle_alarm_add no free alarm remain_time %d  %s errno.\n", errno,
+             strerror(errno));
+        //  return -1;
+    }
+    //if(remain_time > new_remian)
+    {
+        slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: pTmp->remain_time: %d, rtc remain_time: %d \n", pTmp->remain_time,
+             remain_time);
+        alarm_adjust_value(pTmp->remain_time - remain_time);
+        alarm_fix_value(&rtc_timer_list);
+    }
 }
 
 /********************************************
@@ -522,148 +571,171 @@
  *******************************************/
 static int handle_alarm_del(MSG_BUF *pmsg_buf)
 {
-	RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
-	ALARM_T *pTmp, *pTmp1;
-	int wakeup = 0;
+    RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
+    ALARM_T *pTmp, *pTmp1;
+    int wakeup = 0;
 
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del enter.\n");
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list) {
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del timer module:0x%x - 0x%x, src:0x%x - 0x%x.\n",
-		     buf->module, pTmp->rtc_id, buf->srcModule, pTmp->module_id);
-		if ((buf->module == pTmp->rtc_id) && (buf->srcModule == pTmp->module_id)&& (buf->cpu == pTmp->cpu)) {
-        		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_del timer module:0x%x , src:0x%x , cpu:%d \n",
-        		     buf->module, buf->srcModule, buf->cpu);
-			list_del(&pTmp->list);
-			free(pTmp);
-			break;
-		}
-	}
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del enter.\n");
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list)
+    {
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del timer module:0x%x - 0x%x, src:0x%x - 0x%x.\n",
+             buf->module, pTmp->rtc_id, buf->srcModule, pTmp->module_id);
+        if ((buf->module == pTmp->rtc_id) && (buf->srcModule == pTmp->module_id) && (buf->cpu == pTmp->cpu))
+        {
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_del timer module:0x%x , src:0x%x , cpu:%d \n",
+                 buf->module, buf->srcModule, buf->cpu);
+            list_del(&pTmp->list);
+            free(pTmp);
+            break;
+        }
+    }
 
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list) {
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del alarm module:0x%x - 0x%x, src:0x%x - 0x%x.\n",
-		     buf->module, pTmp->rtc_id, buf->srcModule, pTmp->module_id);
-		if ((buf->module == pTmp->rtc_id) && (buf->srcModule == pTmp->module_id)&& (buf->cpu == pTmp->cpu)) {
-        		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_del alarm module:0x%x , src:0x%x , cpu:%d \n",
-        		     buf->module, buf->srcModule, buf->cpu);
-			wakeup = pTmp->wakeup;
-			list_del(&pTmp->list);
-			free(pTmp);
-			break;
-		}
-	}
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list)
+    {
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del alarm module:0x%x - 0x%x, src:0x%x - 0x%x.\n",
+             buf->module, pTmp->rtc_id, buf->srcModule, pTmp->module_id);
+        if ((buf->module == pTmp->rtc_id) && (buf->srcModule == pTmp->module_id) && (buf->cpu == pTmp->cpu))
+        {
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_del alarm module:0x%x , src:0x%x , cpu:%d \n",
+                 buf->module, buf->srcModule, buf->cpu);
+            wakeup = pTmp->wakeup;
+            list_del(&pTmp->list);
+            free(pTmp);
+            break;
+        }
+    }
 
-	if(wakeup)
-		save_rtc_alarm();
-	
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del exit.\n");
+    if (wakeup)
+    {
+        save_rtc_alarm();
+    }
 
-	return 0;
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_del exit.\n");
+
+    return 0;
 }
 
 void send_ok_del_rsp(MSG_BUF *pmsg_buf)
 {
-	RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
+    RTC_DATA_BUF * buf = pmsg_buf->aucDataBuf;
 
-	if(buf->cpu == RTC_CPU_CAP)
-	{
-		int ret = 0;
-		RTC_DATA_BUF sendbuf = {0};
-		sendbuf.cpu = RTC_CPU_AP;
-		sendbuf.module = buf->module;
-		sendbuf.srcModule = buf->srcModule;
-		ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, RTC_MSG_DEL_ALARM, sizeof(RTC_DATA_BUF), (void *)&sendbuf);
-		if (ret != 0) 
-		{
-			slog(RTC_PRINT, SLOG_ERR, "send_ok_del_rsp: failed,ret:%d\n",ret);
-		}
-	}
+    if (buf->cpu == RTC_CPU_CAP)
+    {
+        int ret = 0;
+        RTC_DATA_BUF sendbuf = {0};
+        sendbuf.cpu = RTC_CPU_AP;
+        sendbuf.module = buf->module;
+        sendbuf.srcModule = buf->srcModule;
+        ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, RTC_MSG_DEL_ALARM, sizeof(RTC_DATA_BUF), (void *)&sendbuf);
+        if (ret != 0)
+        {
+            slog(RTC_PRINT, SLOG_ERR, "send_ok_del_rsp: failed,ret:%d\n", ret);
+        }
+    }
 }
 /********************************************
  *¹¦ÄÜ:¶¨Ê±Æ÷³¬Ê±´¦Àí
  *******************************************/
 static int handle_alarm_timeout(MSG_BUF *pmsg_buf)
 {
-	long ret = -1;
-	ALARM_T *pAlarm;
-	RTC_DATA_BUF  buf = {0};
+    long ret = -1;
+    ALARM_T *pAlarm;
+    RTC_DATA_BUF  buf = {0};
     long rtc_report_time = 0;
     long alarm_node_time = 0;
-	enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
-	int wakeup = 0;
+    enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
+    int wakeup = 0;
 
-	if (cmd == RTC_MSG_TIMER_TIMEOUT && !list_empty(&rtc_timer_list)) {
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: rtc timer timeout\n");
-		pAlarm = list_entry(rtc_timer_list.next, ALARM_T, list);
-	} else if (cmd == RTC_MSG_ALARM_TIMEOUT && !list_empty(&rtc_alarm_list)) {
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: rtc alarm timeout\n");
-		pAlarm = list_entry(rtc_alarm_list.next, ALARM_T, list);
+    if (cmd == RTC_MSG_TIMER_TIMEOUT && !list_empty(&rtc_timer_list))
+    {
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: rtc timer timeout\n");
+        pAlarm = list_entry(rtc_timer_list.next, ALARM_T, list);
+    }
+    else if (cmd == RTC_MSG_ALARM_TIMEOUT && !list_empty(&rtc_alarm_list))
+    {
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: rtc alarm timeout\n");
+        pAlarm = list_entry(rtc_alarm_list.next, ALARM_T, list);
         rtc_report_time = atol(pmsg_buf->aucDataBuf);
-     	if (rtc_report_time < 0 || rtc_report_time > LONG_MAX-1)
-        {  
-     		rtc_report_time = 0;       
+        if (rtc_report_time < 0 || rtc_report_time > LONG_MAX - 1)
+        {
+            rtc_report_time = 0;
         }
         alarm_node_time = pAlarm->interval + pAlarm->time_val;
-        if((rtc_report_time>alarm_node_time && (rtc_report_time-alarm_node_time)>g_time_offset)
-            ||(alarm_node_time>rtc_report_time && (alarm_node_time-rtc_report_time)>g_time_offset))
+        if ((rtc_report_time > alarm_node_time && (rtc_report_time - alarm_node_time) > g_time_offset)
+                || (alarm_node_time > rtc_report_time && (alarm_node_time - rtc_report_time) > g_time_offset))
         {
-            slog(RTC_PRINT, SLOG_ERR, "rtc-service: rtc node was deleted, timeout unexpected; node:%ld, rtc:%ld \n", alarm_node_time, rtc_report_time);
-		alarm_fix_value(&rtc_alarm_list);
-	
-		if(pAlarm->wakeup)
-			save_rtc_alarm();
-	
-		alarm_restart(&rtc_alarm_list);
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart alarm.\n");
-        	return 0;
-        }
-        buf.time_val = alarm_node_time;            
-	} else {
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: timeout unexpected\n");
-		return -1;
-	}
+            slog(RTC_PRINT, SLOG_ERR, "rtc-service: rtc node was deleted, timeout unexpected; node:%ld, rtc:%ld \n",
+                 alarm_node_time, rtc_report_time);
+            alarm_fix_value(&rtc_alarm_list);
 
-	wakeup = pAlarm->wakeup;
-	list_del(&pAlarm->list);
-	buf.module = pAlarm->rtc_id;
-	buf.srcModule = pAlarm->module_id;
-	slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_timeout: target:0x%x, rtc_id:0x%x, utc:%d \n", pAlarm->module_id, buf.module, pAlarm->is_utc);
-	if(pAlarm->cpu == RTC_CPU_AP)
-	{	
-		ret = ipc_send_message2(MODULE_ID_RTC_SERVICE, pAlarm->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-		if (ret != 0) {
-			slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n",ret);
-		}
-	}
-	else
-	{
-		buf.module = pAlarm->rtc_id;
+            if (pAlarm->wakeup)
+            {
+                save_rtc_alarm();
+            }
+
+            alarm_restart(&rtc_alarm_list);
+            slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart alarm.\n");
+            return 0;
+        }
+        buf.time_val = alarm_node_time;
+    }
+    else
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: timeout unexpected\n");
+        return -1;
+    }
+
+    wakeup = pAlarm->wakeup;
+    list_del(&pAlarm->list);
+    buf.module = pAlarm->rtc_id;
+    buf.srcModule = pAlarm->module_id;
+    slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: handle_alarm_timeout: target:0x%x, rtc_id:0x%x, utc:%d \n",
+         pAlarm->module_id, buf.module, pAlarm->is_utc);
+    if (pAlarm->cpu == RTC_CPU_AP)
+    {
+        ret = ipc_send_message2(MODULE_ID_RTC_SERVICE, pAlarm->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF),
+                                (unsigned char*)&buf, 0);
+        if (ret != 0)
+        {
+            slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n", ret);
+        }
+    }
+    else
+    {
+        buf.module = pAlarm->rtc_id;
         buf.srcModule = pAlarm->module_id;
         buf.cpu = RTC_CPU_AP;
         buf.is_utc = pAlarm->is_utc;
 
-		slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n", cmd, buf.srcModule, buf.module, pAlarm->is_utc);
+        slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n",
+             cmd, buf.srcModule, buf.module, pAlarm->is_utc);
         ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&buf);
         if (ret != 0)
         {
-            slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n",ret);;
+            slog(RTC_PRINT, SLOG_ERR, "rtc-service: ipc_send_message unexpected,ret:%d\n", ret);;
         }
-	}
-	if (pAlarm->is_utc == 0) {
-		alarm_adjust_value(pAlarm->remain_time);
-		alarm_fix_value(&rtc_timer_list);
-		alarm_restart(&rtc_timer_list);
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart imer.\n");
-	} else {
-		alarm_fix_value(&rtc_alarm_list);
-		if(wakeup)
-			save_rtc_alarm();
-		alarm_restart(&rtc_alarm_list);
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart alarm.\n");
-	}
+    }
+    if (pAlarm->is_utc == 0)
+    {
+        alarm_adjust_value(pAlarm->remain_time);
+        alarm_fix_value(&rtc_timer_list);
+        alarm_restart(&rtc_timer_list);
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart imer.\n");
+    }
+    else
+    {
+        alarm_fix_value(&rtc_alarm_list);
+        if (wakeup)
+        {
+            save_rtc_alarm();
+        }
+        alarm_restart(&rtc_alarm_list);
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout restart alarm.\n");
+    }
 
-	free(pAlarm);
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout exit.\n");
-	return 0;
+    free(pAlarm);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: handle_alarm_timeout exit.\n");
+    return 0;
 }
 
 /********************************************
@@ -671,24 +743,28 @@
  *******************************************/
 static void handle_del_all(MSG_BUF *pmsg_buf)
 {
-	ALARM_T *pTmp, *pTmp1;
+    ALARM_T *pTmp, *pTmp1;
 
-	update_timer_remain(0);
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list) {
-		if (pTmp->wakeup == 0) {
-			list_del(&pTmp->list);
-			free(pTmp);
-		}
-	}
-	alarm_restart(&rtc_timer_list);
+    update_timer_remain(0);
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list)
+    {
+        if (pTmp->wakeup == 0)
+        {
+            list_del(&pTmp->list);
+            free(pTmp);
+        }
+    }
+    alarm_restart(&rtc_timer_list);
 
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list) {
-		if (pTmp->wakeup == 0) {
-			list_del(&pTmp->list);
-			free(pTmp);
-		}
-	}
-	alarm_restart(&rtc_alarm_list);
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list)
+    {
+        if (pTmp->wakeup == 0)
+        {
+            list_del(&pTmp->list);
+            free(pTmp);
+        }
+    }
+    alarm_restart(&rtc_alarm_list);
 }
 
 /********************************************
@@ -696,40 +772,52 @@
  *******************************************/
 static void  update_alarm()
 {
-	ALARM_T *pTmp, *pTmp1;
-	//long sec = get_RtcTime();
-	long sec = time(0);
-	RTC_DATA_BUF  buf = {0};
-	
+    ALARM_T *pTmp, *pTmp1;
+    //long sec = get_RtcTime();
+    long sec = time(0);
+    RTC_DATA_BUF  buf = {0};
+
 #ifdef PRODUCT_NOT_USE_RTC
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list) {
-		buf.module = pTmp->rtc_id;
-		ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_TIME_CHANGED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-		if(pTmp->is_utc){
-		if (pTmp->interval + pTmp->time_val < sec) {
-			list_del(&pTmp->list);
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: delete  ELAPSED timer, alarm_id(%d), alarm_time(%ld).\n", pTmp->rtc_id, (pTmp->interval + pTmp->time_val));
-			free(pTmp); 				
-		} else {
-			pTmp->remain_time = pTmp->interval + pTmp->time_val - sec;
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: timer adjust, alarm_id(%d), alarm_time(%ld), remain(%ld).\n", pTmp->rtc_id, (pTmp->interval + pTmp->time_val), pTmp->remain_time);
-		}
-		}
-	}
-	alarm_restart(&rtc_timer_list);
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_timer_list, list)
+    {
+        buf.module = pTmp->rtc_id;
+        ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_TIME_CHANGED, sizeof(RTC_DATA_BUF),
+                          (unsigned char*)&buf, 0);
+        if (pTmp->is_utc)
+        {
+            if (pTmp->interval + pTmp->time_val < sec)
+            {
+                list_del(&pTmp->list);
+                slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: delete  ELAPSED timer, alarm_id(%d), alarm_time(%ld).\n", pTmp->rtc_id,
+                     (pTmp->interval + pTmp->time_val));
+                free(pTmp);
+            }
+            else
+            {
+                pTmp->remain_time = pTmp->interval + pTmp->time_val - sec;
+                slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: timer adjust, alarm_id(%d), alarm_time(%ld), remain(%ld).\n", pTmp->rtc_id,
+                     (pTmp->interval + pTmp->time_val), pTmp->remain_time);
+            }
+        }
+    }
+    alarm_restart(&rtc_timer_list);
 #else
-	list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list) {
-		buf.module = pTmp->rtc_id;
-		ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_TIME_CHANGED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-		if (pTmp->interval + pTmp->time_val < sec) {
-			list_del(&pTmp->list);
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: delete  ELAPSED alarm, alarm_id(%d), alarm_time(%ld).\n", pTmp->rtc_id, (pTmp->interval + pTmp->time_val));
-			free(pTmp);             	
-		}
-	}
-	alarm_restart(&rtc_alarm_list);
+    list_for_each_entry_safe(pTmp, pTmp1, &rtc_alarm_list, list)
+    {
+        buf.module = pTmp->rtc_id;
+        ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_TIME_CHANGED, sizeof(RTC_DATA_BUF),
+                          (unsigned char*)&buf, 0);
+        if (pTmp->interval + pTmp->time_val < sec)
+        {
+            list_del(&pTmp->list);
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: delete  ELAPSED alarm, alarm_id(%d), alarm_time(%ld).\n", pTmp->rtc_id,
+                 (pTmp->interval + pTmp->time_val));
+            free(pTmp);
+        }
+    }
+    alarm_restart(&rtc_alarm_list);
 #endif
-	slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: update_alarm exit cur_rtc_time: % ld.\n", sec);
+    slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: update_alarm exit cur_rtc_time: % ld.\n", sec);
 }
 
 /********************************************
@@ -737,10 +825,11 @@
  *******************************************/
 static void alarm_adjust_value(int time)
 {
-	ALARM_T * temp;
-	list_for_each_entry(temp, &rtc_timer_list, list) {
-		temp->remain_time -= time;
-	}
+    ALARM_T * temp;
+    list_for_each_entry(temp, &rtc_timer_list, list)
+    {
+        temp->remain_time -= time;
+    }
 }
 
 /********************************************
@@ -748,86 +837,102 @@
  *******************************************/
 static void alarm_fix_value(struct list_head *rtc_list)
 {
-	ALARM_T *pTmp, *pTmp1;
-	RTC_DATA_BUF  buf = {0};
-	int wakeup = 0;
-	int ret =0;
-	enum RTC_MSG_CMD cmd = 0;
-	
-	if (rtc_list == &rtc_timer_list) {
-		list_for_each_entry_safe(pTmp, pTmp1, rtc_list, list) {
-			if (pTmp->remain_time <= 0) {
-				buf.module = pTmp->rtc_id;
-				if(pTmp->cpu == RTC_CPU_CAP)
-				{
-					buf.srcModule = pTmp->module_id;
-					buf.cpu = RTC_CPU_AP;
-				    buf.is_utc = pTmp->is_utc;
-					cmd = RTC_MSG_TIMER_TIMEOUT;
-					slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n", cmd, buf.srcModule, buf.module, buf.is_utc);
-					ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&buf);
-					if (ret != 0)
-					{
-						slog(RTC_PRINT, SLOG_ERR, "rtc-service: send_soc_msg unexpected,ret:%d\n",ret);;
-					}
-				}
-				else
-				{
-					ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-				}
-				list_del(&pTmp->list);
-				free(pTmp);
-			}
-		}
-	} else if (rtc_list == &rtc_alarm_list) {
-		list_for_each_entry_safe(pTmp, pTmp1, rtc_list, list) {
-			if (pTmp->time_val + pTmp->interval <= (time(0) + g_time_offset)) {
-				if(pTmp->wakeup)
-					wakeup = pTmp->wakeup;
+    ALARM_T *pTmp, *pTmp1;
+    RTC_DATA_BUF  buf = {0};
+    int wakeup = 0;
+    int ret = 0;
+    enum RTC_MSG_CMD cmd = 0;
 
-				buf.module = pTmp->rtc_id;
+    if (rtc_list == &rtc_timer_list)
+    {
+        list_for_each_entry_safe(pTmp, pTmp1, rtc_list, list)
+        {
+            if (pTmp->remain_time <= 0)
+            {
+                buf.module = pTmp->rtc_id;
+                if (pTmp->cpu == RTC_CPU_CAP)
+                {
+                    buf.srcModule = pTmp->module_id;
+                    buf.cpu = RTC_CPU_AP;
+                    buf.is_utc = pTmp->is_utc;
+                    cmd = RTC_MSG_TIMER_TIMEOUT;
+                    slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n",
+                         cmd, buf.srcModule, buf.module, buf.is_utc);
+                    ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&buf);
+                    if (ret != 0)
+                    {
+                        slog(RTC_PRINT, SLOG_ERR, "rtc-service: send_soc_msg unexpected,ret:%d\n", ret);;
+                    }
+                }
+                else
+                {
+                    ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF),
+                                      (unsigned char*)&buf, 0);
+                }
+                list_del(&pTmp->list);
+                free(pTmp);
+            }
+        }
+    }
+    else if (rtc_list == &rtc_alarm_list)
+    {
+        list_for_each_entry_safe(pTmp, pTmp1, rtc_list, list)
+        {
+            if (pTmp->time_val + pTmp->interval <= (time(0) + g_time_offset))
+            {
+                if (pTmp->wakeup)
+                {
+                    wakeup = pTmp->wakeup;
+                }
+
+                buf.module = pTmp->rtc_id;
                 buf.time_val = pTmp->time_val + pTmp->interval;
-				if(pTmp->cpu == RTC_CPU_CAP)
-				{
-					buf.srcModule = pTmp->module_id;
-					buf.cpu = RTC_CPU_AP;
-				    buf.is_utc = pTmp->is_utc;
-					cmd = RTC_MSG_ALARM_TIMEOUT;
-					slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n", cmd, buf.srcModule, buf.module, buf.is_utc);
-					ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&buf);
-					if (ret != 0)
-					{
-						slog(RTC_PRINT, SLOG_ERR, "rtc-service: send_soc_msg unexpected,ret:%d\n",ret);;
-					}
-				}
-				else
-				{
-					ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-				}
-				list_del(&pTmp->list);
-				free(pTmp);
-			}
-		}
+                if (pTmp->cpu == RTC_CPU_CAP)
+                {
+                    buf.srcModule = pTmp->module_id;
+                    buf.cpu = RTC_CPU_AP;
+                    buf.is_utc = pTmp->is_utc;
+                    cmd = RTC_MSG_ALARM_TIMEOUT;
+                    slog(RTC_PRINT, SLOG_NORMAL, "[rtc] handle_alarm_timeout: send to cap cmd:0x%x, srcMod:0x%x, module:0x%x, utc:%d \n",
+                         cmd, buf.srcModule, buf.module, buf.is_utc);
+                    ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, sizeof(RTC_DATA_BUF), (void *)&buf);
+                    if (ret != 0)
+                    {
+                        slog(RTC_PRINT, SLOG_ERR, "rtc-service: send_soc_msg unexpected,ret:%d\n", ret);;
+                    }
+                }
+                else
+                {
+                    ipc_send_message2(MODULE_ID_RTC_SERVICE, pTmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF),
+                                      (unsigned char*)&buf, 0);
+                }
+                list_del(&pTmp->list);
+                free(pTmp);
+            }
+        }
 
-		if(wakeup)
-			save_rtc_alarm();
-	}
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_fix_value exit.\n");
+        if (wakeup)
+        {
+            save_rtc_alarm();
+        }
+    }
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_fix_value exit.\n");
 }
 
 #ifdef PRODUCT_NOT_USE_RTC
 /*¶ÔӦûÓÐrtcµÄ²úÆ·£¬rtc¶¨Ê±Æ÷ÊÊÅäµ½softtimerµÄ»Øµ÷º¯Êý*/
 static void rtc_set_softtimer_cb(void *param)
 {
-	int ret = -1;
-	
-	slog(NET_PRINT, SLOG_ERR, "rtc-service: rtc_adapt_softtimer_cb \n");
+    int ret = -1;
 
-	ret = ipc_send_message(MODULE_ID_RTC_SERVICE, MODULE_ID_RTC_SERVICE, RTC_MSG_TIMER_TIMEOUT, 0, 0, 0);;
-	if (ret != 0) {
-		slog(MISC_PRINT, SLOG_ERR, "rtc-service: set rtc timer send msg failed \n");	
-	}
-	return 0;
+    slog(NET_PRINT, SLOG_ERR, "rtc-service: rtc_adapt_softtimer_cb \n");
+
+    ret = ipc_send_message(MODULE_ID_RTC_SERVICE, MODULE_ID_RTC_SERVICE, RTC_MSG_TIMER_TIMEOUT, 0, 0, 0);;
+    if (ret != 0)
+    {
+        slog(MISC_PRINT, SLOG_ERR, "rtc-service: set rtc timer send msg failed \n");
+    }
+    return 0;
 }
 #endif
 
@@ -836,113 +941,137 @@
  *******************************************/
 static void alarm_restart(struct list_head *rtc_list)
 {
-	int ret = 0;
-	//struct tm *p_tm = 0;
-	struct tm ret_tm = {0};
-	struct rtc_wkalrm alarm = {0};
-	long tVal = 0;
-	long remain = -1;
-	ALARM_T *ptmp = NULL;
+    int ret = 0;
+    //struct tm *p_tm = 0;
+    struct tm ret_tm = {0};
+    struct rtc_wkalrm alarm = {0};
+    long tVal = 0;
+    long remain = -1;
+    ALARM_T *ptmp = NULL;
     long cur_rtc_time = time(0);
-	RTC_DATA_BUF  buf = {0};
+    RTC_DATA_BUF  buf = {0};
 NEXT:
-	if (!list_empty(rtc_list)) {
-		ptmp = list_entry(rtc_list->next, ALARM_T, list);
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_restart enter.\n");
-              memset(&buf, 0, sizeof(RTC_DATA_BUF));
-		if (ptmp->is_utc == 0) {
+    if (!list_empty(rtc_list))
+    {
+        ptmp = list_entry(rtc_list->next, ALARM_T, list);
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_restart enter.\n");
+        memset(&buf, 0, sizeof(RTC_DATA_BUF));
+        if (ptmp->is_utc == 0)
+        {
 #ifdef PRODUCT_NOT_USE_RTC
-			g_set_softtime = time(NULL);
-			sc_timer_delete(RTC_USE_SOFTTIMER_ID);
-			ret = sc_timer_create(RTC_USE_SOFTTIMER_ID, TIMER_FLAG_ONCE, ptmp->remain_time*1000, rtc_set_softtimer_cb, NULL);
+            g_set_softtime = time(NULL);
+            sc_timer_delete(RTC_USE_SOFTTIMER_ID);
+            ret = sc_timer_create(RTC_USE_SOFTTIMER_ID, TIMER_FLAG_ONCE, ptmp->remain_time * 1000, rtc_set_softtimer_cb, NULL);
 #else
-			ret = ioctl(g_rtc_fd, ZX234290_SET_TIMER, ptmp->remain_time);
+            ret = ioctl(g_rtc_fd, ZX234290_SET_TIMER, ptmp->remain_time);
 #endif
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: alarm_restart timer: set failed, ret:%d \n", ret);
-				return;
-			}
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart: set timer ok, remain_time:%ld, cur_rtc_time:%ld, module:0x%x, rtc_id:0x%x\n", ptmp->remain_time, cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
-		} else {
-			tVal = ptmp->interval + ptmp->time_val;
-			remain = tVal - cur_rtc_time;
-			if (remain <= g_time_offset) {
-				//¹ýʱ¶¨Ê±Æ÷¶ªÆú´¦Àí£¬Èç¹û¶àÄ£¿éÕýºÃÉèµÄ»ù±¾ÔÚͬһ¸öʱ¼äµã£¬ºóÕ߻ᱻ¶ªÆú£¬¿¼ÂÇÐ޸ijÉÖ±½Ó֪ͨģ¿éʱ¼äµ½
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: remain time error, time_set:%ld, remain:%ld, alarmer:%ld, interval:%ld, current:%ld, module:0x%x, rtc_id:0x%x\n", ptmp->time_val, remain, tVal, ptmp->interval, cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
-				buf.module = ptmp->rtc_id;
-                            buf.time_val = ptmp->time_val + ptmp->interval;
-				ipc_send_message2(MODULE_ID_RTC_SERVICE, ptmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), (unsigned char*)&buf, 0);
-                            list_del(&ptmp->list);
-				free(ptmp);
-				ptmp = NULL;
-				goto NEXT;
-			}
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: alarm_restart timer: set failed, ret:%d \n", ret);
+                return;
+            }
+            slog(RTC_PRINT, SLOG_NORMAL,
+                 "rtc-service: alarm_restart: set timer ok, remain_time:%ld, cur_rtc_time:%ld, module:0x%x, rtc_id:0x%x\n",
+                 ptmp->remain_time, cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
+        }
+        else
+        {
+            tVal = ptmp->interval + ptmp->time_val;
+            remain = tVal - cur_rtc_time;
+            if (remain <= g_time_offset)
+            {
+                //¹ýʱ¶¨Ê±Æ÷¶ªÆú´¦Àí£¬Èç¹û¶àÄ£¿éÕýºÃÉèµÄ»ù±¾ÔÚͬһ¸öʱ¼äµã£¬ºóÕ߻ᱻ¶ªÆú£¬¿¼ÂÇÐ޸ijÉÖ±½Ó֪ͨģ¿éʱ¼äµ½
+                slog(RTC_PRINT, SLOG_ERR,
+                     "rtc-service: remain time error, time_set:%ld, remain:%ld, alarmer:%ld, interval:%ld, current:%ld, module:0x%x, rtc_id:0x%x\n",
+                     ptmp->time_val, remain, tVal, ptmp->interval, cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
+                buf.module = ptmp->rtc_id;
+                buf.time_val = ptmp->time_val + ptmp->interval;
+                ipc_send_message2(MODULE_ID_RTC_SERVICE, ptmp->module_id, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF),
+                                  (unsigned char*)&buf, 0);
+                list_del(&ptmp->list);
+                free(ptmp);
+                ptmp = NULL;
+                goto NEXT;
+            }
 
-			//localtime_r(&tVal, &ret_tm);
-			gmtime_r(&tVal, &ret_tm);
-			memcpy(&alarm.time, &ret_tm, sizeof(struct rtc_time));
-			alarm.enabled = 1;
+            //localtime_r(&tVal, &ret_tm);
+            gmtime_r(&tVal, &ret_tm);
+            memcpy(&alarm.time, &ret_tm, sizeof(struct rtc_time));
+            alarm.enabled = 1;
 
-			/*Ê×ÏÈ´ò¿ªalarm ÖжÏ*/
-			ret = ioctl(g_rtc_fd, RTC_AIE_ON);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: open alarm failed, ret:%d\n", ret);
-				return;
-			}
+            /*Ê×ÏÈ´ò¿ªalarm ÖжÏ*/
+            ret = ioctl(g_rtc_fd, RTC_AIE_ON);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: open alarm failed, ret:%d\n", ret);
+                return;
+            }
 
-			/*ÉèÖÃalarm ʱ¼ä*/
-			ret = ioctl(g_rtc_fd, RTC_WKALM_SET, &alarm);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: set alarm failed, ret:%d\n", ret);
-				return;
-			}
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart set alarm ok, remain_time:%ld, cur_rtc_time:%ld, module:0x%x, rtc_id:0x%x \n", remain, cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
-		}
-	} else {
-		if (rtc_list == &rtc_timer_list) {
-			//¹Ø±Õrtc time, Éè¼ä¸ôʱ¼äΪ0
-			ret = ioctl(g_rtc_fd, ZX234290_TIMER_ENABLED, 0);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: disable timer failed, ret:%d\n", ret);
-				return;
-			}
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart disable timer ok \n");
-		} else {
-			/*¹Ø±Õalarm ÖжÏ*/
-			ret = ioctl(g_rtc_fd, RTC_AIE_OFF);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "rtc-service: disable alarm failed, ret:%d\n", ret);
-				return;
-			}
-			slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart disable alarm ok \n");
-		}
-	}
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_restart exit.\n");
+            /*ÉèÖÃalarm ʱ¼ä*/
+            ret = ioctl(g_rtc_fd, RTC_WKALM_SET, &alarm);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: set alarm failed, ret:%d\n", ret);
+                return;
+            }
+            slog(RTC_PRINT, SLOG_NORMAL,
+                 "rtc-service: alarm_restart set alarm ok, remain_time:%ld, cur_rtc_time:%ld, module:0x%x, rtc_id:0x%x \n", remain,
+                 cur_rtc_time, ptmp->module_id, ptmp->rtc_id);
+        }
+    }
+    else
+    {
+        if (rtc_list == &rtc_timer_list)
+        {
+            //¹Ø±Õrtc time, Éè¼ä¸ôʱ¼äΪ0
+            ret = ioctl(g_rtc_fd, ZX234290_TIMER_ENABLED, 0);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: disable timer failed, ret:%d\n", ret);
+                return;
+            }
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart disable timer ok \n");
+        }
+        else
+        {
+            /*¹Ø±Õalarm ÖжÏ*/
+            ret = ioctl(g_rtc_fd, RTC_AIE_OFF);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc-service: disable alarm failed, ret:%d\n", ret);
+                return;
+            }
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: alarm_restart disable alarm ok \n");
+        }
+    }
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: alarm_restart exit.\n");
 }
 
 static void rtc_set_local_time(MSG_BUF *msg)
 {
-	struct tm set_tm = {0};
-	struct timeval time_tv;
+    struct tm set_tm = {0};
+    struct timeval time_tv;
 
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc_set_local_time, %d, %d \n", sizeof(struct tm), msg->usDataLen);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc_set_local_time, %d, %d \n", sizeof(struct tm), msg->usDataLen);
 
-	memcpy(&set_tm, msg->aucDataBuf, msg->usDataLen);
+    memcpy(&set_tm, msg->aucDataBuf, msg->usDataLen);
 
-	slog(RTC_PRINT, SLOG_ERR, "rtc_set_local_time, year:%d, month:%d, day:%d, hour:%d, min:%d, sec:%d, wday:%d \n",
-		 set_tm.tm_year, set_tm.tm_mon, set_tm.tm_mday, set_tm.tm_hour, set_tm.tm_min, set_tm.tm_sec, set_tm.tm_wday);
+    slog(RTC_PRINT, SLOG_ERR, "rtc_set_local_time, year:%d, month:%d, day:%d, hour:%d, min:%d, sec:%d, wday:%d \n",
+         set_tm.tm_year, set_tm.tm_mon, set_tm.tm_mday, set_tm.tm_hour, set_tm.tm_min, set_tm.tm_sec, set_tm.tm_wday);
 
-	time_tv.tv_sec = mktime(&set_tm);
-	if(time_tv.tv_sec < 0)
-	{
-	    
-	    slog(RTC_PRINT, SLOG_DEBUG, "mktime fail, set time_tv.tv_sec to 0 \n");
-	    time_tv.tv_sec = 0;
-	}
-	time_tv.tv_usec = 0;
+    time_tv.tv_sec = mktime(&set_tm);
+    if (time_tv.tv_sec < 0)
+    {
 
-	if (0 != settimeofday(&time_tv, NULL))
-		slog(RTC_PRINT, SLOG_ERR, "rtc_set_local_time failed \n");
+        slog(RTC_PRINT, SLOG_DEBUG, "mktime fail, set time_tv.tv_sec to 0 \n");
+        time_tv.tv_sec = 0;
+    }
+    time_tv.tv_usec = 0;
+
+    if (0 != settimeofday(&time_tv, NULL))
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc_set_local_time failed \n");
+    }
 }
 
 /********************************************
@@ -951,69 +1080,74 @@
  *******************************************/
 static int process_msg(MSG_BUF *pmsg_buf)
 {
-	enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
-	unsigned short req_cmd = 0;
+    enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
+    unsigned short req_cmd = 0;
 
-	switch (cmd) {
-	case RTC_MSG_GET_TIME:
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_GET_TIME, src:0x%x.\n", pmsg_buf->src_id);
-		handle_get_time(pmsg_buf);
-		break;
-	case RTC_MSG_SET_TIME:
-		security_log(pmsg_buf->src_id,"set time");
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_SET_TIME, src:0x%x.\n", pmsg_buf->src_id);
-		handle_set_time(pmsg_buf);
-		update_alarm();
-		break;
-	case RTC_MSG_SNTP_UPDATE:
-		handle_sntp_update(pmsg_buf);
-		break;
-	case RTC_MSG_ADD_ALARM:
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_ADD_ALARM, src:0x%x, g_clean_flag = %d.\n", pmsg_buf->src_id, g_clean_flag);
-		//Ìí¼ÓrtcǰÏÈɾ³ý´Ërtc_idÒÑÌí¼Ó¼Ç¼£¬Ã¿¸örtc_idÖ»±£Áô1¸ö¶¨Ê±Æ÷
-		if(0 == g_clean_flag){
-		   update_timer_remain(0);
-		   handle_alarm_del(pmsg_buf);
-		   handle_alarm_add(pmsg_buf);
-		}
-		else{		
-		    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: g_clean_flag is nonzero:0x%x, dont add alarm.\n", g_clean_flag);
-		}
-			
-		//wifi´¦ÀíÍêǰ²»ÄÜÐÝÃߣ¬ÔÝʱʹÓÃÑÓÊ±Ëø£¬´ý·½°¸×鏸³ö·½°¸ºóÔÙµ÷Õû
-		//if (pmsg_buf->usSourceModuleID == MODULE_ID_WDT)
-		//write_lockfile("/sys/power/wake_unlock", "rtc_io_time_timeout_lock");
+    switch (cmd)
+    {
+        case RTC_MSG_GET_TIME:
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_GET_TIME, src:0x%x.\n", pmsg_buf->src_id);
+            handle_get_time(pmsg_buf);
+            break;
+        case RTC_MSG_SET_TIME:
+            security_log(pmsg_buf->src_id, "set time");
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_SET_TIME, src:0x%x.\n", pmsg_buf->src_id);
+            handle_set_time(pmsg_buf);
+            update_alarm();
+            break;
+        case RTC_MSG_SNTP_UPDATE:
+            handle_sntp_update(pmsg_buf);
+            break;
+        case RTC_MSG_ADD_ALARM:
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_ADD_ALARM, src:0x%x, g_clean_flag = %d.\n",
+                 pmsg_buf->src_id, g_clean_flag);
+            //Ìí¼ÓrtcǰÏÈɾ³ý´Ërtc_idÒÑÌí¼Ó¼Ç¼£¬Ã¿¸örtc_idÖ»±£Áô1¸ö¶¨Ê±Æ÷
+            if (0 == g_clean_flag)
+            {
+                update_timer_remain(0);
+                handle_alarm_del(pmsg_buf);
+                handle_alarm_add(pmsg_buf);
+            }
+            else
+            {
+                slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: g_clean_flag is nonzero:0x%x, dont add alarm.\n", g_clean_flag);
+            }
 
-		break;
-	case RTC_MSG_DEL_ALARM:
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_DEL_ALARM, src:0x%x.\n", pmsg_buf->src_id);
-		update_timer_remain(0);
-		handle_alarm_del(pmsg_buf);
-		send_ok_del_rsp(pmsg_buf);
-		alarm_restart(&rtc_timer_list);
-		alarm_restart(&rtc_alarm_list);
-		break;
-	case RTC_MSG_ALARM_TIMEOUT:
-	case RTC_MSG_TIMER_TIMEOUT:
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_TIMEOUT, src:0x%x, cmd:0x%x.\n", pmsg_buf->src_id, cmd);
-		handle_alarm_timeout(pmsg_buf);
-		break;
-	case RTC_MSG_DEL_ALL:
-		slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_DEL_ALL, src:0x%x.\n", pmsg_buf->src_id);
-		memcpy(&req_cmd, pmsg_buf->aucDataBuf, sizeof(unsigned short));
-		if(MSG_CMD_RESET_RSP == req_cmd || MSG_CMD_POWEROFF_RSP == req_cmd || MSG_CMD_RESTART_RSP == req_cmd){
-			g_clean_flag = req_cmd;
-		}
-		handle_del_all(pmsg_buf);
+            //wifi´¦ÀíÍêǰ²»ÄÜÐÝÃߣ¬ÔÝʱʹÓÃÑÓÊ±Ëø£¬´ý·½°¸×鏸³ö·½°¸ºóÔÙµ÷Õû
+            //if (pmsg_buf->usSourceModuleID == MODULE_ID_WDT)
+            //write_lockfile("/sys/power/wake_unlock", "rtc_io_time_timeout_lock");
+
+            break;
+        case RTC_MSG_DEL_ALARM:
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_DEL_ALARM, src:0x%x.\n", pmsg_buf->src_id);
+            update_timer_remain(0);
+            handle_alarm_del(pmsg_buf);
+            send_ok_del_rsp(pmsg_buf);
+            alarm_restart(&rtc_timer_list);
+            alarm_restart(&rtc_alarm_list);
+            break;
+        case RTC_MSG_ALARM_TIMEOUT:
+        case RTC_MSG_TIMER_TIMEOUT:
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_TIMEOUT, src:0x%x, cmd:0x%x.\n", pmsg_buf->src_id, cmd);
+            handle_alarm_timeout(pmsg_buf);
+            break;
+        case RTC_MSG_DEL_ALL:
+            slog(RTC_PRINT, SLOG_NORMAL, "rtc-service: process_msg RTC_MSG_DEL_ALL, src:0x%x.\n", pmsg_buf->src_id);
+            memcpy(&req_cmd, pmsg_buf->aucDataBuf, sizeof(unsigned short));
+            if (MSG_CMD_RESET_RSP == req_cmd || MSG_CMD_POWEROFF_RSP == req_cmd || MSG_CMD_RESTART_RSP == req_cmd)
+            {
+                g_clean_flag = req_cmd;
+            }
+            handle_del_all(pmsg_buf);
             save_rtc_alarm();
-		//ÕâÀﻹÐèҪ֪ͨÖ÷¿Ø
-		ipc_send_message(MODULE_ID_RTC_SERVICE, pmsg_buf->src_id, req_cmd, 0, 0, 0);
-		break;
+            //ÕâÀﻹÐèҪ֪ͨÖ÷¿Ø
+            ipc_send_message(MODULE_ID_RTC_SERVICE, pmsg_buf->src_id, req_cmd, 0, 0, 0);
+            break;
 
-	default:
-		break;
-	}
-	return 0;
+        default:
+            break;
+    }
+    return 0;
 }
 
 /********************************************
@@ -1022,178 +1156,190 @@
  *******************************************/
 static int process_msg_rtc_cap(MSG_BUF *pmsg_buf)
 {
-	enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
-	unsigned short req_cmd = 0;
-	int ret = 0;
-	struct tm *ptm = NULL;
-	RTC_DATA_BUF *buf = NULL;
-	int dst_id = 0;
-	
-	switch (cmd) {
-	case RTC_MSG_GET_TIME:
-		buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
-		slog(RTC_PRINT, SLOG_NORMAL, "to cap: RTC_MSG_GET_TIME \n");
-		if(buf->cpu == RTC_CPU_AP)
-		{
-			ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
-			if (ret != 0) {
-				slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
-			}
-		}
-		else
-		{
-			slog(RTC_PRINT, SLOG_NORMAL, "receive rtc time from cap core : RTC_MSG_GET_TIME :%lu \n",buf->ulSec);
-			
-		}
-		break;
-	case RTC_MSG_SET_TIME:
-		ptm = (struct tm *)pmsg_buf->aucDataBuf;
-		if(pmsg_buf->src_id == MODULE_ID_CP_RTC_SERVICE)
-		{
-			rtc_set_local_time(pmsg_buf);
-		}
-		else
-		{
-			slog(RTC_PRINT, SLOG_NORMAL, "to cap: cmd:0x%x, %d-%d-%d %d:%d:%d \n", cmd, ptm->tm_year, ptm->tm_mon, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
-			ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
-	    	if (ret != 0) 
-			{
-	    		slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
-	    	}
-		}
-		break;
-	case RTC_MSG_SNTP_UPDATE:
-		handle_sntp_update(pmsg_buf);
-		break;
-	case RTC_MSG_ADD_ALARM:
-	case RTC_MSG_DEL_ALARM:
-		buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
-		if (buf->cpu == RTC_CPU_AP) 
-		{
-			slog(RTC_PRINT, SLOG_NORMAL, "to cap: cmd:0x%x, module:0x%x, msg_id:0x%x, sec:%ld: cpu:%d, utc:%d, wakeup:%d \n", cmd, buf->module, buf->srcModule, buf->ulSec, buf->cpu, buf->is_utc, buf->wakeup);
-			ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
-			if (ret != 0) 
-			{
-				slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
-			}
-		}
-		else
-		{
-			slog(RTC_PRINT, SLOG_NORMAL, "from cap: cmd:0x%x, module:0x%x, msg_id:0x%x, del ok \n", cmd, buf->module, buf->srcModule);
-		}
-		break;
-	case RTC_MSG_ALARM_TIMEOUT:
-	case RTC_MSG_TIMER_TIMEOUT:
-		buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
-		if (buf->cpu == RTC_CPU_CAP) 
-		{
-			slog(RTC_PRINT, SLOG_NORMAL, "from cap: cmd:0x%x(timeout), module:0x%x, msg_id:0x%x, sec:%ld: %d, %d, %d \n", cmd, buf->module, buf->srcModule, buf->ulSec, buf->cpu, buf->is_utc, buf->wakeup);
-			
-			ret = ipc_send_message(MODULE_ID_RTC_SERVICE, buf->srcModule, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), buf, 0);
-			if (ret != 0) 
-			{
-				slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
-			}
-		}
-		break;
-	case RTC_MSG_DEL_ALL:
-		slog(RTC_PRINT, SLOG_NORMAL, "process_msg_to_cap RTC_MSG_DEL_ALL, src:0x%x.\n", pmsg_buf->src_id);
-		memcpy(&req_cmd, pmsg_buf->aucDataBuf, sizeof(unsigned short));
-		//ÕâÀﻹÐèҪ֪ͨÖ÷¿Ø
-		ipc_send_message(MODULE_ID_RTC_SERVICE, pmsg_buf->src_id, req_cmd, 0, 0, 0);
-		ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
-		if (ret != 0) 
-		{
-			slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
-		}
-		break;
-	case RTC_MSG_TIME_CHANGED:
-		buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
-		slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: RTC_MSG_TIME_CHANGED, dst_id:0x%x.\n",buf->srcModule);
-		ipc_send_message(MODULE_ID_RTC_SERVICE, buf->srcModule, RTC_MSG_TIME_CHANGED, 0, 0, 0);
-		break;
-	default:
-		break;
-	}
-	return 0;
+    enum RTC_MSG_CMD cmd = pmsg_buf->usMsgCmd;
+    unsigned short req_cmd = 0;
+    int ret = 0;
+    struct tm *ptm = NULL;
+    RTC_DATA_BUF *buf = NULL;
+    int dst_id = 0;
+
+    switch (cmd)
+    {
+        case RTC_MSG_GET_TIME:
+            buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
+            slog(RTC_PRINT, SLOG_NORMAL, "to cap: RTC_MSG_GET_TIME \n");
+            if (buf->cpu == RTC_CPU_AP)
+            {
+                ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
+                if (ret != 0)
+                {
+                    slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n", ret);
+                }
+            }
+            else
+            {
+                slog(RTC_PRINT, SLOG_NORMAL, "receive rtc time from cap core : RTC_MSG_GET_TIME :%lu \n", buf->ulSec);
+
+            }
+            break;
+        case RTC_MSG_SET_TIME:
+            ptm = (struct tm *)pmsg_buf->aucDataBuf;
+            if (pmsg_buf->src_id == MODULE_ID_CP_RTC_SERVICE)
+            {
+                rtc_set_local_time(pmsg_buf);
+            }
+            else
+            {
+                /*
+                slog(RTC_PRINT, SLOG_NORMAL, "to cap: cmd:0x%x, %d-%d-%d %d:%d:%d \n", cmd, ptm->tm_year, ptm->tm_mon, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
+                ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
+                if (ret != 0)
+                {
+                	slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n",ret);
+                }
+                */
+            }
+            break;
+        case RTC_MSG_SNTP_UPDATE:
+            handle_sntp_update(pmsg_buf);
+            break;
+        case RTC_MSG_ADD_ALARM:
+        case RTC_MSG_DEL_ALARM:
+            buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
+            if (buf->cpu == RTC_CPU_AP)
+            {
+                slog(RTC_PRINT, SLOG_NORMAL, "to cap: cmd:0x%x, module:0x%x, msg_id:0x%x, sec:%ld: cpu:%d, utc:%d, wakeup:%d \n", cmd,
+                     buf->module, buf->srcModule, buf->ulSec, buf->cpu, buf->is_utc, buf->wakeup);
+                ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
+                if (ret != 0)
+                {
+                    slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n", ret);
+                }
+            }
+            else
+            {
+                slog(RTC_PRINT, SLOG_NORMAL, "from cap: cmd:0x%x, module:0x%x, msg_id:0x%x, del ok \n", cmd, buf->module,
+                     buf->srcModule);
+            }
+            break;
+        case RTC_MSG_ALARM_TIMEOUT:
+        case RTC_MSG_TIMER_TIMEOUT:
+            buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
+            if (buf->cpu == RTC_CPU_CAP)
+            {
+                slog(RTC_PRINT, SLOG_NORMAL, "from cap: cmd:0x%x(timeout), module:0x%x, msg_id:0x%x, sec:%ld: %d, %d, %d \n", cmd,
+                     buf->module, buf->srcModule, buf->ulSec, buf->cpu, buf->is_utc, buf->wakeup);
+
+                ret = ipc_send_message(MODULE_ID_RTC_SERVICE, buf->srcModule, RTC_MSG_ALARM_ELAPSED, sizeof(RTC_DATA_BUF), buf, 0);
+                if (ret != 0)
+                {
+                    slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n", ret);
+                }
+            }
+            break;
+        case RTC_MSG_DEL_ALL:
+            slog(RTC_PRINT, SLOG_NORMAL, "process_msg_to_cap RTC_MSG_DEL_ALL, src:0x%x.\n", pmsg_buf->src_id);
+            memcpy(&req_cmd, pmsg_buf->aucDataBuf, sizeof(unsigned short));
+            //ÕâÀﻹÐèҪ֪ͨÖ÷¿Ø
+            ipc_send_message(MODULE_ID_RTC_SERVICE, pmsg_buf->src_id, req_cmd, 0, 0, 0);
+            ret = send_soc_msg(FAR_PS, MODULE_ID_RTC_SERVICE, cmd, pmsg_buf->usDataLen, (void *)pmsg_buf->aucDataBuf);
+            if (ret != 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: ipc_send_message unexpected,ret:%d\n", ret);
+            }
+            break;
+        case RTC_MSG_TIME_CHANGED:
+            buf = (RTC_DATA_BUF *)pmsg_buf->aucDataBuf;
+            slog(RTC_PRINT, SLOG_ERR, "process_msg_to_cap: RTC_MSG_TIME_CHANGED, dst_id:0x%x.\n", buf->srcModule);
+            ipc_send_message(MODULE_ID_RTC_SERVICE, buf->srcModule, RTC_MSG_TIME_CHANGED, 0, 0, 0);
+            break;
+        default:
+            break;
+    }
+    return 0;
 }
 
 static int rtc_service_sock_init()
 {
     int sockfd = 0;
-    int ret; 
-    struct sockaddr_nl snl; 
-    
-    bzero(&snl, sizeof(struct sockaddr_nl)); 
-    snl.nl_family = AF_NETLINK; 
+    int ret;
+    struct sockaddr_nl snl;
+
+    bzero(&snl, sizeof(struct sockaddr_nl));
+    snl.nl_family = AF_NETLINK;
     snl.nl_pid = getpid();
-    snl.nl_groups = 1; 
+    snl.nl_groups = 1;
 
     if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+    {
         perror ("signal");
-
-    sockfd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); 
-    if (sockfd < 0)  
-    { 
-        slog(RTC_PRINT,SLOG_ERR, "create rtc service socket failed!\n");
-        return -1; 
     }
-//  setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize)); 
 
-    ret = bind(sockfd, (struct sockaddr *)&snl, sizeof(struct sockaddr_nl)); 
-    if (ret < 0)  
-    { 
-        slog(RTC_PRINT,SLOG_ERR, "rtc service socket bind fail!\n"); 
-        close(sockfd); 
-        return -1; 
-    } 
+    sockfd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
+    if (sockfd < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "create rtc service socket failed!\n");
+        return -1;
+    }
+    //  setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize));
 
-    return sockfd; 
+    ret = bind(sockfd, (struct sockaddr *)&snl, sizeof(struct sockaddr_nl));
+    if (ret < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc service socket bind fail!\n");
+        close(sockfd);
+        return -1;
+    }
+
+    return sockfd;
 }
 //change@/devices/platform/zx29_i2c.0/i2c-0/0-0012/zx234290-rtc
 static int rtc_time_msg_parse(const char *msg, int msglen)
 {
-	int offlen = 0;
-	const char *keys = NULL;
-	char* timeStr = NULL;
-	char *pSec = NULL;
-	slog(RTC_PRINT,SLOG_ERR, "[%s][%d] zx234290-rtc \n", __func__, __LINE__);
-	
-	offlen += strlen((char *)msg) + 1;
-	while (offlen <= msglen) {
-		keys = (char *)(msg + offlen);
-		//slog(NET_PRINT,SLOG_ERR, "[%s][%d] zx234290-rtc%s, %d\n", __func__, __LINE__, keys, offlen);
-		if (strncmp(keys, RTC_ALARM_TIMEOUT_MSG, strlen(RTC_ALARM_TIMEOUT_MSG)) == 0)
-		{
+    int offlen = 0;
+    const char *keys = NULL;
+    char* timeStr = NULL;
+    char *pSec = NULL;
+    slog(RTC_PRINT, SLOG_ERR, "[%s][%d] zx234290-rtc \n", __func__, __LINE__);
+
+    offlen += strlen((char *)msg) + 1;
+    while (offlen <= msglen)
+    {
+        keys = (char *)(msg + offlen);
+        //slog(NET_PRINT,SLOG_ERR, "[%s][%d] zx234290-rtc%s, %d\n", __func__, __LINE__, keys, offlen);
+        if (strncmp(keys, RTC_ALARM_TIMEOUT_MSG, strlen(RTC_ALARM_TIMEOUT_MSG)) == 0)
+        {
 #if 1    // cov M	DEADCODE
-            pSec = strstr(keys, "sec:");        
-            if (pSec == NULL) {
-            	slog(RTC_PRINT,SLOG_ERR, "zx234290-rtc event no sec \n");
-            	return -1;
+            pSec = strstr(keys, "sec:");
+            if (pSec == NULL)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "zx234290-rtc event no sec \n");
+                return -1;
             }
-			timeStr = pSec + strlen("sec:");
+            timeStr = pSec + strlen("sec:");
 
 #else
             timeStr = strstr(keys, "sec:") + strlen("sec:");
-			if (timeStr == NULL) {
-				slog(RTC_PRINT,SLOG_ERR, "zx234290-rtc event no sec \n");
-				return -1;
-			}
-#endif			
-			ipc_send_message2(MODULE_ID_HOTPLUG, MODULE_ID_RTC_SERVICE, RTC_MSG_ALARM_TIMEOUT, strlen(timeStr), timeStr, 0);
-			slog(RTC_PRINT,SLOG_NORMAL, "zx234290-rtc alarm timeout \n");
-			return 0;
-		}
-		else if (strncmp(keys, RTC_TIMER_TIMEOUT_MSG, strlen(keys)) == 0)
-		{
-			ipc_send_message2(MODULE_ID_HOTPLUG, MODULE_ID_RTC_SERVICE, RTC_MSG_TIMER_TIMEOUT, 0, NULL, 0);
-			slog(RTC_PRINT,SLOG_NORMAL, "zx234290-rtc timer timeout \n");
-			return 0;
-		}
-		offlen += strlen((char *)keys) + 1;
-	}
-	slog(RTC_PRINT,SLOG_ERR, "zx234290-rtc event not supported \n");
-	return -1;
+            if (timeStr == NULL)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "zx234290-rtc event no sec \n");
+                return -1;
+            }
+#endif
+            ipc_send_message2(MODULE_ID_HOTPLUG, MODULE_ID_RTC_SERVICE, RTC_MSG_ALARM_TIMEOUT, strlen(timeStr), timeStr, 0);
+            slog(RTC_PRINT, SLOG_NORMAL, "zx234290-rtc alarm timeout \n");
+            return 0;
+        }
+        else if (strncmp(keys, RTC_TIMER_TIMEOUT_MSG, strlen(keys)) == 0)
+        {
+            ipc_send_message2(MODULE_ID_HOTPLUG, MODULE_ID_RTC_SERVICE, RTC_MSG_TIMER_TIMEOUT, 0, NULL, 0);
+            slog(RTC_PRINT, SLOG_NORMAL, "zx234290-rtc timer timeout \n");
+            return 0;
+        }
+        offlen += strlen((char *)keys) + 1;
+    }
+    slog(RTC_PRINT, SLOG_ERR, "zx234290-rtc event not supported \n");
+    return -1;
 }
 
 /********************************************
@@ -1202,47 +1348,50 @@
  *******************************************/
 void rtc_event_process(void)
 {
-	int rtc_service_fd = 0;
-	fd_set readfds;
-	int maxfd = 0;
-	char buf[RTC_MSG_BUFFER_SIZE] = {0};
-	int len = 0;
-	int ret = 0;
-	prctl(PR_SET_NAME, "rtceventhandle", 0, 0, 0);
-	rtc_service_fd = rtc_service_sock_init();
-	if(rtc_service_fd < 0)
-	{
-		slog(RTC_PRINT,SLOG_ERR, "rtc service socket init fail!\n");
-		return ;
-	}
+    int rtc_service_fd = 0;
+    fd_set readfds;
+    int maxfd = 0;
+    char buf[RTC_MSG_BUFFER_SIZE] = {0};
+    int len = 0;
+    int ret = 0;
+    prctl(PR_SET_NAME, "rtceventhandle", 0, 0, 0);
+    rtc_service_fd = rtc_service_sock_init();
+    if (rtc_service_fd < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc service socket init fail!\n");
+        return ;
+    }
 
-	maxfd = rtc_service_fd;
-	while (1) 
-	{
-		FD_ZERO(&readfds);
-		FD_SET(rtc_service_fd, &readfds);
+    maxfd = rtc_service_fd;
+    while (1)
+    {
+        FD_ZERO(&readfds);
+        FD_SET(rtc_service_fd, &readfds);
 
-		ret = select(maxfd + 1, &readfds, NULL, NULL, NULL);
-		if (ret == -1 && errno == EINTR)
-			continue;
+        ret = select(maxfd + 1, &readfds, NULL, NULL, NULL);
+        if (ret == -1 && errno == EINTR)
+        {
+            continue;
+        }
 
-		if(FD_ISSET(rtc_service_fd, &readfds))
-		{
-			memset(buf, 0, sizeof(buf));
-			len = recv(rtc_service_fd, &buf, sizeof(buf), 0);
-			if(len <= 0)
-			{
-				slog(RTC_PRINT,SLOG_ERR, "rtc service socket recv msg fail!\n");
-				continue;
-			}
+        if (FD_ISSET(rtc_service_fd, &readfds))
+        {
+            memset(buf, 0, sizeof(buf));
+            len = recv(rtc_service_fd, &buf, sizeof(buf), 0);
+            if (len <= 0)
+            {
+                slog(RTC_PRINT, SLOG_ERR, "rtc service socket recv msg fail!\n");
+                continue;
+            }
 
-			/*½øÐÐueventÏûÏ¢½âÎö£¬·µ»Ø½âÎö½á¹û*/
-			if (strstr(buf, "zx234290-rtc")){
-				rtc_time_msg_parse(buf, len);
-			}
-			continue;
-		}
-	}
+            /*½øÐÐueventÏûÏ¢½âÎö£¬·µ»Ø½âÎö½á¹û*/
+            if (strstr(buf, "zx234290-rtc"))
+            {
+                rtc_time_msg_parse(buf, len);
+            }
+            continue;
+        }
+    }
 }
 
 /********************************************
@@ -1251,104 +1400,116 @@
  *******************************************/
 static void msg_looper(void)
 {
-	int ret = 0;
-	int msg_id = 0;
-	MSG_BUF msg_buf = {0};
-//    key_t msgkey = get_msg_key();
+    int ret = 0;
+    int msg_id = 0;
+    MSG_BUF msg_buf = {0};
+    //    key_t msgkey = get_msg_key();
 
-	msg_id = msgget(MODULE_ID_RTC_SERVICE, IPC_CREAT | 0600);
+    msg_id = msgget(MODULE_ID_RTC_SERVICE, IPC_CREAT | 0600);
 
-	memset(&msg_buf, 0, sizeof(msg_buf));
+    memset(&msg_buf, 0, sizeof(msg_buf));
 
-	slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: msg_looper enter(msgid=%d)&waiting...\n", msg_id);
-	while (1) {
-		ret = msgrcv(msg_id, &msg_buf, sizeof(MSG_BUF) - sizeof(long), 0, 0);
-		wake_rtc_lock();
-		if (ret <= 0) {
-			slog(RTC_PRINT, SLOG_ERR, "rtc-service: msg_looper recv msg break(%d)\n", ret);
-			wake_rtc_unlock();
-			continue;
-		}
-		slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: msg_looper process_msg in, src:0x%x, target:0x%x.\n", msg_buf.src_id, msg_buf.dst_id);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: msg_looper enter(msgid=%d)&waiting...\n", msg_id);
+    while (1)
+    {
+        ret = msgrcv(msg_id, &msg_buf, sizeof(MSG_BUF) - sizeof(long), 0, 0);
+        wake_rtc_lock();
+        if (ret <= 0)
+        {
+            slog(RTC_PRINT, SLOG_ERR, "rtc-service: msg_looper recv msg break(%d)\n", ret);
+            wake_rtc_unlock();
+            continue;
+        }
+        slog(RTC_PRINT, SLOG_DEBUG, "rtc-service: msg_looper process_msg in, src:0x%x, target:0x%x.\n", msg_buf.src_id,
+             msg_buf.dst_id);
 
-		#ifdef USE_CAP_SUPPORT
-			process_msg_rtc_cap(&msg_buf);
-		#else
-			process_msg(&msg_buf);
-		#endif
-		
-		slog(RTC_PRINT, SLOG_ERR, "rtc-service: msg_looper process_msg out.\n");
-		wake_rtc_unlock();
-	}
+#ifdef USE_CAP_SUPPORT
+        process_msg_rtc_cap(&msg_buf);
+#else
+        process_msg(&msg_buf);
+#endif
+
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service: msg_looper process_msg out.\n");
+        wake_rtc_unlock();
+    }
 }
 
 static void print_rtc_list_info(void)
 {
-	ALARM_T *temp = NULL;
-	int remain_time;
+    ALARM_T *temp = NULL;
+    int remain_time;
 
-	if(ioctl(g_rtc_fd, ZX234290_GET_TIMER_REMAIN, &remain_time) < 0)  // cov M CHECKED_RETURN
-	{
-	    slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
-	}
+    if (ioctl(g_rtc_fd, ZX234290_GET_TIMER_REMAIN, &remain_time) < 0) // cov M CHECKED_RETURN
+    {
+        slog(RTC_PRINT, SLOG_ERR, "ioctl fail.\n");
+    }
 
-	
-	slog(RTC_PRINT, SLOG_ERR, "rtc-service: rtc remain_time :%ld \n", remain_time);
-	
-	if (!list_empty(&rtc_timer_list)) {
-		list_for_each_entry(temp, &rtc_timer_list, list) {
-			slog(RTC_PRINT,SLOG_ERR, "rtc-service rtc_alarm_list node rtc_id:0x%x, module_id:0x%x, time_val:%ld, remain_time:%ld, cpu:%d\n", 
-				temp->rtc_id, 
-				temp->module_id, 
-				temp->time_val,
-				temp->remain_time,
-				temp->cpu);
-		}
-	}
-	else {
-		slog(RTC_PRINT,SLOG_ERR, "rtc-service rtc_timer_list is empty!");
-	}
 
-	if (!list_empty(&rtc_alarm_list)) {
-		list_for_each_entry(temp, &rtc_alarm_list, list) {
-			slog(RTC_PRINT,SLOG_ERR, "rtc-service rtc_alarm_list node rtc_id:0x%x, module_id:0x%x, time_val:%ld, remain_time:%ld, cpu:%d, \
-				rtc_tm.tm_year:%d, rtc_tm.tm_mon:%d, rtc_tm.tm_mday:%d, rtc_tm.tm_min:%d, rtc_tm.tm_sec:%d \n", 
-				temp->rtc_id, 
-				temp->module_id, 
-				temp->time_val,
-				temp->remain_time,
-				temp->cpu,
-				temp->rtc_tm.tm_year, temp->rtc_tm.tm_mon, temp->rtc_tm.tm_mday, temp->rtc_tm.tm_min, temp->rtc_tm.tm_sec);
-		}
-	}
-	else {
-		slog(RTC_PRINT,SLOG_ERR, "rtc-service rtc_alarm_list is empty!");
-	}
+    slog(RTC_PRINT, SLOG_ERR, "rtc-service: rtc remain_time :%ld \n", remain_time);
+
+    if (!list_empty(&rtc_timer_list))
+    {
+        list_for_each_entry(temp, &rtc_timer_list, list)
+        {
+            slog(RTC_PRINT, SLOG_ERR,
+                 "rtc-service rtc_alarm_list node rtc_id:0x%x, module_id:0x%x, time_val:%ld, remain_time:%ld, cpu:%d\n",
+                 temp->rtc_id,
+                 temp->module_id,
+                 temp->time_val,
+                 temp->remain_time,
+                 temp->cpu);
+        }
+    }
+    else
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service rtc_timer_list is empty!");
+    }
+
+    if (!list_empty(&rtc_alarm_list))
+    {
+        list_for_each_entry(temp, &rtc_alarm_list, list)
+        {
+            slog(RTC_PRINT, SLOG_ERR,
+                 "rtc-service rtc_alarm_list node rtc_id:0x%x, module_id:0x%x, time_val:%ld, remain_time:%ld, cpu:%d, \
+				rtc_tm.tm_year:%d, rtc_tm.tm_mon:%d, rtc_tm.tm_mday:%d, rtc_tm.tm_min:%d, rtc_tm.tm_sec:%d \n",
+                 temp->rtc_id,
+                 temp->module_id,
+                 temp->time_val,
+                 temp->remain_time,
+                 temp->cpu,
+                 temp->rtc_tm.tm_year, temp->rtc_tm.tm_mon, temp->rtc_tm.tm_mday, temp->rtc_tm.tm_min, temp->rtc_tm.tm_sec);
+        }
+    }
+    else
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service rtc_alarm_list is empty!");
+    }
 }
 
 /* ÐźŴ¦Àí*/
 static void sig_usr(int signo)
 {
 #if 0//(APP_OS_TYPE == APP_OS_LINUX)
-	if (signo == SIGUSR1)
-	{
-		slog(RTC_PRINT,SLOG_NORMAL, "rtc-service receive SIGUSR1! \n");
-		print_rtc_list_info();
-	}
-	else
-	{
-		slog(RTC_PRINT,SLOG_ERR, "rtc-service receive signo:%d", signo);
-	}
+    if (signo == SIGUSR1)
+    {
+        slog(RTC_PRINT, SLOG_NORMAL, "rtc-service receive SIGUSR1! \n");
+        print_rtc_list_info();
+    }
+    else
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service receive signo:%d", signo);
+    }
 #endif
 }
 
 /*RTCÏûÏ¢½âÎö*/
 int rtc_app_msg_parse(const char *msg, int msglen, struct hotplug_event *event)
 {
-	if (strstr(msg, "zx234290-rtc")){
-		rtc_time_msg_parse(msg, msglen);
-	}
-	return -1;
+    if (strstr(msg, "zx234290-rtc"))
+    {
+        rtc_time_msg_parse(msg, msglen);
+    }
+    return -1;
 }
 
 /********************************************
@@ -1358,54 +1519,55 @@
 int rtc_service_main(int argc, char **argv)
 {
 
-	slog(RTC_PRINT,SLOG_DEBUG, "rtc-service enter...\n");
-	pthread_t  rtcservice_thread_id;
-	pthread_attr_t attr;
-	int  result = 0;
-	prctl(PR_SET_NAME, "rtc-service", 0, 0, 0);
+    slog(RTC_PRINT, SLOG_DEBUG, "rtc-service enter...\n");
+    pthread_t  rtcservice_thread_id;
+    pthread_attr_t attr;
+    int  result = 0;
+    prctl(PR_SET_NAME, "rtc-service", 0, 0, 0);
 
-	//¸ù¾ÝNV³õʼ»¯´òÓ¡¼¶±ð£¬²¢×¢²á¶¯Ì¬µ÷Õû´òÓ¡¼¶±ðÐźÅÁ¿
-	loglevel_init();
+    //¸ù¾ÝNV³õʼ»¯´òÓ¡¼¶±ð£¬²¢×¢²á¶¯Ì¬µ÷Õû´òÓ¡¼¶±ðÐźÅÁ¿
+    loglevel_init();
 
-	if (signal(SIGUSR1, sig_usr) == SIG_ERR)
-	{
-		slog(RTC_PRINT,SLOG_ERR, "rtc-service not catch SIGUSR1 \n");
-	}
-	
+    if (signal(SIGUSR1, sig_usr) == SIG_ERR)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "rtc-service not catch SIGUSR1 \n");
+    }
+
     INIT_LIST_HEAD(&rtc_timer_list);
     INIT_LIST_HEAD(&rtc_alarm_list);
 
     g_clean_flag = 0;
-	
-	//rtcÔÚAPʱ£¬½Úµã±ØÐë´ò¿ª³É¹¦£»ÔÚÆäËûºËʱÓÉÆäËûºËÅжÏ
+
+    //rtcÔÚAPʱ£¬½Úµã±ØÐë´ò¿ª³É¹¦£»ÔÚÆäËûºËʱÓÉÆäËûºËÅжÏ
 #ifndef USE_CAP_SUPPORT
-	if ((g_rtc_fd = open_rtc()) < 0) {
-		slog(RTC_PRINT, SLOG_ERR, "Cannt open rtc dev!\n");
-		return -1;
-	}
-	init_rtc_alarm();
+    if ((g_rtc_fd = open_rtc()) < 0)
+    {
+        slog(RTC_PRINT, SLOG_ERR, "Cannt open rtc dev!\n");
+        return -1;
+    }
+    init_rtc_alarm();
 #endif
-/*
-	pthread_attr_init(&attr);
-	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-	result = pthread_create(&rtcservice_thread_id, &attr, rtc_event_process, NULL);
-	pthread_attr_destroy(&attr);
-	if(result != 0)
-	{ 
-		slog(RTC_PRINT,SLOG_ERR, "[rtc-service] rtcservice_thread pthread_create faild!\n"); 
-		return -1;
-	}
-	else
-	{
-		printf("[rtc-service] rtcservice_thread pthread_create  SUCCESS!\n");    
-	}
-*/
+    /*
+    	pthread_attr_init(&attr);
+    	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    	result = pthread_create(&rtcservice_thread_id, &attr, rtc_event_process, NULL);
+    	pthread_attr_destroy(&attr);
+    	if(result != 0)
+    	{
+    		slog(RTC_PRINT,SLOG_ERR, "[rtc-service] rtcservice_thread pthread_create faild!\n");
+    		return -1;
+    	}
+    	else
+    	{
+    		printf("[rtc-service] rtcservice_thread pthread_create  SUCCESS!\n");
+    	}
+    */
     hotplug_parse_register(DEVICE_TYPE_APP_RTC, rtc_app_msg_parse);
     msg_looper();
-	//klocwork
-	//close_rtc(g_rtc_fd);
+    //klocwork
+    //close_rtc(g_rtc_fd);
 
-	//slog(RTC_PRINT, SLOG_ERR, "rtc-service exit...\n");
+    //slog(RTC_PRINT, SLOG_ERR, "rtc-service exit...\n");
 
-	return 0;
+    return 0;
 }
diff --git a/ap/app/zte_comm/sms/src/sms_code.c b/ap/app/zte_comm/sms/src/sms_code.c
index bbcbd73..79a956e 100755
--- a/ap/app/zte_comm/sms/src/sms_code.c
+++ b/ap/app/zte_comm/sms/src/sms_code.c
@@ -6,661 +6,663 @@
 #ifdef WIN32

 #include <wchar.h>

 #endif

-#define     NON_GSM                         (0x1200+2048-0x19e0)

+#define     NON_GSM                         (0x6d7+6427-0x1fd2)

 #define     NON_GSM_P                       NON_GSM

 extern T_zUfiSms_ConcatInfo g_zUfiSms_ConcatSms;static const wms_udh_s_type*
-const_header;char g_zUfiSms_DigAscMap[(0x205f+152-0x20e7)]={
-((char)(0x1220+1883-0x194b)),((char)(0xd3+8037-0x2007)),
-((char)(0x7c1+2258-0x1061)),((char)(0x5ab+3830-0x146e)),
-((char)(0xbf+1696-0x72b)),((char)(0xf34+4156-0x1f3b)),
-((char)(0x11e3+1236-0x1681)),((char)(0xe36+4294-0x1ec5)),
-((char)(0xe84+3743-0x1ceb)),((char)(0xdf0+917-0x114c)),
-((char)(0xc87+4634-0x1e60)),((char)(0x78d+651-0x9d6)),
-((char)(0x17bd+3964-0x26f6)),((char)(0x104d+1932-0x1795)),
-((char)(0x3c9+2707-0xe17)),((char)(0x162c+3686-0x244c))};extern SMS_PARAM 
-g_zUfiSms_SendingSms;extern UINT16 g_zUfiSms_IsLanguageShift;extern int 
-g_zUfiSms_Language;static int SerializeNumbers_sms(const char*pSrc,char*pDst,int
- nSrcLength);const unsigned short g_zUfiSms_AsciiToGsmdefaultTable[]={
-((char)(0x1abd+567-0x1cd4)),((char)(0xbdc+5936-0x22ec)),
-((char)(0x156+6466-0x1a78)),((char)(0x1783+897-0x1ae4)),
-((char)(0xd8d+424-0xf15)),((char)(0xf6+1240-0x5ae)),((char)(0x1278+425-0x1401)),
-((char)(0x17f2+3534-0x25a0)),((char)(0x8f9+6893-0x23c6)),
-((char)(0x197f+1002-0x1d49)),((char)(0x482+4866-0x1764)),
-((char)(0x7fd+2619-0x1218)),((char)(0x1a8+837-0x4cd)),
-((char)(0x2158+876-0x24a4)),((char)(0x998+5443-0x1ebb)),
-((char)(0xad+7740-0x1ec9)),((char)(0x7e7+7239-0x240e)),
-((char)(0x718+8063-0x2677)),((char)(0x623+3204-0x1287)),
-((char)(0x765+4501-0x18da)),((char)(0xfab+5230-0x23f9)),
-((char)(0x8a8+3588-0x168c)),((char)(0x32d+5292-0x17b9)),
-((char)(0x900+2432-0x1260)),((char)(0x27b+8971-0x2566)),
-((char)(0x142+2709-0xbb7)),((char)(0x6c8+6440-0x1fd0)),
-((char)(0x172d+277-0x1822)),((char)(0xc64+3039-0x1823)),
-((char)(0x10cb+2835-0x1bbe)),((char)(0x494+323-0x5b7)),((char)(0xbb8+893-0xf15))
-,((char)(0x732+3665-0x1563)),((char)(0x8ed+2445-0x1259)),(0x2b4+4701-0x14ef),
-((char)(0x46c+1326-0x977)),(0x3+7598-0x1daf),((char)(0x1002+840-0x1325)),
-((char)(0x681+227-0x73e)),(0x201c+1424-0x2585),((char)(0x633+123-0x686)),
-((char)(0x858+7298-0x24b1)),((char)(0x18d9+2940-0x242b)),
-((char)(0x1dc6+1086-0x21d9)),((char)(0x1bdf+2174-0x2431)),
-((char)(0xda7+1913-0x14f3)),((char)(0xde9+2562-0x17bd)),
-((char)(0xc4b+801-0xf3d)),((char)(0x450+2283-0xd0b)),((char)(0x5c0+2627-0xfd2)),
-((char)(0xdc8+4908-0x20c2)),((char)(0x284+9073-0x25c2)),
-((char)(0x1a0d+3223-0x2670)),((char)(0x17e4+364-0x191b)),
-((char)(0x3b+7017-0x1b6e)),((char)(0x75f+1672-0xdb0)),((char)(0x2c1+1661-0x906))
-,((char)(0x13f1+4372-0x24cc)),((char)(0x213+58-0x213)),
-((char)(0x345+7937-0x220b)),((char)(0xe92+196-0xf1a)),
-((char)(0x5ac+2849-0x1090)),((char)(0x1632+1444-0x1b98)),
-((char)(0x84d+2160-0x107e)),(0x10e6+3512-0x1e9e),((char)(0x6b7+675-0x919)),
-((char)(0x439+6830-0x1ea5)),((char)(0x348+8274-0x2357)),
-((char)(0xa0a+7130-0x25a0)),((char)(0xa82+1648-0x10ad)),
-((char)(0x437+5177-0x182a)),((char)(0x1449+3680-0x2262)),
-((char)(0x2ac+8575-0x23e3)),((char)(0x324+5312-0x179b)),
-((char)(0xcca+6448-0x25b0)),((char)(0x7e7+1632-0xdfc)),
-((char)(0x589+1436-0xad9)),((char)(0xddd+2963-0x1923)),
-((char)(0x50+9954-0x26e4)),((char)(0x186a+3120-0x244b)),
-((char)(0x71+4223-0x10a0)),((char)(0x8ed+1200-0xd4c)),
-((char)(0x1f7+9530-0x26df)),((char)(0x188+7396-0x1e19)),
-((char)(0x1650+277-0x1711)),((char)(0x428+4188-0x142f)),
-((char)(0x1025+5705-0x2618)),((char)(0x1e4d+859-0x2151)),
-((char)(0x15db+1100-0x19cf)),((char)(0x18a2+525-0x1a56)),
-((char)(0x174+1996-0x8e6)),(0x2311+3455-0x1554),(0x26cd+1514-0x1188),6974,6932,
-(0x8f9+547-0xb0b),((char)(0x1b13+2893-0x2640)),((char)(0x18ef+2471-0x2235)),
-((char)(0x15b7+602-0x17af)),((char)(0x1741+2756-0x21a2)),
-((char)(0x763+3394-0x1441)),((char)(0x15f6+4143-0x25c0)),
-((char)(0x4ea+202-0x54e)),((char)(0x1375+4407-0x2445)),
-((char)(0x256+9014-0x2524)),((char)(0xa74+5985-0x216c)),
-((char)(0xe63+1918-0x1577)),((char)(0x14a3+1224-0x1900)),
-((char)(0xc88+6160-0x242c)),((char)(0x1c9+2859-0xc87)),
-((char)(0x974+6250-0x2170)),((char)(0x219+2400-0xb0a)),
-((char)(0xd72+2406-0x1668)),((char)(0x1049+2541-0x19c5)),
-((char)(0x1d2a+1021-0x20b5)),((char)(0x919+2191-0x1135)),
-((char)(0x7c4+7886-0x261e)),((char)(0x884+5767-0x1e96)),
-((char)(0x1c9+4643-0x1376)),((char)(0xb64+3851-0x19f8)),
-((char)(0xb3a+950-0xe78)),((char)(0x4dc+5717-0x1ab8)),
-((char)(0x12ab+4055-0x2208)),(0x2639+1610-0x115b),6976,6953,(0x1e00+8580-0x2447)
-,((char)(0x8f1+3157-0x1526)),((char)(0xf9a+312-0x10b2)),
-((char)(0xaab+6694-0x24b1)),((char)(0x8c0+3980-0x182c)),
-((char)(0x1dfb+625-0x204c)),((char)(0x4c0+5599-0x1a7f)),
-((char)(0xd0+1330-0x5e2)),((char)(0x1fa+1944-0x972)),((char)(0x689+1456-0xc19)),
-((char)(0x991+1204-0xe25)),((char)(0x10fb+1467-0x1696)),
-((char)(0x60a+6317-0x1e97)),((char)(0x1ddc+1455-0x236b)),
-((char)(0x90f+4420-0x1a33)),((char)(0xbdf+921-0xf58)),((char)(0x512+2010-0xccc))
-,((char)(0x9e5+3846-0x18cb)),((char)(0xacc+4031-0x1a6b)),
-((char)(0x175d+204-0x1809)),((char)(0x10b+4201-0x1154)),
-((char)(0x142f+1523-0x1a02)),((char)(0x1208+3630-0x2016)),
-((char)(0x1297+1564-0x1893)),((char)(0xceb+3665-0x1b1c)),
-((char)(0x5c+5893-0x1741)),((char)(0x121d+2837-0x1d12)),
-((char)(0x1719+3826-0x25eb)),((char)(0x1b49+682-0x1dd3)),
-((char)(0x1174+1711-0x1803)),((char)(0x1019+4588-0x21e5)),
-((char)(0x14f3+1262-0x19c1)),((char)(0xa09+6850-0x24ab)),
-((char)(0x93b+5092-0x1cff)),((char)(0x2378+513-0x2559)),(0x1462+1604-0x1a66),
-((char)(0x1775+29-0x1772)),(0x245b+289-0x257b),(0xfda+2204-0x1852),
-(0x23e1+693-0x2693),((char)(0x501+3893-0x1416)),(0x1130+5252-0x2555),
-((char)(0x6b2+5801-0x1d3b)),((char)(0xbaf+4113-0x1ba0)),
-((char)(0x335+2618-0xd4f)),((char)(0x1668+4269-0x26f5)),
-((char)(0x18e3+2878-0x2401)),((char)(0x303+4469-0x1458)),
-((char)(0x922+1946-0x109c)),((char)(0x1359+2851-0x1e5c)),
-((char)(0x759+5976-0x1e91)),((char)(0x735+2892-0x1261)),
-((char)(0x63f+3802-0x14f9)),((char)(0x12f1+340-0x1425)),
-((char)(0x730+7085-0x22bd)),((char)(0x70a+6337-0x1fab)),
-((char)(0x1097+5248-0x24f7)),((char)(0x15ba+1350-0x1ae0)),(0x17d5+586-0x1a14),
-((char)(0x1ead+125-0x1f0a)),((char)(0x675+5426-0x1b87)),
-((char)(0x1f3f+276-0x2033)),((char)(0x10e7+1998-0x1895)),
-((char)(0xa7d+5110-0x1e53)),((char)(0x9ec+4555-0x1b97)),(0xec2+3958-0x1dd8),
-((char)(0x6d0+1724-0xd6c)),((char)(0x528+6405-0x1e0d)),
-((char)(0x885+2577-0x1276)),((char)(0xf5a+2974-0x1ad8)),(0x1d3a+2103-0x2516),
-(0x1986+2875-0x24b3),(0xb49+6754-0x258f),(0x1240+3958-0x21ad),
-((char)(0x27+2842-0xb21)),(0x8e2+398-0xa51),((char)(0x40f+1902-0xb5d)),
-((char)(0x30a+1352-0x832)),((char)(0x15a0+4123-0x259b)),
-((char)(0x8e3+3548-0x169f)),((char)(0x2178+627-0x23cb)),
-((char)(0x2b1+1550-0x89f)),((char)(0x139f+477-0x155c)),(0x575+6926-0x2026),
-((char)(0x39+6210-0x185b)),((char)(0x1284+4372-0x2378)),
-((char)(0x1ed6+31-0x1ed5)),((char)(0xfaf+2195-0x1822)),(0x1cb3+1615-0x22a6),
-((char)(0xe6b+3352-0x1b63)),((char)(0xc84+4167-0x1cab)),
-((char)(0xcaa+2154-0x14f4)),((char)(0x10c8+1308-0x15c4)),
-((char)(0x359+462-0x507)),(0x7e9+1617-0xddc),((char)(0x1217+1388-0x1763)),
-((char)(0xa55+5600-0x2015)),(0x1457+3168-0x2099),(0xce6+921-0x1000),
-((char)(0x81d+6188-0x2029)),((char)(0x244d+699-0x26e8)),
-((char)(0x5e8+3237-0x126d)),(0xf24+3071-0x1aa8),(0xbf8+177-0xc9a),
-(0x1c61+2537-0x262d),((char)(0x3cf+7128-0x1f87)),(0x12c9+4030-0x2283),
-(0x164b+1369-0x1b9f),((char)(0x1278+4005-0x21fd)),((char)(0x15ff+684-0x188b)),
-(0x7e0+4500-0x196d),((char)(0x8b6+3724-0x1722)),((char)(0x425+3475-0x1198)),
-((char)(0x2b1+7805-0x210e)),((char)(0x1f1+4415-0x1310)),(0x1326+4229-0x232e),
-(0x42f+3701-0x129c),((char)(0x6b1+3621-0x14b6)),((char)(0x5b4+6550-0x1f2a)),
-((char)(0xd8+3145-0xd01)),(0x3f2+3447-0x10ed),((char)(0xdfc+5329-0x22ad)),
-(0xa39+6085-0x21f2),(0x1a72+2720-0x250c),((char)(0x1457+1220-0x18fb)),
-((char)(0x126f+518-0x1455)),(0x707+429-0x836),((char)(0x1a1+6335-0x1a40)),
-((char)(0x13a8+4203-0x23f3)),((char)(0x1606+2949-0x216b)),};const unsigned short
- zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0xc97+1752-0x136d)]={{
-(0x9e7+4135-0x1a05),(0x2f8+3290-0xeeb)},{(0x342+6526-0x1cb6),
-(0x1819+3309-0x24fa)},{(0x181b+3256-0x24c6),(0x6f7+6561-0x208b)},{
-(0x11d3+1108-0x1613),(0x1c2+9425-0x2635)},{(0x261+6355-0x1b0c),
-(0x17cc+3108-0x2375)},{(0xdc7+608-0xffe),(0x8d4+3205-0x14dc)},{
-(0x1f31+492-0x20ee),(0x760+8065-0x2685)},{(0x23bf+618-0x25ed),
-(0x18c2+952-0x1c1f)},{(0xf8f+5480-0x24ba),(0x22f2+747-0x255f)},{
-(0x70d+263-0x7d6),(0x1824+831-0x1b06)},{(0x301+8343-0x2358),(0x381+1248-0x7e5)},
-{(0x398+6634-0x1d41),(0x2446+460-0x2551)},{(0x927+4739-0x1b61),
-(0x760+6678-0x20a9)},{(0x1594+1216-0x1a05),(0x1019+2239-0x1805)},{
-(0x1c92+1651-0x22b0),(0x54c+344-0x5ca)},{(0x2ef+2335-0xbad),(0x1ef+8901-0x23d3)}
-,{(0x168d+1935-0x1db7),8364},{(0x174a+1381-0x1c46),(0x531+6681-0x1e5d)},{
-(0x18da+1789-0x1f68),(0xfdb+1797-0x15ed)},{(0x11a4+5356-0x261b),
-(0x95c+5036-0x1c0e)},};const unsigned short Ucs2_To_Gsm7_SPANISH_Table_UCS[][
-(0x766+2966-0x12fa)]={{(0xf2f+2107-0x175a),(0x1311+5732-0x25e1)},{
-(0x104c+537-0x1253),(0x66c+8960-0x25c6)},{(0x5ab+7427-0x229b),
-(0x2296+1937-0x2694)},{(0x1705+3772-0x25ad),(0x1f14+656-0x1e09)},{
-(0x70b+6662-0x20fc),(0x62f+2008-0xa5e)},{(0x6f7+3796-0x15b5),(0xa46+3592-0x14ae)
-},{(0xc74+4777-0x1f06),(0x171a+667-0x160d)},{(0x692+7275-0x22e5),
-(0x59a+6420-0x1b0b)},{(0x4c2+2408-0xe11),(0x893+119-0x572)},{(0x1206+997-0x15d1)
-,(0x10a2+2807-0x17fb)},};const unsigned char Ucs2_To_Gsm7_SPANISH_Table_ASC[]={
+const_header;char g_zUfiSms_DigAscMap[(0xf36+5160-0x234e)]={
+((char)(0x5ef+5439-0x1afe)),((char)(0xef7+2905-0x1a1f)),
+((char)(0x2f2+8369-0x2371)),((char)(0xc29+916-0xf8a)),
+((char)(0x162f+1595-0x1c36)),((char)(0x645+3643-0x144b)),
+((char)(0x624+7486-0x232c)),((char)(0xf31+3195-0x1b75)),
+((char)(0x77d+3821-0x1632)),((char)(0xfd+2088-0x8ec)),
+((char)(0x8a5+4768-0x1b04)),((char)(0xb5+7418-0x1d6d)),((char)(0x1fdd+5-0x1f9f))
+,((char)(0x237+8925-0x24d0)),((char)(0x718+1354-0xc1d)),
+((char)(0x10d9+2355-0x19c6))};extern SMS_PARAM g_zUfiSms_SendingSms;extern 
+UINT16 g_zUfiSms_IsLanguageShift;extern int g_zUfiSms_Language;static int 
+SerializeNumbers_sms(const char*pSrc,char*pDst,int nSrcLength);const unsigned 
+short g_zUfiSms_AsciiToGsmdefaultTable[]={((char)(0x1642+3949-0x258f)),
+((char)(0x9bd+2982-0x1543)),((char)(0x2281+797-0x257e)),
+((char)(0x1381+3139-0x1fa4)),((char)(0xa17+6124-0x21e3)),
+((char)(0x47c+3580-0x1258)),((char)(0x834+7343-0x24c3)),
+((char)(0x1828+3726-0x2696)),((char)(0x1593+3132-0x21af)),
+((char)(0x1401+2386-0x1d33)),((char)(0xc82+199-0xd29)),
+((char)(0x1153+3270-0x1df9)),((char)(0x5ba+4852-0x188e)),
+((char)(0x120c+5140-0x2600)),((char)(0xa61+2996-0x15f5)),
+((char)(0x841+1515-0xe0c)),((char)(0x133f+1220-0x17e3)),
+((char)(0x16b0+3601-0x24a1)),((char)(0x31a+3547-0x10d5)),
+((char)(0x150+1119-0x58f)),((char)(0x429+1310-0x927)),
+((char)(0x2cd+4952-0x1605)),((char)(0x5d2+8296-0x261a)),
+((char)(0x4e4+2457-0xe5d)),((char)(0x222+3750-0x10a8)),((char)(0x745+358-0x88b))
+,((char)(0xf3+4228-0x1157)),((char)(0x1680+2313-0x1f69)),
+((char)(0x716+6440-0x201e)),((char)(0x936+7298-0x2598)),
+((char)(0x1ac+7307-0x1e17)),((char)(0x1171+1595-0x178c)),
+((char)(0xa7+9567-0x25e6)),((char)(0xcbd+6554-0x2636)),(0x1cf+5748-0x1821),
+((char)(0xbc6+4564-0x1d77)),(0x18b6+1391-0x1e23),((char)(0x857+1791-0xf31)),
+((char)(0x2e2+6924-0x1dc8)),(0xf6a+1920-0x16c3),((char)(0x91+2170-0x8e3)),
+((char)(0x4b1+8573-0x2605)),((char)(0x12b9+1310-0x17ad)),
+((char)(0xf20+5279-0x2394)),((char)(0x94f+4733-0x1ba0)),
+((char)(0x6b5+3793-0x1559)),((char)(0x3f2+1374-0x922)),
+((char)(0x71a+6009-0x1e64)),((char)(0x10b3+5162-0x24ad)),
+((char)(0x7a8+4919-0x1aae)),((char)(0x12fb+5108-0x26bd)),
+((char)(0x562+945-0x8e0)),((char)(0x336+5857-0x19e3)),((char)(0x5c0+1915-0xd06))
+,((char)(0x19c2+2590-0x23aa)),((char)(0x2fb+8780-0x2510)),
+((char)(0x218d+722-0x2427)),((char)(0x1546+1398-0x1a83)),
+((char)(0x420+7553-0x2167)),((char)(0x6b3+6779-0x20f3)),
+((char)(0x7c7+4519-0x1932)),((char)(0x3fd+1630-0xa1e)),
+((char)(0x68a+3452-0x13c8)),((char)(0xd1f+4844-0x1fcc)),(0x19b8+2195-0x224b),
+((char)(0xa08+2711-0x145e)),((char)(0x734+2394-0x104c)),
+((char)(0xaa4+2317-0x136e)),((char)(0x365+4048-0x12f1)),
+((char)(0x1281+4942-0x258a)),((char)(0xb04+1657-0x1137)),
+((char)(0x910+4736-0x1b49)),((char)(0x1406+1422-0x194c)),
+((char)(0x6f+7643-0x1e01)),((char)(0x1aa1+733-0x1d34)),
+((char)(0x324+5319-0x17a0)),((char)(0x4b8+7879-0x2333)),
+((char)(0xac0+2007-0x124a)),((char)(0x621+5741-0x1c40)),
+((char)(0x14df+2741-0x1f45)),((char)(0x32f+6304-0x1b7f)),
+((char)(0x17c3+580-0x19b6)),((char)(0x42a+3864-0x12f0)),
+((char)(0x162c+1321-0x1b02)),((char)(0x8b0+4131-0x187f)),
+((char)(0x3a4+5121-0x1750)),((char)(0x6ef+1532-0xc95)),
+((char)(0x4e9+4543-0x1651)),((char)(0x50b+6283-0x1d3e)),
+((char)(0xe0a+4685-0x1ffe)),((char)(0xb16+5001-0x1e45)),6972,6959,6974,
+(0x1f4d+7004-0x1f95),(0x1a8a+164-0x1b1d),((char)(0x1ff9+1466-0x2593)),
+((char)(0x24bd+349-0x25b9)),((char)(0x5d5+771-0x876)),
+((char)(0x129+6484-0x1a1a)),((char)(0x3c3+6891-0x1e4a)),
+((char)(0x1c16+784-0x1ec1)),((char)(0x83d+1290-0xce1)),
+((char)(0x1214+4197-0x2212)),((char)(0x2264+1292-0x2708)),
+((char)(0x5a3+6336-0x1dfa)),((char)(0x148+5038-0x148c)),
+((char)(0x134+5666-0x16eb)),((char)(0x71+4135-0x102c)),
+((char)(0x1dbb+1934-0x24dc)),((char)(0x964+7441-0x2607)),
+((char)(0x443+8013-0x2321)),((char)(0xd06+2885-0x17db)),
+((char)(0x31d+2859-0xdd7)),((char)(0x1d37+2375-0x260c)),
+((char)(0x2cc+241-0x34a)),((char)(0x1e1+6118-0x1953)),
+((char)(0x1e6+9384-0x2619)),((char)(0xb14+2342-0x13c4)),
+((char)(0x911+7582-0x2638)),((char)(0x276+9139-0x25b1)),
+((char)(0x651+1728-0xc98)),((char)(0x4cb+1480-0xa19)),6952,6976,6953,6973,
+((char)(0x1a9a+2491-0x2435)),((char)(0x6d7+6943-0x21d6)),
+((char)(0xc14+6839-0x26ab)),((char)(0x1719+3472-0x2489)),
+((char)(0x1e9b+1889-0x25dc)),((char)(0xde5+4488-0x1f4d)),
+((char)(0xfa9+5940-0x26bd)),((char)(0x7ab+5103-0x1b7a)),
+((char)(0x762+4012-0x16ee)),((char)(0x661+4515-0x17e4)),
+((char)(0x905+5389-0x1df2)),((char)(0xf3c+318-0x105a)),
+((char)(0x1ad0+145-0x1b41)),((char)(0x1873+720-0x1b23)),
+((char)(0xa1f+1299-0xf12)),((char)(0x5e1+5794-0x1c63)),
+((char)(0x107+4986-0x1461)),((char)(0xabc+1224-0xf64)),
+((char)(0x130f+999-0x16d6)),((char)(0x1509+4034-0x24ab)),
+((char)(0xb15+1623-0x114c)),((char)(0x19e4+2800-0x24b4)),
+((char)(0x226c+215-0x2323)),((char)(0x7cb+6250-0x2015)),
+((char)(0x1225+2688-0x1c85)),((char)(0x1b7a+432-0x1d0a)),
+((char)(0x1e0a+1300-0x22fe)),((char)(0x27a+1017-0x653)),
+((char)(0xc42+698-0xedc)),((char)(0x12b9+3853-0x21a6)),
+((char)(0x65c+1915-0xdb7)),((char)(0x6d5+1952-0xe55)),((char)(0x352+2941-0xeaf))
+,((char)(0x294+2145-0xad5)),(0x1b4f+2183-0x2396),((char)(0x251+5151-0x1650)),
+(0x1257+4385-0x2377),(0x1038+2097-0x1845),(0x737+1244-0xc10),
+((char)(0x11b6+671-0x1435)),(0x16cc+2476-0x2019),((char)(0x813+6421-0x2108)),
+((char)(0xcdf+1468-0x127b)),((char)(0xd55+1371-0x1290)),
+((char)(0xf1c+1834-0x1626)),((char)(0x2a2+3172-0xee6)),
+((char)(0x707+8111-0x2696)),((char)(0x12e8+2112-0x1b08)),
+((char)(0xad0+2016-0x1290)),((char)(0x180d+2973-0x238a)),
+((char)(0x6c1+1996-0xe6d)),((char)(0x1af+3110-0xdb5)),
+((char)(0x11e2+4779-0x246d)),((char)(0xa76+776-0xd5e)),
+((char)(0x196f+3416-0x26a7)),((char)(0x67c+7666-0x244e)),
+((char)(0x805+6572-0x2191)),(0x145+7756-0x1f86),((char)(0xb59+5786-0x21d3)),
+((char)(0x508+3545-0x12c1)),((char)(0x8b5+5304-0x1d4d)),
+((char)(0x4f3+4615-0x16da)),((char)(0xccf+1130-0x1119)),
+((char)(0x39b+8656-0x254b)),(0x249+8956-0x24e5),((char)(0x1508+145-0x1579)),
+((char)(0xec7+1758-0x1585)),((char)(0x156b+2812-0x2047)),
+((char)(0xb5b+2391-0x1492)),(0x184c+3543-0x25c8),(0x18bf+59-0x18ec),
+(0x1250+1535-0x1833),(0x739+4528-0x18e0),((char)(0x2f0+7254-0x1f26)),
+(0xdc4+2669-0x1812),((char)(0x1ca1+1311-0x21a0)),((char)(0x713+6048-0x1e93)),
+((char)(0xc0f+5526-0x2185)),((char)(0xe0a+1183-0x1289)),
+((char)(0xaf2+2366-0x1410)),((char)(0x94d+4673-0x1b6e)),
+((char)(0x12e6+3983-0x2255)),(0x96+66-0x7b),((char)(0x13f2+4357-0x24d7)),
+((char)(0x31c+1452-0x8a8)),((char)(0x103d+1103-0x146c)),
+((char)(0x3c+2161-0x88d)),(0x234+8983-0x24ef),((char)(0x1370+1247-0x182f)),
+((char)(0x4e7+7863-0x237e)),((char)(0x829+5647-0x1e18)),
+((char)(0x9c6+3775-0x1865)),((char)(0x108f+5754-0x26e9)),(0xee6+3007-0x1a47),
+((char)(0x712+5357-0x1bdf)),((char)(0x14f3+1468-0x1a8f)),(0xea0+2275-0x1765),
+(0x15a+6604-0x1aa7),((char)(0xc8+8744-0x22d0)),((char)(0x5d9+3353-0x12d2)),
+((char)(0x24f+7814-0x20b5)),(0xc4a+4150-0x1c05),(0x1370+4017-0x2312),
+(0x11b3+1634-0x17f8),((char)(0x8e9+3533-0x1696)),(0x990+328-0xad4),
+(0x1426+3610-0x223b),((char)(0x5ea+7919-0x24b9)),((char)(0x4ef+55-0x506)),
+(0x478+3471-0x1200),((char)(0x1c2a+579-0x1e4d)),((char)(0x1c86+1343-0x21a5)),
+((char)(0x1d32+1565-0x232f)),((char)(0x9eb+4172-0x1a17)),(0x750+6870-0x21a9),
+(0xe69+6023-0x25e8),((char)(0x1dba+512-0x1f9a)),((char)(0xe48+3368-0x1b50)),
+((char)(0x17a5+3142-0x23cb)),(0xd28+611-0xf0f),((char)(0xff3+2368-0x1913)),
+(0xe50+5263-0x22d3),(0x1472+3448-0x21e4),((char)(0x10d5+1557-0x16ca)),
+((char)(0x14f7+2092-0x1d03)),(0x441+9027-0x2706),((char)(0x40f+4805-0x16b4)),
+((char)(0xe32+6319-0x26c1)),((char)(0xa73+6363-0x232e)),};const unsigned short 
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0xc08+4387-0x1d29)]={{
+(0x52c+7578-0x22bd),(0x111f+934-0x13de)},{(0x881+6774-0x22ed),
+(0x709+3261-0x13ba)},{(0x3e1+526-0x5e2),(0x1ffd+635-0x226b)},{
+(0x1c89+2580-0x2689),(0x17d9+3718-0x2601)},{(0xfa1+194-0x103b),
+(0x5cd+6363-0x1e2d)},{(0x1a6d+2691-0x24c7),(0x16f+1479-0x6b9)},{
+(0xf6c+5757-0x25ba),(0x1368+3612-0x2128)},{(0x1681+1280-0x1b45),
+(0xce4+742-0xf6f)},{(0xaa7+5396-0x1f7e),(0x16cc+1723-0x1d09)},{
+(0x11b6+3212-0x1e04),(0x1af6+2110-0x22d7)},{(0x19f4+2931-0x2527),
+(0x7f5+1871-0xec8)},{(0xf29+1940-0x167c),(0xe05+4577-0x1f25)},{
+(0x4ed+4884-0x17b8),(0x70d+2615-0x1077)},{(0x8a9+1341-0xd97),(0x311+8226-0x2260)
+},{(0x1af+4564-0x132e),(0x11c3+638-0x1367)},{(0x9f9+5053-0x1d55),
+(0x6b6+2138-0xe2f)},{(0x1aed+1634-0x20ea),8364},{(0x5bb+7846-0x23f8),
+(0x20c+4316-0x11fb)},{(0x8c1+5961-0x1f9b),(0x13c0+4022-0x2283)},{
+(0x1485+3620-0x2234),(0xd0b+3945-0x1b7a)},};const unsigned short 
+Ucs2_To_Gsm7_SPANISH_Table_UCS[][(0x11e6+3831-0x20db)]={{(0x22d+8664-0x23f5),
+(0x1f58+2473-0x256d)},{(0xfeb+3265-0x1c9a),(0x1d96+1970-0x21a2)},{
+(0xf10+4546-0x20bf),(0xa13+6411-0x1f8b)},{(0x2577+200-0x262b),
+(0xd95+5954-0x213c)},{(0x13f+5517-0x16b7),(0x4ea+1700-0x7e5)},{
+(0x6f0+7046-0x2260),(0x2118+280-0x1e90)},{(0xb42+3071-0x172a),
+(0x130c+2792-0x1a4c)},{(0x80a+5409-0x1d13),(0x796+2708-0xe87)},{
+(0x1b3f+2320-0x2436),(0x4f7+7128-0x1d37)},{(0xe01+4119-0x1dfe),(0x404+855-0x3bd)
+},};const unsigned char Ucs2_To_Gsm7_SPANISH_Table_ASC[]={NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x1ca5+289-0x1dbc),NON_GSM,NON_GSM,(0xe08+828-0x1137),NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x84a+2906-0x139a),NON_GSM,NON_GSM,(0x43c+3780-0x12f3),NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x124c+5207-0x2683),(0x2b5+217-0x36d),
-(0x10b2+2413-0x19fd),(0x1dc3+2081-0x25c1),(0x1f24+1646-0x2590),
-(0x3d5+3170-0x1012),(0x2d9+3449-0x102c),(0x2084+1061-0x2482),(0x22f+6494-0x1b65)
-,(0xfe1+1115-0x1413),(0xa9b+6991-0x25c0),(0x546+4910-0x1849),(0x12c+1400-0x678),
-(0xa9+6994-0x1bce),(0x31b+2466-0xc8f),(0x24b+8719-0x242b),(0x9f3+4371-0x1ad6),
-(0x2b9+4957-0x15e5),(0xb8+7738-0x1ec0),(0x4b1+4801-0x173f),(0xe40+5404-0x2328),
-(0x788+5022-0x1af1),(0x3d2+8551-0x2503),(0xb16+1673-0x1168),(0x850+2641-0x1269),
-(0x1d9+1133-0x60d),(0x15a5+93-0x15c8),(0xea8+4037-0x1e32),(0x414+4939-0x1723),
-(0x176d+152-0x17c8),(0x13e2+617-0x160d),(0x102a+4392-0x2113),(0x885+3168-0x14e5)
-,(0xff1+86-0x1006),(0x14c1+723-0x1752),(0x19f4+676-0x1c55),(0x4e3+2418-0xe11),
-(0xb50+3543-0x18e2),(0x6a+252-0x120),(0x10a0+4985-0x23d2),(0x517+841-0x818),
-(0xf59+202-0xfda),(0x4f8+1335-0x9e5),(0x237+5217-0x164d),(0x8f0+6915-0x23a7),
-(0x15c1+4337-0x2665),(0x13ca+2038-0x1b72),(0x882+5286-0x1cd9),
-(0x6b8+7460-0x238c),(0x1ed6+718-0x2153),(0xf3+4687-0x12f0),(0x6ac+3888-0x1589),
-(0x547+5216-0x1953),(0xe2c+4920-0x210f),(0x3c5+373-0x4e4),(0x1763+1494-0x1ce2),
-(0x18eb+1408-0x1e13),(0xba2+2643-0x159c),(0x17fa+913-0x1b31),NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0x1198+1893-0x18ec),NON_GSM,(0x108d+4091-0x2027),
-(0xd61+1432-0x1297),(0x625+3579-0x13bd),(0xdb1+4657-0x1f7e),(0xc97+1731-0x12f5),
-(0xa19+2675-0x1426),(0x119+2884-0xbf6),(0x94a+1517-0xecf),(0xf0a+3847-0x1da8),
-(0x53b+6020-0x1c55),(0xb6a+6831-0x25ae),(0x1539+2627-0x1f10),(0x335+7358-0x1f86)
-,(0x142c+2595-0x1de1),(0x19a4+1659-0x1fb0),(0x1427+31-0x13d6),
-(0xc3d+3798-0x1aa2),(0x339+7622-0x208d),(0x4c9+8668-0x2632),(0x1942+3062-0x24c4)
-,(0xc50+4920-0x1f13),(0x482+5292-0x18b8),(0x8d9+2077-0x107f),(0x729+7563-0x243c)
-,(0x441+7545-0x2141),(0x2026+1442-0x254e),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x9a1+786-0xc93),(0x11bd+4528-0x234c),
+(0x1956+2818-0x2436),(0x107b+4091-0x2053),(0x161b+333-0x1766),
+(0x1787+2205-0x1fff),(0x3d0+3803-0x1285),(0x1580+1323-0x1a84),
+(0x3a7+8624-0x252f),(0x103a+673-0x12b2),(0x1391+4287-0x2426),
+(0x1227+4274-0x22ae),(0x909+2827-0x13e8),(0x380+2532-0xd37),(0x54b+8120-0x24d5),
+(0x6e1+7538-0x2424),(0x13a2+1692-0x1a0e),(0x93f+7294-0x258c),
+(0x1963+2424-0x22a9),(0x5f0+4783-0x186c),(0x3a9+2407-0xcdc),(0xdd+9687-0x267f),
+(0x449+5186-0x1855),(0x1089+3985-0x1fe3),(0x190d+1525-0x1eca),
+(0x1f13+571-0x2115),(0x195c+3213-0x25af),(0x17a+1809-0x850),(0x126a+1484-0x17fa)
+,(0x102c+2214-0x1895),(0x903+5861-0x1faa),(0x3bd+5592-0x1956),
+(0x10e7+1405-0x1664),(0x1310+3994-0x2269),(0x217c+64-0x217a),(0xaab+4043-0x1a33)
+,(0x4b+4930-0x1349),(0xc36+6580-0x25a5),(0x13e1+2496-0x1d5b),(0x1ff+7974-0x20de)
+,(0x5f4+7538-0x231e),(0xb95+3976-0x1ad4),(0x19b7+401-0x1afe),
+(0x1928+3246-0x258b),(0x157+6070-0x18c1),(0x4b3+6651-0x1e61),(0xae1+431-0xc42),
+(0x1ebd+360-0x1fd6),(0x17f5+816-0x1ad5),(0x21d+6020-0x1950),(0x1cbf+2614-0x26a3)
+,(0x2365+112-0x2382),(0x16ea+266-0x17a0),(0x157b+1911-0x1c9d),
+(0x142b+584-0x161d),(0x5c6+4733-0x17ec),(0x1430+3775-0x2297),(0x4b8+6169-0x1c78)
+,(0xd4d+4506-0x1e8d),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x5ec+2637-0x1028),NON_GSM
+,(0x1c3+8054-0x20d8),(0x887+2820-0x1329),(0x103a+5244-0x2453),
+(0x17ed+2531-0x216c),(0x196+3219-0xdc4),(0xa4a+6520-0x235c),(0x1762+785-0x1a0c),
+(0x7b5+4140-0x1779),(0x1976+1035-0x1d18),(0xe4a+3583-0x1bdf),(0x1055+294-0x1110)
+,(0x63b+5012-0x1963),(0xbbc+4191-0x1bae),(0x5ef+2014-0xd5f),(0xf40+5062-0x2297),
+(0x1372+1505-0x18e3),(0x902+5170-0x1cc3),(0x15c4+2377-0x1e9b),
+(0xfd1+1596-0x159a),(0x2011+1621-0x25f2),(0x1b1c+2047-0x22a6),
+(0x1de2+172-0x1e18),(0x33d+3618-0x10e8),(0x20c9+1654-0x26c7),(0xfe5+2260-0x1840)
+,(0x1a9+1104-0x57f),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0x72+6425-0x1970),(0xbb5+6254-0x23e3),NON_GSM,
-(0x12da+2157-0x1b46),(0x1d4+8512-0x22f0),(0x1410+780-0x1719),NON_GSM,
-(0xfea+1398-0x1501),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x25d+4510-0x13e0),(0xe0f+393-0xf58),NON_GSM,(0xd68+5393-0x2278),
+(0xf62+4841-0x2227),(0x626+1578-0xc4d),NON_GSM,(0x1b3+2489-0xb0d),NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x3d5+966-0x73b),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0xcca+5679-0x229e),(0x286+3830-0x116e),
-(0x1bcc+40-0x1bd8),(0x3b0+3530-0x1171),NON_GSM,(0x32f+6073-0x1ac9),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x700+2811-0x119e),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0xd51+1252-0x11d9),NON_GSM,(0x2e6+5001-0x1664),NON_GSM,
-NON_GSM,NON_GSM,(0xf89+4250-0x1fc5),NON_GSM,NON_GSM,(0x420+599-0x659),
-(0x320+6342-0x1b67),NON_GSM,NON_GSM,NON_GSM,(0x977+3944-0x1864),
-(0x216+8481-0x2328),(0x943+2967-0x14bd),NON_GSM,(0x1225+1460-0x17d5),
-(0x7db+7758-0x2624),NON_GSM,NON_GSM,(0x1efc+285-0x2012),NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0x29b+6671-0x1c2d),(0x987+2287-0x126e),NON_GSM,NON_GSM,NON_GSM,
-(0x926+6007-0x2021),NON_GSM,(0x1732+708-0x19ea),(0x24b+942-0x5f3),NON_GSM,
-NON_GSM,(0x303+2211-0xb28),NON_GSM,NON_GSM,NON_GSM};const unsigned short 
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][(0x370+2853-0xe93)]={{
-(0x1db2+197-0x1e72),(0xf58+5199-0x22bd)},{(0x80+9687-0x264e),(0x4f9+3893-0x1347)
-},{(0xc44+5890-0x233c),(0x1f1d+1814-0x2627)},{(0x551+6210-0x1d88),
-(0xc42+1922-0x12f0)},{(0x8af+513-0xaa4),(0x14c9+816-0x1705)},{
-(0x8fa+3585-0x16ee),(0x46d+1075-0x893)},{(0x61f+7842-0x24b3),(0x50b+1708-0xaf6)}
-,{(0x60d+8188-0x25fa),(0xb46+4162-0x1aa7)},{(0x25+7609-0x1dcc),
-(0xc48+5612-0x1e8e)},{(0x925+4861-0x1c0f),(0x1e8b+2910-0x2656)},{
-(0x115b+1296-0x1657),(0x215b+1518-0x26eb)},{(0xfc2+2211-0x1850),
-(0x1bd5+558-0x1a5a)},{(0x388+5612-0x195e),(0x1ed4+1369-0x208d)},{
-(0x1f99+1860-0x26c6),(0x1a5c+3528-0x247c)},{(0x43f+1875-0xb7a),
-(0xc45+3685-0x1707)},{(0xb97+564-0xdb2),(0x74c+4519-0x155b)},{
-(0x16eb+224-0x17ac),(0x1571+3769-0x2360)},{(0x3b+7952-0x1f23),
-(0x705+7538-0x23fc)},{(0x26f+7729-0x2077),(0xa96+312-0xb51)},{
-(0x1bd+7615-0x1f4d),(0x5ec+6312-0x1e38)},{(0x2282+21-0x225b),
-(0x14d9+3042-0x2060)},{(0x1b93+2036-0x234a),(0x256+6223-0x1a27)},{
-(0x16d1+4178-0x26e5),(0x23a8+324-0x248f)},{(0xdfb+576-0xffb),(0xf57+1454-0x1489)
-},{(0x1155+3617-0x1f35),(0x1559+2363-0x1dd4)},{(0x180d+1301-0x1cd9),
-(0x5e0+6518-0x1e89)},{(0x988+2829-0x1446),(0x316+3140-0xe87)},{
-(0xb01+1059-0xecf),(0xb24+384-0xbca)},{(0x2e4+7837-0x2126),(0x166b+1057-0x19c9)}
-,{(0x1b57+1886-0x2259),(0x16e4+854-0x1965)},{(0x75d+4753-0x198d),
-(0x871+1000-0xb97)},{(0x1d95+38-0x1d56),(0x264d+1317-0xac6)},{
-(0x1c1a+2284-0x249d),(0x1adf+2980-0x2596)},{(0xa19+6807-0x2441),
-(0xddb+989-0x10c5)},{(0x45a+736-0x6c5),(0xc15+2834-0x162d)},{(0x950+4350-0x19d3)
-,(0xad4+564-0xc25)},{(0x1433+945-0x1768),(0x1b81+3062-0x2682)},{
-(0x51f+5347-0x1983),(0x25b2+287-0x25ef)},};const unsigned short 
-Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0x790+2237-0x104b)]={{(0xf2b+3649-0x1d5c),
-(0xd24+5192-0x1dd8)},{(0xf2d+4446-0x2076),8929},{(0x638+3002-0x11da),8364},{
-(0x45d+6796-0x1e84),8364},};const unsigned char 
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,(0x2011+95-0x2010),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x1cb+1808-0x880),(0x1697+2366-0x1fc7),(0x802+539-0xa01),(0x2150+110-0x21b5),
+NON_GSM,(0xb28+3178-0x1773),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0x7d4+3190-0x13ed),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1028+3017-0x1b95)
+,NON_GSM,(0x1820+885-0x1b8a),NON_GSM,NON_GSM,NON_GSM,(0x15a5+257-0x1648),NON_GSM
+,NON_GSM,(0x1251+1392-0x17a3),(0x11eb+5191-0x25b3),NON_GSM,NON_GSM,NON_GSM,
+(0x161+415-0x285),(0x22ed+533-0x24f3),(0x2a2+7490-0x1fc7),NON_GSM,
+(0x14dc+4371-0x25eb),(0xa75+246-0xb66),NON_GSM,NON_GSM,(0x1ec+5103-0x15d4),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x929+6405-0x21b1),(0x3f3+1271-0x8e2),NON_GSM,
+NON_GSM,NON_GSM,(0xa68+2272-0x12cc),NON_GSM,(0x5fd+2800-0x10e1),
+(0xc23+3144-0x1865),NON_GSM,NON_GSM,(0x4fb+137-0x506),NON_GSM,NON_GSM,NON_GSM};
+const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][
+(0xee3+993-0x12c2)]={{(0x693+5910-0x1da4),(0x1078+5136-0x239e)},{
+(0x82+5440-0x15b9),(0x507+3924-0x1374)},{(0x874+2214-0x1110),
+(0x1242+2927-0x1da5)},{(0x12d1+2768-0x1d96),(0x2165+1082-0x24cb)},{
+(0x5d8+7246-0x221a),(0xce3+5336-0x20c7)},{(0x17b4+2216-0x204f),
+(0x9f6+3704-0x1861)},{(0x189d+647-0x1b16),(0x2170+1076-0x24e3)},{
+(0x1671+2315-0x1f6d),(0x5fc+797-0x838)},{(0x69c+4725-0x18ff),
+(0x1aa4+1784-0x1df6)},{(0x74b+7724-0x2564),(0x1424+3712-0x1f11)},{
+(0x1b08+2868-0x2628),(0x89d+2336-0x115f)},{(0xa09+4012-0x19a0),
+(0x966+6701-0x1fea)},{(0x20+8733-0x2227),(0xcc7+4545-0x1ae8)},{
+(0x13d5+4345-0x24b7),(0xd95+1656-0x1065)},{(0xdd7+5072-0x218f),
+(0x1916+1795-0x1c76)},{(0xa76+2777-0x1536),(0xe75+5298-0x1f8f)},{
+(0x106b+1622-0x16a2),(0x8e3+2763-0x12e4)},{(0xc4+8887-0x2353),
+(0x1135+862-0x1418)},{(0x1382+4082-0x234b),(0xa1a+6103-0x2174)},{
+(0xd3d+1940-0x14a2),(0xb90+446-0xcf2)},{(0xdd4+5245-0x2215),(0x16fa+3134-0x22dd)
+},{(0x3bb+2418-0xcf0),(0x1beb+2788-0x2651)},{(0xc9c+6083-0x2421),
+(0x10da+2585-0x1a96)},{(0x93f+5333-0x1dd4),(0x12b4+3939-0x219b)},{
+(0x273+6029-0x19bf),(0x1f2+2366-0xa70)},{(0x234+3504-0xf9b),(0x40f+4616-0x154a)}
+,{(0x260+7131-0x1dec),(0x14aa+1220-0x189b)},{(0xca3+529-0xe5f),
+(0x1363+156-0x1325)},{(0x347+8876-0x2598),(0x2027+680-0x220c)},{
+(0x339+4931-0x1620),(0x435+3456-0x10e0)},{(0x99+4054-0x100e),
+(0x1413+2184-0x1bd9)},{(0x1a20+2112-0x21fb),8364},{(0x4a9+7864-0x22f8),
+(0x17ab+3192-0x2336)},{(0x516+7709-0x22c4),(0x21b3+749-0x23ad)},{
+(0x14e8+1829-0x1b98),(0xfdb+1400-0x1459)},{(0x3d6+7459-0x207e),
+(0x19b+3155-0xd0b)},{(0x1419+4563-0x2570),(0x510+7799-0x2292)},{
+(0x1d3+5301-0x1609),(0x4c1+1125-0x844)},};const unsigned short 
+Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0xb9+9395-0x256a)]={{(0xefa+186-0xfa4),
+(0xc59+5198-0x1d13)},{(0xd83+2582-0x1784),8929},{(0x6b5+7718-0x24c3),8364},{
+(0x2f0+4321-0x136c),8364},};const unsigned char 
 Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[]={NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x519+6110-0x1ced),NON_GSM,NON_GSM,
-(0x18ac+2877-0x23dc),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x897+2144-0x10ed),NON_GSM,NON_GSM,
+(0x677+1650-0xcdc),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0xbe5+2861-0x16f2),(0x1b12+1816-0x2209),(0x1a94+152-0x1b0a),
-(0x179d+2276-0x205e),(0x1eab+1792-0x25a9),(0xb9c+6683-0x2592),
-(0xbca+1503-0x1183),(0xda+3125-0xce8),(0xab9+2438-0x1417),(0x9b1+6066-0x213a),
-(0x1482+3918-0x23a6),(0x964+4826-0x1c13),(0x12d2+1597-0x18e3),
-(0x885+6611-0x222b),(0x3d4+1617-0x9f7),(0x735+1399-0xc7d),(0x18cf+277-0x19b4),
-(0x1a07+2526-0x23b4),(0x1afc+935-0x1e71),(0x1a59+27-0x1a41),(0xcb+1078-0x4cd),
-(0x737+2200-0xf9a),(0x8cb+7215-0x24c4),(0xebd+1598-0x14c4),(0x1553+143-0x15aa),
-(0xb2f+2528-0x14d6),(0x6d6+1045-0xab1),(0x91c+6365-0x21be),(0xc65+1387-0x1194),
-(0x36c+4392-0x1457),(0x3ec+7432-0x20b6),(0xb96+2198-0x13ed),(0x72+8911-0x2341),
-(0x2b3+4963-0x15d5),(0x1228+1181-0x1683),(0x4b4+374-0x5e7),(0x10a2+2414-0x19cc),
-(0xf3+4402-0x11e0),(0x4a5+8374-0x2515),(0x97a+363-0xa9e),(0x8ed+7708-0x26c1),
-(0x120b+2239-0x1a81),(0x1a6f+2392-0x237d),(0xde7+5133-0x21a9),
-(0x1001+4268-0x2061),(0xd0f+1106-0x1114),(0x23ec+250-0x2498),(0x10b+3757-0xf69),
-(0x1a66+2247-0x22dd),(0x2149+166-0x219e),(0x233+9491-0x26f4),(0x9bf+2801-0x145d)
-,(0x569+4578-0x16f7),(0xdd2+3364-0x1aa1),(0x19cf+3296-0x2659),
-(0x1bf5+2620-0x25da),(0x8b8+3218-0x14f2),(0x1dcd+2048-0x2574),
-(0x19f+5121-0x1546),NON_GSM,(0x3c1+1024-0x7aa),NON_GSM,(0x82a+1525-0xe09),
-(0x180b+1668-0x1e7e),(0x13da+2174-0x1bdb),(0xb44+3340-0x17ef),
-(0x1836+1673-0x1e5d),(0x6e5+2151-0xee9),(0xb13+1400-0x1027),(0xceb+4464-0x1df6),
-(0xe6d+2380-0x1753),(0x918+2222-0x115f),(0x1376+1958-0x1ab4),(0x9f8+6910-0x248d)
-,(0x2d6+5786-0x1906),(0x1207+3494-0x1f42),(0x114+2713-0xb41),(0x6e7+7995-0x25b5)
-,(0x38c+7024-0x1e8e),(0x1a8f+1277-0x1f1d),(0xf5c+4206-0x1f5a),
-(0x1109+2481-0x1a49),(0xa9+4748-0x12c3),(0x5d0+7307-0x21e8),(0xd60+1598-0x132a),
-(0xa80+3025-0x15dc),(0x2a8+3207-0xeb9),(0x12d5+1498-0x1838),(0xdd0+3819-0x1c43),
-(0xae1+5380-0x1f6c),(0xb44+2181-0x134f),NON_GSM,(0x1a09+2484-0x23a3),NON_GSM,
-(0xa80+6449-0x2351),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0x1051+1189-0x14d6),(0x1251+3931-0x218b),(0x5cc+3112-0x11d2),
+(0xce7+503-0xebb),(0xa18+3267-0x16d9),(0x3f0+6034-0x1b5d),(0x2d+1348-0x54b),
+(0xd12+4715-0x1f56),(0x13e6+3194-0x2038),(0x1f81+1068-0x2384),
+(0xf18+3213-0x1b7b),(0x1ceb+344-0x1e18),(0x3ec+3180-0x102c),(0x97a+2163-0x11c0),
+(0xd5+2405-0xa0c),(0xb8c+3092-0x1771),(0x724+3008-0x12b4),(0x800+5818-0x1e89),
+(0xe1f+4538-0x1fa7),(0x38b+996-0x73c),(0x23a+9345-0x2687),(0x1aaa+321-0x1bb6),
+(0x83d+2256-0x10d7),(0x13a4+4470-0x24e3),(0xa9c+3212-0x16f0),(0x116+1809-0x7ee),
+(0x3f3+8899-0x267c),(0x1fd1+1144-0x240e),(0xa12+6416-0x22e6),(0x1157+853-0x146f)
+,(0x18a5+2590-0x2285),(0x17cb+243-0x187f),(0x722+5202-0x1b74),
+(0x12f5+138-0x133e),(0x199+9003-0x2482),(0x868+1316-0xd49),(0xc9f+6074-0x2415),
+(0x761+6507-0x2087),(0x9e2+2404-0x1300),(0x14ad+1228-0x1932),
+(0x135b+1582-0x1941),(0x1f55+364-0x2078),(0x1164+1434-0x16b4),(0x170+2004-0x8f9)
+,(0x122b+3776-0x209f),(0x21f4+1028-0x25ab),(0x53c+3382-0x1224),
+(0x445+3897-0x132f),(0x23ff+796-0x26cb),(0x129c+3459-0x1fce),(0x8da+4855-0x1b7f)
+,(0xdc6+4809-0x203c),(0xd22+4079-0x1cbd),(0x1c7b+118-0x1c9c),(0xd07+4506-0x1e4b)
+,(0x10f4+2176-0x191d),(0xabd+111-0xad4),(0x65d+7124-0x21d8),(0x843+4716-0x1a55),
+NON_GSM,(0x100c+2736-0x1aa5),NON_GSM,(0xcc9+4835-0x1f96),(0x6ca+3551-0x1498),
+(0x20a9+1283-0x252f),(0x1a9+9484-0x2654),(0x15dd+2506-0x1f45),
+(0x120f+1019-0x15a7),(0x638+7738-0x240e),(0x1547+758-0x17d8),
+(0x1571+1543-0x1b12),(0x1ab6+2260-0x2323),(0xa84+250-0xb16),(0xccb+1067-0x108d),
+(0x4c0+4977-0x17c7),(0x656+1054-0xa09),(0x11b5+5083-0x2524),(0xc34+6113-0x23a8),
+(0x99+8346-0x20c5),(0x25a1+375-0x26a9),(0x9ec+6921-0x2485),(0x4da+1072-0x899),
+(0x6bb+4306-0x171b),(0x3ac+5312-0x17f9),(0x2242+845-0x251b),(0x235+2566-0xbc6),
+(0x830+4626-0x19cc),(0x1190+1124-0x157d),(0x430+5792-0x1a58),(0xab1+4714-0x1ca2)
+,(0x76a+6501-0x2055),NON_GSM,(0x3e9+6941-0x1eec),NON_GSM,(0x1170+3099-0x1d2b),
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x15a3+508-0x1784),NON_GSM_P,
-NON_GSM,(0x197a+2175-0x21f8),NON_GSM_P,(0xaa8+3886-0x19d3),NON_GSM,
-(0x5eb+2984-0x1134),NON_GSM,NON_GSM,(0x16f8+2539-0x20d1),NON_GSM,NON_GSM,NON_GSM
-,NON_GSM,NON_GSM,(0x11a2+3819-0x2069),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x1ab+3393-0xed8),(0x1257+4262-0x22ef),(0x168d+1037-0x1a7e),(0x1c25+668-0x1e66)
-,NON_GSM_P,NON_GSM_P,NON_GSM_P,(0x142+7458-0x1e51),NON_GSM,(0x34f+1426-0x8c2),
-(0x5e9+2576-0xfdb),NON_GSM,NON_GSM,(0x93b+5886-0x1ff9),NON_GSM,NON_GSM,NON_GSM,
-NON_GSM_P,NON_GSM,(0x524+948-0x8bf),(0xbcb+4310-0x1c96),(0x2d4+6652-0x1c74),
-NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM,(0x61d+5214-0x1a1e),NON_GSM,
-(0x924+4584-0x1aae),NON_GSM,NON_GSM,NON_GSM_P,(0x1183+2206-0x19a2),
-(0x2258+110-0x22b7),(0x1a4+902-0x50d),(0xfe5+2348-0x1896),NON_GSM_P,NON_GSM_P,
-NON_GSM_P,(0x76b+5220-0x1bc6),NON_GSM_P,(0x970+1636-0xfcf),(0x11a5+295-0x12c8),
-NON_GSM,NON_GSM_P,(0x16+7145-0x1bf8),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM_P
-,(0x1cca+263-0x1dc9),(0x400+603-0x64f),(0xcaa+2418-0x15a0),NON_GSM_P,NON_GSM,
-NON_GSM_P,NON_GSM_P,(0x86a+1826-0xf86),NON_GSM,(0x1291+5115-0x260e),NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,(0x1619+4125-0x261b),NON_GSM_P,NON_GSM,
+(0x18af+2112-0x20ee),NON_GSM_P,(0x258a+334-0x26d5),NON_GSM,(0xbb5+1557-0x116b),
+NON_GSM,NON_GSM,(0x518+1533-0xb03),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x1f98+1241-0x244d),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x66+4803-0x1315),(0x777+116-0x7dd),(0x398+5470-0x18da),(0x1cdf+2607-0x26b3),
+NON_GSM_P,NON_GSM_P,NON_GSM_P,(0xb38+989-0xf02),NON_GSM,(0x7bb+7540-0x2510),
+(0x1e3c+1649-0x248f),NON_GSM,NON_GSM,(0x22b+6486-0x1b41),NON_GSM,NON_GSM,NON_GSM
+,NON_GSM_P,NON_GSM,(0x112+2619-0xb34),(0x35d+3851-0x125d),(0x7ea+1757-0xe6b),
+NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM,(0x7b3+2874-0x1290),NON_GSM,
+(0x9ec+3616-0x17ae),NON_GSM,NON_GSM,NON_GSM_P,(0xaa1+5027-0x1dc5),
+(0xac5+1926-0x123c),(0xfb5+4947-0x22eb),(0x55d+5680-0x1b12),NON_GSM_P,NON_GSM_P,
+NON_GSM_P,(0x21d8+970-0x2599),NON_GSM_P,(0x166+4931-0x14a4),(0xa47+27-0xa5e),
+NON_GSM,NON_GSM_P,(0x72+3913-0xfb4),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM_P,
+(0x1511+1243-0x19e4),(0x186d+274-0x1973),(0x8ef+5411-0x1d96),NON_GSM_P,NON_GSM,
+NON_GSM_P,NON_GSM_P,(0x853+6154-0x2057),NON_GSM,(0x122b+1429-0x1742),NON_GSM,
 NON_GSM,NON_GSM};const unsigned short zte_sms_GSMDefault_To_UCS2_Table_Ex[][
-(0xa1a+4100-0x1a1c)]={{(0xa68+4653-0x1c8b),(0xd2d+2977-0x18c2)},{
-(0x1899+678-0x1b2b),(0xf42+1330-0x1416)},{(0x225+7076-0x1da1),(0x114+3376-0xdc9)
-},{(0xe58+1786-0x1529),(0x3f6+1282-0x87b)},{(0x760+6223-0x1f80),
-(0x491+3107-0x1058)},{(0x841+6556-0x21a1),(0xa80+6282-0x22af)},{
-(0x9bf+3121-0x15b3),(0x18a9+3291-0x2506)},{(0x1be5+2723-0x264a),
-(0x16d9+3925-0x25d1)},{(0x1b45+1195-0x1fb0),(0xd9+8887-0x2314)},{
-(0x2533+123-0x2549),8364},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[]
-[(0x434+8170-0x241c)]={{(0x3ef+2983-0xf86),(0xa12+6528-0x1ffe)},{
-(0x10b+6020-0x187d),(0x1484+3125-0x1d13)},{(0x839+2443-0x11b1),
-(0x1f26+1763-0x2276)},{(0x6ec+7446-0x23ee),(0x12af+5704-0x255c)},{
-(0x489+1310-0x992),(0x5d5+3408-0xf7c)},{(0x1d8f+276-0x1e8d),(0x745+239-0x494)},{
-(0x1482+2796-0x1f57),(0xad3+2133-0xf80)},{(0x8f2+3691-0x1745),
-(0xd9c+1695-0x1098)},{(0x274+3991-0x11f2),(0xaa7+3106-0x1331)},{
-(0x2dd+2819-0xdc6),(0x1335+4228-0x201b)},};const unsigned char 
+(0x257f+321-0x26be)]={{(0x105d+2254-0x1921),(0x15eb+4112-0x25ef)},{
+(0x7ac+3863-0x16af),(0x2c1+4919-0x159a)},{(0x13f6+4870-0x26d4),
+(0x11a4+1501-0x1706)},{(0x11dc+833-0x14f4),(0x139+8668-0x2298)},{
+(0x12f3+3900-0x2200),(0xe47+4227-0x1e6e)},{(0x22f+2053-0x9f8),(0xca+4620-0x127b)
+},{(0xb47+843-0xe55),(0x4d6+8350-0x24f6)},{(0x10b8+4227-0x20fd),
+(0x3cb+7833-0x2207)},{(0x2012+515-0x21d5),(0x18d7+3116-0x2487)},{
+(0x150+5748-0x175f),8364},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[]
+[(0xa60+5257-0x1ee7)]={{(0xcb3+617-0xf0c),(0xaef+4656-0x198b)},{
+(0xc57+1217-0x1106),(0x1525+5036-0x252b)},{(0x2a2+4701-0x14ec),
+(0xa3d+5374-0x1ba8)},{(0x1a1a+2373-0x234b),(0xeda+1364-0x1093)},{
+(0x10f7+5625-0x26db),(0x15ed+2307-0x1b47)},{(0x76a+1677-0xde1),
+(0x18c2+4016-0x24d2)},{(0x9e7+982-0xda6),(0x114d+6008-0x251d)},{
+(0x4e6+531-0x6e1),(0xb24+1353-0xcca)},{(0x1420+4100-0x240b),(0xda8+1393-0xf81)},
+{(0x1555+2560-0x1f3b),(0x1408+2876-0x1ba6)},};const unsigned char 
 UCS2_To_GSMDefault_Table_ASC[]={NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1484+2970-0x2014),NON_GSM,NON_GSM,
-(0x980+970-0xd3d),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x307+6848-0x1dbd),NON_GSM,NON_GSM,
+(0xf3a+1575-0x1554),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0x2a+5001-0x1393),(0x29+1466-0x5c2),(0x1166+5046-0x24fa),
-(0xcd3+3865-0x1bc9),(0xa16+5981-0x2171),(0x8af+99-0x8ed),(0x1007+811-0x130c),
-(0x37b+8856-0x25ec),(0x7bd+6679-0x21ac),(0xa13+536-0xc02),(0x305+6814-0x1d79),
-(0x108+3157-0xd32),(0xce5+3726-0x1b47),(0x15e8+1043-0x19ce),(0x7da+3029-0x1381),
-(0x1011+2946-0x1b64),(0x1307+206-0x13a5),(0x1221+1948-0x198c),
-(0xf0a+3539-0x1cab),(0x1a90+3229-0x26fa),(0x1385+4503-0x24e8),
-(0x141f+432-0x159a),(0x90+1994-0x824),(0x2c1+8062-0x2208),(0x7a6+1094-0xbb4),
-(0x725+5902-0x1dfa),(0x622+2116-0xe2c),(0x10e2+2534-0x1a8d),(0x1074+3198-0x1cb6)
-,(0xdda+3959-0x1d14),(0xe93+5966-0x25a3),(0x343+2243-0xbc7),(0x1014+4043-0x1fdf)
-,(0xd75+280-0xe4c),(0x1988+2261-0x221b),(0x155+1655-0x789),(0x692+3466-0x13d8),
-(0xe11+3523-0x1b8f),(0xf2+4140-0x10d8),(0x1261+3259-0x1ed5),(0x815+1063-0xbf4),
-(0x1769+801-0x1a41),(0xa5b+7008-0x2571),(0x164a+919-0x1996),(0x1c0+1802-0x87e),
-(0x506+8326-0x253f),(0x17d6+1981-0x1f45),(0x313+879-0x633),(0x3b1+4400-0x1491),
-(0x703+2088-0xeda),(0x1779+1935-0x1eb6),(0x265+4541-0x13cf),(0x1eb6+47-0x1e91),
-(0x3d8+7107-0x1f46),(0xb85+5039-0x1ede),(0x314+5842-0x198f),(0x5b2+2817-0x105b),
-(0xe57+2943-0x197d),(0x2460+128-0x2486),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x925+4924-0x1c50),NON_GSM,(0x1af0+742-0x1d75),(0x339+4011-0x1282),
-(0x18d+3422-0xe88),(0xef9+4443-0x1ff0),(0x140a+4058-0x237f),(0x112f+507-0x12c4),
-(0xc2a+2-0xbc5),(0x1487+1344-0x195f),(0x3cf+6103-0x1b3d),(0x131f+4447-0x2414),
-(0x3b6+1532-0x947),(0x7f7+4162-0x17cd),(0x239+401-0x35d),(0x171+8636-0x22bf),
-(0x392+7962-0x223d),(0xf6a+2100-0x172e),(0x166a+749-0x18e6),(0x2b3+6690-0x1c63),
-(0x8f9+315-0x9c1),(0xe2f+4946-0x210d),(0xb0b+7273-0x26ff),(0x1861+1093-0x1c30),
-(0x505+1400-0xa06),(0x16da+2574-0x2070),(0x1403+4010-0x2334),(0x42b+7763-0x2204)
+NON_GSM,(0x6f4+1700-0xd78),(0x1330+1159-0x1796),(0x1f7a+242-0x204a),
+(0x13f+4863-0x141b),(0x900+4113-0x190f),(0xa7+6722-0x1ac4),(0x24f0+463-0x2699),
+(0x121+4003-0x109d),(0x878+7117-0x241d),(0x45+3759-0xecb),(0xf3f+5459-0x2468),
+(0xf7c+5986-0x26b3),(0x1ac5+1230-0x1f67),(0x5df+5155-0x19d5),
+(0x1079+4170-0x2095),(0x21f5+130-0x2248),(0x502+8760-0x270a),(0x2f0+8895-0x257e)
+,(0xe5+4961-0x1414),(0x4d+8340-0x20ae),(0x7a7+5506-0x1cf5),(0x4a2+509-0x66a),
+(0x1c52+206-0x1cea),(0x6e1+7253-0x22ff),(0x11e8+1348-0x16f4),
+(0x1a45+1770-0x20f6),(0x302+8184-0x22c0),(0x8b6+1510-0xe61),(0x43d+8050-0x2373),
+(0x2b9+8153-0x2255),(0x964+695-0xbdd),(0xf6a+834-0x126d),(0xdf3+3606-0x1c09),
+(0x7c6+4594-0x1977),(0x1ab4+703-0x1d31),(0x3cb+6324-0x1c3c),(0x1109+582-0x130b),
+(0x2489+308-0x2578),(0x192a+1694-0x1f82),(0xe3b+3878-0x1d1a),(0xda6+6538-0x26e8)
+,(0xe13+1979-0x1585),(0xcb3+3201-0x18ea),(0x1454+3281-0x20da),
+(0x18c+6362-0x1a1a),(0x1ad+2844-0xc7c),(0x13e4+1148-0x1812),(0xc34+984-0xfbd),
+(0xf84+821-0x1269),(0x477+274-0x538),(0x1f99+1553-0x2558),(0x47b+6251-0x1c93),
+(0x1ad3+775-0x1d86),(0x300+2029-0xa98),(0x8bb+2453-0x11fa),(0x2192+544-0x235b),
+(0x438+6453-0x1d15),(0x566+2314-0xe17),(0xf06+943-0x125b),NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,(0xbf+6446-0x19dc),NON_GSM,(0xcf8+430-0xe45),
+(0x1096+4692-0x2288),(0x10c6+3203-0x1ce6),(0x6b0+1985-0xe0d),
+(0x102a+3536-0x1d95),(0x482+3274-0x10e6),(0x1248+4086-0x21d7),(0x9d4+1102-0xdba)
+,(0x101+6605-0x1a65),(0x19df+2086-0x219b),(0x123a+3752-0x2077),
+(0x8b4+1024-0xc48),(0x1104+1838-0x17c5),(0x19a8+1134-0x1da8),(0xdc+3713-0xeee),
+(0x218d+1093-0x2562),(0x874+2102-0x1039),(0x548+5006-0x1864),
+(0x12ca+3768-0x210f),(0x16eb+4142-0x26a5),(0x16e2+1068-0x1a99),(0xaef+783-0xd88)
+,(0x903+3111-0x14b3),(0x1110+4769-0x2339),(0x12d3+4490-0x23e4),(0x385+641-0x58c)
 ,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
 ,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
 ,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
-,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xc77+1470-0x121a),
-(0x1742+1938-0x1e94),NON_GSM,(0x739+308-0x86c),(0x383+3271-0x1026),
-(0x2432+299-0x255a),NON_GSM,(0x1872+66-0x1855),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x157b+2312-0x1e68),
+(0x8d5+7629-0x2662),NON_GSM,(0x8d7+5265-0x1d67),(0x15fc+3227-0x2273),
+(0x664+6748-0x20bd),NON_GSM,(0x13b1+877-0x16bf),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
 NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x9d6+6347-0x2241),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x281+3722-0x10b0),
-(0x121a+779-0x1517),(0x19f1+632-0x1c4d),(0xf0+2911-0xc46),NON_GSM,
-(0xb1d+4875-0x1e09),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x7f1+1951-0xf33),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x47c+1627-0xa7b),NON_GSM,
-(0x7b+9385-0x2519),NON_GSM,NON_GSM,NON_GSM,(0x157a+3709-0x2399),NON_GSM,NON_GSM,
-(0x1866+3677-0x26a5),(0xf28+2152-0x1711),NON_GSM,NON_GSM,NON_GSM,
-(0x22c+1613-0x7fe),(0xfb5+4176-0x1ff6),(0x1240+4722-0x2495),NON_GSM,
-(0x1f37+421-0x20d8),(0xce3+912-0x106e),NON_GSM,NON_GSM,(0x16e0+1283-0x1bdc),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x21df+933-0x2507),(0x3d1+7982-0x22f7),NON_GSM,
-NON_GSM,NON_GSM,(0x217+3505-0xf4c),NON_GSM,(0x1887+984-0x1c53),
-(0x433+6830-0x1edb),NON_GSM,NON_GSM,(0x9db+1771-0x1048),NON_GSM,NON_GSM,NON_GSM}
-;const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[]={
-(0x18fd+485-0x1aa2),(0x15c6+3298-0x2205),(0xfad+4803-0x224c),(0xea8+1337-0x133c)
-,(0x2166+1187-0x251f),(0x16e4+1796-0x1cff),(0x392+7815-0x211f),
-(0x1f0a+1608-0x2465),(0x2007+39-0x1f3b),(0x817+204-0x7fc),(0xa49+6034-0x21d1),
-(0x78c+6917-0x21bd),(0xe00+122-0xd86),(0xb65+3983-0x1ae7),(0x9eb+2191-0x11b9),
-(0x609+7240-0x2170),(0x457+8824-0x233b),(0xb8+8509-0x2196),(0x16a+6472-0x1a08),
-(0xf42+3098-0x1a95),(0x7ad+1819-0xe08),8734,(0xa71+7406-0x2701),
-(0xf27+4970-0x2235),8364,(0x20af+33-0x1ffd),(0x196+6520-0x1a92),
-(0xe63+6292-0x2657),(0x16da+1950-0x1db6),(0x1f32+25-0x1e69),(0x1ab7+2918-0x2553)
-,(0x1769+398-0x182e),(0x8ff+4081-0x18d0),(0x1358+3119-0x1f66),
-(0x149d+1580-0x1aa7),(0xa36+5101-0x1e00),(0x11d+6479-0x19bc),(0x1f9+8714-0x23de)
-,(0x14ea+812-0x17f0),(0x54c+4905-0x184e),(0x22d+3602-0x1017),(0x87f+5803-0x1f01)
-,(0x1d01+83-0x1d2a),(0x71f+1542-0xcfa),(0xd62+4756-0x1fca),(0xc03+4919-0x1f0d),
-(0x9c5+7331-0x263a),(0x1526+1974-0x1cad),(0x2394+538-0x257e),(0x233c+281-0x2424)
-,(0x27f+2915-0xdb0),(0x333+2209-0xba1),(0x4cf+3335-0x11a2),(0x1d09+2217-0x257d),
-(0x13f5+2339-0x1ce2),(0x385+3921-0x129f),(0x14ca+1224-0x195a),(0x32d+2415-0xc63)
-,(0xad9+3889-0x19d0),(0xb54+6128-0x2309),(0x1944+2957-0x2495),
-(0x449+3756-0x12b8),(0x608+3371-0x12f5),(0x127d+1620-0x1892),(0x204c+476-0x215b)
-,(0x4d+7790-0x1e7a),(0x163a+384-0x1778),(0x148a+3759-0x22f6),
-(0x1643+1009-0x19f0),(0x59b+1743-0xc25),(0x6dc+6724-0x20da),(0x197d+2165-0x21ab)
-,(0x1d9c+1728-0x2414),(0xb6b+3440-0x1892),(0x95d+3048-0x14fb),
-(0x510+4231-0x154c),(0x385+2949-0xebe),(0xcb5+4503-0x1dff),(0x8f7+906-0xc33),
-(0x1278+351-0x1388),(0x476+4138-0x1450),(0x1e7f+345-0x1f87),(0x120f+4581-0x23a2)
-,(0xa2d+1769-0x10c3),(0x1b17+935-0x1e6a),(0x1c76+553-0x1e4a),(0xd3b+3380-0x1a19)
-,(0x562+2189-0xd98),(0x126d+665-0x14ae),(0xf0c+1636-0x1517),(0xe85+1430-0x13c1),
-(0x763+3201-0x1321),(0x780+6004-0x1e1f),(0x648+3806-0x144c),(0xf41+409-0xffe),
-(0x2b7+3628-0x103c),(0x9d0+2024-0x113a),(0x169+6471-0x1a4f),(0x1a2+7796-0x1fb4),
-(0x166d+3475-0x239d),(0x176a+2717-0x21a3),(0x14a7+933-0x17e7),
-(0x1f45+349-0x203c),(0x2e2+4034-0x123d),(0xb4b+7036-0x265f),(0x801+5413-0x1cbd),
-(0x159a+4299-0x25fb),(0x374+7343-0x1fb8),(0x788+7028-0x2290),(0xa75+349-0xb65),
-(0x808+7671-0x2591),(0x209+3095-0xdb1),(0x1e64+408-0x1f8c),(0x3f3+4402-0x14b4),
-(0x12ad+1522-0x182d),(0x13b6+2673-0x1db4),(0x141a+503-0x159d),
-(0xdf4+5130-0x2189),(0x1839+1131-0x1c2e),(0x1356+913-0x1670),
-(0x1003+2259-0x185e),(0x19c8+222-0x1a2d),(0xaaa+2212-0x12d4),(0x807+359-0x88b),
-(0xd75+4955-0x1fdb),(0xa2+1568-0x662),(0xcf8+172-0xca8),(0x1627+2148-0x1dab)};
-const unsigned short zte_sms_GSMDefault_To_UCS2_Table[]={(0x7b7+5279-0x1c16),
-(0x21a+6434-0x1a99),(0x76+6855-0x1b19),(0x750+2161-0xf1c),(0xedc+2632-0x183c),
-(0x9eb+4524-0x1aae),(0x1a05+760-0x1c04),(0x1aa8+2049-0x21bd),(0x314+8823-0x2499)
-,(0x2bc+9293-0x2642),(0x4d+8719-0x2252),(0x1138+5288-0x2508),
-(0x10e9+2062-0x17ff),(0x8d0+7753-0x270c),(0x573+2875-0xfe9),(0x39b+2736-0xd66),
-(0x868+2152-0xd3c),(0x1e5b+19-0x1e0f),(0x69f+6605-0x1cc6),(0x822+6275-0x1d12),
-(0x1d26+1262-0x1e79),(0x535+6786-0x1c0e),(0x1b6d+1543-0x1dd4),
-(0x1536+2190-0x1a1c),(0x1816+1408-0x19f3),(0x1404+3619-0x1e8f),
-(0x126c+1849-0x1607),(0x1461+553-0x15ea),(0x10e7+3504-0x1dd1),
-(0x1a53+716-0x1c39),(0x18eb+133-0x1891),(0x1fa8+1910-0x2655),
-(0x17bb+2891-0x22e6),(0xb00+1997-0x12ac),(0x134b+3225-0x1fc2),
-(0x42d+6198-0x1c40),(0x1236+2841-0x1cab),(0x23f+6642-0x1c0c),(0x5c2+2201-0xe35),
-(0x2f2+7985-0x21fc),(0xe0f+4300-0x1eb3),(0xab4+529-0xc9c),(0x9e6+6572-0x2368),
-(0x6e2+5643-0x1cc2),(0x1f7a+154-0x1fe8),(0x1ba3+370-0x1ce8),(0x145a+3556-0x2210)
-,(0x2b2+6964-0x1db7),(0xa87+2251-0x1322),(0x76d+7052-0x22c8),(0x9c0+6988-0x24da)
-,(0x18f3+1284-0x1dc4),(0x416+353-0x543),(0x14b9+3468-0x2210),
-(0x1e64+1217-0x22ef),(0x15a8+1215-0x1a30),(0x5ad+8317-0x25f2),
-(0x1ec+5827-0x1876),(0x629+7337-0x2298),(0x421+1078-0x81c),(0x31a+5537-0x187f),
-(0x176a+1729-0x1dee),(0x79c+1623-0xdb5),(0xd11+2268-0x15ae),(0xb45+33-0xac5),
-(0xc46+6073-0x23be),(0x6e8+1170-0xb38),(0x170c+1770-0x1db3),(0x2184+1249-0x2621)
-,(0x5e6+2569-0xfaa),(0x1bb9+2516-0x2547),(0xd7d+4287-0x1df5),
-(0x2156+1327-0x263d),(0xb68+5060-0x1ee3),(0xd9+624-0x2ff),(0xc9f+6347-0x251f),
-(0x711+5438-0x1c03),(0x56c+4781-0x17cc),(0x1091+37-0x1068),(0xa8a+5378-0x1f3d),
-(0xe23+484-0xfb7),(0x192c+391-0x1a62),(0x1370+3285-0x1ff3),(0x1718+418-0x1867),
-(0x862+7900-0x26ea),(0x90b+897-0xc37),(0x22f+7245-0x1e26),(0x176f+75-0x1763),
-(0x90a+4956-0x1c0e),(0x6b1+4821-0x192d),(0xb1b+4045-0x1a8e),(0x420+1823-0xa7b),
-(0x1272+1723-0x1857),(0x190c+2709-0x22d0),(0x11eb+3893-0x2044),
-(0x49b+8444-0x24f0),(0x869+2341-0x10cf),(0x21d1+540-0x238c),(0x5b9+225-0x638),
-(0x468+6861-0x1ed2),(0x968+1303-0xe1b),(0xb52+3508-0x18a1),(0xae2+5612-0x2068),
-(0x358+8603-0x248c),(0x1269+4760-0x2499),(0x2155+1305-0x2605),
-(0x3c5+6265-0x1bd4),(0x358+7370-0x1fb7),(0x12b+8951-0x23b6),(0xc82+1587-0x1248),
-(0xd24+6033-0x2447),(0x158+4066-0x10cb),(0x92b+2096-0x10eb),(0xb56+3963-0x1a60),
-(0xcb5+1576-0x126b),(0x18f5+1320-0x1daa),(0xb99+3165-0x1782),(0x891+3975-0x17a3)
-,(0x1386+3684-0x2174),(0x1562+3447-0x2262),(0x460+6741-0x1e3d),
-(0xd4a+1299-0x11e4),(0x42a+364-0x51c),(0x574+8436-0x2584),(0x35a+6847-0x1d23),
-(0x112+5038-0x13cf),(0xa24+1826-0x104a),(0x11f+7839-0x1ede)};int Bytes2String(
-const unsigned char*pSrc,char*pDst,int nSrcLength){const char tab[]=
-"0123456789ABCDEF";int i=(0xd50+2937-0x18c9);if(pSrc==NULL||pDst==NULL||
-nSrcLength<(0x1bd2+1319-0x20f9)){return-(0xa77+5741-0x20e3);}for(i=
-(0xd5a+2610-0x178c);i<nSrcLength;i++){*pDst++=tab[*pSrc>>(0xdaa+5735-0x240d)];*
-pDst++=tab[*pSrc&(0x1688+1354-0x1bc3)];pSrc++;}*pDst='\0';return nSrcLength*
-(0xb85+2195-0x1416);}int String2Bytes(const char*pSrc,unsigned char*pDst,int 
-nSrcLength){int i=(0x316+8501-0x244b);if(pSrc==NULL||pDst==NULL||nSrcLength<
-(0x11ef+1409-0x1770)){return-(0x407+4478-0x1584);}for(i=(0x1bd7+1731-0x229a);i<
-nSrcLength;i+=(0x6bc+7234-0x22fc)){if(*pSrc>=((char)(0x1bba+2911-0x26e9))&&*pSrc
-<=((char)(0x19eb+3266-0x2674))){*pDst=(*pSrc-((char)(0x170+6748-0x1b9c)))<<
-(0x1329+907-0x16b0);}else{*pDst=((toupper(*pSrc)-((char)(0x1c7d+1984-0x23fc)))+
-(0x81a+3995-0x17ab))<<(0x1c8+7352-0x1e7c);}pSrc++;if(*pSrc>=
-((char)(0xda7+4885-0x208c))&&*pSrc<=((char)(0x839+2561-0x1201))){*pDst|=*pSrc-
-((char)(0x8c+5050-0x1416));}else{*pDst|=(toupper(*pSrc)-
-((char)(0x1698+3142-0x229d)))+(0xc1f+2888-0x175d);}pSrc++;pDst++;}return 
-nSrcLength/(0x11fd+2643-0x1c4e);}int EncodeUcs2(const char*pSrc,unsigned char*
-pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x131f+3816-0x2207))
-{return-(0x924+931-0xcc6);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);return 
-nSrcLength/(0x2108+465-0x22d7);}int Encode7bit(const char*pSrc,unsigned char*
+(0x620+2779-0x109b),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xd71+1057-0x1137),
+(0x8a1+882-0xc05),(0x65d+6182-0x1e67),(0x3c7+7775-0x221d),NON_GSM,
+(0x157d+468-0x1732),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x791+3918-0x1682),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xc0+4740-0x12e8),NON_GSM,
+(0x1f5b+643-0x21d3),NON_GSM,NON_GSM,NON_GSM,(0x445+5624-0x19df),NON_GSM,NON_GSM,
+(0xdf9+2528-0x17bb),(0x4b4+2635-0xe80),NON_GSM,NON_GSM,NON_GSM,
+(0x31d+7438-0x1fb0),(0xa03+2328-0x130c),(0x160d+3109-0x2215),NON_GSM,
+(0x1592+326-0x16d4),(0x12eb+1050-0x1700),NON_GSM,NON_GSM,(0x5b1+2170-0xe24),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x163+3321-0xddf),(0x1822+3680-0x267a),NON_GSM,
+NON_GSM,NON_GSM,(0x15cc+4209-0x25c1),NON_GSM,(0x26+2289-0x90b),
+(0x1553+3523-0x2310),NON_GSM,NON_GSM,(0x1017+2986-0x1b43),NON_GSM,NON_GSM,
+NON_GSM};const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[]={
+(0x2431+503-0x25e8),(0x22a+9134-0x2535),(0x2a0+5841-0x194d),(0x16ba+563-0x1848),
+(0xea7+358-0xf23),(0x364+3705-0x10f4),(0xcb3+1879-0x1310),(0x20cd+62-0x201e),
+(0xcb0+4679-0x1e04),(0x173d+3288-0x232e),(0x1475+102-0x14d1),
+(0x226f+1090-0x25dd),(0x479+6720-0x1dc5),(0x163+6772-0x1bca),(0xd0+1646-0x67d),
+(0x6b8+5582-0x1ba5),(0xa58+6659-0x20c7),(0xeaf+3440-0x1bc0),(0x24b+4234-0x122b),
+(0x1b6c+1742-0x2173),(0x934+6796-0x2300),8734,(0x175a+3098-0x2316),
+(0x1edb+92-0x1edb),8364,(0x25d+4140-0x11b6),(0x1eed+1717-0x2526),
+(0x15c3+4089-0x251c),(0x1981+1513-0x1ea8),(0x18ba+3785-0x26a1),
+(0x4f0+4973-0x1793),(0xd93+3275-0x1995),(0x21b+2099-0xa2e),(0x1990+341-0x1ac4),
+(0x15ba+2843-0x20b3),(0xa25+1865-0x114b),(0x15b5+3516-0x22c1),
+(0x2013+580-0x2232),(0x15c6+1146-0x1a1a),(0x688+7666-0x2453),(0x1c64+747-0x1f27)
+,(0x881+3044-0x143c),(0x1164+2951-0x1cc1),(0x18f3+1633-0x1f29),
+(0x2240+887-0x258b),(0x1469+4044-0x2408),(0x1481+2952-0x1fdb),
+(0xdfd+4221-0x1e4b),(0xe38+5380-0x230c),(0x11f9+4729-0x2441),(0xb96+4682-0x1dae)
+,(0x1f73+285-0x205d),(0x4bc+8698-0x2682),(0x351+7282-0x1f8e),(0xfcc+1026-0x1398)
+,(0xfca+5857-0x2674),(0x1726+352-0x184e),(0x74b+7958-0x2628),
+(0x158c+4219-0x25cd),(0xf24+1892-0x164d),(0x776+1636-0xd9e),(0x48+5339-0x14e6),
+(0xeda+1999-0x166b),(0x106+8948-0x23bb),(0x17aa+3810-0x25bf),(0x214+4270-0x1281)
+,(0x3e7+1137-0x816),(0xc3+6382-0x196e),(0x392+2308-0xc52),(0x126a+322-0x1367),
+(0x9eb+2660-0x1409),(0x1911+353-0x1a2b),(0x982+6644-0x232e),(0x43b+1779-0xae5),
+(0xb16+4727-0x1d43),(0x214+6155-0x19d4),(0x637+6530-0x1f6d),(0x1a5+7860-0x200c),
+(0x102c+4530-0x2190),(0x16a5+224-0x1736),(0xae0+2755-0x1553),
+(0x136b+4829-0x25f7),(0x1ba7+2595-0x2578),(0x436+619-0x64e),(0x10b9+3040-0x1c45)
+,(0xd0d+5964-0x2404),(0x2105+892-0x242b),(0xa16+2683-0x143a),(0x343+5779-0x197e)
+,(0x1085+2252-0x18f8),(0x178f+2060-0x1f41),(0x833+5993-0x1ed9),
+(0x99b+6075-0x2081),(0xb2a+5910-0x2166),(0x112d+729-0x132a),(0x2387+306-0x2412),
+(0x1f1+1794-0x875),(0x14dc+1655-0x1af2),(0xe17+4130-0x1dd7),(0x1a32+1071-0x1dfe)
+,(0x1a48+1569-0x2005),(0x158c+3477-0x22bc),(0x186+5471-0x167f),
+(0x5c7+6631-0x1f47),(0x1195+3546-0x1f07),(0xb42+2688-0x1559),(0xff4+1317-0x14af)
+,(0x21e8+881-0x24ee),(0x17bc+4021-0x2705),(0xe49+146-0xe6e),(0xaa7+6547-0x23cc),
+(0x16ed+3344-0x238e),(0xe4+997-0x459),(0x2da+7609-0x2022),(0x1084+4626-0x2224),
+(0x7d7+4499-0x18f7),(0x1b4a+2691-0x2559),(0xd30+1527-0x12b2),(0x311+627-0x50e),
+(0x116a+3376-0x1e23),(0x1b62+209-0x1bbb),(0x9b0+132-0x9bb),(0x885+3839-0x170a),
+(0x1173+2643-0x1ae3),(0x1570+3214-0x2109),(0x2d3+5204-0x16c7),
+(0x1206+1454-0x16b8),(0x5ec+4277-0x15c1)};const unsigned short 
+zte_sms_GSMDefault_To_UCS2_Table[]={(0x944+3867-0x181f),(0x1643+2367-0x1edf),
+(0x7eb+368-0x937),(0x956+1784-0xfa9),(0x1061+4402-0x20ab),(0x100d+202-0xfee),
+(0x9f2+5672-0x1f21),(0xc09+86-0xb73),(0x10e1+4400-0x211f),(0x187c+2234-0x206f),
+(0x16e9+2253-0x1fac),(0x168+4111-0x109f),(0x1148+4453-0x21b5),
+(0x87d+7435-0x257b),(0x1605+3993-0x24d9),(0x71d+5941-0x1d6d),
+(0x10a1+2486-0x16c3),(0x1a08+493-0x1b96),(0x45d+7653-0x1e9c),
+(0x1dfd+1286-0x1f70),(0x79a+8137-0x23c8),(0x726+1646-0x9eb),(0x1110+5879-0x2467)
+,(0x13ef+4320-0x2127),(0xbc1+6868-0x22f2),(0x1432+5114-0x2494),(0x899+427-0x6a6)
+,(0x189c+775-0x1b03),(0x1903+1774-0x1f2b),(0x136d+3736-0x211f),
+(0x99f+4283-0x197b),(0xe4+5824-0x16db),(0xde8+5474-0x232a),(0x1fb+1062-0x600),
+(0x1e65+1290-0x234d),(0x1c47+1238-0x20fa),(0x1b6a+2426-0x2440),
+(0x613+6702-0x201c),(0x282+4252-0x12f8),(0x2d9+9133-0x265f),(0xe23+4575-0x1fda),
+(0x963+1724-0xff6),(0x3d7+44-0x3d9),(0x1841+1271-0x1d0d),(0x140a+296-0x1506),
+(0x1d53+2474-0x26d0),(0xa7d+4744-0x1cd7),(0x210b+242-0x21ce),(0xc32+585-0xe4b),
+(0x7c9+5594-0x1d72),(0x95+2718-0xb01),(0x4eb+8273-0x2509),(0x2306+571-0x250d),
+(0x159b+4251-0x2601),(0x1182+3448-0x1ec4),(0x107+3636-0xf04),(0x15bd+455-0x174c)
+,(0x291+1858-0x99a),(0x716+1575-0xd03),(0xe7+9182-0x248a),(0xe3c+4267-0x1eab),
+(0x905+4859-0x1bc3),(0x66+5323-0x14f3),(0x9c6+7438-0x2695),(0x7b8+7038-0x2295),
+(0x1af+3561-0xf57),(0x470+2721-0xecf),(0x517+34-0x4f6),(0xb2d+1930-0x1273),
+(0x1a14+1223-0x1e96),(0x2c1+6132-0x1a6f),(0x1fb+9515-0x26df),(0x8c1+3803-0x1754)
+,(0x2bb+414-0x410),(0xe90+1340-0x1382),(0x49d+3272-0x111a),(0xcc0+3750-0x1b1a),
+(0x676+5428-0x1b5d),(0x270+4588-0x140e),(0x5c7+2829-0x1085),(0x1d41+1464-0x22a9)
+,(0x229+6455-0x1b0f),(0xee1+3801-0x1d68),(0x1e68+1-0x1e16),(0x22a2+1093-0x2693),
+(0xf42+5390-0x23fb),(0xa17+1366-0xf17),(0x150d+2304-0x1db6),(0x407+6-0x3b5),
+(0xa9+6604-0x1a1c),(0x10a0+2199-0x18dd),(0x1524+2904-0x1fb8),
+(0x1cc6+1072-0x2020),(0xd4b+6531-0x25fd),(0x1005+1047-0x1340),
+(0x10dd+627-0x12a9),(0xa84+6549-0x235a),(0x316+6662-0x1cbb),(0x17bb+967-0x1b20),
+(0x13bc+3797-0x222e),(0x11aa+884-0x14ba),(0x5d3+3899-0x14a9),(0xe85+1277-0x131c)
+,(0x2256+711-0x24b6),(0xc8a+4722-0x1e94),(0x1dec+62-0x1dc1),(0xbd9+1876-0x12c3),
+(0x16a5+3235-0x22dd),(0xe8a+5031-0x21c5),(0x291+5824-0x18e4),(0x6c3+4169-0x169e)
+,(0x4ca+6767-0x1eca),(0x1b1d+1349-0x1ff2),(0x221b+681-0x2453),
+(0x6a5+5798-0x1cd9),(0x294+7693-0x202e),(0x19c0+2471-0x22f3),(0xddd+6499-0x26cb)
+,(0x77f+1087-0xb48),(0x8c2+2941-0x13c8),(0xff7+4477-0x20fc),(0x169a+1305-0x1b3a)
+,(0x1db8+1355-0x2289),(0x13f5+27-0x132c),(0xb29+4005-0x19d8),(0xb9d+3265-0x176d)
+,(0xf1d+3542-0x1bf7),(0x149f+3817-0x22a8)};int Bytes2String(const unsigned char*
+pSrc,char*pDst,int nSrcLength){const char tab[]="0123456789ABCDEF";int i=
+(0xf7+5098-0x14e1);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1015+471-0x11ec)){
+return-(0x1629+1293-0x1b35);}for(i=(0x1448+4227-0x24cb);i<nSrcLength;i++){*pDst
+++=tab[*pSrc>>(0xcb2+6434-0x25d0)];*pDst++=tab[*pSrc&(0x1d+4108-0x101a)];pSrc++;
+}*pDst='\0';return nSrcLength*(0x1db5+781-0x20c0);}int String2Bytes(const char*
+pSrc,unsigned char*pDst,int nSrcLength){int i=(0x448+4348-0x1544);if(pSrc==NULL
+||pDst==NULL||nSrcLength<(0x899+4244-0x192d)){return-(0x3d3+2844-0xeee);}for(i=
+(0x1131+801-0x1452);i<nSrcLength;i+=(0x120+4914-0x1450)){if(*pSrc>=
+((char)(0x3f5+3112-0xfed))&&*pSrc<=((char)(0x1fa+1427-0x754))){*pDst=(*pSrc-
+((char)(0x16f0+3149-0x230d)))<<(0x2399+522-0x259f);}else{*pDst=((toupper(*pSrc)-
+((char)(0xfbf+2271-0x185d)))+(0x442+8534-0x258e))<<(0xc5c+2616-0x1690);}pSrc++;
+if(*pSrc>=((char)(0x2084+1624-0x26ac))&&*pSrc<=((char)(0xf35+2827-0x1a07))){*
+pDst|=*pSrc-((char)(0x9cc+694-0xc52));}else{*pDst|=(toupper(*pSrc)-
+((char)(0xeaa+2533-0x184e)))+(0xca8+5512-0x2226);}pSrc++;pDst++;}return 
+nSrcLength/(0x986+6546-0x2316);}int EncodeUcs2(const char*pSrc,unsigned char*
+pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x2212+334-0x2360)){
+return-(0x8b7+5013-0x1c4b);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);return
+ nSrcLength/(0xa1+7351-0x1d56);}int Encode7bit(const char*pSrc,unsigned char*
 pDst,int nSrcLength){int nSrc;int nDst;int nChar;unsigned char nLeft=
-(0x1340+3336-0x2048);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1708+812-0x1a34)){
-return-(0xdf+5916-0x17fa);}nSrc=(0x13bf+1577-0x19e8);nDst=(0x10a2+2464-0x1a42);
-while(nSrc<nSrcLength){nChar=nSrc&(0x3dc+810-0x6ff);if(nChar==
-(0x36a+5997-0x1ad7)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
-(0x1412+2671-0x1e80))&&(nSrc==(nSrcLength-(0x6a+1102-0x4b7)))){nDst++;}}else{*
-pDst=(*pSrc<<((0x132d+784-0x1635)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst++
-;}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst,
-UINT8 TP_FCS){SINT32 nLength=(0x18b+9189-0x2570);SINT32 nDstLength=
-(0xbe7+343-0xd3e);UINT8 buf[(0xc8f+5268-0x2023)]={(0xd2+8784-0x2322)};if(NULL==
-pDst){return-(0x1b5c+247-0x1c52);}if(TP_FCS!=(0x60+4604-0x125c)){buf[
-(0xc66+2223-0x1515)]=(0xd64+2264-0x163c);buf[(0xdf7+1650-0x1468)]=TP_FCS;buf[
-(0x2177+1192-0x261d)]=(0x1074+173-0x1121);nDstLength+=Bytes2String(buf,&pDst[
-nDstLength],(0x204+3603-0x1014));}else{buf[(0xfa4+478-0x1182)]=
-(0x1750+1399-0x1cc7);buf[(0x3bc+1587-0x9ee)]=(0x12b8+1180-0x1754);nDstLength+=
-Bytes2String(buf,&pDst[nDstLength],(0x1028+3771-0x1ee1));}return nDstLength;}
+(0x1227+4137-0x2250);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x7b0+6123-0x1f9b)){
+return-(0x9e0+2489-0x1398);}nSrc=(0xf0f+1816-0x1627);nDst=(0xc74+2923-0x17df);
+while(nSrc<nSrcLength){nChar=nSrc&(0xb15+2218-0x13b8);if(nChar==
+(0x189+297-0x2b2)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
+(0x147b+2479-0x1e29))&&(nSrc==(nSrcLength-(0x1702+2887-0x2248)))){nDst++;}}else{
+*pDst=(*pSrc<<((0xa89+6956-0x25ad)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst
+++;}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst
+,UINT8 TP_FCS){SINT32 nLength=(0x148a+871-0x17f1);SINT32 nDstLength=
+(0x1625+3651-0x2468);UINT8 buf[(0x1d9f+2272-0x257f)]={(0x31d+6285-0x1baa)};if(
+NULL==pDst){return-(0x38+6227-0x188a);}if(TP_FCS!=(0x653+1312-0xb73)){buf[
+(0xde7+1356-0x1333)]=(0x33d+5663-0x195c);buf[(0x229b+1054-0x26b8)]=TP_FCS;buf[
+(0x22+8611-0x21c3)]=(0x1426+3174-0x208c);nDstLength+=Bytes2String(buf,&pDst[
+nDstLength],(0x23f+3725-0x10c9));}else{buf[(0x991+3725-0x181e)]=
+(0xadf+3551-0x18be);buf[(0x446+154-0x4df)]=(0x173b+698-0x19f5);nDstLength+=
+Bytes2String(buf,&pDst[nDstLength],(0x1982+1691-0x201b));}return nDstLength;}
 unsigned long zUfiSms_ConvertAsciiToGsmDefault(const unsigned char*inputs,
-unsigned char*outputs,unsigned long len){unsigned long i=(0x1c8+3033-0xda1);
-unsigned long j=(0x1685+709-0x194a);unsigned long k=(0xb00+5471-0x205f);if(NULL
-==inputs||NULL==outputs){printf(
+unsigned char*outputs,unsigned long len){unsigned long i=(0x11d4+5251-0x2657);
+unsigned long j=(0xf8+6861-0x1bc5);unsigned long k=(0xa48+7357-0x2705);if(NULL==
+inputs||NULL==outputs){printf(
 "\x73\x6d\x73\x3a\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74\x73");
-return(0x243+6494-0x1ba1);}for(i=(0x1402+4057-0x23db);i<len;i++){j=inputs[i];if(
-g_zUfiSms_AsciiToGsmdefaultTable[j]<(0xa41+1323-0xe6d)){outputs[k]=
+return(0xe25+976-0x11f5);}for(i=(0x517+6090-0x1ce1);i<len;i++){j=inputs[i];if(
+g_zUfiSms_AsciiToGsmdefaultTable[j]<(0x1ba1+134-0x1b28)){outputs[k]=
 g_zUfiSms_AsciiToGsmdefaultTable[j];}else{outputs[k]=(
-g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0x1b97+2423-0x2506);k++;outputs[k]=
-(g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x597+4505-0x1631));}k++;}return k;}
-unsigned long zUfiSms_ConvertUcs2ToSpanish(const unsigned char*def,unsigned char
-*gsm_default,unsigned long len){unsigned long i=(0x184+7349-0x1e39);unsigned 
-long k=(0x1fc8+690-0x227a);unsigned long p=(0x137d+4398-0x24ab);unsigned long 
-tmp=(0x1e52+1995-0x261d);unsigned long s1=(0xd13+2842-0x182d),s2=
-(0xad7+294-0xbfd);unsigned long q=(0x13e2+2972-0x1f7e);s1=sizeof(
+g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0xcb9+6061-0x245e);k++;outputs[k]=(
+g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x2af+1884-0x90c));}k++;}return k;}unsigned
+ long zUfiSms_ConvertUcs2ToSpanish(const unsigned char*def,unsigned char*
+gsm_default,unsigned long len){unsigned long i=(0x31c+2442-0xca6);unsigned long 
+k=(0x3d6+4181-0x142b);unsigned long p=(0x5a+4012-0x1006);unsigned long tmp=
+(0xab5+5879-0x21ac);unsigned long s1=(0x2275+207-0x2344),s2=(0xd52+5622-0x2348);
+unsigned long q=(0x420+4269-0x14cd);s1=sizeof(
 zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0xc56+4576-0x1e36)]);s2=sizeof(
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0xf99+4764-0x2235)]);s2=sizeof(
 Ucs2_To_Gsm7_SPANISH_Table_UCS)/sizeof(Ucs2_To_Gsm7_SPANISH_Table_UCS[
-(0x2b8+8439-0x23af)]);for(i=(0x2115+406-0x22ab);i<len;i++){if(def[i]==
-(0x6b1+6525-0x202e)){i++;if(Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]!=NON_GSM){
+(0x7e4+645-0xa69)]);for(i=(0x9a1+6832-0x2451);i<len;i++){if(def[i]==
+(0x311+2839-0xe28)){i++;if(Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]!=NON_GSM){
 gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]];k++;continue;}else if((
-Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0x917+3231-0x1596)))
-{gsm_default[k]=(0x321+6117-0x1ae6);k++;continue;}for(q=(0x538+7427-0x223b);q<s1
-;q++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x5c+5497-0x15d4)]){
-gsm_default[k]=(0x1573+2639-0x1fa7);k++;gsm_default[k]=
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x2cd+5612-0x18b9)];break;}}}else{tmp=
-(def[i]<<(0x14e5+4490-0x2667))+def[i+(0x20c+3464-0xf93)];i++;if(tmp==8364){
-gsm_default[k]=(0x1d79+1115-0x21b9);k++;gsm_default[k]=(0x962+6683-0x2318);k++;}
-for(p=(0x83f+629-0xab4);p<s2;p++){if(tmp==Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
-(0x25f+5474-0x17c0)]){gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
-(0xe0f+1354-0x1359)];break;}}}k++;}gsm_default[k]='\0';return k;}unsigned long 
+Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0x1b90+2556-0x256c))
+){gsm_default[k]=(0x13d+3143-0xd64);k++;continue;}for(q=(0x53f+4498-0x16d1);q<s1
+;q++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0xc4a+3448-0x19c1)]){
+gsm_default[k]=(0x1381+2943-0x1ee5);k++;gsm_default[k]=
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x1850+3680-0x26b0)];break;}}}else{tmp
+=(def[i]<<(0x5c5+5690-0x1bf7))+def[i+(0x1eef+375-0x2065)];i++;if(tmp==8364){
+gsm_default[k]=(0xb13+3917-0x1a45);k++;gsm_default[k]=(0x128+7193-0x1cdc);k++;}
+for(p=(0x141c+4690-0x266e);p<s2;p++){if(tmp==Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0x11f8+4993-0x2578)]){gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0x105c+5045-0x2411)];break;}}}k++;}gsm_default[k]='\0';return k;}unsigned long 
 zUfiSms_ConvertUcs2ToPortuguese(const unsigned char*def,unsigned char*
-gsm_default,unsigned long len){unsigned long i=(0x1478+2974-0x2016);unsigned 
-long k=(0x510+1778-0xc02);unsigned long p=(0xaba+941-0xe67);unsigned long tmp=
-(0x141b+2287-0x1d0a);unsigned long s1=(0x1aca+2212-0x236e),s2=
-(0x18d6+2590-0x22f4);unsigned long q=(0xba8+258-0xcaa);s1=sizeof(
+gsm_default,unsigned long len){unsigned long i=(0x9f3+1292-0xeff);unsigned long 
+k=(0x1450+1609-0x1a99);unsigned long p=(0xe5f+3607-0x1c76);unsigned long tmp=
+(0x1924+3271-0x25eb);unsigned long s1=(0x225c+826-0x2596),s2=
+(0x17c9+3068-0x23c5);unsigned long q=(0xf6b+4050-0x1f3d);s1=sizeof(
 zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x1544+256-0x1644)]);s2=sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x15c0+3267-0x2283)]);s2=sizeof(
 Ucs2_To_Gsm7_PORTUGUESE_Table_UCS)/sizeof(Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[
-(0x1a9b+1126-0x1f01)]);for(i=(0xe59+4422-0x1f9f);i<len;i++){if(def[i]==
-(0x3d8+3003-0xf93)){i++;if(Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]!=NON_GSM){
+(0xe8f+922-0x1229)]);for(i=(0x93b+366-0xaa9);i<len;i++){if(def[i]==
+(0x20d+4189-0x126a)){i++;if(Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]!=NON_GSM){
 gsm_default[k]=Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]];k++;continue;}else if((
 Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]==NON_GSM)&&(def[i]==
-(0xf18+5786-0x2592))){gsm_default[k]=(0xc88+234-0xd52);k++;continue;}for(q=
-(0x655+4928-0x1995);q<s1;q++){if(def[i]==
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0x1062+273-0x1172)]){gsm_default[k]
-=(0xee9+3393-0x1c0f);k++;gsm_default[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
-[q][(0x979+2370-0x12bb)];break;}}}else{tmp=(def[i]<<(0x118c+2716-0x1c20))+def[i+
-(0x100d+4411-0x2147)];i++;if(tmp==(0x24b3+7560-0x218f)){gsm_default[k]=
-(0x1c11+2685-0x2673);k++;gsm_default[k]=(0x57b+3169-0x1177);k++;continue;}for(p=
-(0x17+8719-0x2226);p<s2;p++){if(tmp==Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][
-(0x11a4+4199-0x220a)]){gsm_default[k]=Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][
-(0x7a5+5848-0x1e7d)];break;}}}k++;}gsm_default[k]='\0';return k;}unsigned long 
+(0x3ed+3421-0x112a))){gsm_default[k]=(0x4f1+2544-0xec1);k++;continue;}for(q=
+(0x733+7662-0x2521);q<s1;q++){if(def[i]==
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0x41c+4920-0x1753)]){gsm_default[k]
+=(0xb5c+1468-0x10fd);k++;gsm_default[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
+[q][(0x3b3+3518-0x1171)];break;}}}else{tmp=(def[i]<<(0xef+6384-0x19d7))+def[i+
+(0x21a8+464-0x2377)];i++;if(tmp==(0x252c+281-0x599)){gsm_default[k]=
+(0x58a+8193-0x2570);k++;gsm_default[k]=(0x59c+7596-0x22e3);k++;continue;}for(p=
+(0x11e8+3777-0x20a9);p<s2;p++){if(tmp==Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][
+(0x47c+2877-0xfb8)]){gsm_default[k]=Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][
+(0x1740+662-0x19d6)];break;}}}k++;}gsm_default[k]='\0';return k;}unsigned long 
 zUfiSms_ConvertUcs2ToGsmDefault(const unsigned char*def,unsigned char*
-gsm_default,unsigned long len){unsigned long i=(0x8fb+3524-0x16bf);unsigned long
- k=(0x13f+9387-0x25ea);unsigned long p=(0xbcb+3835-0x1ac6);unsigned long tmp=
-(0x19af+1977-0x2168);unsigned long s1=(0x168b+3915-0x25d6),s2=
-(0xb14+5403-0x202f);unsigned long q=(0xa28+72-0xa70);s1=sizeof(
+gsm_default,unsigned long len){unsigned long i=(0x111+4012-0x10bd);unsigned long
+ k=(0x2aa+2686-0xd28);unsigned long p=(0x1c9b+1703-0x2342);unsigned long tmp=
+(0x9b3+4162-0x19f5);unsigned long s1=(0x6d3+5383-0x1bda),s2=(0x1633+691-0x18e6);
+unsigned long q=(0x160+9435-0x263b);s1=sizeof(
 zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[
-(0x926+4953-0x1c7f)]);s2=sizeof(UCS2_To_GSMDefault_Table_UCS2)/sizeof(
-UCS2_To_GSMDefault_Table_UCS2[(0x823+362-0x98d)]);for(i=(0x895+5008-0x1c25);i<
-len;i++){if(def[i]==(0x97b+406-0xb11)){i++;if(UCS2_To_GSMDefault_Table_ASC[def[i
-]]!=NON_GSM){gsm_default[k]=UCS2_To_GSMDefault_Table_ASC[def[i]];k++;continue;}
-else if((UCS2_To_GSMDefault_Table_ASC[def[i]]==NON_GSM)&&(def[i]==
-(0xaec+2721-0x156d))){gsm_default[k]=(0x4dd+7252-0x2111);k++;continue;}for(q=
-(0x1cb4+1437-0x2251);q<s1;q++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q]
-[(0xdc5+1092-0x1208)]){gsm_default[k]=(0x115f+1599-0x1783);k++;gsm_default[k]=
-zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x679+6847-0x2138)];break;}}}else{tmp=(
-def[i]<<(0x914+2605-0x1339))+def[i+(0x1b10+677-0x1db4)];i++;if(tmp==
-(0x2516+1414-0x9f0)){gsm_default[k]=(0x1880+1098-0x1caf);k++;gsm_default[k]=
-(0x1bb+1199-0x605);k++;continue;}for(p=(0xb30+768-0xe30);p<s2;p++){if(tmp==
-UCS2_To_GSMDefault_Table_UCS2[p][(0x50b+6900-0x1ffe)]){gsm_default[k]=
-UCS2_To_GSMDefault_Table_UCS2[p][(0x3a8+652-0x634)];break;}}}k++;}gsm_default[k]
-='\0';return k;}UINT8 zUfiSms_TsIntToBcd(const UINT8 i){return(UINT8)(((i%
-(0xafb+3141-0x1736))+((i/(0xb32+1234-0xffa))<<(0x653+5335-0x1b26))));}void 
+(0xc77+6294-0x250d)]);s2=sizeof(UCS2_To_GSMDefault_Table_UCS2)/sizeof(
+UCS2_To_GSMDefault_Table_UCS2[(0x3da+8599-0x2571)]);for(i=(0xf88+4606-0x2186);i<
+len;i++){if(def[i]==(0x1697+3562-0x2481)){i++;if(UCS2_To_GSMDefault_Table_ASC[
+def[i]]!=NON_GSM){gsm_default[k]=UCS2_To_GSMDefault_Table_ASC[def[i]];k++;
+continue;}else if((UCS2_To_GSMDefault_Table_ASC[def[i]]==NON_GSM)&&(def[i]==
+(0xf52+5349-0x2417))){gsm_default[k]=(0x3c9+7129-0x1f82);k++;continue;}for(q=
+(0xf55+19-0xf68);q<s1;q++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q][
+(0x7cf+4810-0x1a98)]){gsm_default[k]=(0x197+4576-0x135c);k++;gsm_default[k]=
+zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0xc1f+3647-0x1a5e)];break;}}}else{tmp=(
+def[i]<<(0x932+829-0xc67))+def[i+(0x84+2470-0xa29)];i++;if(tmp==8364){
+gsm_default[k]=(0x17c6+3513-0x2564);k++;gsm_default[k]=(0x133d+1399-0x184f);k++;
+continue;}for(p=(0x95a+2609-0x138b);p<s2;p++){if(tmp==
+UCS2_To_GSMDefault_Table_UCS2[p][(0x3e6+4629-0x15fa)]){gsm_default[k]=
+UCS2_To_GSMDefault_Table_UCS2[p][(0x73f+4088-0x1737)];break;}}}k++;}gsm_default[
+k]='\0';return k;}UINT8 zUfiSms_TsIntToBcd(const UINT8 i){return(UINT8)(((i%
+(0xbf6+1698-0x128e))+((i/(0x2454+279-0x2561))<<(0x289+1924-0xa09))));}void 
 zUfiSms_DecodeRelativeTime(UINT8 iValidTime,T_zUfiSms_TimeStamp*ptTimeStamp){
-uint32 i=(0x2f3+5367-0x17ea);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
-(0x4e8+3736-0x1380),sizeof(wms_timestamp_s_type));if(iValidTime<
-(0x115d+4557-0x229a)){i=(iValidTime+(0x156c+1499-0x1b46))*(0x1ab0+1022-0x1ea9);
-ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0x7a7+3400-0x14b3)));
-ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0x4f3+6075-0x1c72)));}
-else if(iValidTime<(0x1a29+1092-0x1dc6)){i=(iValidTime-(0x15d5+3022-0x2114))*
-(0xd7+9405-0x2576);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
-(0x1a6+4538-0x1354)+i/(0x160+1826-0x846)));ptTimeStamp->minute=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0x1368+4977-0x269d)));}else if(iValidTime<
-(0x1171+4564-0x2280)){i=iValidTime-(0xa6b+5675-0x1ff0);ptTimeStamp->month=(UINT8
-)zUfiSms_TsIntToBcd((UINT8)(i/(0x638+2032-0xe0a)));ptTimeStamp->day=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0x919+163-0x99e)));}else{i=(iValidTime-
-(0xfdc+5810-0x25ce))*(0xedc+2465-0x1876);ptTimeStamp->year=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i/(0x1e22+309-0x1dea)));ptTimeStamp->month=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)((i%(0x1b87+3311-0x2709))/(0x650+1074-0xa64)));
-ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0xafb+4778-0x1c38))%
-(0x25b+1374-0x79b)));}}else{printf(
+uint32 i=(0x77f+1988-0xf43);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
+(0x390+8537-0x24e9),sizeof(wms_timestamp_s_type));if(iValidTime<
+(0xc33+1511-0x118a)){i=(iValidTime+(0xef9+1954-0x169a))*(0x54c+6940-0x2063);
+ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0xd2d+4779-0x1f9c)));
+ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0x16a+772-0x432)));}
+else if(iValidTime<(0x3a2+8663-0x24d2)){i=(iValidTime-(0x15a2+3023-0x20e2))*
+(0x2f2+5733-0x1939);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
+(0xa06+3563-0x17e5)+i/(0xa88+6178-0x226e)));ptTimeStamp->minute=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0x4d0+1573-0xab9)));}else if(iValidTime<
+(0x21ad+288-0x2208)){i=iValidTime-(0x7d8+2041-0xf2b);ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0xc80+204-0xd2e)));ptTimeStamp->day=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0xe59+6066-0x25ed)));}else{i=(iValidTime-
+(0xe2b+682-0x1015))*(0x13a+9437-0x2610);ptTimeStamp->year=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0x555+2704-0xe78)));ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)((i%(0x110d+3351-0x1cb7))/(0xc82+4634-0x1e7e)));
+ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0xde9+4969-0x1fe5))%
+(0xed6+1666-0x153a)));}}else{printf(
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x72\x65\x6c\x61\x74\x69\x76\x65\x5f\x74\x69\x6d\x65"
 );}}int zUfiSms_CharToInt(char*pCharArray,int iLen,unsigned char*pIntArray){int 
-i=(0x1055+1625-0x16ae);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}
-for(i=(0x10dc+1860-0x1820);i<iLen;i++){pIntArray[i]=pCharArray[i]-
-((char)(0x91d+2421-0x1262));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
+i=(0x3a9+6121-0x1b92);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}
+for(i=(0x1be3+227-0x1cc6);i<iLen;i++){pIntArray[i]=pCharArray[i]-
+((char)(0x999+690-0xc1b));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
 T_zUfiSms_SubmitTpdu*ptSubmit,T_zUfiSms_ConcatInfo*ptConcatSms,
-T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x1b58+2649-0x25b1);if(ptConcatSms->
-total_msg>(0x15ba+1318-0x1adf)){g_zUfiSms_SendingSms.TP_UDHI=(0x66f+4746-0x18f8)
-;g_zUfiSms_SendingSms.TP_UD[(0x233c+242-0x242e)]=(0x1235+1369-0x1789);
-g_zUfiSms_SendingSms.TP_UD[(0x612+4482-0x1793)]=(0x202a+398-0x21b3);
-g_zUfiSms_SendingSms.TP_UD[(0xc7c+900-0xffe)]=(0x1562+784-0x186f);
-g_zUfiSms_SendingSms.TP_UD[(0x9cc+1329-0xefa)]=(char)ptDbSaveData->concat_info[
-(0x1a48+776-0x1d50)]%(0x45a+8765-0x2598);g_zUfiSms_SendingSms.TP_UD[
-(0x2136+261-0x2237)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
-(0x11f0+1157-0x1670)]=(char)ptConcatSms->current_sending+(0x170c+2060-0x1f17);
-g_zUfiSms_SendingSms.TP_UD[(0x983+723-0xc50)]=(0xda+8214-0x20ea);for(i=
-(0x35b+7199-0x1f7a);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
-[i+(0x1512+4488-0x2693)]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.
-TP_UDLength=ptSubmit->user_data.sm_len+(0x138b+2270-0x1c62);}else{for(i=
-(0xdd7+4396-0x1f03);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
-[i]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.TP_UDLength=ptSubmit->
+T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x7cd+7801-0x2646);if(ptConcatSms->
+total_msg>(0x1694+2438-0x2019)){g_zUfiSms_SendingSms.TP_UDHI=(0x352+2131-0xba4);
+g_zUfiSms_SendingSms.TP_UD[(0x4d4+5679-0x1b03)]=(0x8dc+7279-0x2546);
+g_zUfiSms_SendingSms.TP_UD[(0x20e7+567-0x231d)]=(0x1c01+885-0x1f71);
+g_zUfiSms_SendingSms.TP_UD[(0xcd1+558-0xefd)]=(0x711+6675-0x2121);
+g_zUfiSms_SendingSms.TP_UD[(0x7c3+4368-0x18d0)]=(char)ptDbSaveData->concat_info[
+(0x1267+368-0x13d7)]%(0xbdc+1274-0xfd7);g_zUfiSms_SendingSms.TP_UD[
+(0x4c7+5316-0x1987)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
+(0x1be9+2783-0x26c3)]=(char)ptConcatSms->current_sending+(0x1590+609-0x17f0);
+g_zUfiSms_SendingSms.TP_UD[(0xb7f+7033-0x26f2)]=(0x440+5448-0x1982);for(i=
+(0x37c+3350-0x1092);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
+[i+(0xed4+5778-0x255f)]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.
+TP_UDLength=ptSubmit->user_data.sm_len+(0x2252+80-0x229b);}else{for(i=
+(0xc87+736-0xf67);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD[i
+]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.TP_UDLength=ptSubmit->
 user_data.sm_len;}}void zUfiSms_FillGlobalTpudUcs2(T_zUfiSms_SubmitTpdu*ptSubmit
 ,T_zUfiSms_ConcatInfo*ptConcatSms,T_zUfiSms_DbStoreData*ptDbSaveData){if(
-ptConcatSms->total_msg>(0x1906+3395-0x2648)){g_zUfiSms_SendingSms.TP_UDHI=
-(0xc5d+2262-0x1532);g_zUfiSms_SendingSms.TP_UD[(0xb51+3915-0x1a9c)]=
-(0xe2+8098-0x207f);g_zUfiSms_SendingSms.TP_UD[(0xb92+1798-0x1297)]=
-(0xab6+7215-0x26e0);g_zUfiSms_SendingSms.TP_UD[(0x198+9236-0x25aa)]=
-(0x1dfa+986-0x21d1);g_zUfiSms_SendingSms.TP_UD[(0xd27+355-0xe87)]=(char)
-ptDbSaveData->concat_info[(0x1f0+2938-0xd6a)]%(0xca8+5203-0x1ffc);
-g_zUfiSms_SendingSms.TP_UD[(0xf18+2044-0x1710)]=(char)ptConcatSms->total_msg;
-g_zUfiSms_SendingSms.TP_UD[(0xae3+3567-0x18cd)]=(char)ptConcatSms->
-current_sending+(0x13a+3600-0xf49);(void)Bytes2String(ptSubmit->user_data.
-sm_data,&g_zUfiSms_SendingSms.TP_UD[(0x14ec+2332-0x1e02)],ptSubmit->user_data.
-sm_len);}else{(void)Bytes2String(ptSubmit->user_data.sm_data,
-g_zUfiSms_SendingSms.TP_UD,ptSubmit->user_data.sm_len);}}unsigned char 
-zUfiSms_Low2High(unsigned char x){if(x>=((char)(0x27b+438-0x3d0))&&x<
-((char)(0x1aa0+1995-0x2204))){x=(x-((char)(0x18f1+246-0x1986)))+
-((char)(0x14aa+281-0x1582));}return x;}unsigned char zUfiSms_Char2Dec(unsigned 
-char x){unsigned char d=(0x1506+174-0x15b4);if(x>=((char)(0x1e69+928-0x21c8))&&x
-<((char)(0x379+4636-0x154e))){d=(x-((char)(0xc29+4613-0x1ded)))+
-(0x51+9132-0x23f3);}else{d=x-((char)(0x7ff+3287-0x14a6));}return d;}unsigned 
-char zUfiSms_Char2Byte(unsigned char a,unsigned char b){unsigned char data=
-(0x1c2a+1725-0x22e7);unsigned char l=(0x202a+666-0x22c4),h=(0x8bc+1487-0xe8b);a=
-zUfiSms_Low2High(a);b=zUfiSms_Low2High(b);h=zUfiSms_Char2Dec(a);l=
-zUfiSms_Char2Dec(b);data=h*(0xdcc+5900-0x24c8)+l;return data;}void 
-zUfiSms_Str2Bytes(unsigned char*text,int text_len,unsigned char*data,int 
-data_len){int i=(0x1aaf+872-0x1e17);while((0x18da+813-0x1c05)*i+
-(0x7d2+2045-0xfce)<text_len){data[i]=zUfiSms_Char2Byte(text[(0x59+7983-0x1f86)*i
-],text[(0xd47+6340-0x2609)*i+(0x190+3896-0x10c7)]);i++;}}int zUfiSms_SplitString
-(char*input,char***output,char cMatchChar){int src=(0x1b79+1956-0x231d);int dst=
-(0x141c+4755-0x26af);int count=(0x152+90-0x1ac);int size=(0x1a58+1741-0x211d);
-char quoted=(0xa4b+3835-0x1946);char**tmpout=NULL;*output=(char**)malloc(sizeof(
-char*)*size);if(NULL==*output){return-(0x1d6b+733-0x2047);}(*output)[count++]=
-input;for(src=dst=(0x262+1588-0x896);input[src];){char cInputChar=input[src];if(
-!quoted&&cInputChar==cMatchChar){input[dst++]=(0xc67+3764-0x1b1b);while(input[++
-src]&&(int)isspace(input[src])){};if(count>=size){size+=(0x1e17+2012-0x25e3);
-tmpout=(char**)realloc(*output,sizeof(char*)*size);if(NULL==tmpout){return-
-(0x1fe0+56-0x2017);}*output=tmpout;}(*output)[count++]=input+dst;}else if(!
-quoted&&(cInputChar=='\''||cInputChar==((char)(0x14e5+2329-0x1ddc)))){quoted=
-cInputChar;src++;}else if(cInputChar==quoted){quoted=(0x13b+8885-0x23f0);src++;}
-else{if(cInputChar=='\\'&&quoted!='\''){src++;cInputChar=input[src];if(!
-cInputChar){free(*output);*output=NULL;return-(0x9a6+6078-0x2163);}}input[dst++]
-=cInputChar;src++;}}input[dst]=(0x2db+8333-0x2368);if(quoted){free(*output);*
-output=NULL;return-(0x1f6a+679-0x2210);}return count;}int zUfiSms_atohex(char c)
-{int result=(0x4e0+5589-0x1ab5);if(c>=((char)(0x2253+273-0x2334))&&c<=
-((char)(0xb1+2170-0x8f2))){result=c-((char)(0x157b+1832-0x1c73));}else if(c>=
-((char)(0x50f+7887-0x237d))&&c<=((char)(0xec0+6124-0x2646))){result=(c-
-((char)(0x753+176-0x7a2)))+(0x1485+805-0x17a0);}else if(c>=
-((char)(0x51f+1757-0xbbb))&&c<=((char)(0x100b+4157-0x2002))){result=(c-
-((char)(0x174d+1657-0x1d85)))+(0xcb3+5750-0x231f);}else{at_print(LOG_DEBUG,
+ptConcatSms->total_msg>(0xfe1+1071-0x140f)){g_zUfiSms_SendingSms.TP_UDHI=
+(0x20a7+637-0x2323);g_zUfiSms_SendingSms.TP_UD[(0x1cff+518-0x1f05)]=
+(0x1d62+558-0x1f8b);g_zUfiSms_SendingSms.TP_UD[(0xd1f+1580-0x134a)]=
+(0x2d0+5053-0x1688);g_zUfiSms_SendingSms.TP_UD[(0x4f7+5941-0x1c2a)]=
+(0x382+2421-0xcf4);g_zUfiSms_SendingSms.TP_UD[(0xc5c+219-0xd34)]=(char)
+ptDbSaveData->concat_info[(0x1270+3015-0x1e37)]%(0xd4a+2959-0x17da);
+g_zUfiSms_SendingSms.TP_UD[(0xa7a+4083-0x1a69)]=(char)ptConcatSms->total_msg;
+g_zUfiSms_SendingSms.TP_UD[(0x981+928-0xd1c)]=(char)ptConcatSms->current_sending
++(0x1787+3444-0x24fa);(void)Bytes2String(ptSubmit->user_data.sm_data,&
+g_zUfiSms_SendingSms.TP_UD[(0x1ec+8019-0x2139)],ptSubmit->user_data.sm_len);}
+else{(void)Bytes2String(ptSubmit->user_data.sm_data,g_zUfiSms_SendingSms.TP_UD,
+ptSubmit->user_data.sm_len);}}unsigned char zUfiSms_Low2High(unsigned char x){if
+(x>=((char)(0x61f+2843-0x10d9))&&x<((char)(0x40a+5735-0x1a0a))){x=(x-
+((char)(0x64d+6905-0x20e5)))+((char)(0x1835+807-0x1b1b));}return x;}unsigned 
+char zUfiSms_Char2Dec(unsigned char x){unsigned char d=(0x2074+1004-0x2460);if(x
+>=((char)(0xb4b+6594-0x24cc))&&x<((char)(0x6b0+4431-0x17b8))){d=(x-
+((char)(0x2039+1040-0x2408)))+(0x89c+1782-0xf88);}else{d=x-
+((char)(0x241f+287-0x250e));}return d;}unsigned char zUfiSms_Char2Byte(unsigned 
+char a,unsigned char b){unsigned char data=(0x21f+5961-0x1968);unsigned char l=
+(0x432+6026-0x1bbc),h=(0x97a+7400-0x2662);a=zUfiSms_Low2High(a);b=
+zUfiSms_Low2High(b);h=zUfiSms_Char2Dec(a);l=zUfiSms_Char2Dec(b);data=h*
+(0xd87+59-0xdb2)+l;return data;}void zUfiSms_Str2Bytes(unsigned char*text,int 
+text_len,unsigned char*data,int data_len){int i=(0x126+522-0x330);while(
+(0x92f+6180-0x2151)*i+(0x158a+2455-0x1f20)<text_len){data[i]=zUfiSms_Char2Byte(
+text[(0x161+7671-0x1f56)*i],text[(0xd4f+348-0xea9)*i+(0xfaf+4916-0x22e2)]);i++;}
+}int zUfiSms_SplitString(char*input,char***output,char cMatchChar){int src=
+(0x4c9+1488-0xa99);int dst=(0x787+4580-0x196b);int count=(0x7f8+2064-0x1008);int
+ size=(0x684+7134-0x225a);char quoted=(0x18c+8391-0x2253);char**tmpout=NULL;*
+output=(char**)malloc(sizeof(char*)*size);if(NULL==*output){return-
+(0x571+579-0x7b3);}(*output)[count++]=input;for(src=dst=(0x157a+1208-0x1a32);
+input[src];){char cInputChar=input[src];if(!quoted&&cInputChar==cMatchChar){
+input[dst++]=(0x1364+4828-0x2640);while(input[++src]&&(int)isspace(input[src])){
+};if(count>=size){size+=(0x4c7+5461-0x1a0c);tmpout=(char**)realloc(*output,
+sizeof(char*)*size);if(NULL==tmpout){return-(0x1072+5482-0x25db);}*output=tmpout
+;}(*output)[count++]=input+dst;}else if(!quoted&&(cInputChar=='\''||cInputChar==
+((char)(0x43c+47-0x449)))){quoted=cInputChar;src++;}else if(cInputChar==quoted){
+quoted=(0x53f+1214-0x9fd);src++;}else{if(cInputChar=='\\'&&quoted!='\''){src++;
+cInputChar=input[src];if(!cInputChar){free(*output);*output=NULL;return-
+(0x128b+471-0x1461);}}input[dst++]=cInputChar;src++;}}input[dst]=
+(0x197+3281-0xe68);if(quoted){free(*output);*output=NULL;return-
+(0x6b5+4555-0x187f);}return count;}int zUfiSms_atohex(char c){int result=
+(0xf5f+643-0x11e2);if(c>=((char)(0x825+109-0x862))&&c<=
+((char)(0x4e6+7253-0x2102))){result=c-((char)(0xaef+3640-0x18f7));}else if(c>=
+((char)(0x1a98+2110-0x2275))&&c<=((char)(0x5e1+1096-0x9c3))){result=(c-
+((char)(0x299+4436-0x138c)))+(0x782+1225-0xc41);}else if(c>=
+((char)(0x19ea+137-0x1a32))&&c<=((char)(0xe23+2059-0x15e8))){result=(c-
+((char)(0x826+1619-0xe38)))+(0xaeb+4577-0x1cc2);}else{at_print(LOG_DEBUG,
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x61\x74\x6f\x68\x65\x78\x20\x65\x72\x72\x6f\x72\x2c\x63\x61\x6e\x20\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x63\x68\x61\x72\x3a\x25\x63" "\n"
 ,c);return result;}return result;}int zUfiSms_DispatchWtoi(unsigned char*in_ptr,
-int iLength,unsigned char*out_ptr){int low=(0xe25+1829-0x154a);int high=
-(0x509+5639-0x1b10);if(in_ptr==NULL||out_ptr==NULL){printf(
+int iLength,unsigned char*out_ptr){int low=(0xbd1+3199-0x1850);int high=
+(0x6a7+6632-0x208f);if(in_ptr==NULL||out_ptr==NULL){printf(
 "\x73\x6d\x73\x3a\x69\x6e\x76\x61\x69\x6c\x64\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72" "\n"
-);return ZUFI_FAIL;}while(iLength>(0x1538+809-0x1861)){low=in_ptr[iLength-
-(0x128d+1381-0x17f1)]&(0x1315+4457-0x246f);high=(in_ptr[iLength-
-(0x96+4766-0x1333)]&(0xa48+2618-0x1392))>>(0x455+34-0x473);out_ptr[
-(0x7d6+388-0x958)*iLength-(0x614+7220-0x2247)]=g_zUfiSms_DigAscMap[low];out_ptr[
-(0x23da+123-0x2453)*iLength-(0x1382+105-0x13e9)]=g_zUfiSms_DigAscMap[high];
-iLength--;}return ZUFI_SUCC;}unsigned int zte_wms_convert_PORTUGUESE_To_UCS2(
+);return ZUFI_FAIL;}while(iLength>(0x879+5595-0x1e54)){low=in_ptr[iLength-
+(0x1750+2743-0x2206)]&(0x43c+495-0x61c);high=(in_ptr[iLength-
+(0x1241+5156-0x2664)]&(0x934+7502-0x2592))>>(0x2d0+5579-0x1897);out_ptr[
+(0x14f+4999-0x14d4)*iLength-(0x1f70+1241-0x2448)]=g_zUfiSms_DigAscMap[low];
+out_ptr[(0x122d+1387-0x1796)*iLength-(0x742+4958-0x1a9e)]=g_zUfiSms_DigAscMap[
+high];iLength--;}return ZUFI_SUCC;}unsigned int 
+zte_wms_convert_PORTUGUESE_To_UCS2(const unsigned char*gsmdef,unsigned char*ucs2
+,unsigned int len){unsigned int i=(0x1f91+1708-0x263d);unsigned int j=
+(0x100a+4229-0x208f);unsigned int k=(0xe72+4598-0x2068);unsigned int p=
+(0x5ff+89-0x658);unsigned int s=(0x1fc7+569-0x2200);s=sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x667+603-0x8c2)]);for(i=
+(0xe87+5735-0x24ee);i<len;i++){j=gsmdef[i];if(j==(0xf94+3506-0x1d2b)){i++;for(p=
+(0x18df+3118-0x250d);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
+(0xba1+486-0xd87)]==gsmdef[i]){ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[
+p][(0x1e3c+1555-0x244e)]>>(0xb95+4625-0x1d9e);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x1013+3977-0x1f9b)]);break;}}}else
+{ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x157b+2952-0x20fb);k++;ucs2
+[k]=(unsigned char)(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]);}k++;}ucs2[k]='\0'
+;return k;}unsigned int zte_wms_convert_PORTUGUESE_To_UCS2_USE_GSM7_SS_PORTU_LS(
 const unsigned char*gsmdef,unsigned char*ucs2,unsigned int len){unsigned int i=
-(0x167f+2800-0x216f);unsigned int j=(0x442+1743-0xb11);unsigned int k=
-(0x11a7+406-0x133d);unsigned int p=(0x19b+4573-0x1378);unsigned int s=
-(0x1c9+3875-0x10ec);s=sizeof(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x517+8573-0x2694)]);for(i=
-(0x110+2756-0xbd4);i<len;i++){j=gsmdef[i];if(j==(0x3bf+1134-0x812)){i++;for(p=
-(0x1d35+1102-0x2183);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
-(0x11cc+5218-0x262e)]==gsmdef[i]){ucs2[k]=
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x397+3263-0x1055)]>>
-(0x1eb8+1537-0x24b1);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x1168+1483-0x1732)]);break;}}}else
-{ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0xac4+3680-0x191c);k++;ucs2[
-k]=(unsigned char)(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]);}k++;}ucs2[k]='\0';
-return k;}unsigned int zte_wms_convert_PORTUGUESE_To_UCS2_USE_GSM7_SS_PORTU_LS(
-const unsigned char*gsmdef,unsigned char*ucs2,unsigned int len){unsigned int i=
-(0x405+8398-0x24d3);unsigned int j=(0x7fc+6246-0x2062);unsigned int k=
-(0x38c+8782-0x25da);unsigned int p=(0xe5a+4685-0x20a7);unsigned int s=
-(0xa45+1101-0xe92);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[(0xa1d+2503-0x13e4)]);for(i=
-(0x112+1377-0x673);i<len;i++){j=gsmdef[i];if(j==(0x92d+6341-0x21d7)){i++;for(p=
-(0x1d78+1827-0x249b);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x18+2415-0x987)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x314+6302-0x1bb1)]>>(0xef4+6141-0x26e9);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x2253+131-0x22d5)]);break;}}}else{ucs2[
-k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x1233+235-0x1316);k++;ucs2[k]=(
+(0xb1f+4684-0x1d6b);unsigned int j=(0xe0d+1604-0x1451);unsigned int k=
+(0x21ed+472-0x23c5);unsigned int p=(0x1cf+6926-0x1cdd);unsigned int s=
+(0x952+6747-0x23ad);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x42b+8112-0x23db)]);for(i=
+(0x420+6682-0x1e3a);i<len;i++){j=gsmdef[i];if(j==(0x258+6308-0x1ae1)){i++;for(p=
+(0x958+387-0xadb);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x464+7205-0x2089)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x21db+425-0x2383)]>>(0x1d80+1884-0x24d4);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x30c+1268-0x7ff)]);break;}}}else{ucs2[k
+]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x52d+2780-0x1001);k++;ucs2[k]=(
 unsigned char)(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]);}k++;}ucs2[k]='\0';
 return k;}unsigned long zte_wms_convert_GSMDefault_to_UCS2(const unsigned char*
-gsmdef,unsigned char*ucs2,unsigned long len){unsigned long i=(0x18+3096-0xc30);
-unsigned long j=(0x1211+1058-0x1633);unsigned long k=(0x6a7+4747-0x1932);
-unsigned long p=(0x660+8058-0x25da);unsigned long s=(0x497+8554-0x2601);unsigned
- long is_find=(0x6cf+657-0x960);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/
-sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x1e87+626-0x20f9)]);for(i=
-(0x112a+361-0x1293);i<len;i++){j=gsmdef[i];if(j==(0xfe7+280-0x10e4)){i++;for(p=
-(0x1cab+1741-0x2378);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0xfc1+3758-0x1e6f)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x1127+1857-0x1867)]>>(0xba+4201-0x111b);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x478+3057-0x1068)]);is_find=
-(0xec9+5046-0x227e);break;}}if(!is_find){at_print(LOG_DEBUG,
+gsmdef,unsigned char*ucs2,unsigned long len){unsigned long i=(0x2093+387-0x2216)
+;unsigned long j=(0xca+4854-0x13c0);unsigned long k=(0x1eb+3998-0x1189);unsigned
+ long p=(0xa27+2449-0x13b8);unsigned long s=(0x1a69+2305-0x236a);unsigned long 
+is_find=(0xfd2+3441-0x1d43);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof
+(zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x10dd+1220-0x15a1)]);for(i=
+(0x1323+1895-0x1a8a);i<len;i++){j=gsmdef[i];if(j==(0x1f59+1109-0x2393)){i++;for(
+p=(0xb8b+3054-0x1779);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x8e1+1166-0xd6f)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x150c+20-0x151f)]>>(0xc08+5904-0x2310);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xd22+5473-0x2282)]);is_find=
+(0x163+1266-0x654);break;}}if(!is_find){at_print(LOG_DEBUG,
 "\x73\x6d\x73\x3a\x20\x64\x61\x74\x61\x20\x3d\x20\x25\x64\x20\x6e\x6f\x74\x20\x66\x69\x6e\x64\x20\x69\x6e\x20\x67\x73\x6d\x64\x65\x66\x61\x75\x6c\x74\x20\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\x20\x74\x61\x62\x6c\x65" "\n"
-,gsmdef[i]);i--;ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table[j]>>
-(0x1a24+1127-0x1e83);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table[j]);}}else{ucs2[k]=
-zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x7f3+560-0xa1b);k++;ucs2[k]=(unsigned 
+,gsmdef[i]);i--;ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x704+759-0x9f3);k
+++;ucs2[k]=(unsigned char)(zte_sms_GSMDefault_To_UCS2_Table[j]);}}else{ucs2[k]=
+zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x1862+3539-0x262d);k++;ucs2[k]=(unsigned 
 char)(zte_sms_GSMDefault_To_UCS2_Table[j]);}k++;}ucs2[k]='\0';return k;}void 
 zUfiSms_ConvertUcs2(char*data,UINT16 sms_len,char*out_content){char 
-ascii_content[(0xa75+115-0xae6)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
-(0x58f+4109-0x159b)]={(0x9f0+1370-0xf4a)};UINT16 len=(0x673+6019-0x1df6);switch(
+ascii_content[(0xe8+9206-0x24dc)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
+(0x10b+742-0x3f0)]={(0x1fad+229-0x2092)};UINT16 len=(0x25+7627-0x1df0);switch(
 g_zUfiSms_Language){case DCS_PORTUGUESE:if(g_zUfiSms_IsLanguageShift==
 WMS_UDH_NAT_LANG_SS){len=zte_wms_convert_PORTUGUESE_To_UCS2((const UINT8*)data,(
 UINT8*)ascii_content,sms_len);}else if(g_zUfiSms_IsLanguageShift==
@@ -670,47 +672,47 @@
 sms_len);break;}(void)zUfiSms_DispatchWtoi((char*)ascii_content,len,(char*)
 out_content);}boolean zUfiSms_DecodeContent(char*msg_content,UINT16 sms_len,
 boolean isEsc,char*out_content){boolean endEsc=FALSE;char*p=NULL;static char 
-data[(0x1b00+1902-0x226d)+(0x1864+614-0x1a2a)+(0x562+4149-0x1596)]={
-(0xacf+2695-0x1556)};int len=(0x1c6+7430-0x1ecc);if(msg_content==NULL||
-out_content==NULL||sms_len>(0x11a1+5686-0x2697)||sms_len<(0x7b0+3627-0x15d9)){
-return endEsc;}len=sms_len;memset(data,(0x1a4+63-0x1e3),(0xee1+4998-0x21c5));p=
-data;if(isEsc){*p=(0x131a+1968-0x1aaf);p++;}zUfiSms_Str2Bytes((unsigned char*)
-msg_content,len,(unsigned char*)p,(0x91a+381-0x9f7));if(p[len/(0x8a+3388-0xdc4)-
-(0x66d+750-0x95a)]==(0x1776+223-0x183a)){endEsc=TRUE;}zUfiSms_ConvertUcs2(data,
-len/(0xb6+6255-0x1923)+(isEsc?(0x1b58+721-0x1e28):(0x9a3+3084-0x15af))-(endEsc?
-(0x478+639-0x6f6):(0x10a4+4766-0x2342)),out_content);return endEsc;}byte*
-zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){byte buf[(0xd2f+1940-0x14a2)],c;
-int n;n=sizeof(buf)-(0x712+4343-0x1808);buf[n]='\0';do{c=(byte)(v%r);if(n<=
-(0xcf8+196-0xdbc)){printf("\x4f\x56\x45\x52\x46\x4c\x4f\x57\x20");break;}buf[--n
-]=(byte)((c>(0x6b1+5226-0x1b12))?c+((char)(0x2d0+6776-0x1d07))-
-(0xf82+2801-0x1a69):c+((char)(0x1117+1271-0x15de)));}while((v/=r)>
-(0x17d9+364-0x1945));while((*s++=buf[n++])!=(0x20a6+626-0x2318));return(s-
-(0xd7c+1230-0x1249));}byte*zUfiSms_SmsiAddrToStr(wms_address_s_type addr,byte*
-res_ptr,UINT8*type_of_addr){byte bcd_idx=(0xa73+6262-0x22e9);UINT8 temp=
-(0x19ec+1756-0x20c8);*type_of_addr=(0x43c+852-0x790);temp=(UINT8)((uint32)addr.
-number_type&(0xc41+1261-0x1127));*type_of_addr=(UINT8)((*type_of_addr|temp)<<
-(0x1267+5172-0x2697));temp=(UINT8)((uint32)addr.number_plan&(0xc2f+4381-0x1d45))
-;*type_of_addr=*type_of_addr|temp;*type_of_addr=*type_of_addr|
-(0xf27+1812-0x15bb);while(bcd_idx<addr.number_of_digits){if(addr.digits[bcd_idx]
-==(0x18a3+3647-0x26d8)){addr.digits[bcd_idx]=(0x124c+4664-0x2484);}res_ptr=
-zUfiSms_SmsiUtilitoa((uint32)addr.digits[bcd_idx],res_ptr,(0x2ea+6914-0x1ddc));
-bcd_idx++;}return res_ptr;}byte*zUfiSms_SmsiUtilitoaFill(word v,byte*rb_ptr){int
- n;byte c,*ptr;ptr=rb_ptr+(0x92c+5648-0x1f3a);*ptr='\0';for(n=(0x2c7+2936-0xe3f)
-;n<(0x82f+2586-0x1247);++n){c=(byte)(v%(0x2fb+4914-0x1623));v/=
-(0x10bc+518-0x12b8);*--ptr=(c+((char)(0x81f+7725-0x261c)));}return rb_ptr+
-(0x1882+3723-0x270b);}void zUfiSms_SprintfTime(char*str_time,int len,int t){if(t
-<(0x19d7+1473-0x1f8e)){snprintf(str_time,len,"\x30\x25\x78",t);}else{snprintf(
-str_time,len,"\x25\x78",t);}}static void zUfiSms_ParseDeliverConcat8(
-T_zUfiSms_UdhConcat8*concat_8,T_zUfiSms_DbStoreData*db_data){int mux=
-(0x795+1583-0xdc4);concat_8->seq_num--;if(concat_8->total_sm>
-ZTE_WMS_CONCAT_SMS_COUNT_MAX){mux=(concat_8->seq_num-concat_8->seq_num%
-ZTE_WMS_CONCAT_SMS_COUNT_MAX)/ZTE_WMS_CONCAT_SMS_COUNT_MAX;}db_data->concat_sms=
-(0x18c4+608-0x1b23);db_data->concat_info[(0x15a4+743-0x188b)]=
-(0x263+4314-0x123e)*mux+concat_8->msg_ref;db_data->concat_info[
-(0xf8+8138-0x20c0)]=concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+
-(0x1bd+5316-0x1680);db_data->concat_info[(0x67c+191-0x73a)]=concat_8->total_sm-
-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>ZTE_WMS_CONCAT_SMS_COUNT_MAX-
-(0x6b8+3753-0x1560)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(concat_8->total_sm%
+data[(0x8a9+662-0xb3e)+(0x152+7312-0x1d42)+(0x2da+2285-0xbc6)]={
+(0xff4+130-0x1076)};int len=(0x1692+1506-0x1c74);if(msg_content==NULL||
+out_content==NULL||sms_len>(0x1bff+2768-0x258f)||sms_len<(0x937+3880-0x185d)){
+return endEsc;}len=sms_len;memset(data,(0x4df+7878-0x23a5),(0x10a8+5115-0x2401))
+;p=data;if(isEsc){*p=(0xd82+2767-0x1836);p++;}zUfiSms_Str2Bytes((unsigned char*)
+msg_content,len,(unsigned char*)p,(0x11fa+1349-0x169f));if(p[len/
+(0x12f2+3193-0x1f69)-(0xc0d+3326-0x190a)]==(0x562+4278-0x15fd)){endEsc=TRUE;}
+zUfiSms_ConvertUcs2(data,len/(0x173+2025-0x95a)+(isEsc?(0x1262+954-0x161b):
+(0xcf8+3636-0x1b2c))-(endEsc?(0x5a1+3773-0x145d):(0x4d1+3711-0x1350)),
+out_content);return endEsc;}byte*zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){
+byte buf[(0xc4a+1536-0x1229)],c;int n;n=sizeof(buf)-(0x1bfd+1661-0x2279);buf[n]=
+'\0';do{c=(byte)(v%r);if(n<=(0x17b3+653-0x1a40)){printf(
+"\x4f\x56\x45\x52\x46\x4c\x4f\x57\x20");break;}buf[--n]=(byte)((c>
+(0x5c+5321-0x151c))?c+((char)(0x895+3874-0x1776))-(0x188d+847-0x1bd2):c+
+((char)(0x793+5691-0x1d9e)));}while((v/=r)>(0x7dd+6634-0x21c7));while((*s++=buf[
+n++])!=(0xd9f+65-0xde0));return(s-(0x283+313-0x3bb));}byte*zUfiSms_SmsiAddrToStr
+(wms_address_s_type addr,byte*res_ptr,UINT8*type_of_addr){byte bcd_idx=
+(0x13ba+1257-0x18a3);UINT8 temp=(0x1caa+1408-0x222a);*type_of_addr=
+(0x2f1+5126-0x16f7);temp=(UINT8)((uint32)addr.number_type&(0x138d+1061-0x17ab));
+*type_of_addr=(UINT8)((*type_of_addr|temp)<<(0x1134+3782-0x1ff6));temp=(UINT8)((
+uint32)addr.number_plan&(0x922+3416-0x1673));*type_of_addr=*type_of_addr|temp;*
+type_of_addr=*type_of_addr|(0xd31+4128-0x1cd1);while(bcd_idx<addr.
+number_of_digits){if(addr.digits[bcd_idx]==(0x6e2+4109-0x16e5)){addr.digits[
+bcd_idx]=(0x649+3846-0x154f);}res_ptr=zUfiSms_SmsiUtilitoa((uint32)addr.digits[
+bcd_idx],res_ptr,(0xb2f+541-0xd3c));bcd_idx++;}return res_ptr;}byte*
+zUfiSms_SmsiUtilitoaFill(word v,byte*rb_ptr){int n;byte c,*ptr;ptr=rb_ptr+
+(0xf94+5212-0x23ee);*ptr='\0';for(n=(0x396+34-0x3b8);n<(0xe8+2711-0xb7d);++n){c=
+(byte)(v%(0x1e4+6577-0x1b8b));v/=(0x9b+2817-0xb92);*--ptr=(c+
+((char)(0x1a97+2902-0x25bd)));}return rb_ptr+(0x1009+3680-0x1e67);}void 
+zUfiSms_SprintfTime(char*str_time,int len,int t){if(t<(0x2497+485-0x2672)){
+snprintf(str_time,len,"\x30\x25\x78",t);}else{snprintf(str_time,len,"\x25\x78",t
+);}}static void zUfiSms_ParseDeliverConcat8(T_zUfiSms_UdhConcat8*concat_8,
+T_zUfiSms_DbStoreData*db_data){int mux=(0x878+6886-0x235e);concat_8->seq_num--;
+if(concat_8->total_sm>ZTE_WMS_CONCAT_SMS_COUNT_MAX){mux=(concat_8->seq_num-
+concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX)/ZTE_WMS_CONCAT_SMS_COUNT_MAX;}
+db_data->concat_sms=(0x6c+7272-0x1cd3);db_data->concat_info[(0xbb6+3332-0x18ba)]
+=(0x905+3599-0x1615)*mux+concat_8->msg_ref;db_data->concat_info[
+(0x945+5323-0x1e0e)]=concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+
+(0x868+3373-0x1594);db_data->concat_info[(0x116f+5380-0x2672)]=concat_8->
+total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>ZTE_WMS_CONCAT_SMS_COUNT_MAX-
+(0x25c+7084-0x1e07)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(concat_8->total_sm%
 ZTE_WMS_CONCAT_SMS_COUNT_MAX);}static void zUfiSms_ParserLangSs(wms_udh_s_type*
 user_data_header){if(user_data_header==NULL){return;}switch(user_data_header->u.
 nat_lang_ss.nat_lang_id){case WMS_UDH_NAT_LANG_PORTUGUESE:g_zUfiSms_Language=
@@ -719,27 +721,27 @@
 user_data_header->u.nat_lang_ss.nat_lang_id){case WMS_UDH_NAT_LANG_PORTUGUESE:
 g_zUfiSms_Language=DCS_PORTUGUESE;break;default:break;}}static void 
 zUfiSms_ParseDeliverConcat16(T_zUfiSms_UdhConcat16*concat_16,
-T_zUfiSms_DbStoreData*db_data){int mux=(0x609+2368-0xf49);concat_16->seq_num--;
-db_data->concat_sms=(0x2d8+7465-0x2000);
-#if (0x38d+5006-0x171b)

-db_data->concat_info[(0x89a+4728-0x1b12)]=concat_16->msg_ref;db_data->
-concat_info[(0x73+8655-0x2241)]=concat_16->total_sm;db_data->concat_info[
-(0xe26+3201-0x1aa5)]=concat_16->seq_num;
+T_zUfiSms_DbStoreData*db_data){int mux=(0x520+7141-0x2105);concat_16->seq_num--;
+db_data->concat_sms=(0x21b4+176-0x2263);
+#if (0x6a4+1292-0xbb0)

+db_data->concat_info[(0x105+81-0x156)]=concat_16->msg_ref;db_data->concat_info[
+(0x7a4+4708-0x1a07)]=concat_16->total_sm;db_data->concat_info[
+(0x1e65+706-0x2125)]=concat_16->seq_num;
 #endif

 if(concat_16->total_sm>ZTE_WMS_CONCAT_SMS_COUNT_MAX){mux=(concat_16->seq_num-
 concat_16->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX)/ZTE_WMS_CONCAT_SMS_COUNT_MAX;}
-db_data->concat_info[(0x146d+3841-0x236e)]=(0x747+4735-0x18c7)*mux+concat_16->
-msg_ref;db_data->concat_info[(0x173b+3625-0x2562)]=concat_16->seq_num%
-ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x3ba+5036-0x1765);db_data->concat_info[
-(0xb1a+4162-0x1b5b)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
-ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x50+8378-0x2109)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(
+db_data->concat_info[(0xd6f+2920-0x18d7)]=(0xbf9+1025-0xefb)*mux+concat_16->
+msg_ref;db_data->concat_info[(0x698+1159-0xb1d)]=concat_16->seq_num%
+ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0xb97+4633-0x1daf);db_data->concat_info[
+(0x458+3770-0x1311)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
+ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x1714+335-0x1862)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(
 concat_16->total_sm%ZTE_WMS_CONCAT_SMS_COUNT_MAX);}static int 
 zUfiSms_ParseUdhiData(T_zUfiSms_Udh*user_data_header,T_zUfiSms_DbStoreData*
 db_data){if(NULL==user_data_header||NULL==db_data){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74\x73\x2e");return ZUFI_FAIL
 ;}switch(user_data_header->header_id){case WMS_UDH_CONCAT_8:db_data->concat_sms=
-(0x6e8+7848-0x258f);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8),
-db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0xaab+2371-0x13ed);
+(0xe3f+3873-0x1d5f);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8),
+db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0xe4d+187-0xf07);
 zUfiSms_ParseDeliverConcat16(&(user_data_header->u.concat_16),db_data);break;
 case WMS_UDH_NAT_LANG_SS:g_zUfiSms_IsLanguageShift=WMS_UDH_NAT_LANG_SS;
 zUfiSms_ParserLangSs(user_data_header);break;case WMS_UDH_NAT_LANG_LS:
@@ -749,155 +751,154 @@
 );break;}return ZUFI_SUCC;}int zUfiSms_FormatDeliverDbdata(
 T_zUfiSms_ClientTsData*ts_data_ptr,T_zUfiSms_DbStoreData*db_data){int result=
 ZUFI_SUCC;wms_address_s_type*address_ptr=NULL;wms_gw_alphabet_e_type tp_dcs=
-WMS_GW_ALPHABET_MAX32;int i=(0x1bb8+2836-0x26cc);int ind=(0x185+632-0x3fd);if((
+WMS_GW_ALPHABET_MAX32;int i=(0x957+2189-0x11e4);int ind=(0x168+1037-0x575);if((
 NULL==ts_data_ptr)||(NULL==db_data)){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74\x73\x2e");return ZUFI_FAIL
 ;}address_ptr=&(ts_data_ptr->u.gw_pp.u.deliver.address);if(
 WMS_NUMBER_INTERNATIONAL==address_ptr->number_type){memset(db_data->number,
-(0x1ec3+1438-0x2461),ZTE_WMS_ADDRESS_LEN_MAX+(0xa22+5734-0x2087));db_data->
-number[(0x1277+5161-0x26a0)]=((char)(0x752+5569-0x1ce8));for(i=
-(0x59b+2736-0x104b);i<address_ptr->number_of_digits;i++){if((0xeaa+674-0x1142)==
-address_ptr->digits[i]){db_data->number[i+(0xde1+3980-0x1d6c)]=
-((char)(0x11f6+2004-0x199a));}else{db_data->number[i+(0xb97+6162-0x23a8)]=
-((char)(0xbd1+2867-0x16d4))+address_ptr->digits[i];}}}else if(
-WMS_NUMBER_ALPHANUMERIC==address_ptr->number_type){memcpy(db_data->number,
-address_ptr->digits,address_ptr->number_of_digits);}else{if(address_ptr->
-digit_mode==WMS_DIGIT_MODE_8_BIT){memcpy(&(db_data->number[(0x1f66+322-0x20a7)])
-,address_ptr->digits,address_ptr->number_of_digits);}else{for(i=
-(0x10c9+5164-0x24f5);i<address_ptr->number_of_digits;i++){if(
-(0x1484+3390-0x21b8)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0x5fb+6100-0x1d9f));}else{db_data->number[i]=((char)(0x5d3+4173-0x15f0))
+(0x9b+3141-0xce0),ZTE_WMS_ADDRESS_LEN_MAX+(0x116d+2061-0x1979));db_data->number[
+(0x2b2+4796-0x156e)]=((char)(0x810+6257-0x2056));for(i=(0x298+3271-0xf5f);i<
+address_ptr->number_of_digits;i++){if((0x18a+7470-0x1eae)==address_ptr->digits[i
+]){db_data->number[i+(0x13f+8913-0x240f)]=((char)(0x629+6088-0x1dc1));}else{
+db_data->number[i+(0xe4d+3964-0x1dc8)]=((char)(0x4dd+7364-0x2171))+address_ptr->
+digits[i];}}}else if(WMS_NUMBER_ALPHANUMERIC==address_ptr->number_type){memcpy(
+db_data->number,address_ptr->digits,address_ptr->number_of_digits);}else{if(
+address_ptr->digit_mode==WMS_DIGIT_MODE_8_BIT){memcpy(&(db_data->number[
+(0x36c+7690-0x2175)]),address_ptr->digits,address_ptr->number_of_digits);}else{
+for(i=(0x1139+1114-0x1593);i<address_ptr->number_of_digits;i++){if(
+(0x902+4791-0x1baf)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0x219+3557-0xfce));}else{db_data->number[i]=((char)(0x1cec+1340-0x21f8))
 +address_ptr->digits[i];}}}}(void)zUfiSms_UtilTimeStamp(ts_data_ptr->u.gw_pp.u.
 deliver.timestamp,db_data->tp_scts,&db_data->julian_date);if(ts_data_ptr->u.
-gw_pp.u.deliver.user_data_header_present){db_data->tp_udhi=(0x32b+1176-0x7c2);}
-else{db_data->tp_udhi=(0x2d3+379-0x44e);}if(db_data->tp_udhi==
-(0x4e9+5414-0x1a0e)){for(ind=(0x1904+1477-0x1ec9);ind<ts_data_ptr->u.gw_pp.u.
+gw_pp.u.deliver.user_data_header_present){db_data->tp_udhi=(0xa73+1188-0xf16);}
+else{db_data->tp_udhi=(0x174d+924-0x1ae9);}if(db_data->tp_udhi==
+(0x185b+1394-0x1dcc)){for(ind=(0x159+2996-0xd0d);ind<ts_data_ptr->u.gw_pp.u.
 deliver.user_data.num_headers;ind++){result=zUfiSms_ParseUdhiData(&(ts_data_ptr
 ->u.gw_pp.u.deliver.user_data.headers[ind]),db_data);if(
-ZTE_WMS_CONCAT_SMS_COUNT_MAX<db_data->concat_info[(0x1325+1432-0x18bc)]){printf(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<db_data->concat_info[(0x126d+4121-0x2285)]){printf(
 "\x74\x68\x65\x20\x63\x6f\x6e\x63\x61\x74\x20\x73\x6d\x73\x20\x73\x65\x67\x6d\x65\x6e\x74\x20\x69\x73\x20\x25\x64\x2c\x61\x6e\x64\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x65\x6e\x20\x74\x68\x65\x20\x20\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x20\x25\x64\x20\x73\x65\x67\x6d\x65\x6e\x74\x73\x2c\x73\x6f\x20\x64\x69\x64\x20\x6e\x6f\x74\x20\x64\x65\x61\x6c\x20\x74\x68\x65\x20\x63\x6f\x6e\x63\x61\x74\x20\x73\x6d\x73\x2e\x20"
-,db_data->concat_info[(0x43+9379-0x24e5)],ZTE_WMS_CONCAT_SMS_COUNT_MAX);if(
+,db_data->concat_info[(0x5d5+5703-0x1c1b)],ZTE_WMS_CONCAT_SMS_COUNT_MAX);if(
 WMS_STORAGE_TYPE_NV_V01==db_data->mem_store){zUfiSms_DelModemSms(db_data->index)
 ;}result=ZUFI_FAIL;}}}tp_dcs=ts_data_ptr->u.gw_pp.u.deliver.dcs.alphabet;db_data
 ->sms_class=ts_data_ptr->u.gw_pp.u.deliver.dcs.msg_class;if(
 WMS_GW_ALPHABET_8_BIT>=tp_dcs){db_data->tp_dcs=(unsigned char)
-(0x1bfb+167-0x1ca1);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
-unsigned char)(0x165+996-0x547);}else{printf(
+(0x1d94+1178-0x222d);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
+unsigned char)(0x19e5+1395-0x1f56);}else{printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x74\x70\x5f\x64\x63\x73\x3d\x25\x64",tp_dcs);}
 db_data->tp_pid=(unsigned char)ts_data_ptr->u.gw_pp.u.deliver.pid;if(ts_data_ptr
 ->u.gw_pp.u.deliver.dcs.alphabet==WMS_GW_ALPHABET_UCS2){result=
 zUfiSms_DispatchWtoi(ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data,
 ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_len,db_data->sms_content);db_data->
 alphabet=WMS_GW_ALPHABET_UCS2;}else if(ts_data_ptr->u.gw_pp.u.deliver.dcs.
-alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x5a2+6624-0x1f82);ind<ts_data_ptr->u.
-gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[(0x4c7+8739-0x26e6)
-*ind]=((char)(0x165f+755-0x1922));db_data->sms_content[(0x286+2004-0xa56)*ind+
-(0x1096+2478-0x1a43)]=((char)(0x63+4661-0x1268));db_data->sms_content[
-(0x372+789-0x683)*ind+(0xbdc+3345-0x18eb)]=g_zUfiSms_DigAscMap[((ts_data_ptr->u.
-gw_pp.u.deliver.user_data.sm_data[ind]&(0xa65+6910-0x2473))>>(0xc82+581-0xec3))]
-;db_data->sms_content[(0x3da+3683-0x1239)*ind+(0x159f+4456-0x2704)]=
+alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x22aa+932-0x264e);ind<ts_data_ptr->u.
+gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[(0x10bd+535-0x12d0)
+*ind]=((char)(0x1966+2545-0x2327));db_data->sms_content[(0x920+6007-0x2093)*ind+
+(0x1672+3854-0x257f)]=((char)(0x913+4640-0x1b03));db_data->sms_content[
+(0x8a4+6034-0x2032)*ind+(0x332+4791-0x15e7)]=g_zUfiSms_DigAscMap[((ts_data_ptr->
+u.gw_pp.u.deliver.user_data.sm_data[ind]&(0x3b4+5158-0x16ea))>>(0xba0+769-0xe9d)
+)];db_data->sms_content[(0x853+1563-0xe6a)*ind+(0x2b7+1437-0x851)]=
 g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data[ind]&
-(0x1433+4679-0x266b))];db_data->alphabet=WMS_GW_ALPHABET_UCS2;}}else if(
+(0x34d+8992-0x265e))];db_data->alphabet=WMS_GW_ALPHABET_UCS2;}}else if(
 ts_data_ptr->u.gw_pp.u.deliver.dcs.alphabet==WMS_GW_ALPHABET_7_BIT_DEFAULT){
 result=zUfiSms_DispatchWtoi(ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data,
 ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_len,db_data->sms_content);db_data->
 alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;db_data->tp_dcs=(unsigned char)
-(0xf6+7047-0x1c7b);}return result;}int zUfiSms_FormatSubmitDbdata(
+(0x37+8497-0x2166);}return result;}int zUfiSms_FormatSubmitDbdata(
 T_zUfiSms_ClientTsData*ts_data_ptr,T_zUfiSms_DbStoreData*db_data){int result=
 ZUFI_SUCC;wms_address_s_type*address_ptr=NULL;wms_gw_alphabet_e_type tp_dcs=
-WMS_GW_ALPHABET_MAX32;int i=(0xc47+3357-0x1964);int ind=(0x6af+7603-0x2462);if((
-NULL==ts_data_ptr)||(NULL==db_data)){printf(
+WMS_GW_ALPHABET_MAX32;int i=(0xa78+1770-0x1162);int ind=(0x1513+4063-0x24f2);if(
+(NULL==ts_data_ptr)||(NULL==db_data)){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x69\x6e\x70\x75\x74\x73\x2e");return ZUFI_FAIL
 ;}address_ptr=&(ts_data_ptr->u.gw_pp.u.submit.address);if((
 WMS_NUMBER_INTERNATIONAL==address_ptr->number_type)){db_data->number[
-(0x1259+2081-0x1a7a)]=((char)(0xcda+981-0x1084));for(i=(0x17a8+172-0x1854);i<
-address_ptr->number_of_digits;i++){if((0x17e8+1265-0x1ccf)==address_ptr->digits[
-i]){db_data->number[i+(0x1b3b+1440-0x20da)]=((char)(0x1787+3546-0x2531));}else{
-db_data->number[i+(0x2bb+853-0x60f)]=((char)(0x732+2653-0x115f))+address_ptr->
-digits[i];}}}else{for(i=(0x203d+1573-0x2662);i<address_ptr->number_of_digits;i++
-){if((0x1eb4+1947-0x2645)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0xdc4+1927-0x151b));}else{db_data->number[i]=
-((char)(0x1628+2732-0x20a4))+address_ptr->digits[i];}}}tp_dcs=ts_data_ptr->u.
-gw_pp.u.submit.dcs.alphabet;db_data->sms_class=ts_data_ptr->u.gw_pp.u.submit.dcs
-.msg_class;if(WMS_GW_ALPHABET_8_BIT>=tp_dcs){db_data->tp_dcs=(unsigned char)
-(0x844+3534-0x1611);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
-unsigned char)(0x1fbd+488-0x21a3);}else{printf(
+(0xec+7126-0x1cc2)]=((char)(0x1534+385-0x168a));for(i=(0x703+6079-0x1ec2);i<
+address_ptr->number_of_digits;i++){if((0x377+6518-0x1ce3)==address_ptr->digits[i
+]){db_data->number[i+(0x889+4344-0x1980)]=((char)(0xff6+5626-0x25c0));}else{
+db_data->number[i+(0x63c+1717-0xcf0)]=((char)(0x8b6+4060-0x1862))+address_ptr->
+digits[i];}}}else{for(i=(0x755+2247-0x101c);i<address_ptr->number_of_digits;i++)
+{if((0x1552+3341-0x2255)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0xb94+3675-0x19bf));}else{db_data->number[i]=((char)(0x4e0+1199-0x95f))+
+address_ptr->digits[i];}}}tp_dcs=ts_data_ptr->u.gw_pp.u.submit.dcs.alphabet;
+db_data->sms_class=ts_data_ptr->u.gw_pp.u.submit.dcs.msg_class;if(
+WMS_GW_ALPHABET_8_BIT>=tp_dcs){db_data->tp_dcs=(unsigned char)
+(0x11da+5147-0x25f4);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
+unsigned char)(0x111c+4490-0x22a4);}else{printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x74\x70\x5f\x64\x63\x73\x3d\x25\x64",tp_dcs);}
 db_data->tp_pid=(unsigned char)ts_data_ptr->u.gw_pp.u.submit.pid;db_data->
 msg_ref=(unsigned char)ts_data_ptr->u.gw_pp.u.submit.message_reference;if(
 ts_data_ptr->u.gw_pp.u.submit.user_data_header_present){db_data->tp_udhi=
-(0x2086+728-0x235d);}else{db_data->tp_udhi=(0x1778+1248-0x1c58);}if(db_data->
-tp_udhi==(0xfcd+3015-0x1b93)){for(ind=(0x21c4+259-0x22c7);ind<ts_data_ptr->u.
+(0x166+944-0x515);}else{db_data->tp_udhi=(0xb7b+4539-0x1d36);}if(db_data->
+tp_udhi==(0x369+3154-0xfba)){for(ind=(0xa94+2329-0x13ad);ind<ts_data_ptr->u.
 gw_pp.u.submit.user_data.num_headers;ind++){result=zUfiSms_ParseUdhiData(&(
 ts_data_ptr->u.gw_pp.u.submit.user_data.headers[ind]),db_data);if(
-ZTE_WMS_CONCAT_SMS_COUNT_MAX<db_data->concat_info[(0x849+1892-0xfac)]){printf(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<db_data->concat_info[(0x1900+3407-0x264e)]){printf(
 "\x74\x68\x65\x20\x63\x6f\x6e\x63\x61\x74\x20\x73\x6d\x73\x20\x73\x65\x67\x6d\x65\x6e\x74\x20\x69\x73\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x65\x6e\x20\x74\x68\x65\x20\x20\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x20\x73\x65\x67\x6d\x65\x6e\x74\x73\x2c\x73\x6f\x20\x64\x69\x64\x20\x6e\x6f\x74\x20\x64\x65\x61\x6c\x20\x74\x68\x65\x20\x63\x6f\x6e\x63\x61\x74\x20\x73\x6d\x73\x2e"
 );if(WMS_STORAGE_TYPE_NV_V01==db_data->mem_store){zUfiSms_DelModemSms(db_data->
 index);}result=ZUFI_FAIL;}}}if(ts_data_ptr->u.gw_pp.u.submit.dcs.alphabet==
 WMS_GW_ALPHABET_UCS2){result=zUfiSms_DispatchWtoi(ts_data_ptr->u.gw_pp.u.submit.
 user_data.sm_data,ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len,db_data->
 sms_content);db_data->alphabet=WMS_GW_ALPHABET_UCS2;}else if(ts_data_ptr->u.
-gw_pp.u.submit.dcs.alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x9cb+420-0xb6f);
+gw_pp.u.submit.dcs.alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0xa9f+2730-0x1549);
 ind<ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len;ind++){db_data->sms_content[
-(0xc23+1483-0x11ea)*ind]=((char)(0x360+1382-0x896));db_data->sms_content[
-(0x1eef+2071-0x2702)*ind+(0x20e6+146-0x2177)]=((char)(0x56d+738-0x81f));db_data
-->sms_content[(0x187c+2118-0x20be)*ind+(0x53c+1928-0xcc2)]=g_zUfiSms_DigAscMap[(
-(ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&(0xd31+4870-0x1f47))>>
-(0x540+2148-0xda0))];db_data->sms_content[(0xd86+4555-0x1f4d)*ind+
-(0x26+2947-0xba6)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.submit.user_data.
-sm_data[ind]&(0x123b+4105-0x2235))];db_data->alphabet=WMS_GW_ALPHABET_UCS2;}}
-else if(ts_data_ptr->u.gw_pp.u.submit.dcs.alphabet==
+(0x620+5403-0x1b37)*ind]=((char)(0x16ed+1250-0x1b9f));db_data->sms_content[
+(0x887+6513-0x21f4)*ind+(0x6b3+5165-0x1adf)]=((char)(0x9ab+3213-0x1608));db_data
+->sms_content[(0x6bb+6740-0x210b)*ind+(0x1fa7+496-0x2195)]=g_zUfiSms_DigAscMap[(
+(ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&(0x19f8+1468-0x1ec4))>>
+(0x56a+4632-0x177e))];db_data->sms_content[(0x97+9288-0x24db)*ind+
+(0x1468+1838-0x1b93)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.submit.
+user_data.sm_data[ind]&(0xd8d+2423-0x16f5))];db_data->alphabet=
+WMS_GW_ALPHABET_UCS2;}}else if(ts_data_ptr->u.gw_pp.u.submit.dcs.alphabet==
 WMS_GW_ALPHABET_7_BIT_DEFAULT){result=zUfiSms_DispatchWtoi(ts_data_ptr->u.gw_pp.
 u.submit.user_data.sm_data,ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len,
 db_data->sms_content);db_data->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;db_data->
-tp_dcs=(unsigned char)(0xd08+187-0xdc1);}return result;}int InvertNumbers(const 
+tp_dcs=(unsigned char)(0x37+85-0x8a);}return result;}int InvertNumbers(const 
 char*pSrc,char*pDst,int nSrcLength){int nDstLength;char ch;int i=
-(0xaaf+6219-0x22fa);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x19d+2627-0xbe0)){
-return-(0x1dd+2840-0xcf4);}nDstLength=nSrcLength;for(i=(0x1ddc+2295-0x26d3);i<
-nSrcLength;i+=(0x283+635-0x4fc)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
-nSrcLength&(0x567+932-0x90a)){*(pDst-(0x1749+529-0x1958))=
-((char)(0xe64+6120-0x2606));nDstLength++;}*pDst='\0';return nDstLength;}int 
+(0x870+893-0xbed);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x113f+1064-0x1567)){
+return-(0x1859+2228-0x210c);}nDstLength=nSrcLength;for(i=(0x125f+1655-0x18d6);i<
+nSrcLength;i+=(0x1fc+6211-0x1a3d)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
+nSrcLength&(0x8b4+1024-0xcb3)){*(pDst-(0x898+5798-0x1f3c))=
+((char)(0x2046+1143-0x2477));nDstLength++;}*pDst='\0';return nDstLength;}int 
 code_is_gsm7(const SMS_PARAM*pSrc,unsigned char buf[],int nLength){if(pSrc->
-TP_UDHI==(0xfb2+391-0x1138)){buf[(0xeb+9686-0x26be)]=(unsigned char)nLength;buf[
-(0xa40+2485-0x13f1)]=(unsigned char)pSrc->TP_UD[(0x833+2100-0x1067)];buf[
-(0x617+6877-0x20ef)]=(0x1549+2034-0x1d3b);buf[(0x11c6+4728-0x2438)]=(unsigned 
-char)pSrc->TP_UD[(0x189+6839-0x1c3e)];buf[(0x1ad8+2898-0x2623)]=(unsigned char)
-pSrc->TP_UD[(0xeba+5151-0x22d6)];buf[(0x1162+253-0x1257)]=(unsigned char)pSrc->
-TP_UD[(0x62c+132-0x6ac)];buf[(0x7f5+4439-0x1943)]=(unsigned char)pSrc->TP_UD[
-(0x1778+2871-0x22aa)];buf[(0xe61+2551-0x184e)]=(unsigned char)pSrc->TP_UD[
-(0x15c4+1344-0x1afd)];buf[(0xc9b+5104-0x2081)]=(unsigned char)(buf[
-(0x438+4282-0x14e8)]<<(0x1a6d+1646-0x20da));nLength=nLength-(0x190+6645-0x1b7e);
-nLength=Encode7bit(&(pSrc->TP_UD[(0x790+4717-0x19f5)]),&buf[(0x295+930-0x62c)],
-nLength+(0x8d9+4409-0x1a11))+(0x1e59+785-0x2166)+(0x232+3535-0xffb);
-#if (0xc2+5538-0x1664)
-nLength+=(0xe94+451-0x1055);
+TP_UDHI==(0x184c+687-0x1afa)){buf[(0x226+6634-0x1c0d)]=(unsigned char)nLength;
+buf[(0x114d+861-0x14a6)]=(unsigned char)pSrc->TP_UD[(0x690+5741-0x1cfd)];buf[
+(0x2444+252-0x253b)]=(0x16f9+2568-0x2101);buf[(0x1b7d+1057-0x1f98)]=(unsigned 
+char)pSrc->TP_UD[(0x18c4+1675-0x1f4d)];buf[(0xde9+1174-0x1278)]=(unsigned char)
+pSrc->TP_UD[(0x1564+3481-0x22fa)];buf[(0x96f+6621-0x2344)]=(unsigned char)pSrc->
+TP_UD[(0x1da9+2061-0x25b2)];buf[(0x1da5+460-0x1f68)]=(unsigned char)pSrc->TP_UD[
+(0x3d2+2499-0xd90)];buf[(0xb39+1433-0x10c8)]=(unsigned char)pSrc->TP_UD[
+(0x74f+318-0x886)];buf[(0xee1+292-0xffb)]=(unsigned char)(buf[
+(0x1775+3996-0x2707)]<<(0x11db+1441-0x177b));nLength=nLength-(0x1e51+782-0x2158)
+;nLength=Encode7bit(&(pSrc->TP_UD[(0x7cd+3404-0x1511)]),&buf[(0xc51+1646-0x12b4)
+],nLength+(0xc7d+5987-0x23df))+(0xf43+2129-0x1790)+(0xd4d+3620-0x1b6b);
+#if (0x167+3267-0xe2a)
+nLength+=(0x24a+3513-0x1001);
 #endif

-}else{nLength=pSrc->TP_UDLength;buf[(0x1bf4+2812-0x26ed)]=nLength;nLength=
-Encode7bit(pSrc->TP_UD,&buf[(0x1c7b+607-0x1ed6)],nLength+(0xf0f+3035-0x1ae9))+
-(0x8+6358-0x18da);}at_print(LOG_DEBUG,
+}else{nLength=pSrc->TP_UDLength;buf[(0xa8a+1903-0x11f6)]=nLength;nLength=
+Encode7bit(pSrc->TP_UD,&buf[(0x16e1+748-0x19c9)],nLength+(0x14a2+2314-0x1dab))+
+(0xa1f+7262-0x2679);}at_print(LOG_DEBUG,
 "\x62\x75\x66\x20\x69\x73\x20\x25\x73" "\n",buf);return nLength;}int 
 code_is_ucs2(const SMS_PARAM*pSrc,unsigned char buf[],int nLength){nLength=
-strlen(pSrc->TP_UD);if(pSrc->TP_UDHI==(0x1281+1308-0x179c)){buf[
-(0x7b6+7404-0x249f)]=(unsigned char)nLength;buf[(0x182d+3331-0x252c)]=(unsigned 
-char)pSrc->TP_UD[(0x22d6+499-0x24c9)];buf[(0x96f+2963-0x14fd)]=
-(0x6f7+7586-0x2499);buf[(0xd70+1198-0x1218)]=(unsigned char)pSrc->TP_UD[
-(0x768+2401-0x10c7)];buf[(0x94d+642-0xbc8)]=(unsigned char)pSrc->TP_UD[
-(0x60a+5886-0x1d05)];buf[(0x146f+1850-0x1ba1)]=(unsigned char)pSrc->TP_UD[
-(0x381+4820-0x1651)];buf[(0x90c+2220-0x11af)]=(unsigned char)pSrc->TP_UD[
-(0x1952+1241-0x1e26)];buf[(0x381+3899-0x12b9)]=(unsigned char)(EncodeUcs2(&(pSrc
-->TP_UD[(0x1967+104-0x19c9)]),&buf[(0xf74+1330-0x149c)],nLength-
-(0x99+5063-0x145a))+(0x86d+756-0xb5b));nLength=buf[(0x109+494-0x2f4)]+
-(0x2cc+2837-0xddd);}else{buf[(0x86a+4614-0x1a6d)]=EncodeUcs2(pSrc->TP_UD,&buf[
-(0x138+6366-0x1a12)],nLength);nLength=buf[(0x18bd+364-0x1a26)]+(0x989+145-0xa16)
-;}return nLength;}int Encode8bit(const char*pSrc,unsigned char*pDst,int 
-nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x443+5717-0x1a98)){return-
-(0x54c+194-0x60d);}memcpy(pDst,pSrc,nSrcLength);return nSrcLength;}int 
-EncodePdu_Submit(const SMS_PARAM*pSrc,char*pDst){int nLength=(0xca8+4923-0x1fe3)
-;int nDstLength=(0x1093+2691-0x1b16);unsigned char buf[(0x2bd+8805-0x2422)]={
-(0x4d4+756-0x7c8)};char tmpSCA[(0x243b+169-0x24c0)]={(0xb49+634-0xdc3)};int 
-check_udl=(0x4fa+759-0x7f1);memset(tmpSCA,(0x5f4+5952-0x1d34),sizeof(tmpSCA));if
-(pSrc==NULL||pDst==NULL){return-(0xdad+2713-0x1845);}
-#if (0x14e7+3849-0x23ef)
+strlen(pSrc->TP_UD);if(pSrc->TP_UDHI==(0x235c+171-0x2406)){buf[
+(0x925+1307-0xe3d)]=(unsigned char)nLength;buf[(0x149f+3349-0x21b0)]=(unsigned 
+char)pSrc->TP_UD[(0x1e8f+1338-0x23c9)];buf[(0x16ab+559-0x18d5)]=
+(0xa39+1629-0x1096);buf[(0x698+7215-0x22c1)]=(unsigned char)pSrc->TP_UD[
+(0xc1f+5027-0x1fc0)];buf[(0x1f9+4682-0x143c)]=(unsigned char)pSrc->TP_UD[
+(0x476+6298-0x1d0d)];buf[(0x1fc5+1370-0x2517)]=(unsigned char)pSrc->TP_UD[
+(0x1e04+43-0x1e2b)];buf[(0xbd6+4578-0x1daf)]=(unsigned char)pSrc->TP_UD[
+(0xb17+2374-0x1458)];buf[(0xad3+2198-0x1366)]=(unsigned char)(EncodeUcs2(&(pSrc
+->TP_UD[(0xc8+659-0x355)]),&buf[(0xfd4+3794-0x1e9c)],nLength-(0x1f2f+558-0x2157)
+)+(0x2a4+8187-0x2299));nLength=buf[(0xd10+5415-0x2234)]+(0x251+4101-0x1252);}
+else{buf[(0x1f56+581-0x2198)]=EncodeUcs2(pSrc->TP_UD,&buf[(0x1406+2846-0x1f20)],
+nLength);nLength=buf[(0x10a2+4965-0x2404)]+(0x42+4309-0x1113);}return nLength;}
+int Encode8bit(const char*pSrc,unsigned char*pDst,int nSrcLength){if(pSrc==NULL
+||pDst==NULL||nSrcLength<(0xff3+5290-0x249d)){return-(0xa58+377-0xbd0);}memcpy(
+pDst,pSrc,nSrcLength);return nSrcLength;}int EncodePdu_Submit(const SMS_PARAM*
+pSrc,char*pDst){int nLength=(0x502+205-0x5cf);int nDstLength=
+(0x1012+5603-0x25f5);unsigned char buf[(0xf9b+4434-0x1fed)]={
+(0x1321+2111-0x1b60)};char tmpSCA[(0xccb+1453-0x1254)]={(0x12f2+2838-0x1e08)};
+int check_udl=(0x9b9+6701-0x23e6);memset(tmpSCA,(0x892+4835-0x1b75),sizeof(
+tmpSCA));if(pSrc==NULL||pDst==NULL){return-(0x20b9+1307-0x25d3);}
+#if (0xd57+2375-0x169d)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x20\x45\x6e\x63\x6f\x64\x65\x50\x64\x75\x5f\x53\x75\x62\x6d\x69\x74\x20\x6d\x61\x6b\x65\x20\x70\x64\x75\x20\x64\x61\x74\x61" "\n"
 );printf(
@@ -908,392 +909,392 @@
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x73\x63\x61\x3a\x25\x73" "\n",pSrc->
 SCA);
 #endif

-nLength=strlen(pSrc->SCA);buf[(0x1676+2717-0x2113)]=(char)(((nLength)&
-(0x74d+2592-0x116c))==(0x20c9+1322-0x25f3)?(nLength):nLength+(0x36f+4293-0x1433)
-)/(0xe35+2555-0x182e)+(0xb11+1324-0x103c);buf[(0x1a3a+272-0x1b49)]=
-(0x1b4+2541-0xb20);strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0xdb6+2904-0x190d));
-if(!(strncmp(pSrc->SCA,"\x30\x30\x38\x36",(0x22cd+1083-0x2704)))){memset(tmpSCA,
-(0x12a3+1147-0x171e),sizeof(tmpSCA));nLength=nLength-(0x9b5+357-0xb19);
-#if (0x1516+1395-0x1a88)
-nLength=nLength-(0x928+4640-0x1b47);strncpy(tmpSCA,&(pSrc->SCA[
-(0xea7+2504-0x186d)]),sizeof(tmpSCA)-(0xd43+6207-0x2581));
+nLength=strlen(pSrc->SCA);buf[(0xb38+1236-0x100c)]=(char)(((nLength)&
+(0xc37+2521-0x160f))==(0xe59+5612-0x2445)?(nLength):nLength+(0x1895+873-0x1bfd))
+/(0x230+7443-0x1f41)+(0x765+6898-0x2256);buf[(0xc5c+1311-0x117a)]=
+(0x570+904-0x877);strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0x199a+2171-0x2214));
+if(!(strncmp(pSrc->SCA,"\x30\x30\x38\x36",(0x1f8+5211-0x164f)))){memset(tmpSCA,
+(0xe4f+5682-0x2481),sizeof(tmpSCA));nLength=nLength-(0xc34+1509-0x1218);
+#if (0x795+4695-0x19eb)
+nLength=nLength-(0x51f+4462-0x168c);strncpy(tmpSCA,&(pSrc->SCA[
+(0x9c5+3763-0x1876)]),sizeof(tmpSCA)-(0x1df5+1000-0x21dc));
 #else

-tmpSCA[(0xd34+3938-0x1c96)]=((char)(0x1abf+2876-0x25d0));strcpy(&(tmpSCA[
-(0x17b0+3875-0x26d2)]),&(pSrc->SCA[(0x1c5+7454-0x1ee1)]));
+tmpSCA[(0xf01+2644-0x1955)]=((char)(0xc23+880-0xf68));strcpy(&(tmpSCA[
+(0x3fc+8104-0x23a3)]),&(pSrc->SCA[(0xd31+3387-0x1a6a)]));
 #endif

-buf[(0x393+2463-0xd32)]=(char)((nLength&(0x15f5+1561-0x1c0d))==
-(0xd29+4698-0x1f83)?nLength:nLength+(0x17c4+2361-0x20fc))/(0x1688+3936-0x25e6)+
-(0x21a5+248-0x229c);buf[(0x4bd+6370-0x1d9e)]=(0x1b7b+515-0x1ced);}else if(
-((char)(0x1823+730-0x1ad2))==pSrc->SCA[(0x923+3356-0x163f)]){memset(tmpSCA,
-(0x22e6+305-0x2417),sizeof(tmpSCA));
-#if (0x17e4+1187-0x1c86)
-nLength=nLength-(0x1d2+6086-0x1997);strncpy(tmpSCA,&(pSrc->SCA[
-(0x6f0+8054-0x2665)]),sizeof(tmpSCA)-(0x359+7701-0x216d));
+buf[(0x304+5295-0x17b3)]=(char)((nLength&(0x620+5371-0x1b1a))==
+(0x82f+7153-0x2420)?nLength:nLength+(0x117+1527-0x70d))/(0x1048+4748-0x22d2)+
+(0x1802+1080-0x1c39);buf[(0x11a7+2019-0x1989)]=(0x12a6+217-0x12ee);}else if(
+((char)(0x317+646-0x572))==pSrc->SCA[(0x166+6091-0x1931)]){memset(tmpSCA,
+(0x820+98-0x882),sizeof(tmpSCA));
+#if (0x8b2+2063-0x10c0)
+nLength=nLength-(0xd68+2405-0x16cc);strncpy(tmpSCA,&(pSrc->SCA[
+(0x8e6+7393-0x25c6)]),sizeof(tmpSCA)-(0x18+8554-0x2181));
 #else

 strcpy(tmpSCA,pSrc->SCA);
 #endif

-buf[(0x1653+2242-0x1f15)]=(char)((nLength&(0x315+1565-0x931))==
-(0xd3f+3631-0x1b6e)?(nLength):nLength+(0x45c+6277-0x1ce0))/(0x397+8820-0x2609)+
-(0x687+5330-0x1b58);buf[(0x180+9214-0x257d)]=(0xe40+5045-0x2164);}
-#if (0x78d+944-0xb3c)
+buf[(0x817+6836-0x22cb)]=(char)((nLength&(0xcdc+1612-0x1327))==
+(0x1476+4440-0x25ce)?(nLength):nLength+(0x1d91+1591-0x23c7))/(0x458+763-0x751)+
+(0xa04+3959-0x197a);buf[(0x1100+143-0x118e)]=(0x2a8+8338-0x22a9);}
+#if (0x1327+1514-0x1910)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x32\x3a\x25\x73" "\n",
 pDst);
 #endif

-if(nLength<(0x2e6+9189-0x26ca)||nLength>=sizeof(tmpSCA))return-
-(0x117b+3819-0x2065);nDstLength=Bytes2String(buf,pDst,(0xb3c+3148-0x1786));
+if(nLength<(0x44f+3442-0x11c0)||nLength>=sizeof(tmpSCA))return-
+(0x10af+1139-0x1521);nDstLength=Bytes2String(buf,pDst,(0x1b3d+368-0x1cab));
 nDstLength+=InvertNumbers(tmpSCA,&pDst[nDstLength],nLength);
-#if (0x54c+1874-0xc9d)
+#if (0x138a+2738-0x1e3b)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x33\x3a\x25\x73" "\n",
 pDst);
 #endif

-if(pSrc->TPA[(0x19c8+1822-0x20e6)]==((char)(0x587+5103-0x194b))){nLength=strlen(
-&(pSrc->TPA[(0x2a9+4786-0x155a)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
-TP_UDHI==(0x1922+1467-0x1edd)){if(pSrc->TP_SRR==(0xa98+6767-0x2507)){buf[
-(0x92c+7055-0x24bb)]=(0x5d6+6992-0x2115);}if(pSrc->TP_SRR==(0xb3c+3805-0x1a18)){
-buf[(0xde2+6309-0x2687)]=(0x322+5541-0x1896);}}if(pSrc->TP_UDHI==
-(0x760+4877-0x1a6c)){if(pSrc->TP_SRR==(0xd9d+1759-0x147c)){buf[
-(0x1658+1519-0x1c47)]=(0xbbd+4033-0x1b2d);}if(pSrc->TP_SRR==(0x1a37+2933-0x25ab)
-){buf[(0x406+784-0x716)]=(0x1697+4179-0x2679);}}buf[(0xdc1+3479-0x1b57)]=
-(0x3bf+7204-0x1fe3);buf[(0x7d7+2370-0x1117)]=(char)nLength;if(pSrc->TPA[
-(0x17fa+523-0x1a05)]==((char)(0x16cf+1080-0x1adc))){buf[(0x10bd+4404-0x21ee)]=
-(0x15a5+1653-0x1b89);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
-(0x19a5+644-0x1c25));nDstLength+=InvertNumbers(&(pSrc->TPA[(0x1d56+1522-0x2347)]
-),&pDst[nDstLength],nLength);}else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",
-(0x200c+479-0x21e7)))){buf[(0x917+3085-0x1522)]=(char)nLength-
-(0x6f5+3499-0x149e);buf[(0xc10+2911-0x176c)]=(0x33f+6632-0x1c96);nDstLength+=
-Bytes2String(buf,&pDst[nDstLength],(0x56c+5175-0x199f));nDstLength+=
-InvertNumbers(&(pSrc->TPA[(0x127+9379-0x25c8)]),&pDst[nDstLength],nLength-
-(0x19a5+3083-0x25ae));}else{buf[(0x1d4+6773-0x1c46)]=(0x1913+2034-0x2084);
-nDstLength+=Bytes2String(buf,&pDst[nDstLength],(0x92d+4018-0x18db));nDstLength+=
+if(pSrc->TPA[(0x97c+4516-0x1b20)]==((char)(0xff4+5011-0x235c))){nLength=strlen(&
+(pSrc->TPA[(0xd81+5538-0x2322)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
+TP_UDHI==(0x79+6815-0x1b18)){if(pSrc->TP_SRR==(0x7d2+3148-0x141e)){buf[
+(0x16eb+1907-0x1e5e)]=(0x7d6+1164-0xc51);}if(pSrc->TP_SRR==(0x1bd8+1922-0x2359))
+{buf[(0x6c5+2063-0xed4)]=(0x1848+1763-0x1efa);}}if(pSrc->TP_UDHI==
+(0x692+4915-0x19c4)){if(pSrc->TP_SRR==(0x91c+4869-0x1c21)){buf[
+(0x164b+2172-0x1ec7)]=(0x1379+1918-0x1aa6);}if(pSrc->TP_SRR==(0x363+3718-0x11e8)
+){buf[(0x1833+958-0x1bf1)]=(0xe43+5537-0x2373);}}buf[(0x24c+5305-0x1704)]=
+(0xfd+3232-0xd9d);buf[(0x5a9+3434-0x1311)]=(char)nLength;if(pSrc->TPA[
+(0x7b2+3729-0x1643)]==((char)(0x2532+300-0x2633))){buf[(0x735+4345-0x182b)]=
+(0x5f7+3235-0x1209);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
+(0x37+5187-0x1476));nDstLength+=InvertNumbers(&(pSrc->TPA[(0xa07+1376-0xf66)]),&
+pDst[nDstLength],nLength);}else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",
+(0xfc9+2418-0x1937)))){buf[(0x15bb+1443-0x1b5c)]=(char)nLength-
+(0x1983+2659-0x23e4);buf[(0x17a0+2554-0x2197)]=(0xd42+4191-0x1d10);nDstLength+=
+Bytes2String(buf,&pDst[nDstLength],(0x873+6074-0x2029));nDstLength+=
+InvertNumbers(&(pSrc->TPA[(0x248+8599-0x23dd)]),&pDst[nDstLength],nLength-
+(0x6c+4909-0x1397));}else{buf[(0x728+978-0xaf7)]=(0x1a2b+773-0x1caf);nDstLength
++=Bytes2String(buf,&pDst[nDstLength],(0x5+8968-0x2309));nDstLength+=
 InvertNumbers(pSrc->TPA,&pDst[nDstLength],nLength);}
-#if (0x165f+118-0x16d4)
+#if (0x4ab+5331-0x197d)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x34\x3a\x25\x73" "\n",
 pDst);
 #endif

-nLength=(int)pSrc->TP_UDLength;buf[(0x7dd+5213-0x1c3a)]=pSrc->TP_PID;buf[
-(0x38d+8142-0x235a)]=pSrc->TP_DCS;buf[(0x1090+2316-0x199a)]=pSrc->TP_VP;if(pSrc
-->TP_DCS==CODE_GSM7){nLength=code_is_gsm7(pSrc,buf,nLength);}else if(pSrc->
-TP_DCS==CODE_UCS2){nLength=code_is_ucs2(pSrc,buf,nLength);}else{nLength=strlen(
-pSrc->TP_UD);if(pSrc->TP_UDHI==(0x84a+2513-0x121a)){buf[(0x1b+8207-0x2027)]=(
-unsigned char)nLength;buf[(0x696+4774-0x1938)]=(unsigned char)pSrc->TP_UD[
-(0x7f0+6840-0x22a8)];buf[(0x1072+985-0x1446)]=(0x393+1051-0x7ae);buf[
-(0x6ff+3470-0x1487)]=(unsigned char)pSrc->TP_UD[(0xb0a+4770-0x1daa)];buf[
-(0x1e32+360-0x1f93)]=(unsigned char)pSrc->TP_UD[(0x1211+2861-0x1d3b)];buf[
-(0x13f7+4434-0x2541)]=(unsigned char)pSrc->TP_UD[(0x1701+448-0x18bd)];buf[
-(0xbf1+1357-0x1135)]=(unsigned char)pSrc->TP_UD[(0xa8+6490-0x19fd)];if(nLength-
-(0x2140+1087-0x2579)<=(0x1211+2867-0x1d44)||nLength-(0x616+4761-0x18a9)>=sizeof(
-buf)-(0x5ff+7765-0x244a))return-(0x6fc+4817-0x19cc);buf[(0x662+5429-0x1b94)]=(
-unsigned char)(Encode8bit(&(pSrc->TP_UD[(0x171d+3112-0x233f)]),&buf[
-(0xd39+6498-0x2691)],(unsigned short)(nLength-(0x819+4727-0x1a8a)))+
-(0x2354+958-0x270c));nLength=buf[(0xadc+1607-0x1120)]+(0x2e4+1182-0x77e);}else{
-if(nLength<=(0xca+7070-0x1c68)||nLength>=sizeof(buf)-(0x2cc+2590-0xce6))return-
-(0x2016+608-0x2275);buf[(0x61f+3815-0x1503)]=Encode8bit(pSrc->TP_UD,&buf[
-(0x1b61+1497-0x2136)],nLength);nLength=buf[(0x3d9+1523-0x9c9)]+
-(0xa2c+3906-0x196a);}}check_udl=nLength-(0x20f+855-0x562);nDstLength+=
+nLength=(int)pSrc->TP_UDLength;buf[(0x743+5807-0x1df2)]=pSrc->TP_PID;buf[
+(0x374+5349-0x1858)]=pSrc->TP_DCS;buf[(0xf0b+1739-0x15d4)]=pSrc->TP_VP;if(pSrc->
+TP_DCS==CODE_GSM7){nLength=code_is_gsm7(pSrc,buf,nLength);}else if(pSrc->TP_DCS
+==CODE_UCS2){nLength=code_is_ucs2(pSrc,buf,nLength);}else{nLength=strlen(pSrc->
+TP_UD);if(pSrc->TP_UDHI==(0x162c+1428-0x1bbf)){buf[(0xcda+5983-0x2436)]=(
+unsigned char)nLength;buf[(0x163c+462-0x1806)]=(unsigned char)pSrc->TP_UD[
+(0x14ac+4043-0x2477)];buf[(0xf20+4296-0x1fe3)]=(0xe7+7128-0x1cbf);buf[
+(0x1513+1427-0x1aa0)]=(unsigned char)pSrc->TP_UD[(0x22+6270-0x189e)];buf[
+(0x51b+7022-0x2082)]=(unsigned char)pSrc->TP_UD[(0x23c+4458-0x13a3)];buf[
+(0x8e3+7140-0x24bf)]=(unsigned char)pSrc->TP_UD[(0xbd8+272-0xce4)];buf[
+(0x893+4764-0x1b26)]=(unsigned char)pSrc->TP_UD[(0x16e1+3366-0x2402)];if(nLength
+-(0x28b+6495-0x1be4)<=(0x8ad+4120-0x18c5)||nLength-(0x1b0a+980-0x1ed8)>=sizeof(
+buf)-(0xc0c+3635-0x1a35))return-(0x93+806-0x3b8);buf[(0x136a+4732-0x25e3)]=(
+unsigned char)(Encode8bit(&(pSrc->TP_UD[(0xc05+434-0xdb1)]),&buf[
+(0x31+5676-0x1653)],(unsigned short)(nLength-(0xd9c+3992-0x1d2e)))+
+(0x211c+166-0x21bc));nLength=buf[(0x451+7043-0x1fd1)]+(0x110+2317-0xa19);}else{
+if(nLength<=(0x1a6+7004-0x1d02)||nLength>=sizeof(buf)-(0x15ec+3078-0x21ee))
+return-(0xc6c+2561-0x166c);buf[(0x694+5446-0x1bd7)]=Encode8bit(pSrc->TP_UD,&buf[
+(0x980+2525-0x1359)],nLength);nLength=buf[(0x42b+2179-0xcab)]+
+(0x2125+962-0x24e3);}}check_udl=nLength-(0xb29+3018-0x16ef);nDstLength+=
 Bytes2String(buf,&pDst[nDstLength],nLength);sc_cfg_set(NV_CHECK_UDL,"");if(
-check_udl>(0x8ac+1911-0xf97)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");}
-#if (0x2ad+478-0x48a)
+check_udl>(0x8cc+6323-0x20f3)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");}
+#if (0x1b8+8465-0x22c8)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x20\x45\x6e\x63\x6f\x64\x65\x50\x64\x75\x5f\x53\x75\x62\x6d\x69\x74\x20\x65\x6e\x64\x20\x6d\x61\x6b\x65\x20\x70\x64\x75\x20\x64\x61\x74\x61" "\n"
 );printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x6c\x65\x6e\x3a\x25\x64\x2c\x20\x74\x70\x75\x64\x3a\x25\x73" "\n"
 ,nDstLength,pSrc->TP_UD);
 #endif

-#if (0x1bb+1590-0x7f0)
+#if (0x1684+601-0x18dc)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x35\x3a\x25\x73" "\n",
 pDst);
 #endif

 return nDstLength;}int Decode7bit(const unsigned char*pSrc,char*pDst,int 
 nSrcLength){int nSrc;int nDst;int nByte;unsigned char nLeft;if(pSrc==NULL||pDst
-==NULL||nSrcLength<(0x1364+3466-0x20ee)){return-(0x521+6225-0x1d71);}nSrc=
-(0x624+1260-0xb10);nDst=(0x23d+8861-0x24da);nByte=(0xa6f+1831-0x1196);nLeft=
-(0xa89+605-0xce6);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
-(0x20e3+707-0x2327);nLeft=*pSrc>>((0xdd+5594-0x16b0)-nByte);pDst++;nDst++;nByte
-++;if(nByte==(0x1365+709-0x1623)){*pDst=nLeft;pDst++;nDst++;nByte=
-(0xdba+2426-0x1734);nLeft=(0x1d2f+2499-0x26f2);}pSrc++;nSrc++;}*pDst='\0';return
- nDst;}int DecodePushPdu(const char*pSrcPdu,SMS_PARAM*pDst){int nDstLength=
-(0xec4+2918-0x1a2a);unsigned char tmp=(0xee5+5676-0x2511);int ud_length=
-(0xaab+6738-0x24fd);unsigned char buf[(0x4f9+3088-0x1009)]={(0x10b3+2338-0x19d5)
-};char temp_num[(0x33f+5794-0x197d)]={(0x3e6+3117-0x1013)};unsigned char 
-first_octet=(0xafd+3548-0x18d9);unsigned char udhl=(0x684+1080-0xabc);unsigned 
-int halftmp=(0x1de8+1759-0x24c7);char tp_ra[(0x37b+2917-0xedd)]={
-(0x1003+2107-0x183e)};int tmplen=(0x7d6+2247-0x109d);unsigned char IEIDL;int 
-pushType=(0x22c2+1001-0x26ab);const char*pSrc=pSrcPdu;if(pSrcPdu==NULL||pDst==
+==NULL||nSrcLength<(0x83a+5392-0x1d4a)){return-(0x184b+2617-0x2283);}nSrc=
+(0x5dd+6814-0x207b);nDst=(0xa4b+1727-0x110a);nByte=(0xccc+3237-0x1971);nLeft=
+(0x1a6d+368-0x1bdd);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
+(0xe69+6132-0x25de);nLeft=*pSrc>>((0x1d0+3677-0x1026)-nByte);pDst++;nDst++;nByte
+++;if(nByte==(0x5ea+6515-0x1f56)){*pDst=nLeft;pDst++;nDst++;nByte=
+(0x3e1+5461-0x1936);nLeft=(0xff9+3506-0x1dab);}pSrc++;nSrc++;}*pDst='\0';return 
+nDst;}int DecodePushPdu(const char*pSrcPdu,SMS_PARAM*pDst){int nDstLength=
+(0x179+1754-0x853);unsigned char tmp=(0x5dd+2604-0x1009);int ud_length=
+(0x7c0+1511-0xda7);unsigned char buf[(0x166d+618-0x17d7)]={(0x57c+1378-0xade)};
+char temp_num[(0x275+1492-0x7e5)]={(0x719+1358-0xc67)};unsigned char first_octet
+=(0x12d7+3800-0x21af);unsigned char udhl=(0x40b+6488-0x1d63);unsigned int 
+halftmp=(0x1487+3626-0x22b1);char tp_ra[(0xb41+5417-0x2067)]={
+(0x1b56+1039-0x1f65)};int tmplen=(0x52c+5076-0x1900);unsigned char IEIDL;int 
+pushType=(0x43d+5613-0x1a2a);const char*pSrc=pSrcPdu;if(pSrcPdu==NULL||pDst==
 NULL){printf(
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x70\x61\x72\x61\x20\x6e\x75\x6c\x6c\x2e\x20" "\n"
-);return-(0x17ed+2125-0x2039);}String2Bytes(pSrc,&tmp,(0xaea+3237-0x178d));
+);return-(0x1865+951-0x1c1b);}String2Bytes(pSrc,&tmp,(0x367+3762-0x1217));
 at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x74\x6d\x70\x20\x3d\x20\x25\x64\x2e" "\n"
-,tmp);if(tmp==(0x517+8308-0x258b)){pSrc+=(0x140c+467-0x15dd);}else{tmp=(tmp-
-(0xc0f+1901-0x137b))*(0xe53+1852-0x158d);pSrc+=(0x782+783-0xa8d);if(tmp>
-(0x1c9+912-0x539)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x12bd+822-0x15d3));tmp=
-(0x352+5351-0x1819);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=tmp;}
-String2Bytes(pSrc,&tmp,(0x7f+7876-0x1f41));first_octet=tmp;pSrc+=
-(0x508+6740-0x1f5a);String2Bytes(pSrc,&tmp,(0x82+2599-0xaa7));halftmp=tmp;if(tmp
-&(0x723+8029-0x267f))tmp+=(0x1221+4865-0x2521);pSrc+=(0xaa4+5906-0x21b4);memset(
-tp_ra,(0x4c8+4904-0x17f0),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
-(0x811+4045-0x17dc));pSrc+=(0x2391+277-0x24a4);if((tp_ra[(0x16d4+3874-0x25f6)]&
-(0x10b3+5272-0x24fb))==(0x4d9+5846-0x1b5f)){char tempra[(0xdb3+2212-0x15d7)];
-char acAsc[(0x1384+2614-0x1d3a)];if(halftmp>=(0x96a+6166-0x2172)){halftmp=(tmp/
-(0x1b6d+116-0x1bdf))/(0x1165+2154-0x19c8)+(tmp/(0x7cb+5201-0x1c1a));}else{
-halftmp=tmp/(0x574+5025-0x1913);}memset(tempra,(0xbf3+6064-0x23a3),sizeof(tempra
-));memcpy(tempra,pSrc,tmp);memset(acAsc,(0x803+7495-0x254a),sizeof(acAsc));
-nDstLength=String2Bytes(tempra,buf,halftmp&(0xbb4+3291-0x1888)?(int)halftmp*
-(0x1631+1159-0x1ab1)/(0x7f4+3551-0x15cf)+(0x1603+1446-0x1ba7):(int)halftmp*
-(0x12f9+2302-0x1bf0)/(0x10d4+4106-0x20da));halftmp=Decode7bit(buf,acAsc,
-nDstLength);memset(pDst->TPA,(0xca2+5926-0x23c8),sizeof(pDst->TPA));if(halftmp>
-(0x1fd0+641-0x2231)){memcpy(pDst->TPA,acAsc,(0x9c1+3258-0x165b));tmp=
-(0x2464+681-0x26ed);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
-(0xd9d+243-0xe70)){SerializeNumbers_sms(pSrc,pDst->TPA,(0x19aa+1341-0x1ec7));}
-else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0x76a+606-0x9c8)]&
-(0x211+2928-0xcf0))==(0x982+5093-0x1cd6)){memset(temp_num,(0x709+2468-0x10ad),
-sizeof(temp_num));if(pDst->TPA[(0x6db+7045-0x2260)]!=((char)(0x615+7082-0x2194))
-){snprintf(temp_num,sizeof(temp_num),"\x25\x73\x25\x73","\x2b",pDst->TPA);if(
-strlen(temp_num)>(0x1326+1450-0x18b0)){snprintf(pDst->TPA,sizeof(pDst->TPA),
-"\x25\x33\x32\x73",temp_num);}else{snprintf(pDst->TPA,sizeof(pDst->TPA),
-"\x25\x73",temp_num);}}}}pSrc+=tmp;String2Bytes(pSrc,(unsigned char*)&pDst->
-TP_PID,(0x2069+1201-0x2518));pSrc+=(0x1d1a+459-0x1ee3);String2Bytes(pSrc,(
-unsigned char*)&pDst->TP_DCS,(0x945+2614-0x1379));pSrc+=(0xbec+4473-0x1d63);
-SerializeNumbers_sms(pSrc,pDst->TP_SCTS,(0x1e2+3014-0xd9a));pSrc+=
-(0xbc1+2676-0x1627);String2Bytes(pSrc,&tmp,(0x2597+247-0x268c));pSrc+=
-(0x15d7+668-0x1871);memset(pDst->TP_UD,(0xfc2+2677-0x1a37),sizeof(pDst->TP_UD));
-at_print(LOG_DEBUG,
+,tmp);if(tmp==(0x65f+4771-0x1902)){pSrc+=(0x1a5b+2507-0x2424);}else{tmp=(tmp-
+(0xa7a+1442-0x101b))*(0xc1f+4268-0x1cc9);pSrc+=(0xd42+1346-0x1280);if(tmp>
+(0x6dc+7549-0x2439)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x134+156-0x1b0));tmp=
+(0x91f+2702-0x138d);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=tmp;}
+String2Bytes(pSrc,&tmp,(0x1282+610-0x14e2));first_octet=tmp;pSrc+=
+(0x11d1+2704-0x1c5f);String2Bytes(pSrc,&tmp,(0x10b6+1878-0x180a));halftmp=tmp;if
+(tmp&(0x15c+8223-0x217a))tmp+=(0x258c+254-0x2689);pSrc+=(0xfa5+274-0x10b5);
+memset(tp_ra,(0x335+2829-0xe42),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
+(0x80+7801-0x1ef7));pSrc+=(0x977+4993-0x1cf6);if((tp_ra[(0x1615+2524-0x1ff1)]&
+(0xac5+5025-0x1e16))==(0x17c5+881-0x1ae6)){char tempra[(0x1c8c+2423-0x2583)];
+char acAsc[(0x13af+4954-0x2689)];if(halftmp>=(0x1fdc+1332-0x2502)){halftmp=(tmp/
+(0xb0d+2778-0x15e5))/(0x1c0c+653-0x1e92)+(tmp/(0x11dc+2365-0x1b17));}else{
+halftmp=tmp/(0x316+2862-0xe42);}memset(tempra,(0x13ec+2750-0x1eaa),sizeof(tempra
+));memcpy(tempra,pSrc,tmp);memset(acAsc,(0x1f20+1727-0x25df),sizeof(acAsc));
+nDstLength=String2Bytes(tempra,buf,halftmp&(0x89d+3359-0x15b5)?(int)halftmp*
+(0x17ba+3162-0x240d)/(0x10f9+4860-0x23f1)+(0x13fa+2581-0x1e0d):(int)halftmp*
+(0xae1+5721-0x2133)/(0x3fc+4972-0x1764));halftmp=Decode7bit(buf,acAsc,nDstLength
+);memset(pDst->TPA,(0x31+7228-0x1c6d),sizeof(pDst->TPA));if(halftmp>
+(0x1c37+229-0x1cfc)){memcpy(pDst->TPA,acAsc,(0x352+7937-0x2233));tmp=
+(0x562+3425-0x12a3);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
+(0x1fb+5324-0x16a7)){SerializeNumbers_sms(pSrc,pDst->TPA,(0x316+8883-0x25a9));}
+else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0xd36+2818-0x1838)]&
+(0xd1d+6583-0x2643))==(0x17e4+74-0x179d)){memset(temp_num,(0x1696+761-0x198f),
+sizeof(temp_num));if(pDst->TPA[(0x885+4743-0x1b0c)]!=
+((char)(0x154c+3931-0x247c))){snprintf(temp_num,sizeof(temp_num),
+"\x25\x73\x25\x73","\x2b",pDst->TPA);if(strlen(temp_num)>(0xbdd+1666-0x123f)){
+snprintf(pDst->TPA,sizeof(pDst->TPA),"\x25\x33\x32\x73",temp_num);}else{snprintf
+(pDst->TPA,sizeof(pDst->TPA),"\x25\x73",temp_num);}}}}pSrc+=tmp;String2Bytes(
+pSrc,(unsigned char*)&pDst->TP_PID,(0xe30+6157-0x263b));pSrc+=
+(0x19c4+1292-0x1ece);String2Bytes(pSrc,(unsigned char*)&pDst->TP_DCS,
+(0xca+340-0x21c));pSrc+=(0x79d+5834-0x1e65);SerializeNumbers_sms(pSrc,pDst->
+TP_SCTS,(0x9e3+2982-0x157b));pSrc+=(0x16b0+1417-0x1c2b);String2Bytes(pSrc,&tmp,
+(0x4b2+6687-0x1ecf));pSrc+=(0xf06+1056-0x1324);memset(pDst->TP_UD,
+(0x53b+5736-0x1ba3),sizeof(pDst->TP_UD));at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x66\x69\x72\x73\x74\x5f\x6f\x63\x74\x65\x74\x20\x3d\x20\x30\x78\x25\x30\x32\x78\x2e" "\n"
-,first_octet);if(first_octet&(0xa3f+4053-0x19d4)){const char*temp=pSrc;unsigned 
+,first_octet);if(first_octet&(0xbcc+521-0xd95)){const char*temp=pSrc;unsigned 
 char pduType;unsigned char wspLen;unsigned char udhLen;unsigned char DestPort1;
 unsigned char DestPort2;unsigned char RefNum1;unsigned char RefNum2;pushType=
-SMS_NO_PUSH;String2Bytes(temp,&udhl,(0x10d6+655-0x1363));temp+=
-(0x1eb1+1446-0x2455);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0x51b+8036-0x247d))
-;at_print(LOG_DEBUG,
+SMS_NO_PUSH;String2Bytes(temp,&udhl,(0x227+2477-0xbd2));temp+=
+(0x13c4+3796-0x2296);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0x1701+3084-0x230b)
+);at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x54\x50\x5f\x49\x45\x49\x20\x3d\x20\x30\x78\x25\x30\x32\x78\x2e" "\n"
-,pDst->TP_IEI);if(pDst->TP_IEI==(0xc36+3692-0x1a9d)){temp+=(0x33c+4699-0x1595)*
-tmplen+(0x6c+5919-0x1789);tmplen=String2Bytes(temp,&DestPort1,
-(0x1676+585-0x18bd));at_print(LOG_DEBUG,
+,pDst->TP_IEI);if(pDst->TP_IEI==(0x26c+6957-0x1d94)){temp+=(0x1b08+1815-0x221d)*
+tmplen+(0x16d0+2151-0x1f35);tmplen=String2Bytes(temp,&DestPort1,
+(0x2074+41-0x209b));at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x44\x65\x73\x74\x50\x6f\x72\x74\x31\x20\x3d\x20\x30\x78\x25\x30\x32\x78\x2e" "\n"
-,DestPort1);temp+=(0x8af+4449-0x1a0e)*tmplen;tmplen=String2Bytes(temp,&DestPort2
-,(0xb43+3948-0x1aad));at_print(LOG_DEBUG,
+,DestPort1);temp+=(0x18cf+309-0x1a02)*tmplen;tmplen=String2Bytes(temp,&DestPort2
+,(0xf44+3750-0x1de8));at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x44\x65\x73\x74\x50\x6f\x72\x74\x32\x20\x3d\x20\x30\x78\x25\x30\x32\x78\x2e" "\n"
-,DestPort2);if((DestPort1==(0xcf2+5710-0x2335))&&((DestPort2==
-(0x778+5627-0x1cef))||(DestPort2==(0x1303+1218-0x1740)))){pushType=SMS_PUSH;}}if
-(SMS_PUSH!=pushType){return pushType;}temp=pSrc+udhl*(0x5f+9597-0x25da)+
-(0xc58+2094-0x1482);tmplen=String2Bytes(temp,&pduType,(0xa3a+1522-0x102a));if(
-pduType==(0xd02+2310-0x1602)){pushType=SMS_PUSH;temp+=(0x8f6+453-0xab7);tmplen=
-String2Bytes(temp,&pduType,(0x1afa+670-0x1d96));if(pduType==(0x26a+1450-0x750)){
-pushType=SMS_NOTIFICATION;}else{temp+=(0x1bda+1774-0x22c4);tmplen=String2Bytes(
-temp,&pduType,(0x26d+709-0x530));if((pduType==(0x16cd+3106-0x222d))||(pduType==
-(0x840+1530-0xd84))){pushType=SMS_BOOTSTRAP;}}}if((pDst->TP_IEI==
-(0x828+2010-0xffe))||(pDst->TP_IEI==(0x14d7+823-0x1809))||(pDst->TP_IEI==
-(0x572+5349-0x1a4f))){temp=pSrc+(0x430+7362-0x20ee);tmplen=String2Bytes(temp,&
-IEIDL,(0x422+7855-0x22cf));if(IEIDL==(udhl-(0x80b+1926-0xf8f))){}else{temp+=
-(0x1443+2061-0x1c4e)*(0x1427+3037-0x1ffe);tmplen=String2Bytes(temp,&udhLen,
-(0xa4b+4616-0x1c51));if(udhLen==(0x578+6038-0x1d0b)){temp+=(0x9d9+3760-0x1887)*
-tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x8d+7557-0x1e10));pDst->TP_ReferNum=
-RefNum1;temp+=(0x11f0+3554-0x1fd0)*tmplen;tmplen=String2Bytes(temp,&pDst->
-TP_AllPieceNum,(0x15c9+1243-0x1aa2));temp+=(0x1923+2878-0x245f)*tmplen;tmplen=
-String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0xcd7+3552-0x1ab5));temp+=
-(0x1481+319-0x15be)*tmplen;}else if(udhLen==(0x34f+2753-0xe0c)){temp+=
-(0x181+2262-0xa55)*tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x2367+847-0x26b4))
-;temp+=(0x1357+2653-0x1db2)*tmplen;tmplen=String2Bytes(temp,&RefNum2,
-(0x31+7823-0x1ebe));int ReferNum=RefNum2+RefNum1*(0xaf3+2114-0x1235);pDst->
-TP_ReferNum=ReferNum;temp+=(0x3ea+3057-0xfd9)*tmplen;tmplen=String2Bytes(temp,&
-pDst->TP_AllPieceNum,(0x166a+2505-0x2031));temp+=(0x9b5+2404-0x1317)*tmplen;
-tmplen=String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x15c4+909-0x194f));temp+=
-(0x1cd9+1352-0x221f)*tmplen;}}}at_print(LOG_DEBUG,
+,DestPort2);if((DestPort1==(0x10a+9541-0x2644))&&((DestPort2==
+(0x201b+880-0x2307))||(DestPort2==(0x1d6f+2154-0x2554)))){pushType=SMS_PUSH;}}if
+(SMS_PUSH!=pushType){return pushType;}temp=pSrc+udhl*(0x2e2+8218-0x22fa)+
+(0xd5+1575-0x6f8);tmplen=String2Bytes(temp,&pduType,(0x337+2237-0xbf2));if(
+pduType==(0x9a5+473-0xb78)){pushType=SMS_PUSH;temp+=(0xd6f+919-0x1102);tmplen=
+String2Bytes(temp,&pduType,(0x557+5623-0x1b4c));if(pduType==(0x114+8739-0x2273))
+{pushType=SMS_NOTIFICATION;}else{temp+=(0x328+6831-0x1dd3);tmplen=String2Bytes(
+temp,&pduType,(0x321+823-0x656));if((pduType==(0x2261+535-0x23b6))||(pduType==
+(0x1c8+7470-0x1e40))){pushType=SMS_BOOTSTRAP;}}}if((pDst->TP_IEI==
+(0x69b+710-0x95d))||(pDst->TP_IEI==(0x133+8012-0x207a))||(pDst->TP_IEI==
+(0x4f3+503-0x6e2))){temp=pSrc+(0xb03+3634-0x1931);tmplen=String2Bytes(temp,&
+IEIDL,(0x98a+60-0x9c4));if(IEIDL==(udhl-(0x77c+7137-0x235b))){}else{temp+=
+(0x1807+1795-0x1f08)*(0x1d61+1840-0x248b);tmplen=String2Bytes(temp,&udhLen,
+(0x417+6219-0x1c60));if(udhLen==(0x90d+5588-0x1ede)){temp+=(0x36a+2710-0xdfe)*
+tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x1133+1917-0x18ae));pDst->TP_ReferNum
+=RefNum1;temp+=(0xd6a+155-0xe03)*tmplen;tmplen=String2Bytes(temp,&pDst->
+TP_AllPieceNum,(0x68c+1600-0xcca));temp+=(0x16f4+3818-0x25dc)*tmplen;tmplen=
+String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x49+4157-0x1084));temp+=
+(0x20e9+140-0x2173)*tmplen;}else if(udhLen==(0xc94+4308-0x1d64)){temp+=
+(0x1493+3999-0x2430)*tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x138+67-0x179));
+temp+=(0x516+8245-0x2549)*tmplen;tmplen=String2Bytes(temp,&RefNum2,
+(0x387+5238-0x17fb));int ReferNum=RefNum2+RefNum1*(0x110d+4620-0x2219);pDst->
+TP_ReferNum=ReferNum;temp+=(0x653+5233-0x1ac2)*tmplen;tmplen=String2Bytes(temp,&
+pDst->TP_AllPieceNum,(0xb04+113-0xb73));temp+=(0xb7a+6948-0x269c)*tmplen;tmplen=
+String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x1983+300-0x1aad));temp+=
+(0xd4a+6448-0x2678)*tmplen;}}}at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x52\x65\x66\x65\x72\x4e\x75\x6d\x20\x3d\x20\x25\x64\x2c\x41\x6c\x6c\x4e\x75\x6d\x20\x3d\x25\x64\x2c\x43\x75\x72\x4e\x75\x6d\x20\x3d\x25\x64\x2e" "\n"
 ,pDst->TP_ReferNum,pDst->TP_AllPieceNum,pDst->TP_CurrentPieceNum);if(
-SMS_NOTIFICATION==pushType){temp=pSrc+udhl*(0x1b0a+761-0x1e01)+
-(0x1eed+209-0x1fb8);tmplen=String2Bytes(temp,&wspLen,(0x5c+9871-0x26e9));temp=
-temp+wspLen*(0x1a7c+2121-0x22c3)+(0x1fa2+973-0x236d);}else{temp=pSrc+udhl*
-(0xe8+2961-0xc77)+(0x4c9+6657-0x1ec8);}nDstLength=((strlen(temp)<sizeof(pDst->
-TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x17b3+2816-0x22b2)));memcpy(pDst->
-TP_UD,temp,nDstLength);at_print(LOG_DEBUG,
+SMS_NOTIFICATION==pushType){temp=pSrc+udhl*(0x1bd3+1712-0x2281)+
+(0xa8b+5401-0x1f9e);tmplen=String2Bytes(temp,&wspLen,(0x101d+2635-0x1a66));temp=
+temp+wspLen*(0x1338+4566-0x250c)+(0x17c4+1753-0x1e9b);}else{temp=pSrc+udhl*
+(0x81f+5122-0x1c1f)+(0x1ac8+2927-0x2635);}nDstLength=((strlen(temp)<sizeof(pDst
+->TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x596+2-0x597)));memcpy(pDst->TP_UD
+,temp,nDstLength);at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x70\x44\x73\x74\x2d\x3e\x54\x50\x5f\x55\x44\x20\x3d\x20\x25\x73\x2e" "\n"
 ,pDst->TP_UD);}at_print(LOG_DEBUG,
 "\x44\x65\x63\x6f\x64\x65\x50\x75\x73\x68\x50\x64\x75\x20\x70\x75\x73\x68\x54\x79\x70\x65\x20\x3d\x20\x25\x64\x2e" "\n"
 ,pushType);return pushType;}static int SerializeNumbers_sms(const char*pSrc,char
-*pDst,int nSrcLength){int nDstLength;char ch;int i=(0xf7c+1248-0x145c);if(pSrc==
-NULL||pDst==NULL||nSrcLength<(0x6f2+3703-0x1569)){return-(0x7d2+1293-0xcde);}
-nDstLength=nSrcLength;for(i=(0xc59+3658-0x1aa3);i<nSrcLength;i+=
-(0x5e7+3851-0x14f0)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
-(0xc33+3212-0x18be))==((char)(0x1381+1081-0x1774))){pDst--;nDstLength--;}*pDst=
+*pDst,int nSrcLength){int nDstLength;char ch;int i=(0x11ea+5385-0x26f3);if(pSrc
+==NULL||pDst==NULL||nSrcLength<(0x1a57+2417-0x23c8)){return-(0xcf1+3349-0x1a05);
+}nDstLength=nSrcLength;for(i=(0x116d+2384-0x1abd);i<nSrcLength;i+=
+(0x300+4875-0x1609)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
+(0x121f+2539-0x1c09))==((char)(0x1dcb+2271-0x2664))){pDst--;nDstLength--;}*pDst=
 '\0';return nDstLength;}UINT16 wms_ts_pack_gw_7_bit_chars(const UINT8*in,UINT16 
-in_len,UINT16 shift,UINT16 out_len_max,UINT8*out){UINT16 i=(0x1102+3406-0x1e50);
-UINT16 pos=(0xcdf+4416-0x1e1f);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+in_len,UINT16 shift,UINT16 out_len_max,UINT8*out){UINT16 i=(0x12c7+4466-0x2439);
+UINT16 pos=(0x188+6385-0x1a79);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x70\x61\x63\x6b\x5f\x67\x77\x5f\x37\x5f\x62\x69\x74\x5f\x63\x68\x61\x72\x73"
-);return(0xfd0+694-0x1286);}shift%=(0x487+2542-0xe6e);if(shift!=
-(0x1fb5+226-0x2097)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0x224+3131-0xe58)-
-shift)+(0x5+4056-0xfdc);if(shift==(0x144f+11-0x1453)){shift=(0xc64+2899-0x17b7);
-i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[pos]=in[i]>>shift;if(i
-+(0x1d5+4598-0x13ca)<in_len){out[pos]|=(UINT8)(in[i+(0xfab+5132-0x23b6)]<<(
-(0x1bcd+1310-0x20e4)-shift));shift++;if(shift==(0x691+435-0x83d)){shift=
-(0xa1d+5689-0x2056);i++;}}}return pos;}UINT8 wms_ts_encode_address(const 
-wms_address_s_type*addr,UINT8*data){UINT8 i,pos=(0x193d+401-0x1ace);if(addr->
-number_of_digits>WMS_GW_ADDRESS_MAX){at_print(LOG_DEBUG,
-"\x41\x64\x64\x72\x20\x6c\x65\x6e\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x20\x25\x64"
-,addr->number_of_digits);return(0x1ac8+626-0x1d3a);}if(addr->number_type==
-WMS_NUMBER_ALPHANUMERIC){data[pos]=(UINT8)((addr->number_of_digits*
-(0xa71+6454-0x23a0)+(0xbad+1284-0x10ae))/(0x1118+104-0x117c));}else{data[pos]=
-addr->number_of_digits;}pos++;data[pos]=(0x37d+641-0x57e);data[pos]|=(UINT8)((
-UINT8)addr->number_type<<(0x1f7f+513-0x217c));data[pos]|=(UINT8)addr->
-number_plan;pos++;if(addr->number_type==WMS_NUMBER_ALPHANUMERIC){pos+=(UINT8)
-wms_ts_pack_gw_7_bit_chars(addr->digits,addr->number_of_digits,
-(0x1423+3016-0x1feb),WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=
-(0xc7a+1599-0x12b9);i<addr->number_of_digits;i++){data[pos]=(UINT8)(addr->digits
-[i++]&(0x29b+590-0x4da));{data[pos]|=(UINT8)(addr->digits[i]<<
-(0x20b1+738-0x238f));}pos++;}}return pos;}UINT8 wms_ts_encode_dcs(const 
-wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=(0x606+5437-0x1b43);if(dcs->
-msg_waiting==WMS_GW_MSG_WAITING_NONE){data[pos]=dcs->is_compressed?
-(0x14ec+2831-0x1fdb):(0x17c+2955-0xd07);data[pos]|=(dcs->msg_class!=
-WMS_MESSAGE_CLASS_NONE)?(0x12c9+1172-0x174d):(0xd26+4579-0x1f09);data[pos]|=dcs
-->alphabet<<(0x18da+3506-0x268a);data[pos]|=dcs->msg_class&(0xfe6+3178-0x1c4d);}
-else if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data[pos]=
-(0x476+8302-0x23f4);if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=
-(0x522+681-0x7c7);data[pos]|=dcs->msg_class&(0x20e0+1101-0x252a);}else{if(dcs->
-msg_waiting==WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0xe88+2338-0x16ea);}else if(
-dcs->msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
-WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0xdc4+1924-0x1478);}else{data[pos]=
-(0x380+6314-0x1b4a);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
-(0xa96+1512-0x1076):(0x343+2341-0xc68);data[pos]|=dcs->msg_waiting_kind&
-(0x16ca+569-0x1900);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
-UINT8*result){unsigned char low_bit=(bcd&(0x1461+1454-0x1a00));unsigned char 
-high_bit=((bcd&(0xfca+4532-0x208e))>>(0x142d+4179-0x247c));if(low_bit>
-(0x5bf+4600-0x17ae)||high_bit>(0xb7a+3729-0x1a02)){at_print(LOG_DEBUG,
-"\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x64\x69\x67\x69\x74\x21");*
-result=(0x8ed+6356-0x21c1);return FALSE;}else{*result=((bcd&(0x6b2+7772-0x24ff))
-+(((bcd&(0xbad+5383-0x1fc4))>>(0xf4a+5934-0x2674))*(0x974+7129-0x2543)));return 
-TRUE;}}UINT8 wms_ts_encode_timestamp(const wms_timestamp_s_type*timestamp,UINT8*
-data){sint7 i;UINT8 pos=(0x83b+5744-0x1eab),j;if(!wms_ts_bcd_to_int(timestamp->
-year,&j)){return(0x800+5267-0x1c93);}data[pos]=((timestamp->year&
-(0x1143+4630-0x234a))<<(0xab0+1731-0x116f))+((timestamp->year&
-(0x1e4b+1837-0x2488))>>(0x412+4049-0x13df));pos++;if(wms_ts_bcd_to_int(timestamp
-->month,&j)){if(j>(0x1d9b+1931-0x251a)||j<(0x9d7+4394-0x1b00)){at_print(
+);return(0x3a7+1104-0x7f7);}shift%=(0x2319+953-0x26cb);if(shift!=
+(0x56b+8381-0x2628)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0xe10+3566-0x1bf7)-
+shift)+(0xaed+6214-0x2332);if(shift==(0x5c3+4129-0x15dd)){shift=
+(0xc17+5376-0x2117);i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[
+pos]=in[i]>>shift;if(i+(0x15a6+3373-0x22d2)<in_len){out[pos]|=(UINT8)(in[i+
+(0x585+2916-0x10e8)]<<((0x80c+5713-0x1e56)-shift));shift++;if(shift==
+(0xcd+7620-0x1e8a)){shift=(0x71c+1986-0xede);i++;}}}return pos;}UINT8 
+wms_ts_encode_address(const wms_address_s_type*addr,UINT8*data){UINT8 i,pos=
+(0x12ea+4088-0x22e2);if(addr->number_of_digits>WMS_GW_ADDRESS_MAX){at_print(
 LOG_DEBUG,
+"\x41\x64\x64\x72\x20\x6c\x65\x6e\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x20\x25\x64"
+,addr->number_of_digits);return(0x738+3592-0x1540);}if(addr->number_type==
+WMS_NUMBER_ALPHANUMERIC){data[pos]=(UINT8)((addr->number_of_digits*
+(0x118+8398-0x21df)+(0xf4+7665-0x1ee2))/(0x808+557-0xa31));}else{data[pos]=addr
+->number_of_digits;}pos++;data[pos]=(0x1571+45-0x151e);data[pos]|=(UINT8)((UINT8
+)addr->number_type<<(0xa26+4558-0x1bf0));data[pos]|=(UINT8)addr->number_plan;pos
+++;if(addr->number_type==WMS_NUMBER_ALPHANUMERIC){pos+=(UINT8)
+wms_ts_pack_gw_7_bit_chars(addr->digits,addr->number_of_digits,
+(0x686+2396-0xfe2),WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=
+(0x8ad+7214-0x24db);i<addr->number_of_digits;i++){data[pos]=(UINT8)(addr->digits
+[i++]&(0x13f6+244-0x14db));{data[pos]|=(UINT8)(addr->digits[i]<<
+(0x3e9+1357-0x932));}pos++;}}return pos;}UINT8 wms_ts_encode_dcs(const 
+wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=(0x2244+3-0x2247);if(dcs->
+msg_waiting==WMS_GW_MSG_WAITING_NONE){data[pos]=dcs->is_compressed?
+(0x167+8154-0x2121):(0x139f+1562-0x19b9);data[pos]|=(dcs->msg_class!=
+WMS_MESSAGE_CLASS_NONE)?(0x794+5271-0x1c1b):(0xf0f+4790-0x21c5);data[pos]|=dcs->
+alphabet<<(0xcb4+5382-0x21b8);data[pos]|=dcs->msg_class&(0x70c+619-0x974);}else 
+if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data[pos]=(0x7b7+883-0xa3a);
+if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=(0x478+1047-0x88b);data[pos]
+|=dcs->msg_class&(0x1462+386-0x15e1);}else{if(dcs->msg_waiting==
+WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0x2011+1289-0x245a);}else if(dcs->
+msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
+WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0x6ba+7997-0x2527);}else{data[pos]=
+(0x7d5+5822-0x1db3);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
+(0x8df+6420-0x21eb):(0xdfb+1344-0x133b);data[pos]|=dcs->msg_waiting_kind&
+(0xaef+5223-0x1f53);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
+UINT8*result){unsigned char low_bit=(bcd&(0x12b6+102-0x130d));unsigned char 
+high_bit=((bcd&(0x1927+1683-0x1eca))>>(0x8e7+2828-0x13ef));if(low_bit>
+(0x219+168-0x2b8)||high_bit>(0xf75+2606-0x199a)){at_print(LOG_DEBUG,
+"\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x64\x69\x67\x69\x74\x21");*
+result=(0xddd+2599-0x1804);return FALSE;}else{*result=((bcd&(0x1cd9+973-0x2097))
++(((bcd&(0x1a58+2337-0x2289))>>(0x149+3728-0xfd5))*(0x1d53+1968-0x24f9)));return
+ TRUE;}}UINT8 wms_ts_encode_timestamp(const wms_timestamp_s_type*timestamp,UINT8
+*data){sint7 i;UINT8 pos=(0x273+2456-0xc0b),j;if(!wms_ts_bcd_to_int(timestamp->
+year,&j)){return(0x1bf4+2062-0x2402);}data[pos]=((timestamp->year&
+(0xaff+1205-0xfa5))<<(0x960+3517-0x1719))+((timestamp->year&(0x1a59+1655-0x1fe0)
+)>>(0x1e00+2033-0x25ed));pos++;if(wms_ts_bcd_to_int(timestamp->month,&j)){if(j>
+(0x16bd+1945-0x1e4a)||j<(0xbb1+3069-0x17ad)){at_print(LOG_DEBUG,
 "\x4d\x6f\x6e\x74\x68\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);return(0x103c+2653-0x1a99);}}else{return(0x8a6+398-0xa34);}data[pos]=((
-timestamp->month&(0x114d+283-0x1259))<<(0x931+3159-0x1584))+((timestamp->month&
-(0x2133+162-0x20e5))>>(0x1a25+1162-0x1eab));pos++;if(wms_ts_bcd_to_int(timestamp
-->day,&j)){if(j>(0xe0f+3975-0x1d77)||j<(0x9c7+1878-0x111c)){at_print(LOG_DEBUG,
+,j);return(0x39+5089-0x141a);}}else{return(0x11e5+3954-0x2157);}data[pos]=((
+timestamp->month&(0x5ab+275-0x6af))<<(0xa31+2223-0x12dc))+((timestamp->month&
+(0x286+6807-0x1c2d))>>(0x1cea+79-0x1d35));pos++;if(wms_ts_bcd_to_int(timestamp->
+day,&j)){if(j>(0xc74+2688-0x16d5)||j<(0xe0+1215-0x59e)){at_print(LOG_DEBUG,
 "\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);
-return(0xf8d+153-0x1026);}}else{return(0x861+1459-0xe14);}data[pos]=((timestamp
-->day&(0xa62+6870-0x2529))<<(0x668+6058-0x1e0e))+((timestamp->day&
-(0x11e5+5634-0x26f7))>>(0x1241+2453-0x1bd2));pos++;if(wms_ts_bcd_to_int(
-timestamp->hour,&j)){if(j>(0x63b+820-0x958)){at_print(LOG_DEBUG,
+return(0x650+667-0x8eb);}}else{return(0xbcb+488-0xdb3);}data[pos]=((timestamp->
+day&(0x595+102-0x5ec))<<(0x141d+3294-0x20f7))+((timestamp->day&
+(0x433+1817-0xa5c))>>(0x1b5d+2997-0x270e));pos++;if(wms_ts_bcd_to_int(timestamp
+->hour,&j)){if(j>(0x6bc+6231-0x1efc)){at_print(LOG_DEBUG,
 "\x48\x6f\x75\x72\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j
-);return(0x1568+1184-0x1a08);}}else{return(0xf8a+5291-0x2435);}data[pos]=((
-timestamp->hour&(0x699+6493-0x1fe7))<<(0x922+6039-0x20b5))+((timestamp->hour&
-(0x132b+5217-0x269c))>>(0xd41+128-0xdbd));pos++;if(wms_ts_bcd_to_int(timestamp->
-minute,&j)){if(j>(0xca1+5660-0x2282)){at_print(LOG_DEBUG,
+);return(0x164b+2938-0x21c5);}}else{return(0xec8+305-0xff9);}data[pos]=((
+timestamp->hour&(0xa57+3784-0x1910))<<(0x4ac+2393-0xe01))+((timestamp->hour&
+(0x10d+4155-0x1058))>>(0x59a+1186-0xa38));pos++;if(wms_ts_bcd_to_int(timestamp->
+minute,&j)){if(j>(0x1fb+7934-0x20be)){at_print(LOG_DEBUG,
 "\x4d\x69\x6e\x75\x74\x65\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);return(0xfbf+228-0x10a3);}}else{return(0x1d99+638-0x2017);}data[pos]=((
-timestamp->minute&(0x1703+127-0x1773))<<(0xdf5+5317-0x22b6))+((timestamp->minute
-&(0x10a3+4308-0x2087))>>(0x12da+1756-0x19b2));pos++;if(wms_ts_bcd_to_int(
-timestamp->second,&j)){if(j>(0x1828+353-0x194e)){at_print(LOG_DEBUG,
+,j);return(0xc1f+5735-0x2286);}}else{return(0x646+176-0x6f6);}data[pos]=((
+timestamp->minute&(0x1292+5212-0x26df))<<(0x1f53+1588-0x2583))+((timestamp->
+minute&(0x1778+4214-0x26fe))>>(0x178+967-0x53b));pos++;if(wms_ts_bcd_to_int(
+timestamp->second,&j)){if(j>(0xcc8+3936-0x1bed)){at_print(LOG_DEBUG,
 "\x53\x65\x63\x6f\x6e\x64\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);return(0x447+2175-0xcc6);}}else{return(0x3bf+8788-0x2613);}data[pos]=((
-timestamp->second&(0x1b1f+1981-0x22cd))<<(0x103b+1195-0x14e2))+((timestamp->
-second&(0x608+2666-0xf82))>>(0x3fa+2383-0xd45));pos++;i=(sint7)timestamp->
-timezone;if(i>(0x74+4860-0x1340)||i<-(0xcf4+4397-0x1df1)){at_print(LOG_DEBUG,
+,j);return(0x400+1340-0x93c);}}else{return(0x15ea+3433-0x2353);}data[pos]=((
+timestamp->second&(0x8ab+3396-0x15e0))<<(0xc9b+4579-0x1e7a))+((timestamp->second
+&(0x5cf+1513-0xac8))>>(0xc6b+523-0xe72));pos++;i=(sint7)timestamp->timezone;if(i
+>(0xb3+8940-0x236f)||i<-(0xbd8+2632-0x15f0)){at_print(LOG_DEBUG,
 "\x54\x69\x6d\x65\x7a\x6f\x6e\x65\x20\x69\x73\x20\x6f\x75\x74\x20\x6f\x66\x20\x62\x6f\x75\x6e\x64\x3a\x20\x25\x64"
-,i);return(0x1013+2719-0x1ab2);}if(i>=(0xc63+5239-0x20da)){data[pos]=(UINT8)(((
-UINT8)(i%(0x1429+4291-0x24e2)))<<(0x1a77+3128-0x26ab));data[pos]|=(i/
-(0x39a+4628-0x15a4));}else{i*=(-(0xd86+3605-0x1b9a));data[pos]=(UINT8)(((UINT8)(
-i%(0xe44+2694-0x18c0)))<<(0x3f9+8824-0x266d));data[pos]|=(i/(0xb5a+2650-0x15aa))
-;data[pos]|=(0x39d+609-0x5f6);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
-const wms_udh_s_type*udh){UINT8 length=(0x7ef+5035-0x1b9a);if(udh!=NULL){switch(
-udh->header_id){case WMS_UDH_CONCAT_8:length=(0x14f4+4400-0x2623)+
-(0x3ec+2967-0xf82)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
-(0xbf7+3764-0x1aaa)+(0x98+6440-0x19bf)+WMS_UDH_OCTETS_CONCAT16;break;case 
-WMS_UDH_SPECIAL_SM:length=(0xc1d+1993-0x13e5)+(0x16dc+3270-0x23a1)+
-WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0x1197+4409-0x22cf)+
-(0x1e2+1531-0x7dc)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
-(0x15f8+94-0x1655)+(0x408+8661-0x25dc)+WMS_UDH_OCTETS_PORT16;break;case 
-WMS_UDH_SMSC_CONTROL:length=(0x1961+2789-0x2445)+(0x23d+6471-0x1b83)+udh->u.
-other.header_length;break;case WMS_UDH_SOURCE:length=(0x6b+4085-0x105f)+
-(0xfa5+2594-0x19c6)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
-(0x1eb1+486-0x2096)+(0x692+5105-0x1a82)+udh->u.other.header_length;break;case 
+,i);return(0x835+2692-0x12b9);}if(i>=(0x50c+3546-0x12e6)){data[pos]=(UINT8)(((
+UINT8)(i%(0xa7f+1276-0xf71)))<<(0x175b+2850-0x2279));data[pos]|=(i/
+(0x57d+1960-0xd1b));}else{i*=(-(0xe80+3743-0x1d1e));data[pos]=(UINT8)(((UINT8)(i
+%(0x1a7+129-0x21e)))<<(0x639+5730-0x1c97));data[pos]|=(i/(0x4d8+3819-0x13b9));
+data[pos]|=(0x505+7524-0x2261);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
+const wms_udh_s_type*udh){UINT8 length=(0x6d6+7984-0x2606);if(udh!=NULL){switch(
+udh->header_id){case WMS_UDH_CONCAT_8:length=(0x6a2+6406-0x1fa7)+
+(0x602+1787-0xcfc)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
+(0xa34+3500-0x17df)+(0x5ca+4882-0x18db)+WMS_UDH_OCTETS_CONCAT16;break;case 
+WMS_UDH_SPECIAL_SM:length=(0x87b+5366-0x1d70)+(0x656+3553-0x1436)+
+WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0xc0f+3364-0x1932)+
+(0x12eb+4045-0x22b7)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
+(0xc60+5525-0x21f4)+(0x17ec+2049-0x1fec)+WMS_UDH_OCTETS_PORT16;break;case 
+WMS_UDH_SMSC_CONTROL:length=(0xb14+5596-0x20ef)+(0x185c+1779-0x1f4e)+udh->u.
+other.header_length;break;case WMS_UDH_SOURCE:length=(0xb6+4434-0x1207)+
+(0xe62+556-0x108d)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
+(0x305+5356-0x17f0)+(0x26b+9346-0x26ec)+udh->u.other.header_length;break;case 
 WMS_UDH_TEXT_FORMATING:if(!udh->u.text_formating.is_color_present){length=
-(0x134+1097-0x57c)+(0x16cc+2821-0x21d0)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
-length=(0x131+5430-0x1666)+(0xfa+9187-0x24dc)+WMS_UDH_OCTETS_TEXT_FORMATTING+
-(0x11d0+5196-0x261b);}break;case WMS_UDH_PRE_DEF_SOUND:length=(0x8bc+177-0x96c)+
-(0xa01+6774-0x2476)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_USER_DEF_SOUND:
-length=(0x1121+1382-0x1686)+(0x1f1+6589-0x1bad)+udh->u.user_def_sound.
-data_length+(0x1302+2502-0x1cc7);break;case WMS_UDH_PRE_DEF_ANIM:length=
-(0x610+4514-0x17b1)+(0x9b4+7233-0x25f4)+WMS_UDH_OCTETS_PRE_DEF;break;case 
-WMS_UDH_LARGE_ANIM:length=(0x13f6+3791-0x22c4)+(0x10df+240-0x11ce)+
-WMS_UDH_LARGE_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x155+8571-0x22cf);break;
-case WMS_UDH_SMALL_ANIM:length=(0x3cf+6178-0x1bf0)+(0xe9+9131-0x2493)+
-WMS_UDH_SMALL_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x18d+7305-0x1e15);break;
-case WMS_UDH_LARGE_PICTURE:length=(0x557+1909-0xccb)+(0xe5c+727-0x1132)+
-WMS_UDH_LARGE_PIC_SIZE+(0x240+1257-0x728);break;case WMS_UDH_SMALL_PICTURE:
-length=(0x52d+311-0x663)+(0x74c+5189-0x1b90)+WMS_UDH_SMALL_PIC_SIZE+
-(0x3d7+5352-0x18be);break;case WMS_UDH_VAR_PICTURE:length=(0x2ba+623-0x528)+
-(0x1629+1850-0x1d62)+(UINT8)(udh->u.var_picture.height*udh->u.var_picture.width/
-(0x13d+6174-0x1953))+(0x881+128-0x8fe);break;case WMS_UDH_RFC822:length=
-(0x2c7+690-0x578)+(0xde9+2462-0x1786)+WMS_UDH_OCTETS_RFC822;break;case 
-WMS_UDH_NAT_LANG_SS:length=(0x150f+2181-0x1d93)+(0x11d9+3767-0x208f)+
-WMS_UDH_OCTETS_NAT_LANG_SS;break;case WMS_UDH_NAT_LANG_LS:length=
-(0x1c0a+2176-0x2489)+(0x8ab+40-0x8d2)+WMS_UDH_OCTETS_NAT_LANG_LS;break;case 
-WMS_UDH_USER_PROMPT:length=(0x15df+301-0x170b)+(0x647+392-0x7ce)+
-WMS_UDH_OCTETS_USER_PROMPT;break;case WMS_UDH_EXTENDED_OBJECT:length=
-(0x1d64+1153-0x21e4)+(0x1385+3065-0x1f7d)+udh->u.eo.content.length;if(udh->u.eo.
-first_segment==TRUE){length+=WMS_UDH_OCTETS_EO_HEADER;}break;default:length=
-(0x19d4+1860-0x2117)+(0x6ef+5859-0x1dd1)+udh->u.other.header_length;break;}}
-return length;}uint32 wms_ts_compute_user_data_header_length(const UINT8 
-num_headers,const wms_udh_s_type*headers){uint32 length=(0x13ea+1499-0x19c5);
-uint32 i;if(headers==NULL){at_print(LOG_DEBUG,
+(0x1806+3204-0x2489)+(0x13a+9279-0x2578)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
+length=(0x11d3+3256-0x1e8a)+(0xa88+3460-0x180b)+WMS_UDH_OCTETS_TEXT_FORMATTING+
+(0x7+1228-0x4d2);}break;case WMS_UDH_PRE_DEF_SOUND:length=(0x3ca+7405-0x20b6)+
+(0x1bfc+1168-0x208b)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_USER_DEF_SOUND:
+length=(0xb93+2697-0x161b)+(0x31+7165-0x1c2d)+udh->u.user_def_sound.data_length+
+(0x5ad+8000-0x24ec);break;case WMS_UDH_PRE_DEF_ANIM:length=(0x1b6a+1274-0x2063)+
+(0xd64+2173-0x15e0)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_LARGE_ANIM:length=
+(0x535+4349-0x1631)+(0x184c+589-0x1a98)+WMS_UDH_LARGE_BITMAP_SIZE*
+WMS_UDH_ANIM_NUM_BITMAPS+(0x200+4282-0x12b9);break;case WMS_UDH_SMALL_ANIM:
+length=(0x500+2897-0x1050)+(0xdbb+5426-0x22ec)+WMS_UDH_SMALL_BITMAP_SIZE*
+WMS_UDH_ANIM_NUM_BITMAPS+(0xf7c+4465-0x20ec);break;case WMS_UDH_LARGE_PICTURE:
+length=(0x701+4341-0x17f5)+(0x10f9+3095-0x1d0f)+WMS_UDH_LARGE_PIC_SIZE+
+(0x1bf0+940-0x1f9b);break;case WMS_UDH_SMALL_PICTURE:length=(0x2561+290-0x2682)+
+(0x82b+532-0xa3e)+WMS_UDH_SMALL_PIC_SIZE+(0x16f0+166-0x1795);break;case 
+WMS_UDH_VAR_PICTURE:length=(0x15f8+3141-0x223c)+(0x1b3+3680-0x1012)+(UINT8)(udh
+->u.var_picture.height*udh->u.var_picture.width/(0x2ed+8488-0x240d))+
+(0x1b2d+863-0x1e89);break;case WMS_UDH_RFC822:length=(0x14e1+2066-0x1cf2)+
+(0xaef+5684-0x2122)+WMS_UDH_OCTETS_RFC822;break;case WMS_UDH_NAT_LANG_SS:length=
+(0x43a+1468-0x9f5)+(0x158d+3568-0x237c)+WMS_UDH_OCTETS_NAT_LANG_SS;break;case 
+WMS_UDH_NAT_LANG_LS:length=(0x8fb+1267-0xded)+(0x1644+3991-0x25da)+
+WMS_UDH_OCTETS_NAT_LANG_LS;break;case WMS_UDH_USER_PROMPT:length=
+(0xa47+3124-0x167a)+(0x70c+5413-0x1c30)+WMS_UDH_OCTETS_USER_PROMPT;break;case 
+WMS_UDH_EXTENDED_OBJECT:length=(0xd71+3968-0x1cf0)+(0xac4+3479-0x185a)+udh->u.eo
+.content.length;if(udh->u.eo.first_segment==TRUE){length+=
+WMS_UDH_OCTETS_EO_HEADER;}break;default:length=(0x1218+867-0x157a)+
+(0x1784+890-0x1afd)+udh->u.other.header_length;break;}}return length;}uint32 
+wms_ts_compute_user_data_header_length(const UINT8 num_headers,const 
+wms_udh_s_type*headers){uint32 length=(0x45b+1231-0x92a);uint32 i;if(headers==
+NULL){at_print(LOG_DEBUG,
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x63\x6f\x6d\x70\x75\x74\x65\x5f\x75\x73\x65\x72\x5f\x64\x61\x74\x61\x5f\x68\x65\x61\x64\x65\x72\x5f\x6c\x65\x6e\x67\x74\x68\x21"
-);return(0x469+4452-0x15cd);}if(num_headers>(0x4ef+3211-0x117a)){length+=
-(0x2cf+3868-0x11ea);for(i=(0xb26+4590-0x1d14);i<num_headers&&i<
+);return(0xfa9+1584-0x15d9);}if(num_headers>(0xcf+280-0x1e7)){length+=
+(0x37c+7304-0x2003);for(i=(0x2124+1030-0x252a);i<num_headers&&i<
 WMS_MAX_UD_HEADERS;i++){length+=(uint32)wms_ts_get_udh_length(&headers[i]);}}
 return length;}uint32 wms_ts_compute_gw_user_data_length(const wms_gw_dcs_s_type
-*dcs,const wms_gw_user_data_s_type*user_data){uint32 length=(0x5d8+3240-0x1280);
+*dcs,const wms_gw_user_data_s_type*user_data){uint32 length=(0xc28+4785-0x1ed9);
 if(dcs==NULL||user_data==NULL){at_print(LOG_DEBUG,
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x63\x6f\x6d\x70\x75\x74\x65\x5f\x67\x77\x5f\x75\x73\x65\x72\x5f\x64\x61\x74\x61\x5f\x6c\x65\x6e\x67\x74\x68\x21"
-);return(0x431+8891-0x26ec);}length+=wms_ts_compute_user_data_header_length(
+);return(0x1c33+1444-0x21d7);}length+=wms_ts_compute_user_data_header_length(
 user_data->num_headers,user_data->headers);if(dcs->alphabet==
-WMS_GW_ALPHABET_7_BIT_DEFAULT){length+=((user_data->sm_len*(0x1580+1189-0x1a1e))
-+(0x949+7394-0x2624))/(0x123+5274-0x15b5);}else{length+=user_data->sm_len;}
-return length;}static int wms_ts_encode_udh_concat_8(UINT8*udh){int pos=
-(0x106+3508-0xeba);if(const_header->u.concat_8.total_sm==(0x10d9+1659-0x1754)||
-const_header->u.concat_8.seq_num==(0x5b9+4836-0x189d)||const_header->u.concat_8.
-seq_num>const_header->u.concat_8.total_sm){at_print(LOG_DEBUG,
+WMS_GW_ALPHABET_7_BIT_DEFAULT){length+=((user_data->sm_len*(0x22c8+520-0x24c9))+
+(0xbe1+4389-0x1cff))/(0xbc8+2309-0x14c5);}else{length+=user_data->sm_len;}return
+ length;}static int wms_ts_encode_udh_concat_8(UINT8*udh){int pos=
+(0x9c8+6267-0x2243);if(const_header->u.concat_8.total_sm==(0x97b+2107-0x11b6)||
+const_header->u.concat_8.seq_num==(0x125c+5044-0x2610)||const_header->u.concat_8
+.seq_num>const_header->u.concat_8.total_sm){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x69\x64\x20\x25\x64\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x6e\x6f\x20\x44\x61\x74\x61"
-,const_header->header_id);return(0xbda+2841-0x16f3);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0x7ca+2580-0x11de);}udh[pos++]=(UINT8)
 WMS_UDH_CONCAT_8;udh[pos++]=(UINT8)WMS_UDH_OCTETS_CONCAT8;udh[pos++]=
 const_header->u.concat_8.msg_ref;udh[pos++]=const_header->u.concat_8.total_sm;
 udh[pos++]=const_header->u.concat_8.seq_num;return pos;}static int 
-wms_ts_encode_udh_concat16(UINT8*udh){int pos=(0xab7+5797-0x215c);if(
-const_header->u.concat_16.total_sm==(0x88b+344-0x9e3)||const_header->u.concat_16
-.seq_num==(0x11b3+86-0x1209)||const_header->u.concat_16.seq_num>const_header->u.
+wms_ts_encode_udh_concat16(UINT8*udh){int pos=(0x3a+4569-0x1213);if(const_header
+->u.concat_16.total_sm==(0x1027+1985-0x17e8)||const_header->u.concat_16.seq_num
+==(0x11cc+3831-0x20c3)||const_header->u.concat_16.seq_num>const_header->u.
 concat_16.total_sm){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x69\x64\x20\x25\x64\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x6e\x6f\x20\x44\x61\x74\x61"
-,const_header->header_id);return(0xecc+5786-0x2566);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0x321+5716-0x1975);}udh[pos++]=(UINT8)
 WMS_UDH_CONCAT_16;udh[pos++]=(UINT8)WMS_UDH_OCTETS_CONCAT16;udh[pos++]=(UINT8)((
-const_header->u.concat_16.msg_ref&65280)>>(0xcf6+1614-0x133c));udh[pos++]=(UINT8
-)(const_header->u.concat_16.msg_ref&(0x599+5014-0x1830));udh[pos++]=const_header
+const_header->u.concat_16.msg_ref&65280)>>(0x47c+6294-0x1d0a));udh[pos++]=(UINT8
+)(const_header->u.concat_16.msg_ref&(0x731+7028-0x21a6));udh[pos++]=const_header
 ->u.concat_16.total_sm;udh[pos++]=const_header->u.concat_16.seq_num;return pos;}
-int wms_ts_encode_udh_nat_lang_ss(UINT8*udh){int pos=(0x291+7116-0x1e5d);udh[pos
+int wms_ts_encode_udh_nat_lang_ss(UINT8*udh){int pos=(0xd9b+3368-0x1ac3);udh[pos
 ++]=(UINT8)WMS_UDH_NAT_LANG_SS;udh[pos++]=(UINT8)WMS_UDH_OCTETS_NAT_LANG_SS;udh[
 pos++]=(UINT8)const_header->u.nat_lang_ss.nat_lang_id;return pos;}int 
-wms_ts_encode_udh_nat_lang_ls(UINT8*udh){int pos=(0x1d6a+1887-0x24c9);udh[pos++]
-=(UINT8)WMS_UDH_NAT_LANG_LS;udh[pos++]=(UINT8)WMS_UDH_OCTETS_NAT_LANG_LS;udh[pos
+wms_ts_encode_udh_nat_lang_ls(UINT8*udh){int pos=(0x1dc9+695-0x2080);udh[pos++]=
+(UINT8)WMS_UDH_NAT_LANG_LS;udh[pos++]=(UINT8)WMS_UDH_OCTETS_NAT_LANG_LS;udh[pos
 ++]=(UINT8)const_header->u.nat_lang_ls.nat_lang_id;return pos;}int 
 wms_ts_encode_udh_other(UINT8*udh,wms_udh_id_e_type header_id){int i=
-(0x195+5405-0x16b2);int pos=(0x18ec+1151-0x1d6b);udh[pos++]=(UINT8)const_header
-->u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
-(0x1c9b+521-0x1ea4);i<const_header->u.other.header_length;i++){udh[pos++]=
+(0x396+4359-0x149d);int pos=(0x312+7041-0x1e93);udh[pos++]=(UINT8)const_header->
+u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
+(0x409+2167-0xc80);i<const_header->u.other.header_length;i++){udh[pos++]=
 const_header->u.other.data[i];}return pos;}UINT8 wms_ts_encode_user_data_header(
 UINT8 num_headers,const wms_udh_s_type*headers,UINT8*data){int i,pos=
-(0x120+1533-0x71d);if(num_headers==(0xc70+1007-0x105f))return(0xd26+3982-0x1cb4)
-;++pos;for(i=(0x87c+2472-0x1224);i<WMS_MAX_UD_HEADERS&&i<num_headers;i++){
+(0x15f3+1304-0x1b0b);if(num_headers==(0x576+6967-0x20ad))return(0x700+981-0xad5)
+;++pos;for(i=(0x12b+8068-0x20af);i<WMS_MAX_UD_HEADERS&&i<num_headers;i++){
 const_header=&headers[i];switch(const_header->header_id){case WMS_UDH_CONCAT_8:
 pos+=wms_ts_encode_udh_concat_8(data+pos);break;case WMS_UDH_CONCAT_16:pos+=
 wms_ts_encode_udh_concat16(data+pos);break;
-#if (0x674+8326-0x26fa)

+#if (0x165d+2344-0x1f85)

 case WMS_UDH_SPECIAL_SM:pos+=wms_ts_encode_udh_special_sm(data+pos);break;case 
 WMS_UDH_PORT_8:pos+=wms_ts_encode_udh_port_8(data+pos);break;case 
 WMS_UDH_PORT_16:pos+=wms_ts_encode_udh_port16(data+pos);break;case 
@@ -1313,49 +1314,49 @@
 case WMS_UDH_NAT_LANG_SS:pos+=wms_ts_encode_udh_nat_lang_ss(data+pos);break;case
  WMS_UDH_NAT_LANG_LS:pos+=wms_ts_encode_udh_nat_lang_ls(data+pos);break;default:
 pos+=wms_ts_encode_udh_other(data+pos,const_header->header_id);}}data[
-(0x20c+3676-0x1068)]=(UINT8)(pos-(0x13f0+445-0x15ac));return((UINT8)(pos-
-(0x1dfd+2311-0x2703)));}UINT8 wms_ts_encode_gw_user_data(const wms_gw_dcs_s_type
-*dcs,const wms_gw_user_data_s_type*user_data,UINT8*data){UINT16 i,pos=
-(0x150b+677-0x17b0);UINT8 fill_bits=(0x1c41+600-0x1e99);UINT16 
+(0x93b+4610-0x1b3d)]=(UINT8)(pos-(0x462+8655-0x2630));return((UINT8)(pos-
+(0x1523+789-0x1837)));}UINT8 wms_ts_encode_gw_user_data(const wms_gw_dcs_s_type*
+dcs,const wms_gw_user_data_s_type*user_data,UINT8*data){UINT16 i,pos=
+(0x9b2+3922-0x1904);UINT8 fill_bits=(0x9aa+3643-0x17e5);UINT16 
 total_bits_occupied;UINT8 user_data_header_length;UINT16 user_data_length;data[
 pos]=(UINT8)user_data->sm_len;pos++;if(dcs->alphabet==
-WMS_GW_ALPHABET_7_BIT_DEFAULT){if(user_data->num_headers>(0x1633+3815-0x251a)){
-if(wms_ts_compute_user_data_header_length(user_data->num_headers,user_data->
+WMS_GW_ALPHABET_7_BIT_DEFAULT){if(user_data->num_headers>(0xffc+4617-0x2205)){if
+(wms_ts_compute_user_data_header_length(user_data->num_headers,user_data->
 headers)<=WMS_SMS_UDL_MAX_8_BIT){user_data_header_length=
 wms_ts_encode_user_data_header(user_data->num_headers,user_data->headers,data+
-pos);pos+=user_data_header_length+(0xd43+1315-0x1265);total_bits_occupied=(
-user_data_header_length+(0x176+485-0x35a))*(0x1769+2826-0x226b);fill_bits=(
-total_bits_occupied%(0xf08+5327-0x23d0));if(fill_bits!=(0x129+6678-0x1b3f)){
-fill_bits=(0x1184+673-0x141e)-fill_bits;}user_data_length=(total_bits_occupied+
-fill_bits+(user_data->sm_len*(0x4bc+3276-0x1181)))/(0xfed+3722-0x1e70);data[
-(0xaef+3100-0x170b)]=(UINT8)user_data_length;data[(0x25d+585-0x4a5)]=
+pos);pos+=user_data_header_length+(0xac9+2703-0x1557);total_bits_occupied=(
+user_data_header_length+(0xa4a+2097-0x127a))*(0x1111+3833-0x2002);fill_bits=(
+total_bits_occupied%(0x2031+1232-0x24fa));if(fill_bits!=(0x6a2+3547-0x147d)){
+fill_bits=(0x10f6+1551-0x16fe)-fill_bits;}user_data_length=(total_bits_occupied+
+fill_bits+(user_data->sm_len*(0x1027+4272-0x20d0)))/(0x92f+3534-0x16f6);data[
+(0x264+2005-0xa39)]=(UINT8)user_data_length;data[(0x2aa+2310-0xbaf)]=
 user_data_header_length;}else{at_print(LOG_DEBUG,
 "\x45\x6e\x63\x6f\x64\x65\x20\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x48\x65\x61\x64\x65\x72\x20\x45\x78\x63\x65\x65\x64\x73\x20\x43\x61\x70\x61\x63\x69\x74\x79\x20\x2d\x20\x53\x6b\x69\x70\x70\x69\x6e\x67\x20\x55\x44\x48"
 );}}i=wms_ts_pack_gw_7_bit_chars(user_data->sm_data,user_data->sm_len,fill_bits,
 (UINT16)(WMS_MAX_LEN-pos),&data[pos]);pos+=i;}else{if(user_data->num_headers>
-(0x1784+29-0x17a1)){if(wms_ts_compute_user_data_header_length(user_data->
+(0x537+914-0x8c9)){if(wms_ts_compute_user_data_header_length(user_data->
 num_headers,user_data->headers)<=WMS_SMS_UDL_MAX_8_BIT){user_data_header_length=
 wms_ts_encode_user_data_header(user_data->num_headers,user_data->headers,data+
-pos);data[(0x7f4+2456-0x118c)]=(UINT8)(user_data->sm_len+user_data_header_length
-+(0x182+2230-0xa37));pos+=user_data_header_length+(0xab3+5296-0x1f62);}else{
-at_print(LOG_DEBUG,
+pos);data[(0x1057+5670-0x267d)]=(UINT8)(user_data->sm_len+
+user_data_header_length+(0xd80+6090-0x2549));pos+=user_data_header_length+
+(0x351+5040-0x1700);}else{at_print(LOG_DEBUG,
 "\x45\x6e\x63\x6f\x64\x65\x20\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x48\x65\x61\x64\x65\x72\x20\x45\x78\x63\x65\x65\x64\x73\x20\x43\x61\x70\x61\x63\x69\x74\x79\x20\x2d\x20\x53\x6b\x69\x70\x70\x69\x6e\x67\x20\x55\x44\x48"
 );}}memcpy(&data[pos],user_data->sm_data,user_data->sm_len);pos+=user_data->
 sm_len;}return(UINT8)pos;}wms_status_e_type wms_ts_encode_deliver(const 
 wms_gw_deliver_s_type*deliver,T_zUfiSms_RawTsData*raw_ts_data_ptr){
-wms_status_e_type st=WMS_OK_S;UINT8*data;UINT8 pos=(0xb7c+3863-0x1a93),i;if(
+wms_status_e_type st=WMS_OK_S;UINT8*data;UINT8 pos=(0xc2c+6329-0x24e5),i;if(
 deliver==NULL||raw_ts_data_ptr==NULL){at_print(LOG_DEBUG,
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x65\x6e\x63\x6f\x64\x65\x5f\x64\x65\x6c\x69\x76\x65\x72\x21"
 );return WMS_NULL_PTR_S;}data=raw_ts_data_ptr->data;(void)memset(data,
-(0x199c+978-0x1d6e),WMS_MAX_LEN);data[pos]=(0x10c2+5076-0x2496);data[pos]|=
-deliver->more?(0x8f8+1976-0x10b0):(0xc4a+1251-0x1129);data[pos]|=deliver->
-status_report_enabled?(0x285+525-0x472):(0xf87+3728-0x1e17);data[pos]|=deliver->
-user_data_header_present?(0x189+4226-0x11cb):(0xd09+6047-0x24a8);data[pos]|=
-deliver->reply_path_present?(0x1560+4433-0x2631):(0x25+3578-0xe1f);pos++;i=
-wms_ts_encode_address(&deliver->address,&data[pos]);if(i==(0x1a23+2718-0x24c1)){
+(0x287+5812-0x193b),WMS_MAX_LEN);data[pos]=(0x1e6b+720-0x213b);data[pos]|=
+deliver->more?(0xb34+229-0xc19):(0x153+3248-0xdff);data[pos]|=deliver->
+status_report_enabled?(0xa66+43-0xa71):(0x783+3214-0x1411);data[pos]|=deliver->
+user_data_header_present?(0x22d+3506-0xf9f):(0x20+7037-0x1b9d);data[pos]|=
+deliver->reply_path_present?(0x11af+3051-0x1d1a):(0x215d+131-0x21e0);pos++;i=
+wms_ts_encode_address(&deliver->address,&data[pos]);if(i==(0x259+7290-0x1ed3)){
 return WMS_INVALID_PARM_SIZE_S;}pos+=i;data[pos]=deliver->pid;pos++;pos+=
 wms_ts_encode_dcs(&deliver->dcs,data+pos);i=wms_ts_encode_timestamp(&deliver->
-timestamp,data+pos);if(i==(0x1946+616-0x1bae)){return WMS_INVALID_PARM_VALUE_S;}
+timestamp,data+pos);if(i==(0x9e7+7239-0x262e)){return WMS_INVALID_PARM_VALUE_S;}
 pos+=i;if(wms_ts_compute_gw_user_data_length(&deliver->dcs,&deliver->user_data)>
 WMS_SMS_UDL_MAX_8_BIT){at_print(LOG_DEBUG,
 "\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x4c\x65\x6e\x67\x74\x68\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x63\x61\x70\x61\x63\x69\x74\x79"
@@ -1363,55 +1364,54 @@
 dcs,&deliver->user_data,data+pos);pos+=i;}raw_ts_data_ptr->tpdu_type=
 WMS_TPDU_DELIVER;raw_ts_data_ptr->len=pos;return st;}UINT8 
 wms_ts_encode_relative_time(const wms_timestamp_s_type*timestamp){uint32 i;UINT8
- v=(0x12e7+4717-0x2554),j;if(timestamp!=NULL){if(!wms_ts_bcd_to_int(timestamp->
+ v=(0xf79+4326-0x205f),j;if(timestamp!=NULL){if(!wms_ts_bcd_to_int(timestamp->
 year,&j)){at_print(LOG_DEBUG,
 "\x59\x65\x61\x72\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j
-);}i=j*(0x681+5582-0x1ae2);if(!wms_ts_bcd_to_int(timestamp->month,&j)){at_print(
-LOG_DEBUG,
+);}i=j*(0x16c1+1363-0x1aa7);if(!wms_ts_bcd_to_int(timestamp->month,&j)){at_print
+(LOG_DEBUG,
 "\x4d\x6f\x6e\x74\x68\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);}i=i+j*(0x828+6257-0x207b);if(!wms_ts_bcd_to_int(timestamp->day,&j)){
+,j);}i=i+j*(0x1fa+880-0x54c);if(!wms_ts_bcd_to_int(timestamp->day,&j)){at_print(
+LOG_DEBUG,
+"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);}i
++=j;if(i>(0x2c0+184-0x35a)){v=(UINT8)((i+(0x1cb8+1865-0x23fb))/
+(0xd69+4981-0x20d7)+(0xb88+3206-0x174e));}else if(i>=(0xc7d+6482-0x25ce)){v=(
+UINT8)(i+(0x5c5+8252-0x255b));}else{if(!wms_ts_bcd_to_int(timestamp->day,&j)){
 at_print(LOG_DEBUG,
 "\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);}i
-+=j;if(i>(0x1bbf+1989-0x2366)){v=(UINT8)((i+(0xb3c+6297-0x23cf))/
-(0xfc2+81-0x100c)+(0x1de2+2102-0x2558));}else if(i>=(0x8ba+4202-0x1923)){v=(
-UINT8)(i+(0x70c+5568-0x1c26));}else{if(!wms_ts_bcd_to_int(timestamp->day,&j)){
-at_print(LOG_DEBUG,
-"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);}i
-=j*(0x746+6714-0x2168)*(0x1dd+4612-0x13a5);if(!wms_ts_bcd_to_int(timestamp->hour
+=j*(0x872+5838-0x1f28)*(0xab3+1426-0x1009);if(!wms_ts_bcd_to_int(timestamp->hour
 ,&j)){at_print(LOG_DEBUG,
 "\x48\x6f\x75\x72\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j
-);}i=i+j*(0x1ac1+357-0x1bea);if(!wms_ts_bcd_to_int(timestamp->minute,&j)){
+);}i=i+j*(0xb34+2192-0x1388);if(!wms_ts_bcd_to_int(timestamp->minute,&j)){
 at_print(LOG_DEBUG,
 "\x4d\x69\x6e\x75\x74\x65\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);}i+=j;if(i>(0x1ca7+660-0x1f2f)*(0x14d8+368-0x160c)){v=(UINT8)((i-((
-(0x10cf+2333-0x19e0)*(0xdc3+3399-0x1ace))+(0xd0d+5473-0x2251)))/
-(0x11ca+2045-0x19a9)+(0x1131+2736-0x1b52));}else{v=(UINT8)((i+
-(0xd4c+6443-0x2673))/(0xb8c+1443-0x112a)-(0x507+8379-0x25c1));}}}else{at_print(
-LOG_DEBUG,
+,j);}i+=j;if(i>(0x81f+3986-0x17a5)*(0x858+3172-0x1480)){v=(UINT8)((i-((
+(0x25a2+369-0x2707)*(0x829+7428-0x24f1))+(0x694+273-0x788)))/
+(0x12bc+3228-0x1f3a)+(0x1864+3052-0x23c1));}else{v=(UINT8)((i+(0x43+8181-0x2034)
+)/(0x71f+7900-0x25f6)-(0x17a3+3647-0x25e1));}}}else{at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x65\x6e\x63\x6f\x64\x65\x5f\x72\x65\x6c\x61\x74\x69\x76\x65\x5f\x74\x69\x6d\x65"
 );}return v;}UINT8 wms_ts_encode_gw_validity(const wms_gw_validity_s_type*
-validity,UINT8*data){UINT8 i,pos=(0x8b8+5947-0x1ff3);switch(validity->format){
+validity,UINT8*data){UINT8 i,pos=(0x91a+5668-0x1f3e);switch(validity->format){
 case WMS_GW_VALIDITY_NONE:break;case WMS_GW_VALIDITY_RELATIVE:data[pos]=
 wms_ts_encode_relative_time(&validity->u.time);pos++;break;case 
 WMS_GW_VALIDITY_ABSOLUTE:i=wms_ts_encode_timestamp(&validity->u.time,data+pos);
-if(i==(0x110f+3391-0x1e4e)){at_print(LOG_DEBUG,
+if(i==(0xa64+4832-0x1d44)){at_print(LOG_DEBUG,
 "\x45\x72\x72\x6f\x72\x20\x77\x68\x69\x6c\x65\x20\x44\x65\x63\x6f\x64\x69\x6e\x67\x20\x41\x62\x73\x6f\x6c\x75\x74\x65\x20\x56\x61\x6c\x69\x64\x69\x74\x79\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70"
 );}pos+=i;break;case WMS_GW_VALIDITY_ENHANCED:break;default:break;}return pos;}
 wms_status_e_type wms_ts_encode_submit(const wms_gw_submit_s_type*submit,
 T_zUfiSms_RawTsData*raw_ts_data_ptr){wms_status_e_type st=WMS_OK_S;UINT8*data;
-UINT8 pos=(0x93d+4309-0x1a12),i;if(submit==NULL||raw_ts_data_ptr==NULL){at_print
-(LOG_DEBUG,
+UINT8 pos=(0x1573+4220-0x25ef),i;if(submit==NULL||raw_ts_data_ptr==NULL){
+at_print(LOG_DEBUG,
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x65\x6e\x63\x6f\x64\x65\x5f\x73\x75\x62\x6d\x69\x74\x21"
 );return WMS_NULL_PTR_S;}data=raw_ts_data_ptr->data;(void)memset(data,
-(0xbc5+1012-0xfb9),WMS_MAX_LEN);data[pos]=(0xf40+3588-0x1d43);data[pos]|=submit
-->reject_duplicates?(0xf93+5436-0x24cb):(0x104f+94-0x10ad);if(submit->validity.
-format>(0x14e1+3837-0x23db)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]
-|=submit->validity.format<<(0xa73+1587-0x10a3);data[pos]|=submit->
-status_report_enabled?(0x1618+3622-0x241e):(0xb6f+4540-0x1d2b);data[pos]|=submit
-->user_data_header_present?(0x232+2433-0xb73):(0x12dc+2105-0x1b15);data[pos]|=
-submit->reply_path_present?(0x1442+317-0x14ff):(0x1188+3460-0x1f0c);pos++;data[
+(0xaa3+6157-0x22b0),WMS_MAX_LEN);data[pos]=(0xde1+369-0xf51);data[pos]|=submit->
+reject_duplicates?(0x1868+3715-0x26e7):(0x2043+283-0x215e);if(submit->validity.
+format>(0x832+3144-0x1477)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]|=
+submit->validity.format<<(0x1d8d+479-0x1f69);data[pos]|=submit->
+status_report_enabled?(0x130a+3100-0x1f06):(0xcec+4050-0x1cbe);data[pos]|=submit
+->user_data_header_present?(0x1a47+1194-0x1eb1):(0x335+6193-0x1b66);data[pos]|=
+submit->reply_path_present?(0x979+3161-0x1552):(0x696+4836-0x197a);pos++;data[
 pos]=(UINT8)submit->message_reference;pos++;i=wms_ts_encode_address(&submit->
-address,&data[pos]);if(i==(0x8a2+1164-0xd2e)){return WMS_INVALID_PARM_SIZE_S;}
+address,&data[pos]);if(i==(0x168a+2453-0x201f)){return WMS_INVALID_PARM_SIZE_S;}
 pos+=i;data[pos]=submit->pid;pos++;pos+=wms_ts_encode_dcs(&submit->dcs,data+pos)
 ;pos+=wms_ts_encode_gw_validity(&submit->validity,data+pos);if(
 wms_ts_compute_gw_user_data_length(&submit->dcs,&submit->user_data)>
@@ -1422,21 +1422,21 @@
 WMS_TPDU_SUBMIT;raw_ts_data_ptr->len=pos;return st;}wms_status_e_type 
 wms_ts_encode_status_report(const wms_gw_status_report_s_type*status_report,
 T_zUfiSms_RawTsData*raw_ts_data_ptr){wms_status_e_type st=WMS_OK_S;UINT8*data;
-UINT8 pos=(0xc56+6514-0x25c8),i;if(status_report==NULL||raw_ts_data_ptr==NULL){
+UINT8 pos=(0x616+801-0x937),i;if(status_report==NULL||raw_ts_data_ptr==NULL){
 at_print(LOG_DEBUG,
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x65\x6e\x63\x6f\x64\x65\x5f\x73\x74\x61\x74\x75\x73\x5f\x72\x65\x70\x6f\x72\x74\x21"
 );return WMS_NULL_PTR_S;}data=raw_ts_data_ptr->data;(void)memset(data,
-(0x407+2893-0xf54),WMS_MAX_LEN);data[pos]=(0x1152+5271-0x25d9);data[pos]|=
-status_report->more?(0x1e79+1801-0x2582):(0x754+1215-0xc0f);data[pos]|=
-status_report->status_report_qualifier?(0x1f6+2865-0xd07):(0x125d+1207-0x1714);
-data[pos]|=status_report->user_data_header_present?(0x11d2+3311-0x1e81):
-(0x8d1+2956-0x145d);pos++;data[pos]=(UINT8)status_report->message_reference;pos
+(0xa7f+1718-0x1135),WMS_MAX_LEN);data[pos]=(0x11ba+2269-0x1a87);data[pos]|=
+status_report->more?(0x230+2209-0xad1):(0x2fc+1273-0x7f1);data[pos]|=
+status_report->status_report_qualifier?(0x1a45+2727-0x24cc):(0xa0a+385-0xb8b);
+data[pos]|=status_report->user_data_header_present?(0x4c0+4292-0x1544):
+(0x35d+4858-0x1657);pos++;data[pos]=(UINT8)status_report->message_reference;pos
 ++;i=wms_ts_encode_address(&status_report->address,&data[pos]);if(i==
-(0xb87+3981-0x1b14)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0x1960+1639-0x1fc7)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
 wms_ts_encode_timestamp(&status_report->timestamp,data+pos);if(i==
-(0x732+3287-0x1409)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0xb7+5631-0x16b6)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
 wms_ts_encode_timestamp(&status_report->discharge_time,data+pos);if(i==
-(0x1c9+3017-0xd92)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;data[pos]=
+(0x7ad+2003-0xf80)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;data[pos]=
 status_report->tp_status;pos++;data[pos]=(UINT8)status_report->mask;pos++;if(
 status_report->mask&WMS_TPDU_MASK_PID){data[pos]=status_report->pid;pos++;}if(
 status_report->mask&WMS_TPDU_MASK_DCS){pos+=wms_ts_encode_dcs(&status_report->
@@ -1451,7 +1451,7 @@
 T_zUfiSms_RawTsData*ptRawTsData){wms_status_e_type st=WMS_OK_S;const 
 wms_gw_pp_ts_data_s_type*msg;if(ptClientTsData==NULL||ptRawTsData==NULL){return 
 WMS_NULL_PTR_S;}msg=&ptClientTsData->u.gw_pp;switch(ptClientTsData->format){
-#if (0x1403+1447-0x19aa)

+#if (0x12a5+301-0x13d2)

 case WMS_FORMAT_CDMA:case WMS_FORMAT_ANALOG_AWISMS:case WMS_FORMAT_ANALOG_CLI:
 case WMS_FORMAT_ANALOG_VOICE_MAIL:case WMS_FORMAT_ANALOG_SMS:case WMS_FORMAT_MWI
 :st=wms_ts_encode_bearer_data(&ptClientTsData->u.cdma,ptRawTsData);break;
@@ -1461,7 +1461,7 @@
 ptRawTsData);break;case WMS_TPDU_SUBMIT:st=wms_ts_encode_submit(&msg->u.submit,
 ptRawTsData);break;case WMS_TPDU_STATUS_REPORT:st=wms_ts_encode_status_report(&
 msg->u.status_report,ptRawTsData);break;
-#if (0x69+4473-0x11e2)

+#if (0x169b+2378-0x1fe5)

 case WMS_TPDU_SUBMIT_REPORT_ACK:st=wms_ts_encode_submit_report_ack(&msg->u.
 submit_report_ack,ptRawTsData);break;case WMS_TPDU_SUBMIT_REPORT_ERROR:st=
 wms_ts_encode_submit_report_error(&msg->u.submit_report_error,ptRawTsData);break
@@ -1478,361 +1478,360 @@
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x66\x6f\x72\x6d\x61\x74\x3a\x20\x25\x64",
 ptClientTsData->format);break;}ptRawTsData->format=ptClientTsData->format;return
  st;}UINT8 wms_ts_unpack_gw_7_bit_chars(const UINT8*in,UINT8 in_len,UINT8 
-out_len_max,UINT16 shift,UINT8*out){int i=(0xd6b+668-0x1007);UINT16 pos=
-(0x333+7295-0x1fb2);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+out_len_max,UINT16 shift,UINT8*out){int i=(0x210a+762-0x2404);UINT16 pos=
+(0x1e57+1145-0x22d0);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x75\x6e\x70\x61\x63\x6b\x5f\x67\x77\x5f\x37\x5f\x62\x69\x74\x5f\x63\x68\x61\x72\x73"
-);return(0x917+4894-0x1c35);}if(shift!=(0x4c0+2928-0x1030))pos=pos+
-(0xc2+3645-0xefe);if(shift==(0xdc4+3249-0x1a6e)){out[(0x5c1+8230-0x25e7)]=in[
-(0x17f4+2872-0x232c)]>>(0x49a+6924-0x1fa5);shift=(0x9dd+1681-0x106e);i=
-(0x5ef+5169-0x1a1f);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]
-<<shift)&(0x38f+7766-0x2166);if(pos!=(0x946+5675-0x1f71)){
-#if (0x213d+941-0x24e9)       
-if(shift==(0xb88+5299-0x203b)){out[i]|=(0xf40+5563-0x24fb);}else{out[i]|=in[pos-
-(0xa5+1875-0x7f7)]>>((0x1643+192-0x16fb)-shift);}
+);return(0x1e9+6494-0x1b47);}if(shift!=(0x1da+3235-0xe7d))pos=pos+
+(0xcc2+60-0xcfd);if(shift==(0x1d1+801-0x4eb)){out[(0x477+8418-0x2559)]=in[
+(0x10ba+4100-0x20be)]>>(0xfa2+3252-0x1c55);shift=(0xb6f+662-0xe05);i=
+(0x6d2+721-0x9a2);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]<<
+shift)&(0x649+5743-0x1c39);if(pos!=(0x18a7+1523-0x1e9a)){
+#if (0x682+3623-0x14a8)       
+if(shift==(0x639+2683-0x10b4)){out[i]|=(0xd2+5543-0x1679);}else{out[i]|=in[pos-
+(0x5b+8820-0x22ce)]>>((0x334+5052-0x16e8)-shift);}
 #else

-out[i]|=in[pos-(0x21a2+79-0x21f0)]>>((0x1f6d+1683-0x25f8)-shift);
+out[i]|=in[pos-(0x1417+814-0x1744)]>>((0x1875+1441-0x1e0e)-shift);
 #endif

-}shift++;if(shift==(0xc6a+353-0xdc4)){shift=(0x7ed+7674-0x25e7);i++;if(i>=
+}shift++;if(shift==(0x6e3+6065-0x1e8d)){shift=(0x123b+2287-0x1b2a);i++;if(i>=
 out_len_max){at_print(LOG_DEBUG,
 "\x4e\x6f\x74\x20\x65\x6e\x6f\x75\x67\x68\x20\x6f\x75\x74\x70\x75\x74\x20\x62\x75\x66\x66\x65\x72\x20\x66\x6f\x72\x20\x75\x6e\x70\x61\x63\x6b\x69\x6e\x67\x21"
-);break;}out[i]=in[pos]>>(0x1128+537-0x1340);}}return(UINT8)(pos);}UINT8 
+);break;}out[i]=in[pos]>>(0x9a2+5042-0x1d53);}}return(UINT8)(pos);}UINT8 
 wms_ts_decode_address(const UINT8*data,wms_address_s_type*addr){UINT8 i,pos=
-(0x11a9+1821-0x18c6);i=data[pos];if(i>WMS_GW_ADDRESS_MAX){at_print(LOG_DEBUG,
+(0x652+942-0xa00);i=data[pos];if(i>WMS_GW_ADDRESS_MAX){at_print(LOG_DEBUG,
 "\x41\x64\x64\x72\x20\x6c\x65\x6e\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x20\x25\x64"
-,i);return(0x576+1484-0xb42);}addr->number_of_digits=i;pos++;addr->digit_mode=
+,i);return(0x45+3736-0xedd);}addr->number_of_digits=i;pos++;addr->digit_mode=
 WMS_DIGIT_MODE_4_BIT;addr->number_type=(wms_number_type_e_type)((data[pos]&
-(0xfc0+2173-0x17cd))>>(0x17ec+2302-0x20e6));addr->number_plan=(
-wms_number_plan_e_type)(data[pos]&(0x3c7+3167-0x1017));pos++;if(addr->
-number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0x3a7+7251-0x1ffa);
-addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
-(0x1082+2325-0x1996))/(0x3f7+3046-0xfdb);addr->number_of_digits=(UINT8)(addr->
-number_of_digits*(0xa80+4909-0x1da9)/(0x483+1978-0xc36));(void)
+(0x1a10+580-0x1be4))>>(0xec5+1420-0x144d));addr->number_plan=(
+wms_number_plan_e_type)(data[pos]&(0xd16+1508-0x12eb));pos++;if(addr->
+number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0x1c8a+1651-0x22fd)
+;addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
+(0x1383+5002-0x270c))/(0xb6a+3661-0x19b5);addr->number_of_digits=(UINT8)(addr->
+number_of_digits*(0x8b2+2197-0x1143)/(0x1181+2808-0x1c72));(void)
 wms_ts_unpack_gw_7_bit_chars(&data[pos],addr->number_of_digits,
-WMS_GW_ADDRESS_MAX,(0x39f+3081-0xfa8),addr->digits);pos+=bytes_increment;}else{
-for(i=(0x1401+2274-0x1ce3);i<addr->number_of_digits;i++){addr->digits[i++]=data[
-pos]&(0xe74+3324-0x1b61);addr->digits[i]=(data[pos]&(0xe36+1701-0x13eb))>>
-(0x8fa+6047-0x2095);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*data
-,wms_gw_dcs_s_type*dcs){UINT8 pos=(0x4cb+7620-0x228f);UINT8 i;if(data==NULL||dcs
+WMS_GW_ADDRESS_MAX,(0x1378+3851-0x2283),addr->digits);pos+=bytes_increment;}else
+{for(i=(0x6a7+328-0x7ef);i<addr->number_of_digits;i++){addr->digits[i++]=data[
+pos]&(0xf80+1045-0x1386);addr->digits[i]=(data[pos]&(0x11a5+3972-0x2039))>>
+(0xeb3+471-0x1086);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*data,
+wms_gw_dcs_s_type*dcs){UINT8 pos=(0x569+7178-0x2173);UINT8 i;if(data==NULL||dcs
 ==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x64\x63\x73"
-);return(0x15b2+137-0x163b);}dcs->msg_class=WMS_MESSAGE_CLASS_NONE;dcs->
+);return(0x11f4+2267-0x1acf);}dcs->msg_class=WMS_MESSAGE_CLASS_NONE;dcs->
 msg_waiting=WMS_GW_MSG_WAITING_NONE;dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;
-dcs->is_compressed=FALSE;i=(data[pos]&(0x7ad+1389-0xc5a))>>(0x2028+1631-0x2681);
-switch(i){case(0x5ed+6212-0x1e31):dcs->is_compressed=data[pos]&
-(0x1899+603-0x1ad4);if(data[pos]&(0xdfc+3034-0x19c6)){dcs->msg_class=(
-wms_message_class_e_type)(data[pos]&(0x2cb+2600-0xcf0));}else{dcs->msg_class=
-WMS_MESSAGE_CLASS_NONE;}dcs->alphabet=(wms_gw_alphabet_e_type)((data[pos]&
-(0xeed+660-0x1175))>>(0x62d+1637-0xc90));break;case(0xabd+3714-0x193c):if((data[
-pos]&(0x10cb+2243-0x195e))==(0x10fa+1529-0x16c3)){dcs->alphabet=(data[pos]&
-(0x50a+4030-0x14c4))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
-msg_class=(wms_message_class_e_type)(data[pos]&(0x20b4+874-0x241b));dcs->
+dcs->is_compressed=FALSE;i=(data[pos]&(0x14a8+2261-0x1cbd))>>(0xff9+2760-0x1abb)
+;switch(i){case(0x80b+13-0x818):dcs->is_compressed=data[pos]&(0x29+3147-0xc54);
+if(data[pos]&(0x2ca+6687-0x1cd9)){dcs->msg_class=(wms_message_class_e_type)(data
+[pos]&(0x89a+7162-0x2491));}else{dcs->msg_class=WMS_MESSAGE_CLASS_NONE;}dcs->
+alphabet=(wms_gw_alphabet_e_type)((data[pos]&(0x164+5181-0x1595))>>
+(0x22f+7377-0x1efe));break;case(0x1cc+8146-0x219b):if((data[pos]&
+(0x116a+1864-0x1882))==(0x8c4+5184-0x1cd4)){dcs->alphabet=(data[pos]&
+(0x550+1987-0xd0f))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
+msg_class=(wms_message_class_e_type)(data[pos]&(0x70c+3924-0x165d));dcs->
 is_compressed=FALSE;dcs->msg_waiting=WMS_GW_MSG_WAITING_NONE_1111;}else{dcs->
 is_compressed=FALSE;dcs->msg_class=WMS_MESSAGE_CLASS_NONE;if((data[pos]&
-(0x1ad5+1577-0x20ce))==(0x79d+4635-0x19b8)){dcs->msg_waiting=
+(0x1dfa+101-0x1e2f))==(0x8fb+2358-0x1231)){dcs->msg_waiting=
 WMS_GW_MSG_WAITING_DISCARD;dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}else if(
-(data[pos]&(0x144+2454-0xaaa))==(0x1ce1+2459-0x266c)){dcs->msg_waiting=
+(data[pos]&(0x1acd+2608-0x24cd))==(0x1861+1853-0x1f8e)){dcs->msg_waiting=
 WMS_GW_MSG_WAITING_STORE;dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}else{dcs->
 msg_waiting=WMS_GW_MSG_WAITING_STORE;dcs->alphabet=WMS_GW_ALPHABET_UCS2;}dcs->
-msg_waiting_active=(data[pos]&(0x1836+1119-0x1c8d))?TRUE:FALSE;dcs->
-msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0xc18+2586-0x162f))
-;}break;default:at_print(LOG_DEBUG,
+msg_waiting_active=(data[pos]&(0x1bf+7697-0x1fc8))?TRUE:FALSE;dcs->
+msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0x5b9+500-0x7aa));}
+break;default:at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x44\x43\x53\x3a\x20\x25\x78",data[pos]);dcs->
 alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->is_compressed=FALSE;dcs->msg_waiting
 =WMS_GW_MSG_WAITING_NONE;dcs->msg_class=WMS_MESSAGE_CLASS_NONE;break;}if(dcs->
 alphabet>WMS_GW_ALPHABET_UCS2){dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}dcs
 ->raw_dcs_data=data[pos];pos++;return pos;}UINT8 wms_ts_decode_timestamp(const 
-UINT8*data,wms_timestamp_s_type*timestamp){UINT8 pos=(0x586+8530-0x26d8),i,j;if(
+UINT8*data,wms_timestamp_s_type*timestamp){UINT8 pos=(0x91b+5247-0x1d9a),i,j;if(
 data==NULL||timestamp==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x74\x69\x6d\x65\x73\x74\x61\x6d\x70"
-);return(0x110c+4645-0x2331);}i=((data[pos]&(0x18b1+2380-0x21ee))<<
-(0x3a8+3081-0xfad))+((data[pos]&(0x182a+91-0x1795))>>(0x14fd+1156-0x197d));if(!
+);return(0xdd0+2851-0x18f3);}i=((data[pos]&(0x15d0+2942-0x213f))<<
+(0x9d+9534-0x25d7))+((data[pos]&(0xe89+6378-0x2683))>>(0x46f+8380-0x2527));if(!
 wms_ts_bcd_to_int(i,&j)){at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x59\x65\x61\x72\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x1272+1030-0x1678);}timestamp->year=i;pos++;i=((data[pos]&
-(0x69+137-0xe3))<<(0x933+7274-0x2599))+((data[pos]&(0xa29+4344-0x1a31))>>
-(0x473+4585-0x1658));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x1305+518-0x14ff)||j<
-(0x342+2832-0xe51)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x7c3+1448-0xd6b);}timestamp->year=i;pos++;i=((data[pos]&
+(0xd63+4632-0x1f6c))<<(0x3a2+2566-0xda4))+((data[pos]&(0x2c1+2598-0xbf7))>>
+(0x5e6+1913-0xd5b));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xef6+695-0x11a1)||j<
+(0x209+792-0x520)){at_print(LOG_DEBUG,
 "\x4d\x6f\x6e\x74\x68\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64"
-,j);i=(0x91d+246-0xa12);}}else{at_print(LOG_DEBUG,
+,j);i=(0x3+589-0x24f);}}else{at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x4d\x6f\x6e\x74\x68\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x194b+1101-0x1d97);}timestamp->month=i;pos++;i=((data[pos]&
-(0x990+1752-0x1059))<<(0x70a+2874-0x1240))+((data[pos]&(0x3a7+4537-0x1470))>>
-(0x11c+3195-0xd93));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x5d7+1655-0xc2f)||j<
-(0x1824+3528-0x25eb)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x75f+7484-0x249a);}timestamp->month=i;pos++;i=((data[pos]&
+(0xf7+5358-0x15d6))<<(0x4bc+3388-0x11f4))+((data[pos]&(0x63d+6874-0x2027))>>
+(0x1217+5086-0x25f1));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x711+6287-0x1f81)||j<
+(0x5db+1170-0xa6c)){at_print(LOG_DEBUG,
 "\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);i=
-(0x161c+559-0x184a);}}else{at_print(LOG_DEBUG,
+(0xe83+5973-0x25d7);}}else{at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x44\x61\x79\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x207+5482-0x1770);}timestamp->day=i;pos++;i=((data[pos]&
-(0x16f4+415-0x1884))<<(0xbb0+17-0xbbd))+((data[pos]&(0x2b0+502-0x3b6))>>
-(0xf5+9420-0x25bd));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x10c2+2975-0x1c4a)){
+,data[pos]);i=(0x124+9061-0x2488);}timestamp->day=i;pos++;i=((data[pos]&
+(0x746+8112-0x26e7))<<(0x13d0+4094-0x23ca))+((data[pos]&(0xacd+2561-0x13de))>>
+(0xfd7+2654-0x1a31));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x88f+6899-0x236b)){
 at_print(LOG_DEBUG,
 "\x48\x6f\x75\x72\x20\x69\x73\x20\x74\x6f\x6f\x20\x6c\x61\x72\x67\x65\x3a\x20\x25\x64"
-,j);i=(0x72+5841-0x1743);}}else{at_print(LOG_DEBUG,
+,j);i=(0x1772+78-0x17c0);}}else{at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x48\x6f\x75\x72\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x198d+1968-0x213d);}timestamp->hour=i;pos++;i=((data[pos]&
-(0x8c2+7295-0x2532))<<(0x4f7+4679-0x173a))+((data[pos]&(0x1575+1698-0x1b27))>>
-(0x8d2+337-0xa1f));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xc9+1773-0x77b)){at_print(
-LOG_DEBUG,
+,data[pos]);i=(0x12aa+39-0x12d1);}timestamp->hour=i;pos++;i=((data[pos]&
+(0x1301+2844-0x1e0e))<<(0x23c9+338-0x2517))+((data[pos]&(0x2ba+1502-0x7a8))>>
+(0x694+6168-0x1ea8));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x227a+878-0x25ad)){
+at_print(LOG_DEBUG,
 "\x4d\x69\x6e\x75\x74\x65\x20\x69\x73\x20\x74\x6f\x6f\x20\x6c\x61\x72\x67\x65\x3a\x20\x25\x64"
-,j);i=(0x9b0+5503-0x1f2f);}}else{at_print(LOG_DEBUG,
+,j);i=(0x48f+1081-0x8c8);}}else{at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x4d\x69\x6e\x75\x74\x65\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x648+7105-0x2209);}timestamp->minute=i;pos++;i=((data[pos]&
-(0x10f7+330-0x1232))<<(0x6b4+2987-0x125b))+((data[pos]&(0x3db+3997-0x1288))>>
-(0x236b+167-0x240e));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xd2a+967-0x10b6)){
+,data[pos]);i=(0x1082+1281-0x1583);}timestamp->minute=i;pos++;i=((data[pos]&
+(0x16f9+325-0x182f))<<(0x1476+1843-0x1ba5))+((data[pos]&(0x865+5291-0x1c20))>>
+(0xc8c+6527-0x2607));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x65b+6406-0x1f26)){
 at_print(LOG_DEBUG,
 "\x53\x65\x63\x6f\x6e\x64\x20\x69\x73\x20\x74\x6f\x6f\x20\x6c\x61\x72\x67\x65\x3a\x20\x25\x64"
-,i);i=(0x26+7617-0x1de7);}}else{at_print(LOG_DEBUG,
+,i);i=(0xdba+5482-0x2324);}}else{at_print(LOG_DEBUG,
 "\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x44\x69\x67\x69\x74\x73\x20\x69\x6e\x20\x45\x6e\x63\x6f\x64\x65\x64\x20\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x20\x53\x65\x63\x6f\x6e\x64\x20\x3a\x20\x25\x64"
-,data[pos]);i=(0x34+8415-0x2113);}timestamp->second=i;pos++;if(data[pos]&
-(0x1162+834-0x149c)){timestamp->timezone=(data[pos]&(0x10a2+1167-0x152a))*
-(0x5b1+3122-0x11d9)+((data[pos]&(0x13db+430-0x1499))>>(0xc4d+323-0xd8c));
-timestamp->timezone*=(-(0xe38+1225-0x1300));}else{timestamp->timezone=(sint7)((
-data[pos]&(0x1269+4670-0x2498))*(0x475+4101-0x1470)+((data[pos]&
-(0xdc4+2807-0x17cb))>>(0x1f36+1542-0x2538)));}if(timestamp->timezone>
-(0x1716+2155-0x1f51)||timestamp->timezone<-(0x1717+2122-0x1f31)){at_print(
-LOG_DEBUG,
+,data[pos]);i=(0x1b9+895-0x538);}timestamp->second=i;pos++;if(data[pos]&
+(0x9a2+4296-0x1a62)){timestamp->timezone=(data[pos]&(0x42a+1204-0x8d7))*
+(0x1555+2050-0x1d4d)+((data[pos]&(0x1c7b+769-0x1e8c))>>(0x836+4270-0x18e0));
+timestamp->timezone*=(-(0xed3+2163-0x1745));}else{timestamp->timezone=(sint7)((
+data[pos]&(0x1610+2351-0x1f30))*(0x125f+2182-0x1adb)+((data[pos]&
+(0xdf7+3399-0x1a4e))>>(0xb0+9370-0x2546)));}if(timestamp->timezone>
+(0x3f7+2419-0xd3a)||timestamp->timezone<-(0xe7f+5591-0x2426)){at_print(LOG_DEBUG
+,
 "\x54\x69\x6d\x65\x7a\x6f\x6e\x65\x20\x69\x73\x20\x6f\x75\x74\x20\x6f\x66\x20\x62\x6f\x75\x6e\x64\x3a\x20\x25\x64"
-,timestamp->timezone);timestamp->timezone=(0x841+7207-0x2468);}pos++;return pos;
+,timestamp->timezone);timestamp->timezone=(0x1cc+8643-0x238f);}pos++;return pos;
 }static UINT8 wms_ts_decode_udh_concat_8(const UINT8*udh,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x299+2647-0xcf0);if(udh==NULL||header_ptr==NULL){
+header_ptr){UINT8 pos=(0x59f+6206-0x1ddd);if(udh==NULL||header_ptr==NULL){
 at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x83d+3255-0x14f4);}if(udh[pos]<(0xdea+2454-0x177d)){at_print(LOG_DEBUG,
+(0x14a9+972-0x1875);}if(udh[pos]<(0x1bf5+759-0x1ee9)){at_print(LOG_DEBUG,
 "\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x43\x6f\x6e\x63\x61\x74\x20\x38\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x9b+9324-0x2507);}if(udh[pos+(0x6a8+4730-0x1920)]==
-(0xfdb+2672-0x1a4b)||udh[pos+(0x39f+5148-0x17b8)]>udh[pos+(0x1a7a+2746-0x2532)])
-{at_print(LOG_DEBUG,
+,udh[pos]);return(0x1416+1494-0x19ec);}if(udh[pos+(0x374+1571-0x995)]==
+(0x50+3639-0xe87)||udh[pos+(0x1360+486-0x1543)]>udh[pos+(0xba1+826-0xed9)]){
+at_print(LOG_DEBUG,
 "\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x43\x6f\x6e\x74\x61\x63\x74\x20\x38\x20\x77\x69\x74\x68\x20\x6f\x75\x74\x20\x6f\x66\x20\x62\x6f\x75\x6e\x64\x20\x6d\x61\x78\x20\x6d\x65\x73\x73\x61\x67\x65\x73"
-);return(0x2272+264-0x237a);}pos++;header_ptr->header_id=WMS_UDH_CONCAT_8;
+);return(0xb28+6324-0x23dc);}pos++;header_ptr->header_id=WMS_UDH_CONCAT_8;
 header_ptr->u.concat_8.msg_ref=udh[pos++];header_ptr->u.concat_8.total_sm=udh[
-pos++];header_ptr->u.concat_8.seq_num=udh[pos++];return(udh[(0x2d5+8259-0x2318)]
-+(0x525+1734-0xbea));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x5c5+927-0x964);if(udh==NULL||header_ptr
+pos++];header_ptr->u.concat_8.seq_num=udh[pos++];return(udh[(0x11a8+2291-0x1a9b)
+]+(0x1d6d+872-0x20d4));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0xd86+290-0xea8);if(udh==NULL||header_ptr
 ==NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");
-return(0x15+4712-0x127d);}if(udh[pos]<(0x1591+692-0x1841)){at_print(LOG_DEBUG,
+return(0x2156+1322-0x2680);}if(udh[pos]<(0x278+3310-0xf62)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x43\x6f\x6e\x63\x61\x74\x31\x36\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1291+4829-0x256e);}if(udh[pos+(0x22f+2366-0xb6a)]==
-(0x401+4658-0x1633)||udh[pos+(0x57c+6346-0x1e42)]==(0x74+2457-0xa0d)||udh[pos+
-(0x9e1+6945-0x24fe)]>udh[pos+(0x17ec+919-0x1b80)])return(0x56b+1368-0xac3);
+,udh[pos]);return(0xe00+553-0x1029);}if(udh[pos+(0xb71+3805-0x1a4b)]==
+(0x1795+3249-0x2446)||udh[pos+(0xbe6+3398-0x1928)]==(0xeb7+4624-0x20c7)||udh[pos
++(0x207d+1616-0x26c9)]>udh[pos+(0x17eb+515-0x19eb)])return(0x1432+1499-0x1a0d);
 header_ptr->header_id=WMS_UDH_CONCAT_16;pos++;header_ptr->u.concat_16.msg_ref=
 udh[pos++];header_ptr->u.concat_16.msg_ref=(UINT16)(header_ptr->u.concat_16.
-msg_ref<<(0x2cb+8222-0x22e1))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
-pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[(0x29+5771-0x16b4)]
-+(0xf33+1733-0x15f7));}static UINT8 wms_ts_udh_decode_first_seg_check(const 
+msg_ref<<(0x19c1+1203-0x1e6c))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
+pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[(0xa5d+1462-0x1013)
+]+(0x338+9164-0x2703));}static UINT8 wms_ts_udh_decode_first_seg_check(const 
 UINT8 len,const UINT8*data,UINT8*is_first_segment_ptr){UINT8 pos=
-(0x760+5091-0x1b43);UINT8 num_headers=(0x3d4+8197-0x23d9);UINT8 udhl=
-(0x885+5013-0x1c1a);UINT8 iedl=(0xcea+5538-0x228c);UINT8 iei=
-(0x1288+1727-0x1947);*is_first_segment_ptr=TRUE;if(data==NULL||data[pos]==
-(0x12c8+4639-0x24e7)||len==(0x115c+246-0x1252)){at_print(LOG_DEBUG,
+(0x59a+5506-0x1b1c);UINT8 num_headers=(0x50b+7109-0x20d0);UINT8 udhl=
+(0xdd3+3521-0x1b94);UINT8 iedl=(0x9eb+6106-0x21c5);UINT8 iei=(0xb0d+1519-0x10fc)
+;*is_first_segment_ptr=TRUE;if(data==NULL||data[pos]==(0x772+1842-0xea4)||len==
+(0x729+4391-0x1850)){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x75\x64\x68\x5f\x64\x65\x63\x6f\x64\x65\x5f\x66\x69\x72\x73\x74\x5f\x73\x65\x67\x5f\x63\x68\x65\x63\x6b"
 );return FALSE;}udhl=data[pos];pos++;while((pos<udhl)&&(num_headers<
-WMS_MAX_UD_HEADERS)){iei=data[pos];iedl=data[pos+(0x566+3330-0x1267)];if(iei==
-WMS_UDH_CONCAT_16){if(data[pos+(0xcdb+4188-0x1d32)]!=(0xf35+1895-0x169b)){
+WMS_MAX_UD_HEADERS)){iei=data[pos];iedl=data[pos+(0xbca+5336-0x20a1)];if(iei==
+WMS_UDH_CONCAT_16){if(data[pos+(0x275+2689-0xcf1)]!=(0x18c6+1952-0x2065)){
 at_print(LOG_DEBUG,
 "\x57\x4d\x53\x5f\x55\x44\x48\x5f\x43\x4f\x4e\x43\x41\x54\x5f\x31\x36\x20\x6e\x6f\x74\x20\x66\x69\x72\x73\x74\x20\x73\x65\x67\x6d\x65\x6e\x74\x21"
 );*is_first_segment_ptr=FALSE;return TRUE;}else{return TRUE;}}else{num_headers++
-;pos+=((0x142+2232-0x9f8)+iedl);}}return TRUE;}static UINT8 
+;pos+=((0xd08+295-0xe2d)+iedl);}}return TRUE;}static UINT8 
 wms_ts_decode_udh_special_sm(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 
-pos=(0x1cc+7868-0x2088);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x280+3732-0x1114);}if(
-udh[pos]<(0x1a2+3308-0xe8c)){at_print(LOG_DEBUG,
+pos=(0x20+9734-0x2626);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x16c6+3845-0x25cb);}if(
+udh[pos]<(0x455+4523-0x15fe)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x53\x70\x65\x63\x69\x61\x6c\x20\x53\x4d\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0xcdc+3511-0x1a93);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x625+1732-0xce9);}pos++;header_ptr->header_id=
 WMS_UDH_SPECIAL_SM;header_ptr->u.special_sm.msg_waiting=(
-wms_gw_msg_waiting_e_type)((udh[pos]>>(0x1d0d+26-0x1d20)==(0x4d7+4220-0x1553))?
-WMS_GW_MSG_WAITING_DISCARD:WMS_GW_MSG_WAITING_STORE);header_ptr->u.special_sm.
-msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(udh[pos++]&
-(0x158f+2426-0x1e8a));header_ptr->u.special_sm.message_count=udh[pos++];return(
-udh[(0x4bf+4327-0x15a6)]+(0x16c8+1371-0x1c22));}static UINT8 
-wms_ts_decode_udh_port_8(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
-(0x849+7306-0x24d3);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x4+8347-0x209f);}if(udh[
-pos]<(0x3b7+8545-0x2516)){at_print(LOG_DEBUG,
+wms_gw_msg_waiting_e_type)((udh[pos]>>(0x1e0a+1137-0x2274)==(0x5b5+8205-0x25c2))
+?WMS_GW_MSG_WAITING_DISCARD:WMS_GW_MSG_WAITING_STORE);header_ptr->u.special_sm.
+msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(udh[pos++]&(0xf67+5481-0x2451)
+);header_ptr->u.special_sm.message_count=udh[pos++];return(udh[
+(0x5a7+7227-0x21e2)]+(0x1e2b+341-0x1f7f));}static UINT8 wms_ts_decode_udh_port_8
+(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x10f8+4433-0x2249);if(
+udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1383+159-0x1422);}if(
+udh[pos]<(0xf75+1329-0x14a4)){at_print(LOG_DEBUG,
 "\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x50\x6f\x72\x74\x20\x38\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1ce6+2485-0x269b);}pos++;header_ptr->header_id=
-WMS_UDH_PORT_8;header_ptr->u.wap_8.dest_port=udh[pos++];header_ptr->u.wap_8.
-orig_port=udh[pos++];return(udh[(0x1ad3+481-0x1cb4)]+(0x753+5057-0x1b13));}
-static UINT8 wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr)
-{UINT8 pos=(0xad2+1105-0xf23);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
-,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x23fc+15-0x240b);}if(
-udh[pos]<(0x1bff+680-0x1ea3)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x1605+138-0x168f);}pos++;header_ptr->header_id=WMS_UDH_PORT_8
+;header_ptr->u.wap_8.dest_port=udh[pos++];header_ptr->u.wap_8.orig_port=udh[pos
+++];return(udh[(0x1d41+1781-0x2436)]+(0x10a1+4557-0x226d));}static UINT8 
+wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
+(0x122f+3300-0x1f13);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x3e3+3707-0x125e);}if(
+udh[pos]<(0x14d0+575-0x170b)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x50\x6f\x72\x74\x31\x36\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0xcbd+1107-0x1110);}header_ptr->header_id=WMS_UDH_PORT_16;pos
+,udh[pos]);return(0x122a+163-0x12cd);}header_ptr->header_id=WMS_UDH_PORT_16;pos
 ++;header_ptr->u.wap_16.dest_port=udh[pos++];header_ptr->u.wap_16.dest_port=(
-UINT16)(header_ptr->u.wap_16.dest_port<<(0x670+1972-0xe1c))|udh[pos++];
+UINT16)(header_ptr->u.wap_16.dest_port<<(0x44f+8678-0x262d))|udh[pos++];
 header_ptr->u.wap_16.orig_port=udh[pos++];header_ptr->u.wap_16.orig_port=(UINT16
-)(header_ptr->u.wap_16.orig_port<<(0x13cf+1935-0x1b56))|udh[pos++];return(udh[
-(0xf8a+3681-0x1deb)]+(0x178f+1306-0x1ca8));}static UINT8 
+)(header_ptr->u.wap_16.orig_port<<(0xd54+468-0xf20))|udh[pos++];return(udh[
+(0x1106+4446-0x2264)]+(0xe28+5418-0x2351));}static UINT8 
 wms_ts_decode_udh_text_formatting(const UINT8*udh,wms_udh_s_type*header_ptr){
-UINT8 pos=(0xb28+6075-0x22e3);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
-,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x152b+1583-0x1b5a);}if(
-udh[pos]<(0x1847+271-0x1953)){at_print(LOG_DEBUG,
+UINT8 pos=(0xa47+1506-0x1029);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
+,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1d57+519-0x1f5e);}if(
+udh[pos]<(0x103f+4005-0x1fe1)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x54\x65\x78\x74\x20\x46\x6f\x72\x6d\x61\x74\x74\x69\x6e\x67\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x428+6534-0x1dae);}if(udh[pos]>=(0x1b6a+1714-0x2218)){
+,udh[pos]);return(0x652+2704-0x10e2);}if(udh[pos]>=(0x1550+3575-0x2343)){
 header_ptr->u.text_formating.is_color_present=TRUE;}else{header_ptr->u.
 text_formating.is_color_present=FALSE;}pos++;header_ptr->header_id=
 WMS_UDH_TEXT_FORMATING;header_ptr->u.text_formating.start_position=udh[pos++];
 header_ptr->u.text_formating.text_formatting_length=udh[pos++];header_ptr->u.
 text_formating.alignment_type=(wms_udh_alignment_e_type)(udh[pos]&
-(0x108d+2628-0x1ace));header_ptr->u.text_formating.font_size=(
-wms_udh_font_size_e_type)((udh[pos]&(0xb52+2976-0x16e6))>>(0xa61+7273-0x26c8));
-header_ptr->u.text_formating.style_bold=(udh[pos]&(0xdd0+2750-0x187e))>>
-(0x80+3827-0xf6f);header_ptr->u.text_formating.style_italic=(udh[pos]&
-(0x279+1108-0x6ad))>>(0x1ba+1665-0x836);header_ptr->u.text_formating.
-style_underlined=(udh[pos]&(0x1af+5714-0x17c1))>>(0x1402+2517-0x1dd1);header_ptr
-->u.text_formating.style_strikethrough=(udh[pos]&(0xa8b+2439-0x1392))>>
-(0xf36+3650-0x1d71);pos++;if(header_ptr->u.text_formating.is_color_present){
+(0x36b+1578-0x992));header_ptr->u.text_formating.font_size=(
+wms_udh_font_size_e_type)((udh[pos]&(0xa5b+4598-0x1c45))>>(0xf1+5162-0x1519));
+header_ptr->u.text_formating.style_bold=(udh[pos]&(0x662+6289-0x1ee3))>>
+(0x993+32-0x9af);header_ptr->u.text_formating.style_italic=(udh[pos]&
+(0xcf2+6613-0x26a7))>>(0x2f5+6250-0x1b5a);header_ptr->u.text_formating.
+style_underlined=(udh[pos]&(0x17b9+1053-0x1b96))>>(0x12b+3251-0xdd8);header_ptr
+->u.text_formating.style_strikethrough=(udh[pos]&(0xa78+5328-0x1ec8))>>
+(0x621+1643-0xc85);pos++;if(header_ptr->u.text_formating.is_color_present){
 header_ptr->u.text_formating.text_color_foreground=(wms_udh_text_color_e_type)(
-udh[pos]&(0x1723+1151-0x1b93));header_ptr->u.text_formating.
-text_color_background=(wms_udh_text_color_e_type)((udh[pos]&(0x15a2+4165-0x24f7)
-)>>(0x537+4090-0x152d));pos++;}return(udh[(0x10a0+3606-0x1eb6)]+
-(0x75d+7985-0x268d));}static UINT8 wms_ts_decode_udh_pre_def_sound(const UINT8*
-udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x15bd+3594-0x23c7);if(udh==NULL||
-header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1e3a+904-0x21c2);}if(
-udh[pos]<(0x62b+8058-0x25a3)){at_print(LOG_DEBUG,
+udh[pos]&(0x2a1+2189-0xb1f));header_ptr->u.text_formating.text_color_background=
+(wms_udh_text_color_e_type)((udh[pos]&(0xfb0+1201-0x1371))>>(0x16fa+1580-0x1d22)
+);pos++;}return(udh[(0x209b+1563-0x26b6)]+(0x507+6803-0x1f99));}static UINT8 
+wms_ts_decode_udh_pre_def_sound(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
+ pos=(0x127d+4115-0x2290);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x435+7975-0x235c);}if(
+udh[pos]<(0xa29+1889-0x1188)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x50\x72\x65\x20\x44\x65\x66\x69\x6e\x65\x64\x20\x53\x6f\x75\x6e\x64\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0xc7f+5319-0x2146);}pos++;header_ptr->header_id=
+,udh[pos]);return(0xcb9+5940-0x23ed);}pos++;header_ptr->header_id=
 WMS_UDH_PRE_DEF_SOUND;header_ptr->u.pre_def_sound.position=udh[pos++];header_ptr
-->u.pre_def_sound.snd_number=udh[pos++];return(udh[(0x71b+1183-0xbba)]+
-(0x17e3+2592-0x2202));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8
-*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x1c34+529-0x1e45),j;if(udh==NULL||
+->u.pre_def_sound.snd_number=udh[pos++];return(udh[(0xf54+4986-0x22ce)]+
+(0xded+190-0xeaa));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8*
+udh,wms_udh_s_type*header_ptr){UINT8 pos=(0xf7+6255-0x1966),j;if(udh==NULL||
 header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x78c+7487-0x24cb);}if(
-udh[pos]==(0x1405+1300-0x1919)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1388+1494-0x195e);}if(
+udh[pos]==(0x33c+6134-0x1b32)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x55\x73\x65\x72\x20\x44\x65\x66\x69\x6e\x65\x64\x20\x53\x6f\x75\x6e\x64\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x6e\x6f\x20\x44\x61\x74\x61"
-);return(0xee4+4265-0x1f8d);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
-header_ptr->u.user_def_sound.data_length=udh[pos++]-(0xcf6+3552-0x1ad5);
+);return(0x4b7+327-0x5fe);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
+header_ptr->u.user_def_sound.data_length=udh[pos++]-(0xeb9+4414-0x1ff6);
 header_ptr->u.user_def_sound.position=udh[pos++];if(header_ptr->u.user_def_sound
 .data_length>WMS_UDH_MAX_SND_SIZE){at_print(LOG_DEBUG,
 "\x4d\x61\x78\x20\x53\x69\x7a\x65\x20\x45\x78\x63\x65\x65\x64\x20\x48\x65\x61\x64\x65\x72\x20\x69\x64\x20\x25\x64\x20"
-,header_ptr->header_id);return(0xb4f+4478-0x1ccd);}memset(header_ptr->u.
-user_def_sound.user_def_sound,(0x727+2705-0x10b9),WMS_UDH_MAX_SND_SIZE);for(j=
-(0x3e9+1940-0xb7d);j<header_ptr->u.user_def_sound.data_length;j++)header_ptr->u.
-user_def_sound.user_def_sound[j]=udh[pos++];return pos;}static UINT8 
+,header_ptr->header_id);return(0xc73+4651-0x1e9e);}memset(header_ptr->u.
+user_def_sound.user_def_sound,(0x10b5+2629-0x19fb),WMS_UDH_MAX_SND_SIZE);for(j=
+(0x23fb+639-0x267a);j<header_ptr->u.user_def_sound.data_length;j++)header_ptr->u
+.user_def_sound.user_def_sound[j]=udh[pos++];return pos;}static UINT8 
 wms_ts_decode_udh_pre_def_anim(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 
-pos=(0xbad+2870-0x16e3);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x15e5+79-0x1634);}if(udh
-[pos]!=(0xc58+1572-0x127a)){at_print(LOG_DEBUG,
+pos=(0xb86+142-0xc14);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xfe2+54-0x1018);}if(udh[
+pos]!=(0x18a2+1331-0x1dd3)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x50\x72\x65\x20\x44\x65\x66\x69\x6e\x65\x64\x20\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0xa8b+5196-0x1ed7);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x1d33+2483-0x26e6);}pos++;header_ptr->header_id=
 WMS_UDH_PRE_DEF_ANIM;header_ptr->u.pre_def_anim.position=udh[pos++];header_ptr->
 u.pre_def_anim.animation_number=udh[pos++];return pos;}static UINT8 
 wms_ts_decode_udh_large_anim(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 
-pos=(0x1198+1773-0x1885),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xe16+4156-0x1e52);}if(
+pos=(0x918+219-0x9f3),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1132+850-0x1484);}if(
 udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_LARGE_BITMAP_SIZE+
-(0x10f9+4178-0x214a))){at_print(LOG_DEBUG,
+(0x146d+2421-0x1de1))){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x4c\x61\x72\x67\x65\x20\x44\x65\x66\x69\x6e\x65\x64\x20\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1ac2+1768-0x21aa);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
-pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0x75c+1231-0xc2b);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x22d2+237-0x23bf);k<
+,udh[pos]);return(0xfc+8618-0x22a6);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
+pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0xdb5+5959-0x24fc);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0xf1c+2192-0x17ac);k<
 WMS_UDH_LARGE_BITMAP_SIZE;k++)header_ptr->u.large_anim.data[j][k]=udh[pos++];
 return pos;}static UINT8 wms_ts_decode_udh_small_anim(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x107c+4414-0x21ba),j,k;if(udh==NULL||
+wms_udh_s_type*header_ptr){UINT8 pos=(0x105+6350-0x19d3),j,k;if(udh==NULL||
 header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1297+3763-0x214a);}if(
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1115+3411-0x1e68);}if(
 udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_SMALL_BITMAP_SIZE+
-(0x1be9+2480-0x2598))){at_print(LOG_DEBUG,
+(0x2108+379-0x2282))){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x4c\x61\x72\x67\x65\x20\x44\x65\x66\x69\x6e\x65\x64\x20\x41\x6e\x69\x6d\x61\x74\x69\x6f\x6e\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x323+8612-0x24c7);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
-pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0x1d48+2127-0x2597);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x17f7+2237-0x20b4);k<
+,udh[pos]);return(0x2c8+7692-0x20d4);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
+pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0x59b+1333-0xad0);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x169b+61-0x16d8);k<
 WMS_UDH_SMALL_BITMAP_SIZE;k++)header_ptr->u.small_anim.data[j][k]=udh[pos++];
 return pos;}static UINT8 wms_ts_decode_udh_large_picture(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x2026+1633-0x2687),j;if(udh==NULL||
+wms_udh_s_type*header_ptr){UINT8 pos=(0xbd5+2671-0x1644),j;if(udh==NULL||
 header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xa42+6356-0x2316);}if(
-udh[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x271+2536-0xc58)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x682+1459-0xc35);}if(udh
+[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x835+4899-0x1b57)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x4c\x61\x72\x67\x65\x20\x50\x69\x63\x74\x75\x72\x65\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1c+1561-0x635);}header_ptr->header_id=WMS_UDH_LARGE_PICTURE;
-pos++;header_ptr->u.large_picture.position=udh[pos++];for(j=(0x14c4+4031-0x2483)
-;j<WMS_UDH_LARGE_PIC_SIZE;j++)header_ptr->u.large_picture.data[j]=udh[pos++];
-return pos;}static UINT8 wms_ts_decode_udh_small_picture(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x1748+1116-0x1ba4),j;if(udh==NULL||
-header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x104b+437-0x1200);}if(
-udh[pos]!=WMS_UDH_SMALL_PIC_SIZE+(0x1bf9+2422-0x256e)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x1708+709-0x19cd);}header_ptr->header_id=
+WMS_UDH_LARGE_PICTURE;pos++;header_ptr->u.large_picture.position=udh[pos++];for(
+j=(0x1848+961-0x1c09);j<WMS_UDH_LARGE_PIC_SIZE;j++)header_ptr->u.large_picture.
+data[j]=udh[pos++];return pos;}static UINT8 wms_ts_decode_udh_small_picture(
+const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x276+2787-0xd59),j;if(udh
+==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1b7f+2572-0x258b);}if(
+udh[pos]!=WMS_UDH_SMALL_PIC_SIZE+(0xe32+578-0x1073)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x53\x6d\x61\x6c\x6c\x20\x50\x69\x63\x74\x75\x72\x65\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x67\x6e\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x9c0+4155-0x19fb);}header_ptr->header_id=
+,udh[pos]);return(0x1e14+585-0x205d);}header_ptr->header_id=
 WMS_UDH_SMALL_PICTURE;pos++;header_ptr->u.small_picture.position=udh[pos++];for(
-j=(0xe3f+6143-0x263e);j<WMS_UDH_SMALL_PIC_SIZE;j++)header_ptr->u.small_picture.
+j=(0x12ac+1195-0x1757);j<WMS_UDH_SMALL_PIC_SIZE;j++)header_ptr->u.small_picture.
 data[j]=udh[pos++];return pos;}static UINT8 wms_ts_decode_udh_var_picture(const 
-UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x12c0+254-0x13be),j,pic_size;if
-(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xe44+2724-0x18e8);}if(
-udh[pos]>WMS_UDH_VAR_PIC_SIZE+(0x5ea+958-0x9a5)){at_print(LOG_DEBUG,
+UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x1f9a+1020-0x2396),j,pic_size;
+if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xb2d+2443-0x14b8);}if(
+udh[pos]>WMS_UDH_VAR_PIC_SIZE+(0x1c04+2375-0x2548)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x56\x61\x72\x20\x50\x69\x63\x74\x75\x72\x65\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1131+3443-0x1ea4);}if((udh[pos]-(0x881+6310-0x2124))!=(udh[
-pos+(0x7c4+6471-0x2109)]*udh[pos+(0x41c+2278-0xcff)])){at_print(LOG_DEBUG,
+,udh[pos]);return(0xaa4+7154-0x2696);}if((udh[pos]-(0x16c3+3394-0x2402))!=(udh[
+pos+(0x69c+3172-0x12fe)]*udh[pos+(0x1875+564-0x1aa6)])){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x56\x61\x72\x20\x50\x69\x63\x74\x75\x72\x65\x2c\x20\x70\x69\x63\x20\x73\x69\x7a\x65\x20\x76\x61\x6c\x75\x65\x20\x6d\x69\x73\x6d\x61\x74\x63\x68\x20\x77\x69\x74\x68\x20\x68\x65\x69\x67\x74\x20\x61\x6e\x64\x20\x77\x65\x69\x67\x68\x74"
-);return(0xc94+2067-0x14a7);}pic_size=udh[pos++]-(0x1616+1925-0x1d98);header_ptr
-->header_id=WMS_UDH_VAR_PICTURE;header_ptr->u.var_picture.position=udh[pos++];
-header_ptr->u.var_picture.width=(UINT8)(udh[pos++]*(0xf47+4204-0x1fab));
-header_ptr->u.var_picture.height=udh[pos++];for(j=(0x1a67+1622-0x20bd);j<
+);return(0x170+3434-0xeda);}pic_size=udh[pos++]-(0x31a+8974-0x2625);header_ptr->
+header_id=WMS_UDH_VAR_PICTURE;header_ptr->u.var_picture.position=udh[pos++];
+header_ptr->u.var_picture.width=(UINT8)(udh[pos++]*(0x6c7+5949-0x1dfc));
+header_ptr->u.var_picture.height=udh[pos++];for(j=(0x17fa+2079-0x2019);j<
 pic_size&&j<WMS_UDH_VAR_PIC_SIZE;j++)header_ptr->u.var_picture.data[j]=udh[pos++
 ];return pos;}static UINT8 wms_ts_decode_udh_user_prompt(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x1058+5012-0x23ec);if(udh==NULL||
+wms_udh_s_type*header_ptr){UINT8 pos=(0x14cf+1947-0x1c6a);if(udh==NULL||
 header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1ad+7835-0x2048);}if(
-udh[pos]<(0x1f24+82-0x1f75)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x962+3853-0x186f);}if(
+udh[pos]<(0x161+9602-0x26e2)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x55\x73\x65\x72\x20\x50\x72\x6f\x6d\x70\x74\x20\x70\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x1542+224-0x1622);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x16c+5682-0x179e);}pos++;header_ptr->header_id=
 WMS_UDH_USER_PROMPT;header_ptr->u.user_prompt.number_of_objects=udh[pos++];
-return(udh[(0x6c7+2321-0xfd8)]+(0x135c+2441-0x1ce4));}static UINT8 
+return(udh[(0x21e3+606-0x2441)]+(0x3f3+2405-0xd57));}static UINT8 
 wms_ts_decode_udh_eo(const UINT8*udh,UINT8 first_segment,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x278+1426-0x80a),udh_length;if(udh==NULL||header_ptr==
+header_ptr){UINT8 pos=(0xc1a+1093-0x105f),udh_length;if(udh==NULL||header_ptr==
 NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x43+5532-0x15df);}if(udh[pos]==(0xae4+5731-0x2147)){at_print(LOG_DEBUG,
+(0xe9f+1277-0x139c);}if(udh[pos]==(0xbe3+5736-0x224b)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x45\x78\x74\x65\x6e\x64\x65\x64\x20\x4f\x62\x6a\x65\x63\x74\x20\x70\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x6e\x6f\x20\x44\x61\x74\x61"
-);return(0x1fbd+130-0x203f);}udh_length=udh[pos++];header_ptr->header_id=
+);return(0xf0f+3195-0x1b8a);}udh_length=udh[pos++];header_ptr->header_id=
 WMS_UDH_EXTENDED_OBJECT;header_ptr->u.eo.first_segment=first_segment;if(
 first_segment==TRUE){if(udh_length<WMS_UDH_OCTETS_EO_HEADER){return
-(0x866+1627-0xec1);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.
-length=udh[pos++]<<(0x17ac+1380-0x1d08);header_ptr->u.eo.length|=udh[pos++];
+(0x2529+191-0x25e8);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.
+length=udh[pos++]<<(0x20d+4873-0x150e);header_ptr->u.eo.length|=udh[pos++];
 header_ptr->u.eo.control=udh[pos++];header_ptr->u.eo.type=(wms_udh_eo_id_e_type)
-udh[pos++];header_ptr->u.eo.position=udh[pos++]<<(0x1472+54-0x14a0);header_ptr->
-u.eo.position|=udh[pos++];}header_ptr->u.eo.content.length=(udh_length-pos)+
-(0x10b2+5562-0x266b);memcpy(header_ptr->u.eo.content.data,udh+pos,header_ptr->u.
+udh[pos++];header_ptr->u.eo.position=udh[pos++]<<(0x2ff+7414-0x1fed);header_ptr
+->u.eo.position|=udh[pos++];}header_ptr->u.eo.content.length=(udh_length-pos)+
+(0x25c+5621-0x1850);memcpy(header_ptr->u.eo.content.data,udh+pos,header_ptr->u.
 eo.content.length);pos+=header_ptr->u.eo.content.length;return pos;}static UINT8
  wms_ts_decode_udh_rfc822(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
-(0xe24+438-0xfda);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x208a+1065-0x24b3);}if(
-udh[pos]<(0x192a+272-0x1a39)){at_print(LOG_DEBUG,
+(0x77b+6261-0x1ff0);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x9e7+2988-0x1593);}if(
+udh[pos]<(0x1d5+6407-0x1adb)){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x52\x66\x63\x38\x32\x32\x20\x50\x72\x65\x73\x65\x6e\x74\x20\x77\x69\x74\x68\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3d\x20\x25\x64"
-,udh[pos]);return(0x473+2371-0xdb6);}pos++;header_ptr->header_id=WMS_UDH_RFC822;
-header_ptr->u.rfc822.header_length=udh[pos++];return(udh[(0x16b3+669-0x1950)]+
-(0x2d9+7989-0x220d));}static UINT8 wms_ts_decode_udh_nat_lang_ss(const UINT8*udh
-,wms_udh_s_type*header_ptr){UINT8 pos=(0x1772+226-0x1854);if(udh==NULL||
-header_ptr==NULL){return(0x322+4689-0x1573);}if(udh[pos]!=
-WMS_UDH_OCTETS_NAT_LANG_SS){return(0x337+7635-0x210a);}pos++;header_ptr->
+,udh[pos]);return(0xbf9+3913-0x1b42);}pos++;header_ptr->header_id=WMS_UDH_RFC822
+;header_ptr->u.rfc822.header_length=udh[pos++];return(udh[(0x7f0+3328-0x14f0)]+
+(0xf1+6363-0x19cb));}static UINT8 wms_ts_decode_udh_nat_lang_ss(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0x341+7768-0x2199);if(udh==NULL||
+header_ptr==NULL){return(0x10d1+316-0x120d);}if(udh[pos]!=
+WMS_UDH_OCTETS_NAT_LANG_SS){return(0x6e8+5783-0x1d7f);}pos++;header_ptr->
 header_id=WMS_UDH_NAT_LANG_SS;if((WMS_UDH_NAT_LANG_TURKISH>udh[pos])||(
-WMS_UDH_NAT_LANG_PORTUGUESE<udh[pos])){return(0x75+3770-0xf2f);}header_ptr->u.
+WMS_UDH_NAT_LANG_PORTUGUESE<udh[pos])){return(0x578+3554-0x135a);}header_ptr->u.
 nat_lang_ss.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
-(0xb74+5597-0x2151)]+(0x45+8424-0x212c));}static UINT8 
+(0x708+6727-0x214f)]+(0x7e8+563-0xa1a));}static UINT8 
 wms_ts_decode_udh_nat_lang_ls(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 
-pos=(0x2226+167-0x22cd);if(udh==NULL||header_ptr==NULL){return
-(0x501+8162-0x24e3);}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_LS){return
-(0x176c+1539-0x1d6f);}pos++;header_ptr->header_id=WMS_UDH_NAT_LANG_LS;if((
+pos=(0x1354+1571-0x1977);if(udh==NULL||header_ptr==NULL){return
+(0x1844+2820-0x2348);}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_LS){return
+(0x2b3+8033-0x2214);}pos++;header_ptr->header_id=WMS_UDH_NAT_LANG_LS;if((
 WMS_UDH_NAT_LANG_TURKISH>udh[pos])||(WMS_UDH_NAT_LANG_PORTUGUESE<udh[pos])){
-return(0x7b8+7875-0x267b);}header_ptr->u.nat_lang_ls.nat_lang_id=(
-wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[(0xb90+4156-0x1bcc)]+
-(0x5df+2922-0x1148));}static UINT8 wms_ts_decode_udh_other(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x40f+109-0x47c),i=(0x2147+1127-0x25ae);if
-(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x691+4796-0x194d);}if(
-udh[pos+(0xe27+542-0x1044)]>WMS_UDH_OTHER_SIZE){at_print(LOG_DEBUG,
+return(0x1dfc+391-0x1f83);}header_ptr->u.nat_lang_ls.nat_lang_id=(
+wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[(0x4b8+589-0x705)]+
+(0x538+136-0x5bf));}static UINT8 wms_ts_decode_udh_other(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0x1300+3943-0x2267),i=(0x1edd+1278-0x23db)
+;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x4da+1181-0x977);}if(udh
+[pos+(0x21a9+99-0x220b)]>WMS_UDH_OTHER_SIZE){at_print(LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x48\x65\x61\x64\x65\x72\x20\x4f\x74\x68\x65\x72\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x65\x78\x63\x65\x65\x64\x69\x6e\x67\x20\x32\x32\x36"
-);return(0x160c+843-0x1957);}header_ptr->header_id=(wms_udh_id_e_type)udh[pos];
+);return(0x150c+1422-0x1a9a);}header_ptr->header_id=(wms_udh_id_e_type)udh[pos];
 header_ptr->u.other.header_id=(wms_udh_id_e_type)udh[pos++];header_ptr->u.other.
-header_length=udh[pos++];for(i=(0xed9+5706-0x2523);i<header_ptr->u.other.
+header_length=udh[pos++];for(i=(0xced+4788-0x1fa1);i<header_ptr->u.other.
 header_length;i++){header_ptr->u.other.data[i]=udh[pos++];}return pos;}UINT8 
 wms_ts_decode_user_data_header(const UINT8 len,const UINT8*data,UINT8*
-num_headers_ptr,wms_udh_s_type*udh_ptr){UINT8 pos=(0x1336+2541-0x1d23);UINT8 
-header_length=(0x400+4357-0x1505),num_headers=(0x467+3648-0x12a7);UINT8 udhl;
-UINT8 first_segment=TRUE;if(data==NULL||len==(0x1c5+8017-0x2116)||data[pos]==
-(0x1096+878-0x1404)||num_headers_ptr==NULL||udh_ptr==NULL){at_print(LOG_DEBUG,
+num_headers_ptr,wms_udh_s_type*udh_ptr){UINT8 pos=(0x2fb+619-0x566);UINT8 
+header_length=(0x24f8+285-0x2615),num_headers=(0x5f2+1148-0xa6e);UINT8 udhl;
+UINT8 first_segment=TRUE;if(data==NULL||len==(0x1ac+8525-0x22f9)||data[pos]==
+(0x5e7+4639-0x1806)||num_headers_ptr==NULL||udh_ptr==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x75\x73\x65\x72\x5f\x64\x61\x74\x61\x5f\x68\x65\x61\x64\x65\x72"
-);return(0x841+2085-0x1066);}udhl=data[pos];pos++;while((pos<udhl)&&(num_headers
+);return(0xc3a+5915-0x2355);}udhl=data[pos];pos++;while((pos<udhl)&&(num_headers
 <WMS_MAX_UD_HEADERS)){switch(data[pos++]){case WMS_UDH_CONCAT_8:header_length=
 wms_ts_decode_udh_concat_8(data+pos,&udh_ptr[num_headers]);break;case 
 WMS_UDH_CONCAT_16:header_length=wms_ts_decode_udh_concat16(data+pos,&udh_ptr[
@@ -1866,66 +1865,66 @@
 data+pos,&udh_ptr[num_headers]);break;}if((UINT16)pos+(UINT16)header_length>
 WMS_MAX_LEN){at_print(LOG_DEBUG,
 "\x6e\x75\x6d\x62\x65\x72\x20\x6f\x66\x20\x62\x79\x74\x65\x73\x20\x64\x65\x63\x6f\x64\x65\x64\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x55\x44\x48\x4c\x20\x76\x61\x6c\x75\x65\x20\x6f\x66\x20\x25\x64"
-,udhl);return(0xcfb+4974-0x2069);}else if(header_length!=(0xe86+5717-0x24db)){
+,udhl);return(0x1887+1241-0x1d60);}else if(header_length!=(0x110+3410-0xe62)){
 pos+=header_length;num_headers++;}else{at_print(LOG_DEBUG,
 "\x42\x61\x64\x20\x55\x44\x48\x3a\x20\x70\x6f\x73\x3d\x25\x64\x2c\x20\x64\x61\x74\x61\x5b\x70\x6f\x73\x5d\x3d\x25\x64"
-,pos,data[pos]);*num_headers_ptr=(0xfaa+2005-0x177f);return(0x138f+16-0x139f);}}
-if(num_headers>=WMS_MAX_UD_HEADERS){at_print(LOG_DEBUG,
+,pos,data[pos]);*num_headers_ptr=(0xa43+3145-0x168c);return(0x1576+2572-0x1f82);
+}}if(num_headers>=WMS_MAX_UD_HEADERS){at_print(LOG_DEBUG,
 "\x64\x65\x63\x6f\x64\x65\x5f\x75\x64\x68\x3a\x20\x4e\x75\x6d\x20\x48\x65\x61\x64\x65\x72\x73\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x57\x4d\x53\x5f\x4d\x41\x58\x5f\x55\x44\x5f\x48\x45\x41\x44\x45\x52\x53"
-);pos=udhl+(0x70f+935-0xab5);}if(pos!=(udhl+(0x117+2377-0xa5f))){at_print(
+);pos=udhl+(0x18d6+1131-0x1d40);}if(pos!=(udhl+(0xc65+6115-0x2447))){at_print(
 LOG_DEBUG,
 "\x53\x4d\x53\x20\x55\x44\x48\x20\x63\x6f\x75\x6c\x64\x20\x6e\x6f\x74\x20\x62\x65\x20\x64\x65\x63\x6f\x64\x65\x64"
-);num_headers=(0xbfc+3828-0x1af0);udhl=(0x743+2098-0xf75);}if(num_headers>
-(0x93d+1610-0xf87)){*num_headers_ptr=num_headers;}return udhl;}UINT8 
+);num_headers=(0x15c4+833-0x1905);udhl=(0x2112+1427-0x26a5);}if(num_headers>
+(0x2c7+4101-0x12cc)){*num_headers_ptr=num_headers;}return udhl;}UINT8 
 wms_ts_decode_gw_user_data(const wms_gw_dcs_s_type*dcs,const UINT8 len,const 
 UINT8*data,const UINT8 user_data_header_present,wms_gw_user_data_s_type*
-user_data){UINT8 i,pos=(0x1d5f+2107-0x259a);UINT8 fill_bits=(0x387+1660-0xa03);
-UINT8 user_data_length;UINT8 user_data_header_length=(0xe43+2373-0x1788);if(dcs
-==NULL||data==NULL||user_data==NULL){at_print(LOG_DEBUG,
+user_data){UINT8 i,pos=(0x9b0+131-0xa33);UINT8 fill_bits=(0x3b1+28-0x3cd);UINT8 
+user_data_length;UINT8 user_data_header_length=(0x173+6906-0x1c6d);if(dcs==NULL
+||data==NULL||user_data==NULL){at_print(LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x67\x77\x5f\x75\x73\x65\x72\x5f\x64\x61\x74\x61"
-);return(0xc84+5182-0x20c2);}(void)memset(user_data,(0x125d+5228-0x26c9),sizeof(
-wms_gw_user_data_s_type));if(len==(0xd37+1471-0x12f6)){return(0x1c4+5092-0x15a8)
-;}if(dcs->alphabet==WMS_GW_ALPHABET_7_BIT_DEFAULT){if(len>WMS_SMS_UDL_MAX_7_BIT)
-{at_print(LOG_DEBUG,
+);return(0x2117+855-0x246e);}(void)memset(user_data,(0x38a+5536-0x192a),sizeof(
+wms_gw_user_data_s_type));if(len==(0x74+6360-0x194c)){return(0xb38+1093-0xf7d);}
+if(dcs->alphabet==WMS_GW_ALPHABET_7_BIT_DEFAULT){if(len>WMS_SMS_UDL_MAX_7_BIT){
+at_print(LOG_DEBUG,
 "\x75\x73\x65\x72\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x6d\x61\x78\x20\x76\x61\x6c\x75\x65\x20\x66\x6f\x72\x20\x67\x77\x20\x37\x2d\x62\x69\x74\x20\x61\x6c\x70\x68\x61\x62\x65\x74"
-);return(0x7b1+6935-0x22c8);}user_data_length=len;if(user_data_header_present){
+);return(0xa1b+2667-0x1486);}user_data_length=len;if(user_data_header_present){
 user_data_header_length=wms_ts_decode_user_data_header(data[pos],data+pos,&
 user_data->num_headers,user_data->headers);}if(user_data_header_length>len){
 at_print(LOG_DEBUG,
 "\x75\x73\x65\x72\x20\x64\x61\x74\x61\x20\x68\x65\x61\x64\x65\x72\x20\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x74\x6f\x74\x61\x6c\x20\x6c\x65\x6e\x67\x74\x68"
-);return(0x13fc+4796-0x26b8);}if(user_data_header_length>(0x1a2c+1381-0x1f91)){
-fill_bits=((len*(0x935+5724-0x1f8a))-((user_data_header_length+
-(0x1894+259-0x1996))*(0x1245+3958-0x21b3)))%(0x23f+5298-0x16ea);user_data_length
-=(UINT8)(((len*(0xd61+1039-0x1169))-((user_data_header_length+
-(0xa0f+1780-0x1102))*(0x381+5183-0x17b8)))/(0x9e2+1518-0xfc9));pos=
-user_data_header_length+(0x168f+1205-0x1b43);if(fill_bits!=(0x1485+144-0x1515)){
-fill_bits=(0x570+620-0x7d4)-fill_bits;}}i=wms_ts_unpack_gw_7_bit_chars(&data[pos
-],user_data_length,WMS_MAX_LEN,fill_bits,user_data->sm_data);user_data->sm_len=
+);return(0xc2c+6055-0x23d3);}if(user_data_header_length>(0xfbb+3432-0x1d23)){
+fill_bits=((len*(0xfa5+2054-0x17a4))-((user_data_header_length+
+(0x620+1451-0xbca))*(0x851+35-0x86c)))%(0xb65+6086-0x2324);user_data_length=(
+UINT8)(((len*(0xf5d+4705-0x21b7))-((user_data_header_length+(0xcbb+5595-0x2295))
+*(0x1683+2071-0x1e92)))/(0x3bd+8944-0x26a6));pos=user_data_header_length+
+(0x32b+5874-0x1a1c);if(fill_bits!=(0x11ed+4736-0x246d)){fill_bits=
+(0xe30+5136-0x2238)-fill_bits;}}i=wms_ts_unpack_gw_7_bit_chars(&data[pos],
+user_data_length,WMS_MAX_LEN,fill_bits,user_data->sm_data);user_data->sm_len=
 user_data_length;}else{if(len>WMS_SMS_UDL_MAX_8_BIT){at_print(LOG_DEBUG,
 "\x75\x73\x65\x72\x20\x64\x61\x74\x61\x20\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x6d\x61\x78\x20\x76\x61\x6c\x75\x65\x20\x66\x6f\x72\x20\x38\x2d\x62\x69\x74\x20\x63\x68\x61\x72\x61\x72\x61\x63\x74\x65\x72\x73"
-);return(0x13d2+648-0x165a);}user_data_length=len;if(user_data_header_present){
+);return(0x14cd+2840-0x1fe5);}user_data_length=len;if(user_data_header_present){
 user_data_header_length=wms_ts_decode_user_data_header(data[pos],data+pos,&
 user_data->num_headers,user_data->headers);if(user_data_header_length>len){
 at_print(LOG_DEBUG,
 "\x75\x73\x65\x72\x20\x64\x61\x74\x61\x20\x68\x65\x61\x64\x65\x72\x20\x6c\x65\x6e\x67\x74\x68\x20\x3e\x20\x74\x6f\x74\x61\x6c\x20\x6c\x65\x6e\x67\x74\x68"
-);return(0xec0+2081-0x16e1);}pos+=user_data_header_length+(0xa2b+567-0xc61);
-user_data_length=(len-user_data_header_length)-(0x166+7161-0x1d5e);}memcpy(
+);return(0x1544+3684-0x23a8);}pos+=user_data_header_length+(0x732+2676-0x11a5);
+user_data_length=(len-user_data_header_length)-(0xdff+1442-0x13a0);}memcpy(
 user_data->sm_data,data+pos,user_data_length);user_data->sm_len=user_data_length
 ;i=(UINT8)user_data->sm_len;}pos+=i;return pos;}wms_status_e_type 
 wms_ts_decode_deliver(const T_zUfiSms_RawTsData*ptRawTsData,
 wms_gw_deliver_s_type*deliver){wms_status_e_type st=WMS_OK_S;uint32 pos=
-(0x2af+1933-0xa3c),i;const UINT8*data=ptRawTsData->data;if(ptRawTsData==NULL||
+(0xd29+6590-0x26e7),i;const UINT8*data=ptRawTsData->data;if(ptRawTsData==NULL||
 deliver==NULL){printf(
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x64\x65\x6c\x69\x76\x65\x72"
-);return WMS_NULL_PTR_S;}else if((data[pos]&(0x1926+1325-0x1e50))!=
-(0x11e0+2673-0x1c51)){printf(
+);return WMS_NULL_PTR_S;}else if((data[pos]&(0x1c0+429-0x36a))!=
+(0xb2f+3227-0x17ca)){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x74\x70\x64\x75\x20\x74\x79\x70\x65\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x64\x65\x6c\x69\x76\x65\x72"
 );return WMS_INVALID_TPDU_TYPE_S;}else{deliver->more=(data[pos]&
-(0x633+7420-0x232b))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
-(0x99+7988-0x1fad))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
-(0x257+1105-0x668))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
-(0x14a0+2795-0x1f0b))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&
-deliver->address);if(i==(0x246+146-0x2d8)){printf(
+(0x922+3936-0x187e))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
+(0xd7a+796-0x1076))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
+(0x1c7c+1521-0x222d))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
+(0xe35+971-0x1180))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&deliver
+->address);if(i==(0x13b0+4562-0x2582)){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x70\x61\x72\x61\x6d\x20\x73\x69\x7a\x65\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x64\x65\x6c\x69\x76\x65\x72"
 );return WMS_INVALID_PARM_SIZE_S;}pos+=i;deliver->pid=(wms_pid_e_type)data[pos];
 pos++;pos+=wms_ts_decode_dcs(data+pos,&deliver->dcs);if(deliver->dcs.
@@ -1933,75 +1932,75 @@
 WMS_PID_RETURN_CALL){deliver->dcs.msg_waiting=WMS_GW_MSG_WAITING_STORE;deliver->
 dcs.msg_waiting_active=TRUE;deliver->dcs.msg_waiting_kind=
 WMS_GW_MSG_WAITING_VOICEMAIL;}}i=wms_ts_decode_timestamp(data+pos,&deliver->
-timestamp);if(i==(0x1444+4052-0x2418)){printf(
+timestamp);if(i==(0x1540+3313-0x2231)){printf(
 "\x69\x6e\x76\x61\x6c\x69\x64\x20\x70\x61\x72\x61\x6d\x20\x76\x61\x6c\x75\x65\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x64\x65\x6c\x69\x76\x65\x72"
 );return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=wms_ts_decode_gw_user_data(&
-deliver->dcs,data[pos-(0x825+6003-0x1f97)],data+pos,deliver->
+deliver->dcs,data[pos-(0xbb0+6305-0x2450)],data+pos,deliver->
 user_data_header_present,&deliver->user_data);if(i>WMS_SMS_UDL_MAX_8_BIT){printf
 (
 "\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x4c\x65\x6e\x67\x74\x68\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x63\x61\x70\x61\x63\x69\x74\x79\x3a\x20\x55\x44\x4c\x20\x3d\x20\x25\x6c\x75"
 ,i);st=WMS_INVALID_USER_DATA_SIZE_S;}pos+=i;return st;}}UINT8 
 wms_ts_decode_gw_validity(const UINT8*data,wms_gw_validity_s_type*validity){
-UINT8 i,pos=(0x305+5907-0x1a18);if(data==NULL||validity==NULL){at_print(
+UINT8 i,pos=(0x8d5+5083-0x1cb0);if(data==NULL||validity==NULL){at_print(
 LOG_DEBUG,
 "\x6e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x67\x77\x5f\x76\x61\x6c\x69\x64\x69\x74\x79"
-);return(0x343+6017-0x1ac4);}else{switch(validity->format){case 
-WMS_GW_VALIDITY_NONE:memset(validity,(0x8+562-0x23a),sizeof(
+);return(0x1211+5176-0x2649);}else{switch(validity->format){case 
+WMS_GW_VALIDITY_NONE:memset(validity,(0x1326+3987-0x22b9),sizeof(
 wms_gw_validity_s_type));break;case WMS_GW_VALIDITY_RELATIVE:
 zUfiSms_DecodeRelativeTime(data[pos],&validity->u.time);pos++;break;case 
 WMS_GW_VALIDITY_ABSOLUTE:i=wms_ts_decode_timestamp(data+pos,&validity->u.time);
 pos+=i;break;case WMS_GW_VALIDITY_ENHANCED:break;default:break;}return pos;}}
 wms_status_e_type wms_ts_decode_submit(const T_zUfiSms_RawTsData*ptRawTsData,
 wms_gw_submit_s_type*submit){wms_status_e_type st=WMS_OK_S;uint32 pos=
-(0x125+1818-0x83f),i;const UINT8*data;if(ptRawTsData==NULL||submit==NULL){printf
-(
+(0x402+6107-0x1bdd),i;const UINT8*data;if(ptRawTsData==NULL||submit==NULL){
+printf(
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x73\x75\x62\x6d\x69\x74\x21"
 );return WMS_NULL_PTR_S;}data=ptRawTsData->data;submit->reject_duplicates=(data[
-pos]&(0x976+2243-0x1235))?TRUE:FALSE;submit->validity.format=(
-wms_gw_validity_format_e_type)((data[pos]&(0x1831+926-0x1bb7))>>
-(0x2e5+1769-0x9cb));submit->status_report_enabled=(data[pos]&
-(0x2086+1433-0x25ff))?TRUE:FALSE;submit->user_data_header_present=(data[pos]&
-(0x1d36+1624-0x234e))?TRUE:FALSE;submit->reply_path_present=(data[pos]&
-(0x1d8b+2402-0x266d))?TRUE:FALSE;pos++;submit->message_reference=data[pos];pos++
-;i=wms_ts_decode_address(&data[pos],&submit->address);if(i==(0x94+7517-0x1df1)){
+pos]&(0x1976+1277-0x1e6f))?TRUE:FALSE;submit->validity.format=(
+wms_gw_validity_format_e_type)((data[pos]&(0x5d2+6830-0x2068))>>
+(0x6e6+2137-0xf3c));submit->status_report_enabled=(data[pos]&
+(0x1175+4135-0x217c))?TRUE:FALSE;submit->user_data_header_present=(data[pos]&
+(0xe81+4844-0x212d))?TRUE:FALSE;submit->reply_path_present=(data[pos]&
+(0xd5a+5707-0x2325))?TRUE:FALSE;pos++;submit->message_reference=data[pos];pos++;
+i=wms_ts_decode_address(&data[pos],&submit->address);if(i==(0x900+6822-0x23a6)){
 return WMS_INVALID_PARM_SIZE_S;}pos+=i;submit->pid=(wms_pid_e_type)data[pos];pos
 ++;pos+=wms_ts_decode_dcs(data+pos,&submit->dcs);i=wms_ts_decode_gw_validity(
 data+pos,&submit->validity);if((submit->validity.format!=WMS_GW_VALIDITY_NONE)&&
-(i==(0x11eb+3861-0x2100))){return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=
-wms_ts_decode_gw_user_data(&submit->dcs,data[pos-(0x1d82+540-0x1f9d)],data+pos,
+(i==(0x1f04+1893-0x2669))){return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=
+wms_ts_decode_gw_user_data(&submit->dcs,data[pos-(0x306+415-0x4a4)],data+pos,
 submit->user_data_header_present,&submit->user_data);if(i>WMS_SMS_UDL_MAX_8_BIT)
 {printf(
 "\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x4c\x65\x6e\x67\x74\x68\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x63\x61\x70\x61\x63\x69\x74\x79\x3a\x20\x55\x44\x4c\x20\x3d\x20\x25\x6c\x75"
 ,i);st=WMS_INVALID_USER_DATA_SIZE_S;}pos+=i;return st;}wms_status_e_type 
 wms_ts_decode_status_report(const T_zUfiSms_RawTsData*ptRawTsData,
 wms_gw_status_report_s_type*status_report){wms_status_e_type st=WMS_OK_S;uint32 
-pos=(0x1420+333-0x156d),i;const UINT8*data;if(ptRawTsData==NULL||status_report==
+pos=(0x8ac+2420-0x1220),i;const UINT8*data;if(ptRawTsData==NULL||status_report==
 NULL){printf(
 "\x4e\x75\x6c\x6c\x20\x70\x6f\x69\x6e\x74\x65\x72\x20\x69\x6e\x20\x77\x6d\x73\x5f\x74\x73\x5f\x64\x65\x63\x6f\x64\x65\x5f\x73\x74\x61\x74\x75\x73\x5f\x72\x65\x70\x6f\x72\x74\x21"
 );return WMS_NULL_PTR_S;}data=ptRawTsData->data;status_report->more=data[pos]&
-(0x1aa+4737-0x1427)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
-(0x1423+14-0x1411)?TRUE:FALSE;status_report->user_data_header_present=(data[pos]
-&(0x691+335-0x7a0))?TRUE:FALSE;pos++;status_report->message_reference=data[pos];
-pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i==
-(0x634+7469-0x2361)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0x75a+4221-0x17d3)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
+(0x1526+2039-0x1cfd)?TRUE:FALSE;status_report->user_data_header_present=(data[
+pos]&(0x254b+79-0x255a))?TRUE:FALSE;pos++;status_report->message_reference=data[
+pos];pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i==
+(0x345+6178-0x1b67)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
 wms_ts_decode_timestamp(data+pos,&status_report->timestamp);if(i==
-(0x1080+3151-0x1ccf)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0x1564+778-0x186e)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
 wms_ts_decode_timestamp(data+pos,&status_report->discharge_time);if(i==
-(0x130+5890-0x1832)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;status_report->
+(0x77a+8018-0x26cc)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;status_report->
 tp_status=(wms_tp_status_e_type)data[pos];pos++;status_report->mask=data[pos];
-status_report->pid=(wms_pid_e_type)(0x6cf+2024-0xeb7);status_report->user_data.
-sm_len=(0xcdf+2358-0x1615);status_report->mask&=(0x15d9+4645-0x26ff);if((
-status_report->mask!=(0xd09+740-0xeee))&&(status_report->mask!=
-(0x10e9+5653-0x26fe))){pos++;if(status_report->mask&WMS_TPDU_MASK_PID){
+status_report->pid=(wms_pid_e_type)(0xe7d+5998-0x25eb);status_report->user_data.
+sm_len=(0x1708+3774-0x25c6);status_report->mask&=(0x1b40+1797-0x2146);if((
+status_report->mask!=(0xaa1+808-0xcca))&&(status_report->mask!=
+(0x1b02+100-0x1b66))){pos++;if(status_report->mask&WMS_TPDU_MASK_PID){
 status_report->pid=(wms_pid_e_type)data[pos];pos++;}if(status_report->mask&
 WMS_TPDU_MASK_DCS){pos+=wms_ts_decode_dcs(data+pos,&status_report->dcs);}if(
 status_report->mask&WMS_TPDU_MASK_USER_DATA){pos++;i=wms_ts_decode_gw_user_data(
-&status_report->dcs,data[pos-(0x1f+4460-0x118a)],data+pos,status_report->
+&status_report->dcs,data[pos-(0x4af+2917-0x1013)],data+pos,status_report->
 user_data_header_present,&status_report->user_data);if(i>WMS_SMS_UDL_MAX_8_BIT){
 printf(
 "\x55\x73\x65\x72\x20\x44\x61\x74\x61\x20\x4c\x65\x6e\x67\x74\x68\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x63\x61\x70\x61\x63\x69\x74\x79\x3a\x20\x55\x44\x4c\x20\x3d\x20\x25\x6c\x75"
 ,i);st=WMS_INVALID_USER_DATA_SIZE_S;}pos+=i;}}else{status_report->mask=
-(0x1030+4048-0x2000);}return st;}wms_status_e_type wms_ts_decode(const 
+(0x13d7+2048-0x1bd7);}return st;}wms_status_e_type wms_ts_decode(const 
 T_zUfiSms_RawTsData*ptRawTsData,T_zUfiSms_ClientTsData*ptClientTsData){
 wms_status_e_type st=WMS_OK_S;wms_gw_pp_ts_data_s_type*msg;if(ptRawTsData==NULL
 ||ptClientTsData==NULL){return WMS_NULL_PTR_S;}msg=&ptClientTsData->u.gw_pp;
diff --git a/ap/app/zte_comm/sms/src/sms_db.c b/ap/app/zte_comm/sms/src/sms_db.c
index 661ef87..f4090de 100755
--- a/ap/app/zte_comm/sms/src/sms_db.c
+++ b/ap/app/zte_comm/sms/src/sms_db.c
@@ -100,85 +100,86 @@
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x68\x65\x72\x65\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x73\x69\x6d\x27\x3b"

 #define OUTDATEINTERVAL 7776000

 typedef struct{char*buf_addr;int buf_len;}T_zUfiSms_BufInfo;typedef struct{int 
-valid;char*strSQL;}T_zUfiSms_SQLMap;sqlite3*g_zUfiSms_DbPointer=
-(0x120a+1011-0x15fd);extern T_zUfiSms_ParaInfo g_zUfiSms_CurSmsPara;extern 
-unsigned long g_zUfiSms_StoreCapablity[ZTE_WMS_MEMORY_MAX];extern 
-T_zUfiSms_DelSms g_zUfiSms_DelMsg;static int isSucess(T_zUfiSms_DbResult dbRst){
-return dbRst==ZTE_WMS_DB_OK?ZUFI_SUCC:ZUFI_FAIL;}time_t zte_getsecond(
-T_zUfiSms_Date date){time_t timet;struct tm tmtime={(0x12b4+2094-0x1ae2)};int 
-tmp_i=(0x8d5+4219-0x1950);
-#if (0x1266+4090-0x2260)

-if(atoi(date.year)>(0x692+407-0x7c6)||atoi(date.year)<(0x14a0+2886-0x1fe6)){
+valid;char*strSQL;}T_zUfiSms_SQLMap;sqlite3*g_zUfiSms_DbPointer=(0x4f+238-0x13d)
+;extern T_zUfiSms_ParaInfo g_zUfiSms_CurSmsPara;extern unsigned long 
+g_zUfiSms_StoreCapablity[ZTE_WMS_MEMORY_MAX];extern T_zUfiSms_DelSms 
+g_zUfiSms_DelMsg;static int isSucess(T_zUfiSms_DbResult dbRst){return dbRst==
+ZTE_WMS_DB_OK?ZUFI_SUCC:ZUFI_FAIL;}time_t zte_getsecond(T_zUfiSms_Date date){
+time_t timet;struct tm tmtime={(0xbc0+2776-0x1698)};int tmp_i=
+(0xb46+5680-0x2176);
+#if (0x12af+4920-0x25e7)

+if(atoi(date.year)>(0x4cc+2765-0xf36)||atoi(date.year)<(0x2008+1185-0x24a9)){
 printf("[SMS] getsecond error, year out of range: %d!!!",atoi(date.year));return
-(0x1ef1+378-0x206b);}
+(0x10a+554-0x334);}
 #endif

-tmp_i=atoi(date.year);if(tmp_i<(0xbb8+5955-0x22fb)||tmp_i>INT_MAX-
-(0x9b1+5723-0x200b)){at_print(LOG_ERR,
+tmp_i=atoi(date.year);if(tmp_i<(0x18e6+967-0x1cad)||tmp_i>INT_MAX-
+(0x958+2887-0x149e)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x79\x65\x61\x72\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0x1e6b+850-0x21bd);}tmtime.tm_year=tmp_i+(0x8bd+870-0x453)-
-(0x2096+871-0x1c91);tmp_i=atoi(date.month);if(tmp_i<(0x68b+5665-0x1cac)||tmp_i>
-INT_MAX-(0xe8f+3959-0x1e05)){at_print(LOG_ERR,
+,tmp_i);return(0x1c47+2700-0x26d3);}tmtime.tm_year=tmp_i+(0x2087+3626-0x26e1)-
+(0x1f58+2592-0x220c);tmp_i=atoi(date.month);if(tmp_i<(0x14b+3370-0xe75)||tmp_i>
+INT_MAX-(0xc0d+3419-0x1967)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x6d\x6f\x6e\x74\x68\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0xb53+6035-0x22e6);}tmtime.tm_mon=tmp_i-(0x18d7+834-0x1c18);tmp_i
-=atoi(date.day);if(tmp_i<(0x582+379-0x6fd)||tmp_i>INT_MAX-(0x6e5+4870-0x19ea)){
-at_print(LOG_ERR,
+,tmp_i);return(0x1263+1597-0x18a0);}tmtime.tm_mon=tmp_i-(0x2281+949-0x2635);
+tmp_i=atoi(date.day);if(tmp_i<(0x90f+5932-0x203b)||tmp_i>INT_MAX-
+(0x23b2+263-0x24b8)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x64\x61\x79\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0x11c4+3282-0x1e96);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);
-if(tmp_i<(0x4f8+4665-0x1731)||tmp_i>INT_MAX-(0x1299+3363-0x1fbb)){at_print(
-LOG_ERR,
+,tmp_i);return(0xe78+3498-0x1c22);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);if
+(tmp_i<(0xe27+1641-0x1490)||tmp_i>INT_MAX-(0x16bf+3456-0x243e)){at_print(LOG_ERR
+,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x68\x6f\x75\x72\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0xdad+3573-0x1ba2);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if(
-tmp_i<(0x4c6+5374-0x19c4)||tmp_i>INT_MAX-(0x307+7614-0x20c4)){at_print(LOG_ERR,
+,tmp_i);return(0x3cd+3077-0xfd2);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if(
+tmp_i<(0x18bc+3336-0x25c4)||tmp_i>INT_MAX-(0x151c+2610-0x1f4d)){at_print(LOG_ERR
+,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x6d\x69\x6e\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0x246+3905-0x1187);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
-tmp_i<(0x111d+3037-0x1cfa)||tmp_i>INT_MAX-(0x1bb+3077-0xdbf)){at_print(LOG_ERR,
+,tmp_i);return(0x26a+6324-0x1b1e);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
+tmp_i<(0xb1c+3463-0x18a3)||tmp_i>INT_MAX-(0xaf+9532-0x25ea)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x64\x61\x74\x65\x2e\x73\x65\x63\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return(0x44c+8585-0x25d5);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
+,tmp_i);return(0x1991+730-0x1c6b);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
 return timet;}T_zUfiSms_DbResult zUfiSms_OpenDb(void){int retry_times=
-(0x1416+330-0x1560);int open_rst=SQLITE_ERROR;if(g_zUfiSms_DbPointer!=NULL){
+(0xa1b+4861-0x1d18);int open_rst=SQLITE_ERROR;if(g_zUfiSms_DbPointer!=NULL){
 sqlite3_close(g_zUfiSms_DbPointer);g_zUfiSms_DbPointer=NULL;}do{open_rst=
 sqlite3_open(ZTE_WMS_DB_PATH,&g_zUfiSms_DbPointer);}while(open_rst==
-SQLITE_CANTOPEN&&retry_times++<(0xcb7+6117-0x2492));printf(
+SQLITE_CANTOPEN&&retry_times++<(0x875+6115-0x204e));printf(
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4f\x70\x65\x6e\x44\x62\x3a\x20\x72\x65\x74\x72\x79\x5f\x74\x69\x6d\x65\x73\x20\x3d\x20\x25\x64\x2c\x20\x6f\x70\x65\x6e\x5f\x72\x73\x74\x20\x3d\x20\x25\x64" "\n"
 ,retry_times,open_rst);return open_rst==SQLITE_OK?ZTE_WMS_DB_OK:
 ZTE_SMS_DB_ERROR_NOT_OPEN_DB;}T_zUfiSms_DbResult zUfiSms_CloseDb(void){if(
 sqlite3_close(g_zUfiSms_DbPointer)!=SQLITE_OK){return ZTE_SMS_DB_ERROR;}
 g_zUfiSms_DbPointer=NULL;return ZTE_WMS_DB_OK;}T_zUfiSms_DbResult 
 zUfiSms_ExecSql(const char*exec_sql,zte_wms_db_callback callback,void*fvarg){int
- try_times=(0x13fb+3845-0x2300);int sqlRst=SQLITE_ERROR;while(try_times++<
-(0x1283+1191-0x1720)){sqlRst=sqlite3_exec(g_zUfiSms_DbPointer,exec_sql,callback,
+ try_times=(0x11bf+4478-0x233d);int sqlRst=SQLITE_ERROR;while(try_times++<
+(0xc46+6038-0x23d2)){sqlRst=sqlite3_exec(g_zUfiSms_DbPointer,exec_sql,callback,
 fvarg,NULL);if(sqlRst!=SQLITE_BUSY&&sqlRst!=SQLITE_LOCKED&&sqlRst!=SQLITE_IOERR)
 {break;}printf(
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x45\x78\x65\x63\x53\x71\x6c\x3a\x20\x74\x72\x79\x5f\x74\x69\x6d\x65\x73\x3d\x25\x64\x2c\x20\x53\x51\x4c\x3d\x25\x73\x2c\x20\x45\x72\x72\x6d\x73\x67\x3d\x25\x73" "\n"
 ,try_times,exec_sql,sqlite3_errmsg(g_zUfiSms_DbPointer));sleep(
-(0x297+6804-0x1d2a));}if(sqlRst!=SQLITE_OK){printf(
+(0x1325+1681-0x19b5));}if(sqlRst!=SQLITE_OK){printf(
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x45\x78\x65\x63\x53\x71\x6c\x3a\x20\x74\x72\x79\x5f\x74\x69\x6d\x65\x73\x3d\x25\x64\x2c\x20\x53\x51\x4c\x3d\x25\x73\x2c\x20\x45\x72\x72\x6d\x73\x67\x3d\x25\x73" "\n"
 ,try_times,exec_sql,sqlite3_errmsg(g_zUfiSms_DbPointer));return ZTE_SMS_DB_ERROR
 ;}else{
 #ifdef WEBS_SECURITY

-if(access(ZTE_WMS_TMP1_PATH,F_OK)==(0x50f+4342-0x1605)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZTE_WMS_TMP1_PATH,F_OK)==(0x1a32+2899-0x2585)){slog(PB_PRINT,SLOG_ERR,
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x45\x78\x65\x63\x53\x71\x6c\x20\x64\x62\x20\x73\x74\x61\x79"
-);if(remove(ZTE_WMS_TMP1_PATH)!=(0x2c8+2188-0xb54)){slog(SMS_PRINT,SLOG_ERR,
+);if(remove(ZTE_WMS_TMP1_PATH)!=(0xd96+3383-0x1acd)){slog(SMS_PRINT,SLOG_ERR,
 "\x72\x65\x6d\x6f\x76\x65\x20\x57\x4d\x53\x5f\x54\x4d\x50\x31\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}}{char rnum_buf[(0x857+4575-0x1a1e)]={(0x5ca+7693-0x23d7)};char cmd[
-(0x56b+4431-0x163a)]={(0xee0+1402-0x145a)};sc_cfg_get(
+);}}{char rnum_buf[(0x329+8639-0x24d0)]={(0x15b1+3368-0x22d9)};char cmd[
+(0x11c5+4130-0x2167)]={(0xc0+1949-0x85d)};sc_cfg_get(
 "\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(rnum_buf));snprintf(cmd,sizeof(
 cmd),
 "\x2f\x62\x69\x6e\x2f\x6f\x70\x65\x6e\x73\x73\x6c\x20\x65\x6e\x63\x20\x2d\x65\x20\x2d\x61\x65\x73\x32\x35\x36\x20\x2d\x73\x61\x6c\x74\x20\x2d\x69\x6e\x20\x25\x73\x20\x2d\x6f\x75\x74\x20\x25\x73\x20\x2d\x70\x61\x73\x73\x20\x70\x61\x73\x73\x3a\x25\x73"
 ,ZTE_WMS_DB_PATH,ZTE_WMS_TMP1_PATH,rnum_buf);zxic_system(cmd);if(access(
-ZTE_WMS_TMP1_PATH,F_OK)==(0x154+2281-0xa3d)){if(remove(ZTE_WMS_SEC_PATH)!=
-(0x519+1402-0xa93)){slog(SMS_PRINT,SLOG_ERR,
+ZTE_WMS_TMP1_PATH,F_OK)==(0x115d+1521-0x174e)){if(remove(ZTE_WMS_SEC_PATH)!=
+(0x1e41+522-0x204b)){slog(SMS_PRINT,SLOG_ERR,
 "\x72\x65\x6d\x6f\x76\x65\x20\x57\x4d\x53\x5f\x53\x45\x43\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
-);}if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=(0xc04+2055-0x140b)){slog(
+);}if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=(0x9ff+6101-0x21d4)){slog(
 SMS_PRINT,SLOG_ERR,
 "\x72\x65\x6e\x61\x6d\x65\x20\x57\x4d\x53\x5f\x54\x4d\x50\x31\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c"
 );}}}
 #endif	

 return ZTE_WMS_DB_OK;}}int zUfiSms_GetFirstColumnInt(void*fvarg,int columns,char
-**zresult,char**lname){if(columns>=(0x170+972-0x53b)){if(zresult[
-(0x1649+1947-0x1de4)]==NULL){*(int*)fvarg=(0x58+2264-0x930);}else{*(int*)fvarg=
-atoi(zresult[(0x46c+891-0x7e7)]);}return SQLITE_OK;}else{return SQLITE_ERROR;}}
-int zUfiSms_SetCmdStatus(T_zUfiSms_StatusInfo*ptSetStatus){T_zUfiSms_DbResult 
+**zresult,char**lname){if(columns>=(0x1845+1333-0x1d79)){if(zresult[
+(0x234a+119-0x23c1)]==NULL){*(int*)fvarg=(0xbe7+3338-0x18f1);}else{*(int*)fvarg=
+atoi(zresult[(0x9a5+7025-0x2516)]);}return SQLITE_OK;}else{return SQLITE_ERROR;}
+}int zUfiSms_SetCmdStatus(T_zUfiSms_StatusInfo*ptSetStatus){T_zUfiSms_DbResult 
 result=ZTE_WMS_DB_OK;char*strSQL=NULL;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x43\x6d\x64\x53\x74\x61\x74\x75\x73\x20\x65\x6e\x74\x65\x72\x2e" "\n"
 );strSQL=sqlite3_mprintf(
@@ -188,28 +189,28 @@
 ptSetStatus->err_code,ptSetStatus->send_failed_count,ptSetStatus->
 delete_failed_count);result=zUfiSms_ExecSql(strSQL,NULL,NULL);sqlite3_free(
 strSQL);return isSucess(result);}void zUfiSms_SetParameterNv(T_zUfiSms_ParaInfo*
-para){if((0xec2+4841-0x21ab)==(int)para->status_report_on){sc_cfg_set(
+para){if((0x690+3407-0x13df)==(int)para->status_report_on){sc_cfg_set(
 NV_REPORT_ENABLE,"\x30");}else{sc_cfg_set(NV_REPORT_ENABLE,"\x31");}if(
-(0x9ad+6025-0x2136)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
-"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0x570+2493-0xf2d)==(int)
-para->outdate_delete_on){sc_cfg_set(NV_OUTDATE_DELETE,"\x30");}else{sc_cfg_set(
+(0xeb7+2367-0x17f6)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
+"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0x268+5207-0x16bf)==(int
+)para->outdate_delete_on){sc_cfg_set(NV_OUTDATE_DELETE,"\x30");}else{sc_cfg_set(
 NV_OUTDATE_DELETE,"\x31");}if(*(para->default_store)!='\0'){sc_cfg_set(
-NV_DEFAULT_STORE,(char*)para->default_store);}if((0x12c9+1620-0x191d)==(int)para
+NV_DEFAULT_STORE,(char*)para->default_store);}if((0x604+5344-0x1ae4)==(int)para
 ->mem_store){sc_cfg_set(NV_PRA_MEMSTORE,"\x30");}else{sc_cfg_set(NV_PRA_MEMSTORE
-,"\x31");}if((0xdfc+661-0xf92)==(int)para->tp_validity_period){sc_cfg_set(
-NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0x90f+3670-0x16b8)==(int)
+,"\x31");}if((0x1c4c+1214-0x200b)==(int)para->tp_validity_period){sc_cfg_set(
+NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0x1d88+2282-0x25c5)==(int)
 para->tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x6f\x6e\x65\x77\x65\x65\x6b");}
-else if((0x890+1493-0xdbe)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP,
-"\x6f\x6e\x65\x5f\x64\x61\x79");}else if((0x36d+3029-0xeb3)==(int)para->
+else if((0x882+3259-0x1496)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP
+,"\x6f\x6e\x65\x5f\x64\x61\x79");}else if((0x638+1350-0xaef)==(int)para->
 tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x74\x77\x65\x6c\x76\x65\x68");}printf
 (
 "\x77\x6d\x73\x5f\x64\x62\x5f\x73\x65\x74\x5f\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x20\x3a\x3a\x20\x73\x65\x74\x20\x74\x70\x5f\x76\x61\x6c\x69\x64\x69\x74\x79\x5f\x70\x65\x72\x69\x6f\x64\x20\x25\x64" "\n"
 ,(int)para->tp_validity_period);}int zUfiSms_SetDbParameters(T_zUfiSms_ParaInfo*
 para){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;char*strSQL=NULL;int count=
-(0x94c+6757-0x23b1);if(NULL==para){return-(0x1334+2010-0x1b0d);}zUfiSms_ExecSql(
+(0x1ce5+2010-0x24bf);if(NULL==para){return-(0x85f+6725-0x22a3);}zUfiSms_ExecSql(
 "\x53\x45\x4c\x45\x43\x54\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x46\x52\x4f\x4d\x20"
  ZTE_WMS_DB_PARAMETER_TABLE"\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x31\x3b",
-zUfiSms_GetFirstColumnInt,&count);if(count>(0xe4+3703-0xf5b)){strSQL=
+zUfiSms_GetFirstColumnInt,&count);if(count>(0x1ee1+1925-0x2666)){strSQL=
 sqlite3_mprintf(
 "\x55\x50\x44\x41\x54\x45\x20\x25\x73\x20\x53\x45\x54\x20\x53\x6d\x73\x5f\x52\x65\x70\x6f\x72\x74\x3d\x27\x25\x64\x27\x2c\x53\x6d\x73\x5f\x53\x63\x61\x3d\x27\x25\x71\x27\x2c\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x64\x27\x2c\x54\x70\x5f\x56\x61\x6c\x69\x64\x69\x74\x79\x3d\x27\x25\x64\x27\x2c\x53\x65\x6e\x64\x5f\x52\x65\x74\x72\x79\x3d\x27\x25\x64\x27\x2c\x4f\x75\x74\x64\x61\x74\x65\x5f\x44\x65\x6c\x65\x74\x65\x3d\x27\x25\x64\x27\x2c\x44\x65\x66\x61\x75\x6c\x74\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x71\x27\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x31\x3b"
 ,ZTE_WMS_DB_PARAMETER_TABLE,(int)para->status_report_on,para->sca,(int)para->
@@ -222,13 +223,13 @@
 mem_store,(int)para->tp_validity_period,(int)para->sendfail_retry_on,(int)para->
 outdate_delete_on,para->default_store);}result=zUfiSms_ExecSql(strSQL,NULL,NULL)
 ;sqlite3_free(strSQL);if(result==ZTE_WMS_DB_OK){zUfiSms_SetParameterNv(para);
-return(0x1292+1982-0x1a50);}return-(0x1859+251-0x1953);}int 
-zUfiSms_GetTotalCount(const char*pDbTable,int*pTotalCount){T_zUfiSms_DbResult 
-result=ZTE_WMS_DB_OK;char*strSQL=NULL;strSQL=sqlite3_mprintf(
+return(0x2+7758-0x1e50);}return-(0xb16+6638-0x2503);}int zUfiSms_GetTotalCount(
+const char*pDbTable,int*pTotalCount){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;
+char*strSQL=NULL;strSQL=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x71\x27\x3b"
 ,pDbTable);result=zUfiSms_ExecSql(strSQL,zUfiSms_GetFirstColumnInt,pTotalCount);
 sqlite3_free(strSQL);return isSucess(result);}int zUfiSms_GetSmsMaxReferInDb(
-void){int max_sms_ref=-(0x487+3582-0x1284);zUfiSms_ExecSql(
+void){int max_sms_ref=-(0x341+4894-0x165e);zUfiSms_ExecSql(
 "\x53\x45\x4c\x45\x43\x54\x20\x4d\x61\x78\x5f\x53\x6d\x73\x5f\x52\x65\x66\x20\x46\x52\x4f\x4d\x20"
  ZTE_WMS_DB_PARAMETER_TABLE
 "\x20\x57\x48\x45\x52\x45\x20\x69\x64\x20\x3d\x20\x31\x3b",
@@ -237,18 +238,18 @@
 content,int len){sqlite3_stmt*stmt=NULL;char*strSQL=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x69\x6e\x64\x2c\x43\x63\x5f\x53\x65\x71\x2c\x43\x63\x5f\x43\x6f\x6e\x74\x65\x6e\x74\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x71\x27\x3b"
 ,id,mem_store);(void)sqlite3_prepare(g_zUfiSms_DbPointer,strSQL,-
-(0xc6a+2674-0x16db),&stmt,(0x311+4457-0x147a));while(SQLITE_ROW==sqlite3_step(
-stmt)){char*column_text=NULL;memset(pac->IndStr,(0xd95+784-0x10a5),sizeof(pac->
-IndStr));memset(pac->Seg_Seq,(0x1d1+3914-0x111b),sizeof(pac->Seg_Seq));if((
-column_text=sqlite3_column_text(stmt,(0x1a67+2879-0x25a6)))!=NULL)strncpy(pac->
-IndStr,column_text,sizeof(pac->FormatInd)-(0x1f67+1465-0x251f));if((column_text=
-sqlite3_column_text(stmt,(0xfb0+593-0x1200)))!=NULL)strncpy(pac->Seg_Seq,
-column_text,sizeof(pac->FormatSeq)-(0x7f3+2434-0x1174));if((column_text=
-sqlite3_column_text(stmt,(0xfcd+2959-0x1b5a)))!=NULL)strncpy(content,column_text
-,len-(0x1654+2822-0x2159));printf(
+(0xb50+277-0xc64),&stmt,(0xa1+8950-0x2397));while(SQLITE_ROW==sqlite3_step(stmt)
+){char*column_text=NULL;memset(pac->IndStr,(0x1117+5391-0x2626),sizeof(pac->
+IndStr));memset(pac->Seg_Seq,(0x1698+725-0x196d),sizeof(pac->Seg_Seq));if((
+column_text=sqlite3_column_text(stmt,(0x1dc+2899-0xd2f)))!=NULL)strncpy(pac->
+IndStr,column_text,sizeof(pac->FormatInd)-(0x13ef+3121-0x201f));if((column_text=
+sqlite3_column_text(stmt,(0xbfc+2132-0x144f)))!=NULL)strncpy(pac->Seg_Seq,
+column_text,sizeof(pac->FormatSeq)-(0x111b+4933-0x245f));if((column_text=
+sqlite3_column_text(stmt,(0x1400+1645-0x1a6b)))!=NULL)strncpy(content,
+column_text,len-(0x20f4+866-0x2455));printf(
 "\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x43\x6f\x6e\x63\x61\x74\x49\x6e\x66\x6f\x3a\x25\x73\x2c\x25\x73" "\n"
 ,pac->IndStr,pac->Seg_Seq);}(void)sqlite3_finalize(stmt);sqlite3_free(strSQL);
-return(0x421+3872-0x1341);}int zUfiSms_UpdateConcatSmsToDb(T_zUfiSms_DbStoreData
+return(0xd3a+2591-0x1759);}int zUfiSms_UpdateConcatSmsToDb(T_zUfiSms_DbStoreData
 *db_data,const char*mem_store,char*format_concat,char*content,
 T_zUfiSms_DbStoreStr*pac,int concat_num,long id){char*sql=NULL;
 T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;sql=sqlite3_mprintf(
@@ -270,8 +271,8 @@
 "\x43\x6f\x6e\x74\x65\x6e\x74\x2c\x53\x6d\x73\x5f\x52\x65\x70\x6f\x72\x74\x5f\x52\x65\x63\x69\x76\x65\x64\x2c\x44\x72\x61\x66\x74\x5f\x47\x72\x6f\x75\x70\x5f\x49\x64\x2c\x59\x65\x61\x72\x2c\x4d\x6f\x6e\x74\x68\x2c\x44\x61\x79\x2c\x48\x6f\x75\x72\x2c\x4d\x69\x6e\x75\x74\x65\x2c\x53\x65\x63\x6f\x6e\x64\x2c\x54\x69\x6d\x65\x5a\x6f\x6e\x65\x2c\x4d\x6b\x74\x69\x6d\x65\x2c\x44\x69\x73\x70\x6c\x61\x79\x4d\x6f\x64\x65\x29\x20"
 "\x56\x41\x4c\x55\x45\x53\x28" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x20\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x20\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x20" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x20\x27\x25\x64\x27\x29\x3b"
 ,pac->FormatInd,mem_store,db_data->tag,db_data->number,db_data->concat_sms,
-db_data->concat_info[(0x16a1+2507-0x206c)],db_data->concat_info[
-(0xcd8+5809-0x2388)],pac->FormatSeq,concat_num,format_concat,db_data->tp_dcs,
+db_data->concat_info[(0x1552+3000-0x210a)],db_data->concat_info[
+(0x7d1+7671-0x25c7)],pac->FormatSeq,concat_num,format_concat,db_data->tp_dcs,
 db_data->msg_ref,content,"\x30",db_data->draft_group_id,db_data->julian_date.
 year,db_data->julian_date.month,db_data->julian_date.day,db_data->julian_date.
 hour,db_data->julian_date.min,db_data->julian_date.sec,db_data->julian_date.
@@ -280,22 +281,23 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x49\x6e\x73\x65\x72\x74\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x54\x6f\x44\x62\x20\x73\x71\x6c\x3d\x25\x73\x2e" "\n"
 ,sql);result=zUfiSms_ExecSql(sql,NULL,NULL);sqlite3_free(sql);return isSucess(
 result);}int zUfiSms_GetConcatMaxReferInDb(void){int ConcatMaxRefer=
-(0x22d0+201-0x2399);int result=(0x338+6915-0x1e3b);result=zUfiSms_ExecSql(
+(0x605+1883-0xd60);int result=(0x15f9+865-0x195a);result=zUfiSms_ExecSql(
 "\x53\x45\x4c\x45\x43\x54\x20\x4d\x61\x78\x5f\x43\x63\x5f\x52\x65\x66\x20\x46\x52\x4f\x4d\x20"
  ZTE_WMS_DB_PARAMETER_TABLE
 "\x20\x57\x48\x45\x52\x45\x20\x69\x64\x20\x3d\x20\x31\x3b",
 zUfiSms_GetFirstColumnInt,&ConcatMaxRefer);if(ZTE_WMS_DB_OK!=result){return-
-(0xe39+2949-0x19bd);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap=
-(0xf8f+5392-0x249f);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x5dc+3377-0x130c),
-ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x790+2720-0x122f),ZTE_WMS_DEL_SIM_SQL},{
-(0x1187+3624-0x1fae),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0x15b1+3143-0x21f7),
-ZTE_WMS_CREATE_SMS_REP_SQL},{(0x13a7+1755-0x1a81),ZTE_WMS_CREATE_PAR_SQL},{
-(0x628+3949-0x1594),ZTE_WMS_CREATE_INFO_SQL},{(0xa44+2735-0x14f2),
-ZTE_WMS_CREATE_CELL_BRO_SQL},{(0x5a+917-0x3ee),ZTE_WMS_CREATE_SEND_CONTENT_SQL},
-};for(iMap=(0x48c+1308-0x9a8);iMap<sizeof(SQL_MAP)/sizeof(T_zUfiSms_SQLMap);iMap
-++){if(SQL_MAP[iMap].valid==(0x3f+551-0x265)){if(zUfiSms_ExecSql(SQL_MAP[iMap].
-strSQL,NULL,NULL)!=ZTE_WMS_DB_OK){return ZUFI_FAIL;}}}return ZUFI_SUCC;}int 
-zUfiSms_CreateAllTable(void){if(ZTE_WMS_DB_OK!=zUfiSms_OpenDb()){printf(
+(0x544+665-0x7dc);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap=
+(0x1582+1398-0x1af8);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x1f84+141-0x2010),
+ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x659+5028-0x19fc),ZTE_WMS_DEL_SIM_SQL},{
+(0x1024+1877-0x1778),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0x1609+2377-0x1f51),
+ZTE_WMS_CREATE_SMS_REP_SQL},{(0x119+9481-0x2621),ZTE_WMS_CREATE_PAR_SQL},{
+(0x1e3b+1780-0x252e),ZTE_WMS_CREATE_INFO_SQL},{(0xb70+6190-0x239d),
+ZTE_WMS_CREATE_CELL_BRO_SQL},{(0xef7+2934-0x1a6c),
+ZTE_WMS_CREATE_SEND_CONTENT_SQL},};for(iMap=(0x340+2959-0xecf);iMap<sizeof(
+SQL_MAP)/sizeof(T_zUfiSms_SQLMap);iMap++){if(SQL_MAP[iMap].valid==
+(0xc45+619-0xeaf)){if(zUfiSms_ExecSql(SQL_MAP[iMap].strSQL,NULL,NULL)!=
+ZTE_WMS_DB_OK){return ZUFI_FAIL;}}}return ZUFI_SUCC;}int zUfiSms_CreateAllTable(
+void){if(ZTE_WMS_DB_OK!=zUfiSms_OpenDb()){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x63\x61\x6e\x20\x6e\x6f\x74\x20\x6f\x70\x65\x6e\x20\x64\x61\x74\x61\x62\x61\x73\x65\x2e\x72\x65\x74\x75\x72\x6e\x2e" "\n"
 );return ZTE_SMS_DB_ERROR_NOT_OPEN_DB;}return zUfiSms_CreateTables();}int 
 zUfiSms_DropAllTable(void){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;if(
@@ -324,9 +326,9 @@
 "\x27\x25\x64\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x20"
 "\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x75\x27\x2c\x20\x27\x25\x64\x27\x29\x3b"
 ,ptDbSaveData->index,pStorePos,ptDbSaveData->tag,ptDbSaveData->number,
-ptDbSaveData->concat_sms,ptDbSaveData->concat_info[(0x507+1955-0xcaa)],
-ptDbSaveData->concat_info[(0xdd4+4931-0x2116)],ptDbSaveData->concat_info[
-(0xa99+4709-0x1cfc)],ptDbSaveData->tp_dcs,ptDbSaveData->msg_ref,pContent,"\x30",
+ptDbSaveData->concat_sms,ptDbSaveData->concat_info[(0x8f7+1047-0xd0e)],
+ptDbSaveData->concat_info[(0x8e6+5908-0x1ff9)],ptDbSaveData->concat_info[
+(0x76f+6226-0x1fbf)],ptDbSaveData->tp_dcs,ptDbSaveData->msg_ref,pContent,"\x30",
 ptDbSaveData->draft_group_id,ptDbSaveData->julian_date.year,ptDbSaveData->
 julian_date.month,ptDbSaveData->julian_date.day,ptDbSaveData->julian_date.hour,
 ptDbSaveData->julian_date.min,ptDbSaveData->julian_date.sec,ptDbSaveData->
@@ -348,25 +350,25 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x55\x70\x64\x61\x74\x65\x4e\x6f\x72\x6d\x61\x6c\x53\x6d\x73\x54\x6f\x44\x62\x20\x73\x71\x6c\x3d\x25\x73" "\n"
 ,strSQL);result=zUfiSms_ExecSql(strSQL,NULL,NULL);sqlite3_free(strSQL);return 
 isSucess(result);}int zUfiSms_GetFirstColumnStr(void*fvarg,int columns,char**
-zresult,char**lname){if(columns>=(0x13b7+951-0x176d)&&fvarg!=NULL){if(zresult[
-(0x273+6542-0x1c01)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
-strncpy(para->buf_addr,zresult[(0x1002+4943-0x2351)],para->buf_len-
-(0xf90+4326-0x2075));return SQLITE_OK;}}return SQLITE_ERROR;}int 
+zresult,char**lname){if(columns>=(0x12f8+5058-0x26b9)&&fvarg!=NULL){if(zresult[
+(0x185+3073-0xd86)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
+strncpy(para->buf_addr,zresult[(0x638+5955-0x1d7b)],para->buf_len-
+(0x11f+232-0x206));return SQLITE_OK;}}return SQLITE_ERROR;}int 
 zUfiSms_GetStorePosById(char*item,char*item_data,int item_len,int id){
 T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;T_zUfiSms_BufInfo buf_info={
-(0xe3f+124-0xebb)};char*strSQL=NULL;if(NULL==item||NULL==item_data){return 
+(0x2d1+6501-0x1c36)};char*strSQL=NULL;if(NULL==item||NULL==item_data){return 
 ZUFI_FAIL;}buf_info.buf_addr=item_data;buf_info.buf_len=item_len;strSQL=
 sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x25\x71\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,item,id);result=zUfiSms_ExecSql(strSQL,zUfiSms_GetFirstColumnStr,&buf_info);
-sqlite3_free(strSQL);if((ZTE_WMS_DB_OK!=result)||((0x18f0+2568-0x22f8)==strcmp(
+sqlite3_free(strSQL);if((ZTE_WMS_DB_OK!=result)||((0xc2f+264-0xd37)==strcmp(
 item_data,""))){at_print(LOG_ERR,
 "\x67\x65\x74\x20\x74\x61\x62\x6c\x65\x5f\x6d\x65\x6d\x62\x65\x72\x20\x62\x79\x20\x69\x64\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
 );return ZUFI_FAIL;}return ZUFI_SUCC;}int zUfiSms_DeleteSmsInDb(void){char sql[
-(0x2cc+2666-0xcb6)]={(0x307+7133-0x1ee4)};snprintf(sql,sizeof(sql),
+(0x37b+6857-0x1dc4)]={(0x13ea+4056-0x23c2)};snprintf(sql,sizeof(sql),
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x61\x6e\x64\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_SIM_TABLE,g_zUfiSms_DelMsg.sim_id[g_zUfiSms_DelMsg.sim_index-
-(0x20c4+28-0x20df)]);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}int 
+(0xce7+763-0xfe1)]);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}int 
 zUfiSms_DeleteAllSimSmsInDb(void){return isSucess(zUfiSms_ExecSql(
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27"
  ZTE_WMS_DB_SIM_TABLE"\x27\x3b",NULL,NULL));}int zUfiSms_DeleteNvSms(void){if(
@@ -375,11 +377,11 @@
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27"
  ZTE_WMS_DB_NV_TABLE"\x27\x3b",NULL,NULL)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x64\x65\x6c\x65\x74\x65\x20\x66\x61\x69\x6c" "\n"
-);return WMS_CMD_FAILED;}}else{int i=(0x1530+463-0x16ff);printf(
+);return WMS_CMD_FAILED;}}else{int i=(0xd78+1713-0x1429);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x64\x65\x6c\x65\x74\x65\x20\x6e\x76\x5f\x63\x6f\x75\x6e\x74\x3d\x25\x64" "\n"
-,g_zUfiSms_DelMsg.nv_count);for(i=(0x1574+504-0x176c);i<g_zUfiSms_DelMsg.
-nv_count;i++){char sql[(0x178+9000-0x2420)]={(0xc60+802-0xf82)};snprintf(sql,
-sizeof(sql),
+,g_zUfiSms_DelMsg.nv_count);for(i=(0x718+2636-0x1164);i<g_zUfiSms_DelMsg.
+nv_count;i++){char sql[(0x1c8b+2139-0x2466)]={(0x12fd+1212-0x17b9)};snprintf(sql
+,sizeof(sql),
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x61\x6e\x64\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_NV_TABLE,g_zUfiSms_DelMsg.nv_id[i]);if(ZTE_WMS_DB_OK!=
 zUfiSms_ExecSql(sql,NULL,NULL)){printf(
@@ -387,39 +389,38 @@
 ,i);return WMS_CMD_FAILED;}}}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x64\x65\x6c\x65\x74\x65\x20\x73\x75\x63\x63\x65\x73\x73" "\n"
 );return WMS_CMD_SUCCESS;}int zUfiSms_GetSmsIndex(int id,T_zUfiSms_ModifyTag*
-ptModifyTag,int is_cc){char sql[(0xdd1+2203-0x15ec)]={(0x5d+2562-0xa5f)};
-T_zUfiSms_BufInfo buf_info={(0x2364+658-0x25f6)};char str_index[
-(0x1b9+4131-0x11da)*WMS_MESSAGE_LIST_MAX]={(0x254+1795-0x957)};buf_info.buf_addr
-=str_index;buf_info.buf_len=sizeof(str_index);snprintf(sql,sizeof(sql),
+ptModifyTag,int is_cc){char sql[(0xe8b+757-0x1100)]={(0x1841+959-0x1c00)};
+T_zUfiSms_BufInfo buf_info={(0x230+4383-0x134f)};char str_index[
+(0x1d09+2139-0x2562)*WMS_MESSAGE_LIST_MAX]={(0x1a8+2239-0xa67)};buf_info.
+buf_addr=str_index;buf_info.buf_len=sizeof(str_index);snprintf(sql,sizeof(sql),
 "\x53\x45\x4c\x45\x43\x54\x20\x69\x6e\x64\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,id);if(zUfiSms_ExecSql(sql,zUfiSms_GetFirstColumnStr,&buf_info)!=ZTE_WMS_DB_OK)
 {at_print(LOG_ERR,
 "\x6f\x70\x65\x6e\x20\x74\x61\x62\x6c\x65\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64"
-);return ZUFI_FAIL;}if((0x9df+2533-0x13c3)==is_cc){int i=(0x1c02+1207-0x20b9);
-int j=(0xad3+3454-0x1851);int count=(0x465+3971-0x13e8);char**out_result=NULL;
-count=zUfiSms_SplitString(str_index,&out_result,((char)(0x7ad+4613-0x1977)));for
-(i=(0xc3b+3861-0x1b50);i<count;i++){if((0x63c+45-0x669)!=strcmp(out_result[i],""
-)){ptModifyTag->indices[j++]=atoi(out_result[i]);}}ptModifyTag->num_of_indices=j
-;free(out_result);}else{ptModifyTag->indices[(0xd44+911-0x10d3)]=atoi(str_index)
-;ptModifyTag->num_of_indices=(0x1000+1192-0x14a7);}ptModifyTag->total_indices=
-ptModifyTag->num_of_indices;printf(
+);return ZUFI_FAIL;}if((0x1e24+685-0x20d0)==is_cc){int i=(0xab8+3537-0x1889);int
+ j=(0x18b0+2849-0x23d1);int count=(0x1875+3547-0x2650);char**out_result=NULL;
+count=zUfiSms_SplitString(str_index,&out_result,((char)(0x13f2+749-0x16a4)));for
+(i=(0x1410+2829-0x1f1d);i<count;i++){if((0x9c4+1068-0xdf0)!=strcmp(out_result[i]
+,"")){ptModifyTag->indices[j++]=atoi(out_result[i]);}}ptModifyTag->
+num_of_indices=j;free(out_result);}else{ptModifyTag->indices[(0x17f1+17-0x1802)]
+=atoi(str_index);ptModifyTag->num_of_indices=(0x28d+7000-0x1de4);}ptModifyTag->
+total_indices=ptModifyTag->num_of_indices;printf(
 "\x6d\x6f\x64\x69\x66\x79\x5f\x74\x61\x67\x5f\x70\x74\x72\x2d\x3e\x74\x6f\x74\x61\x6c\x5f\x69\x6e\x64\x69\x63\x65\x73\x3d\x25\x64" "\n"
 ,ptModifyTag->total_indices);return ZUFI_SUCC;}int zUfiSms_IsConcatSms(int id){
-char sql[(0x1f35+1277-0x23b2)]={(0xd88+1358-0x12d6)};int is_cc=
-(0x99b+7411-0x268e);T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;snprintf(sql,sizeof(
-sql),
+char sql[(0x4a6+1351-0x96d)]={(0x2e7+3036-0xec3)};int is_cc=(0xb6b+4335-0x1c5a);
+T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;snprintf(sql,sizeof(sql),
 "\x53\x45\x4c\x45\x43\x54\x20\x43\x63\x5f\x53\x6d\x73\x20\x46\x52\x4f\x4d\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_SMS_TABLE,id);result=zUfiSms_ExecSql(sql,zUfiSms_GetFirstColumnInt,&
 is_cc);if(ZTE_WMS_DB_OK!=result){at_print(LOG_ERR,
 "\x6f\x70\x65\x6e\x20\x74\x61\x62\x6c\x65\x20\x25\x73\x20\x66\x61\x69\x6c\x65\x64"
-,ZTE_WMS_DB_SMS_TABLE);return-(0xeb6+3416-0x1c0d);}return is_cc;}int 
+,ZTE_WMS_DB_SMS_TABLE);return-(0x1333+480-0x1512);}return is_cc;}int 
 zUfiSms_UpdateSmsTagInDb(unsigned long id,unsigned int tags){char sql[
-(0x1818+1501-0x1d75)]={(0x1acb+1538-0x20cd)};snprintf(sql,sizeof(sql),
+(0x9a7+6283-0x21b2)]={(0x3b0+4986-0x172a)};snprintf(sql,sizeof(sql),
 "\x55\x50\x44\x41\x54\x45\x20\x25\x73\x20\x53\x45\x54\x20\x54\x61\x67\x3d\x27\x25\x64\x27\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_SMS_TABLE,tags,id);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}
 int zUfiSms_GetTagCountInDb(T_zUfiSms_MemoryType mem_store,unsigned int tags,int
 *pTotalCount){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;char sql[
-(0x1966+2671-0x2355)]={(0xa19+5188-0x1e5d)};if(pTotalCount==NULL){return 
+(0x1e55+605-0x2032)]={(0x9f6+5001-0x1d7f)};if(pTotalCount==NULL){return 
 ZUFI_FAIL;}if(mem_store==ZTE_WMS_MEMORY_MAX){snprintf(sql,sizeof(sql),
 "\x53\x45\x4c\x45\x43\x54\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x46\x52\x4f\x4d\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x54\x61\x67\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_SMS_TABLE,tags);}else if(mem_store==ZTE_WMS_MEMORY_NV){snprintf(sql,
@@ -429,17 +430,17 @@
 "\x53\x45\x4c\x45\x43\x54\x20\x63\x6f\x75\x6e\x74\x28\x2a\x29\x20\x46\x52\x4f\x4d\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x41\x4e\x44\x20\x54\x61\x67\x3d\x27\x25\x64\x27\x3b"
 ,ZTE_WMS_DB_SMS_TABLE,ZTE_WMS_DB_SIM_TABLE,tags);}result=zUfiSms_ExecSql(sql,(
 zte_wms_db_callback)zUfiSms_GetFirstColumnInt,pTotalCount);return isSucess(
-result);}int zUfiSms_DeleteDraftSms(long iSmsId){char sql[(0x1417+1087-0x17d6)]=
-{(0x11ea+3518-0x1fa8)};snprintf(sql,sizeof(sql),
+result);}int zUfiSms_DeleteDraftSms(long iSmsId){char sql[(0x84+2445-0x991)]={
+(0xbf8+4975-0x1f67)};snprintf(sql,sizeof(sql),
 "\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x27\x25\x6c\x64\x27\x3b"
 ,ZTE_WMS_DB_SMS_TABLE,iSmsId);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}
-int zUfiSms_SetConcatMaxRefer(int ref){char sql[(0x1461+569-0x161a)]={
-(0x374+1629-0x9d1)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0x1c27+759-0x1f1e);}
+int zUfiSms_SetConcatMaxRefer(int ref){char sql[(0x6bd+960-0x9fd)]={
+(0x13a1+1244-0x187d)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0xaca+4257-0x1b6b);}
 snprintf(sql,sizeof(sql),
 "\x55\x50\x44\x41\x54\x45\x20\x25\x73\x20\x53\x45\x54\x20\x4d\x61\x78\x5f\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x31\x3b"
 ,ZTE_WMS_DB_PARAMETER_TABLE,ref);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL))
-;}int zUfiSms_SetMaxReference(int ref){char sql[(0x17d3+1440-0x1cf3)]={
-(0x1e6a+1161-0x22f3)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0xa4+8174-0x2092);}
+;}int zUfiSms_SetMaxReference(int ref){char sql[(0xfa2+1670-0x15a8)]={
+(0x1dca+1037-0x21d7)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0x559+2886-0x109f);}
 snprintf(sql,sizeof(sql),
 "\x55\x50\x44\x41\x54\x45\x20\x25\x73\x20\x53\x45\x54\x20\x4d\x61\x78\x5f\x53\x6d\x73\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3d\x31\x3b"
 ,ZTE_WMS_DB_PARAMETER_TABLE,ref);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL))
@@ -452,75 +453,74 @@
 ->hour,ptSmsDate->min,ptSmsDate->sec,ptSmsDate->timezone);result=zUfiSms_ExecSql
 (strSQL,NULL,NULL);sqlite3_free(strSQL);return isSucess(result);}int 
 zUfiSms_GetFirstColumnParaInfo(void*fvarg,int columns,char**zresult,char**lname)
-{if(columns>=(0x17a2+1791-0x1ea0)&&fvarg!=NULL){if(zresult[(0x1388+3146-0x1fd2)]
-!=NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
-zresult[(0x14a+7756-0x1f96)],sizeof(para->sca)-(0x1334+4495-0x24c2));para->
-mem_store=atoi(zresult[(0x13b7+142-0x1444)]);para->tp_validity_period=atoi(
-zresult[(0x102+7265-0x1d61)]);para->status_report_on=atoi(zresult[
-(0x2159+901-0x24db)]);para->sendfail_retry_on=atoi(zresult[(0x266+6578-0x1c14)])
-;para->outdate_delete_on=atoi(zresult[(0xbd7+733-0xeaf)]);(void)strncpy(para->
-default_store,zresult[(0x162c+518-0x182c)],sizeof(para->default_store)-
-(0x7d6+6850-0x2297));return SQLITE_OK;}}return SQLITE_ERROR;}int 
+{if(columns>=(0x14dd+881-0x184d)&&fvarg!=NULL){if(zresult[(0x1841+510-0x1a3f)]!=
+NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
+zresult[(0x110+4565-0x12e5)],sizeof(para->sca)-(0xd21+2047-0x151f));para->
+mem_store=atoi(zresult[(0x5c9+1588-0xbfc)]);para->tp_validity_period=atoi(
+zresult[(0x1010+3181-0x1c7b)]);para->status_report_on=atoi(zresult[
+(0xe58+5293-0x2302)]);para->sendfail_retry_on=atoi(zresult[(0x5b+4136-0x107f)]);
+para->outdate_delete_on=atoi(zresult[(0x1f4a+22-0x1f5b)]);(void)strncpy(para->
+default_store,zresult[(0x1f5d+1205-0x240c)],sizeof(para->default_store)-
+(0x4e3+3377-0x1213));return SQLITE_OK;}}return SQLITE_ERROR;}int 
 zUfiSms_GetDbParameters(void){char*strSQL=
 "\x53\x45\x4c\x45\x43\x54\x20\x53\x6d\x73\x5f\x53\x63\x61\x2c\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x2c\x54\x70\x5f\x56\x61\x6c\x69\x64\x69\x74\x79\x2c\x53\x6d\x73\x5f\x52\x65\x70\x6f\x72\x74\x2c\x53\x65\x6e\x64\x5f\x52\x65\x74\x72\x79\x2c\x4f\x75\x74\x64\x61\x74\x65\x5f\x44\x65\x6c\x65\x74\x65\x2c\x44\x65\x66\x61\x75\x6c\x74\x5f\x53\x74\x6f\x72\x65\x20\x46\x52\x4f\x4d\x20"
  ZTE_WMS_DB_PARAMETER_TABLE"\x3b";memset(&g_zUfiSms_CurSmsPara,
-(0x11df+3110-0x1e05),sizeof(T_zUfiSms_ParaInfo));return isSucess(zUfiSms_ExecSql
-(strSQL,zUfiSms_GetFirstColumnParaInfo,&g_zUfiSms_CurSmsPara));}int 
+(0x950+3341-0x165d),sizeof(T_zUfiSms_ParaInfo));return isSucess(zUfiSms_ExecSql(
+strSQL,zUfiSms_GetFirstColumnParaInfo,&g_zUfiSms_CurSmsPara));}int 
 zUfiSms_GetSendContent(void*fvarg,int column,char**zresult,char**lname){
-T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;if(column>=(0x1ef0+173-0x1f9c)
-&&para!=NULL)(void)strncpy(para->buf_addr,zresult[(0x124a+3193-0x1ec3)],para->
-buf_len-(0x796+6234-0x1fef));return(0x35f+8008-0x22a7);}int 
+T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;if(column>=(0x1686+464-0x1855)
+&&para!=NULL)(void)strncpy(para->buf_addr,zresult[(0x29f+1750-0x975)],para->
+buf_len-(0x178a+1702-0x1e2f));return(0xb76+5514-0x2100);}int 
 zUfiSms_GetSmsContent(char*pSmsBuf,int len){T_zUfiSms_BufInfo buf_info={
-(0xdf8+2481-0x17a9)};char*strSQL=
+(0x9cf+6739-0x2422)};char*strSQL=
 "\x53\x45\x4c\x45\x43\x54\x20\x6d\x73\x67\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x20\x46\x52\x4f\x4d\x20"
  ZTE_WMS_DB_SEND_CONTENT_TABLE"\x3b";buf_info.buf_addr=pSmsBuf;buf_info.buf_len=
-len;memset(buf_info.buf_addr,(0x6e4+2379-0x102f),len);return isSucess(
+len;memset(buf_info.buf_addr,(0x1932+923-0x1ccd),len);return isSucess(
 zUfiSms_ExecSql(strSQL,zUfiSms_GetSendContent,&buf_info));}int 
 zUfiSms_SearchConcatSmsInDb(T_zUfiSms_DbStoreData*ptDbSaveData,char*pMemStore){
-char*sql=NULL;sqlite3_stmt*stmt=NULL;int id=-(0xe48+3404-0x1b93);switch(
+char*sql=NULL;sqlite3_stmt*stmt=NULL;int id=-(0x1142+422-0x12e7);switch(
 ptDbSaveData->tag){case WMS_TAG_TYPE_MO_SENT_V01:case 
 WMS_TAG_TYPE_MO_NOT_SENT_V01:{sql=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x43\x63\x5f\x53\x65\x71\x2c\x69\x64\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4e\x75\x6d\x62\x65\x72\x3d\x27\x25\x71\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x54\x6f\x74\x61\x6c\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x41\x4e\x44\x20\x28\x54\x61\x67\x20\x3d\x20\x27\x25\x64\x27\x20\x4f\x52\x20\x54\x61\x67\x3d\x20\x27\x25\x64\x27\x29\x3b"
-,ptDbSaveData->number,ptDbSaveData->concat_info[(0x185d+612-0x1ac1)],
-ptDbSaveData->concat_info[(0x1085+5353-0x256d)],pMemStore,
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x10ed+3961-0x2066)],
+ptDbSaveData->concat_info[(0xc52+6004-0x23c5)],pMemStore,
 WMS_TAG_TYPE_MO_SENT_V01,WMS_TAG_TYPE_MO_NOT_SENT_V01);break;}case
-(0x1904+427-0x1aab):{sql=sqlite3_mprintf(
+(0x635+8161-0x2612):{sql=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x43\x63\x5f\x53\x65\x71\x2c\x69\x64\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4e\x75\x6d\x62\x65\x72\x3d\x27\x25\x71\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x54\x6f\x74\x61\x6c\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x41\x4e\x44\x20\x54\x61\x67\x20\x3d\x20\x27\x25\x64\x27\x3b"
-,ptDbSaveData->number,ptDbSaveData->concat_info[(0xef5+163-0xf98)],ptDbSaveData
-->concat_info[(0xfef+2162-0x1860)],pMemStore,(0x4bd+3742-0x1357));break;}case 
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x240+519-0x447)],ptDbSaveData
+->concat_info[(0xaf8+2454-0x148d)],pMemStore,(0x504+4075-0x14eb));break;}case 
 WMS_TAG_TYPE_MT_READ_V01:case WMS_TAG_TYPE_MT_NOT_READ_V01:{sql=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x43\x63\x5f\x53\x65\x71\x2c\x69\x64\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4e\x75\x6d\x62\x65\x72\x3d\x27\x25\x71\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x54\x6f\x74\x61\x6c\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x41\x4e\x44\x20\x28\x54\x61\x67\x20\x3d\x20\x27\x25\x64\x27\x20\x4f\x52\x20\x54\x61\x67\x3d\x20\x27\x25\x64\x27\x29\x3b"
-,ptDbSaveData->number,ptDbSaveData->concat_info[(0xc72+3037-0x184f)],
-ptDbSaveData->concat_info[(0x7ba+6328-0x2071)],pMemStore,
-WMS_TAG_TYPE_MT_READ_V01,WMS_TAG_TYPE_MT_NOT_READ_V01);break;}default:{sql=
-sqlite3_mprintf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x3e4+122-0x45e)],ptDbSaveData
+->concat_info[(0x1b8f+2430-0x250c)],pMemStore,WMS_TAG_TYPE_MT_READ_V01,
+WMS_TAG_TYPE_MT_NOT_READ_V01);break;}default:{sql=sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x43\x63\x5f\x53\x65\x71\x2c\x69\x64\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4e\x75\x6d\x62\x65\x72\x3d\x27\x25\x71\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x54\x6f\x74\x61\x6c\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x3b"
-,ptDbSaveData->number,ptDbSaveData->concat_info[(0x45c+3772-0x1318)],
-ptDbSaveData->concat_info[(0x9d+2328-0x9b4)],pMemStore);at_print(LOG_ERR,
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x2079+944-0x2429)],
+ptDbSaveData->concat_info[(0xeb8+262-0xfbd)],pMemStore);at_print(LOG_ERR,
 "\x74\x61\x67\x20\x25\x64\x20\x69\x73\x20\x75\x6e\x6b\x6e\x6f\x77\x6e",
 ptDbSaveData->tag);break;}}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x3a\x25\x73" "\n",sql);if(
-sqlite3_prepare(g_zUfiSms_DbPointer,sql,-(0x109d+758-0x1392),&stmt,
-(0x2061+1527-0x2658))!=SQLITE_OK){at_print(LOG_ERR,
+sqlite3_prepare(g_zUfiSms_DbPointer,sql,-(0x69d+58-0x6d6),&stmt,
+(0x554+399-0x6e3))!=SQLITE_OK){at_print(LOG_ERR,
 "\x63\x61\x6e\x20\x6e\x6f\x74\x20\x65\x78\x65\x63\x20\x73\x71\x6c\x2c\x73\x71\x6c\x69\x74\x65\x33\x5f\x65\x72\x72\x6d\x73\x67\x3a\x25\x73\x2e" "\n"
-,sqlite3_errmsg(g_zUfiSms_DbPointer));sqlite3_free(sql);return-(0xcf7+714-0xfc0)
-;}while(SQLITE_ROW==sqlite3_step(stmt)){int j=(0x1ab3+782-0x1dc1);char**
-out_result=NULL;char*column_text=sqlite3_column_text(stmt,(0x33+6530-0x19b5));
-int count=-(0x4a7+6320-0x1d56);if(column_text!=NULL)count=zUfiSms_SplitString(
-column_text,&out_result,((char)(0x64a+5305-0x1ac8)));for(j=(0x5c1+1033-0x9ca);j<
-count;j++){if((0x400+1415-0x987)==strcmp(out_result[j],"")){if(j+
-(0x1df4+773-0x20f8)==ptDbSaveData->concat_info[(0x2085+1620-0x26d7)]){id=
-sqlite3_column_int(stmt,(0xddd+2034-0x15ce));break;}}}if(out_result!=NULL){free(
-out_result);out_result=NULL;}if(-(0x1105+4447-0x2263)!=id){break;}}(void)
+,sqlite3_errmsg(g_zUfiSms_DbPointer));sqlite3_free(sql);return-(0x6+5997-0x1772)
+;}while(SQLITE_ROW==sqlite3_step(stmt)){int j=(0xc2+9022-0x2400);char**
+out_result=NULL;char*column_text=sqlite3_column_text(stmt,(0x1eb+579-0x42e));int
+ count=-(0x9a+8478-0x21b7);if(column_text!=NULL)count=zUfiSms_SplitString(
+column_text,&out_result,((char)(0xcb8+2825-0x1786)));for(j=(0xf9+5078-0x14cf);j<
+count;j++){if((0x12da+1264-0x17ca)==strcmp(out_result[j],"")){if(j+
+(0x134a+4103-0x2350)==ptDbSaveData->concat_info[(0x80f+2055-0x1014)]){id=
+sqlite3_column_int(stmt,(0x8df+4955-0x1c39));break;}}}if(out_result!=NULL){free(
+out_result);out_result=NULL;}if(-(0x67d+3388-0x13b8)!=id){break;}}(void)
 sqlite3_finalize(stmt);sqlite3_free(sql);return id;}int 
 zUfiSms_CheckDbOutdateSms_Callback(void*fvarg,int columns,char**zresult,char**
-lname){if(fvarg!=NULL&&columns>=(0x3a7+8242-0x23d8)){if(zresult[
-(0xa7b+5516-0x2007)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
-result->id[result->all_or_count]=atoi(zresult[(0xc60+435-0xe13)]);result->
+lname){if(fvarg!=NULL&&columns>=(0x192+278-0x2a7)){if(zresult[
+(0x788+6015-0x1f07)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
+result->id[result->all_or_count]=atoi(zresult[(0x1a01+542-0x1c1f)]);result->
 all_or_count++;return SQLITE_OK;}}return SQLITE_ERROR;}VOID 
 zUfiSms_CheckDbOutdateSms(const char*pDbTable,T_zUfiSms_DelReq*pSmsDel){char 
-acSql[(0x22e9+611-0x24cc)]={(0xb2+787-0x3c5)};struct timeval tp;if(
-(0x417+3548-0x11f3)!=gettimeofday(&tp,NULL)){printf(
+acSql[(0x151b+1025-0x189c)]={(0x6b7+2673-0x1128)};struct timeval tp;if(
+(0x16d2+2795-0x21bd)!=gettimeofday(&tp,NULL)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x67\x65\x74\x74\x69\x6d\x65\x6f\x66\x64\x61\x79\x20\x65\x72\x72\x6f\x72\x21\x21\x21"
 );return;}if(tp.tv_sec<=OUTDATEINTERVAL){return;}snprintf(acSql,sizeof(acSql),
 "\x53\x45\x4c\x45\x43\x54\x20\x69\x64\x20\x46\x52\x4f\x4d\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x6b\x74\x69\x6d\x65\x3c\x27\x25\x75\x27\x20\x41\x4e\x44\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x3b"
@@ -530,21 +530,21 @@
 "\x6f\x70\x65\x6e\x20\x74\x61\x62\x6c\x65\x20\x25\x73\x20\x66\x61\x69\x6c\x65\x64"
 ,ZTE_WMS_DB_CMD_STATUS_TABLE);}return;}int 
 zUfiSms_GetCurrentRecvTotalSeq_Callback(void*fvarg,int column,char**zresult,char
-**lname){if(fvarg!=NULL&&column>=(0x9d7+3753-0x187e)){if(zresult[
-(0x10f4+2168-0x196c)]!=NULL&&zresult[(0x44+1808-0x753)]!=NULL){SMS_MSG_INFO*msg=
-(SMS_MSG_INFO*)fvarg;memset(msg->id,(0x1da+3064-0xdd2),sizeof(msg->id));memset(
-msg->total_seq,(0x1499+4393-0x25c2),sizeof(msg->total_seq));strncpy(msg->id,
-zresult[(0xf07+1362-0x1459)],sizeof(msg->id)-(0xd13+316-0xe4e));strncpy(msg->
-total_seq,zresult[(0xcd4+5620-0x22c7)],sizeof(msg->total_seq)-
-(0x1820+849-0x1b70));printf(
+**lname){if(fvarg!=NULL&&column>=(0x1884+1560-0x1e9a)){if(zresult[
+(0x13a7+4284-0x2463)]!=NULL&&zresult[(0x44+7801-0x1ebc)]!=NULL){SMS_MSG_INFO*msg
+=(SMS_MSG_INFO*)fvarg;memset(msg->id,(0x103+8786-0x2355),sizeof(msg->id));memset
+(msg->total_seq,(0xf2a+143-0xfb9),sizeof(msg->total_seq));strncpy(msg->id,
+zresult[(0xd9d+1229-0x126a)],sizeof(msg->id)-(0x12e0+241-0x13d0));strncpy(msg->
+total_seq,zresult[(0x1c63+877-0x1fcf)],sizeof(msg->total_seq)-
+(0x476+5691-0x1ab0));printf(
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x63\x76\x54\x6f\x74\x61\x6c\x53\x65\x71\x5f\x43\x61\x6c\x6c\x62\x61\x63\x6b\x20\x69\x64\x20\x3d\x20\x25\x73\x2c\x20\x74\x6f\x74\x61\x6c\x5f\x73\x65\x71\x20\x3d\x20\x25\x73" "\n"
 ,msg->id,msg->total_seq);return SQLITE_OK;}}return SQLITE_ERROR;}int 
 zUfiSms_GetCurrentRecvTotalSeq(T_zUfiSms_DbStoreData*ptDbSaveData,SMS_MSG_INFO*
 pmsg){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;char*strSQL=NULL;strSQL=
 sqlite3_mprintf(
 "\x53\x45\x4c\x45\x43\x54\x20\x69\x64\x2c\x20\x43\x63\x5f\x4e\x75\x6d\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x20\x6e\x75\x6d\x62\x65\x72\x3d\x27\x25\x71\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x52\x65\x66\x3d\x27\x25\x64\x27\x20\x41\x4e\x44\x20\x43\x63\x5f\x54\x6f\x74\x61\x6c\x3d\x27\x25\x64\x27\x3b"
-,ptDbSaveData->number,ptDbSaveData->concat_info[(0x2d9+4469-0x144e)],
-ptDbSaveData->concat_info[(0x1330+964-0x16f3)]);printf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0xfba+3865-0x1ed3)],
+ptDbSaveData->concat_info[(0xee8+5468-0x2443)]);printf(
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x43\x75\x72\x72\x65\x6e\x74\x52\x65\x63\x76\x54\x6f\x74\x61\x6c\x53\x65\x71\x20\x73\x71\x6c\x20\x3a\x20\x25\x73\x20" "\n"
 ,strSQL);result=zUfiSms_ExecSql(strSQL,zUfiSms_GetCurrentRecvTotalSeq_Callback,
 pmsg);sqlite3_free(strSQL);return isSucess(result);}
diff --git a/ap/app/zte_comm/sms/src/sms_fnc.c b/ap/app/zte_comm/sms/src/sms_fnc.c
index 31094f4..23cee76 100755
--- a/ap/app/zte_comm/sms/src/sms_fnc.c
+++ b/ap/app/zte_comm/sms/src/sms_fnc.c
@@ -8,17 +8,17 @@
 #include "sms_fnc.h"

 #include "sms_db.h"

 #include "sms_code.h"

-#define SMS_RETRY_COUNT (0x1703+698-0x19ba)

-#define SHORT_INT_LEN (0x1247+2653-0x1c9e)

+#define SMS_RETRY_COUNT (0x16c4+3457-0x2442)

+#define SHORT_INT_LEN (0x1c3+4194-0x121f)

 SMS_LOCATION g_zUfiSms_CurLocation=SMS_LOCATION_SIM;int 
-g_zUfiSms_ConcatSmsReference=(0x9c4+2571-0x13cf);T_zUfiSms_ParaInfo 
+g_zUfiSms_ConcatSmsReference=(0x161+7641-0x1f3a);T_zUfiSms_ParaInfo 
 g_zUfiSms_CurSmsPara={"",WMS_STORAGE_TYPE_UIM_V01,
-ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0x8d4+1571-0xef7),(0x48a+8307-0x24fd)
-,(0x369+7282-0x1fdb),"\x6e\x76"};int g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;int 
-g_zUfiSms_Dcs=(0x5e8+5869-0x1cd5);unsigned long g_zUfiSms_StoreCapablity[
-ZTE_WMS_MEMORY_MAX]={(0x17a0+1583-0x1d6b),ZTE_WMS_DB_MSG_COUNT_MAX};
+ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0xf04+1315-0x1427),(0xaa+5073-0x147b)
+,(0x126c+243-0x135f),"\x6e\x76"};int g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;int 
+g_zUfiSms_Dcs=(0x761+6342-0x2027);unsigned long g_zUfiSms_StoreCapablity[
+ZTE_WMS_MEMORY_MAX]={(0x96+5070-0x1400),ZTE_WMS_DB_MSG_COUNT_MAX};
 T_zSms_SendSmsReq g_zUfiSms_FinalCmgsBuf;SMS_PARAM g_zUfiSms_SendingSms;UINT16 
-g_zUfiSms_IsLanguageShift=(0x1090+1138-0x1502);extern int g_zUfiSms_MsgRefer;
+g_zUfiSms_IsLanguageShift=(0xa52+7127-0x2629);extern int g_zUfiSms_MsgRefer;
 extern T_zUfiSms_DelSms g_zUfiSms_DelMsg;extern T_zUfiSms_DelIndexInfo 
 g_deleteIndex;extern T_zUfiSms_ModifyIndexInfo g_modifyIndex;extern 
 T_zUfiSms_ModifySms g_zUfiSms_modifyMsg;extern UINT8 g_zUfiSms_MemFullFlag[
@@ -31,16 +31,16 @@
 eLocation){switch(eLocation){case SMS_LOCATION_SIM:{g_zUfiSms_CurLocation=
 SMS_LOCATION_SIM;break;}case SMS_LOCATION_ME:{g_zUfiSms_CurLocation=
 SMS_LOCATION_ME;break;}default:{return;}}}int zUfiSms_SetDeleteInfo(
-T_zUfiSms_DelReq*ptDelMsg){char acStorePos[(0xf5f+4291-0x1ff0)];int i=
-(0x817+2648-0x126f);g_zUfiSms_DelMsg.nv_count=(0x646+7228-0x2282);
-g_zUfiSms_DelMsg.nv_index=(0x57d+1109-0x9d2);g_zUfiSms_DelMsg.sim_count=
-(0xd17+1376-0x1277);g_zUfiSms_DelMsg.sim_index=(0x106b+3141-0x1cb0);for(i=
-(0x15b3+3174-0x2219);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
-(0x4c+6851-0x1b0f),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+T_zUfiSms_DelReq*ptDelMsg){char acStorePos[(0x2e9+3950-0x1225)];int i=
+(0x58b+6191-0x1dba);g_zUfiSms_DelMsg.nv_count=(0x10bb+3527-0x1e82);
+g_zUfiSms_DelMsg.nv_index=(0xcbc+5971-0x240f);g_zUfiSms_DelMsg.sim_count=
+(0x14b+6180-0x196f);g_zUfiSms_DelMsg.sim_index=(0x4b9+3292-0x1195);for(i=
+(0x549+1191-0x9f0);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
+(0x9ea+1361-0xf3b),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
 "Mem_Store",acStorePos,sizeof(acStorePos),ptDelMsg->id[i])){return ZUFI_FAIL;}if
-((0xc5f+2811-0x175a)==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){g_zUfiSms_DelMsg.
+((0x1b1+716-0x47d)==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){g_zUfiSms_DelMsg.
 nv_id[g_zUfiSms_DelMsg.nv_count]=ptDelMsg->id[i];g_zUfiSms_DelMsg.nv_count++;
-g_zUfiSms_DelMsg.nv_index_count++;}else if((0xf04+4116-0x1f18)==strcmp(
+g_zUfiSms_DelMsg.nv_index_count++;}else if((0xec7+3664-0x1d17)==strcmp(
 acStorePos,ZTE_WMS_DB_SIM_TABLE)){g_zUfiSms_DelMsg.sim_id[g_zUfiSms_DelMsg.
 sim_count]=ptDelMsg->id[i];g_zUfiSms_DelMsg.sim_count++;g_zUfiSms_DelMsg.
 sim_index_count++;}}return ZUFI_SUCC;}void zUfiSms_ChangeMainState(
@@ -69,95 +69,96 @@
 SMS_STATE_RECVING:case SMS_STATE_RECVED:case SMS_STATE_DELSAVING:case 
 SMS_STATE_DELSAVED:{break;}default:{return;}}sc_cfg_set(NV_SMS_STATE,
 ptStrSmsState[iNewState]);}int zUfiSms_CheckStoreDir(void){if(-
-(0xc03+2908-0x175e)==access(ZTE_WMS_DB_DIR,F_OK)){printf(
+(0x1124+4552-0x22eb)==access(ZTE_WMS_DB_DIR,F_OK)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x3a\x25\x73\x20\x64\x6f\x65\x73\x20\x6e\x6f\x74\x20\x65\x78\x69\x73\x74\x2c\x73\x6f\x63\x72\x65\x61\x74\x65\x20\x69\x74\x2e" "\n"
-,ZTE_WMS_DB_DIR);if(-(0x6f1+7130-0x22ca)==mkdir(ZTE_WMS_DB_DIR,
-(0x12a9+2972-0x1c46))){printf(
+,ZTE_WMS_DB_DIR);if(-(0xf59+4587-0x2143)==mkdir(ZTE_WMS_DB_DIR,
+(0xafa+5688-0x1f33))){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x3a\x66\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x63\x72\x65\x61\x74\x65\x20\x64\x62\x20\x64\x69\x72\x2e" "\n"
 );return ZUFI_FAIL;}}return ZUFI_SUCC;}int zUfiSms_CheckSmsDb(void){if(-
-(0x2ec+2927-0xe5a)==access(ZTE_WMS_DB_PATH,F_OK)){printf(
+(0xe70+5744-0x24df)==access(ZTE_WMS_DB_PATH,F_OK)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x3a\x25\x73\x20\x64\x6f\x65\x73\x20\x6e\x6f\x74\x20\x65\x78\x69\x73\x74\x2c\x73\x6f\x20\x67\x65\x74\x20\x64\x65\x66\x61\x75\x6c\x74\x20\x63\x6f\x6e\x66\x69\x67\x2e" "\n"
 ,ZTE_WMS_DB_PATH);return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x3d\x3d\x3d\x3d\x3d\x3d\x25\x73\x20\x65\x78\x69\x73\x74\x2e" "\n"
 ,ZTE_WMS_DB_PATH);return ZUFI_SUCC;}void zUfiSms_GetDefaultCfgPara(void){
-unsigned char sts_flag=(0x1695+1531-0x1c90);unsigned char mem_store_flag=
-(0x17e1+2129-0x2032);unsigned int tp_validity_period=(0xac+847-0x3fb);char 
-Temp_sms_vp[(0x21c+7127-0x1deb)]={(0x190+9081-0x2509)};CHAR reportEnable[
-(0x167c+364-0x17b6)]={(0x29a+2871-0xdd1)};CHAR smsLocation[(0x443+6025-0x1b9a)]=
-{(0x43f+1397-0x9b4)};CHAR sendfailRetry[(0x959+6391-0x221e)]={
-(0x1a09+144-0x1a99)};CHAR outdateDelete[(0x17b0+3506-0x2530)]={
-(0x855+2305-0x1156)};CHAR defaultStore[(0x9d5+1410-0xf25)]={(0xea3+1129-0x130c)}
-;sc_cfg_get(NV_REPORT_ENABLE,reportEnable,sizeof(reportEnable));sc_cfg_get(
+unsigned char sts_flag=(0x7d5+7587-0x2578);unsigned char mem_store_flag=
+(0xbda+5920-0x22fa);unsigned int tp_validity_period=(0x130+4662-0x1366);char 
+Temp_sms_vp[(0xa9c+2709-0x1529)]={(0xb31+6684-0x254d)};CHAR reportEnable[
+(0xbd+657-0x31c)]={(0x636+6229-0x1e8b)};CHAR smsLocation[(0x8f0+7086-0x246c)]={
+(0xbba+4450-0x1d1c)};CHAR sendfailRetry[(0xe9+7930-0x1fb1)]={(0x471+4392-0x1599)
+};CHAR outdateDelete[(0x5fb+7025-0x213a)]={(0x1200+2686-0x1c7e)};CHAR 
+defaultStore[(0xc6+4724-0x1308)]={(0x237+3828-0x112b)};sc_cfg_get(
+NV_REPORT_ENABLE,reportEnable,sizeof(reportEnable));sc_cfg_get(
 NV_SMS_LOCATION_SET,smsLocation,sizeof(smsLocation));sc_cfg_get(
 NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));sc_cfg_get(
 NV_OUTDATE_DELETE,outdateDelete,sizeof(outdateDelete));sc_cfg_get(
-NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if((0x1ad+6422-0x1ac3)==
-strcmp(reportEnable,"\x31")){sts_flag=(0xae0+2959-0x166e);}g_zUfiSms_CurSmsPara.
-status_report_on=sts_flag;if((0x1012+857-0x136b)==strcmp(smsLocation,"\x4d\x45")
-){mem_store_flag=(0x25a+4718-0x14c8);}else{mem_store_flag=(0x102f+3442-0x1da0);}
-g_zUfiSms_CurSmsPara.mem_store=(unsigned int)((0x1079+1345-0x15ba)==
+NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if((0x3fc+7250-0x204e)==
+strcmp(reportEnable,"\x31")){sts_flag=(0x6fc+1225-0xbc4);}g_zUfiSms_CurSmsPara.
+status_report_on=sts_flag;if((0x1d59+255-0x1e58)==strcmp(smsLocation,"\x4d\x45")
+){mem_store_flag=(0x1085+423-0x122c);}else{mem_store_flag=(0x15ec+1236-0x1abf);}
+g_zUfiSms_CurSmsPara.mem_store=(unsigned int)((0x12fd+2599-0x1d24)==
 mem_store_flag?WMS_STORAGE_TYPE_NV_V01:WMS_STORAGE_TYPE_UIM_V01);sc_cfg_get(
 NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));tp_validity_period=
-(0x5ea+4632-0x1703);if((0x1a38+1823-0x2157)==strncmp(Temp_sms_vp,
-"\x6c\x6f\x6e\x67\x65\x73\x74",(0x9da+2987-0x157e))){tp_validity_period=
-(0xf18+1742-0x14e7);}if((0x10c7+1212-0x1583)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x5f\x64\x61\x79",(0x1c3c+1093-0x207a))){tp_validity_period=
-(0x34a+3961-0x121c);}if((0x74b+286-0x869)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x77\x65\x65\x6b",(0x170f+3755-0x25b3))){tp_validity_period=
-(0x16f4+897-0x19c8);}if((0x165b+1736-0x1d23)==strncmp(Temp_sms_vp,
-"\x74\x77\x65\x6c\x76\x65\x68",(0x1fe4+778-0x22e7))){tp_validity_period=
-(0x212+8751-0x23b2);}g_zUfiSms_CurSmsPara.tp_validity_period=tp_validity_period;
-if((0x1795+2227-0x2048)==strcmp(sendfailRetry,"\x31")){g_zUfiSms_CurSmsPara.
-sendfail_retry_on=(0x2d+6414-0x193a);}else{g_zUfiSms_CurSmsPara.
-sendfail_retry_on=(0x280+2073-0xa99);}if((0xedf+1237-0x13b4)==strcmp(
+(0x13b8+4512-0x2459);if((0xe68+4506-0x2002)==strncmp(Temp_sms_vp,
+"\x6c\x6f\x6e\x67\x65\x73\x74",(0x9f0+3930-0x1943))){tp_validity_period=
+(0x1795+2556-0x2092);}if((0x3ac+8625-0x255d)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0x40a+6824-0x1eab))){tp_validity_period=
+(0xc2c+5586-0x2157);}if((0x7c3+1845-0xef8)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0xffc+3520-0x1db5))){tp_validity_period=
+(0x1393+4835-0x25c9);}if((0xd5+3154-0xd27)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0x12ef+4626-0x24fa))){tp_validity_period=
+(0x84d+4131-0x17e1);}g_zUfiSms_CurSmsPara.tp_validity_period=tp_validity_period;
+if((0xb2f+3796-0x1a03)==strcmp(sendfailRetry,"\x31")){g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0x1348+4271-0x23f6);}else{g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0x1c95+393-0x1e1e);}if((0x1034+1854-0x1772)==strcmp(
 outdateDelete,"\x31")){g_zUfiSms_CurSmsPara.outdate_delete_on=
-(0x172d+1259-0x1c17);}else{g_zUfiSms_CurSmsPara.outdate_delete_on=
-(0x12cd+4332-0x23b9);}if((0x79a+3768-0x1652)==strcmp(defaultStore,"\x73\x69\x6d"
-)){strncpy(g_zUfiSms_CurSmsPara.default_store,"\x73\x69\x6d",sizeof(
-g_zUfiSms_CurSmsPara.default_store)-(0x2b0+5247-0x172e));}else{strncpy(
+(0x1870+2089-0x2098);}else{g_zUfiSms_CurSmsPara.outdate_delete_on=
+(0x4bf+4331-0x15aa);}if((0x148+2364-0xa84)==strcmp(defaultStore,"\x73\x69\x6d"))
+{strncpy(g_zUfiSms_CurSmsPara.default_store,"\x73\x69\x6d",sizeof(
+g_zUfiSms_CurSmsPara.default_store)-(0x135f+3379-0x2091));}else{strncpy(
 g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(g_zUfiSms_CurSmsPara.
-default_store)-(0x55f+4814-0x182c));}}void zUfiSms_GetDefaultPara(void){memset(&
-g_zUfiSms_CurSmsPara,(0x77d+6934-0x2293),sizeof(T_zUfiSms_ParaInfo));
-g_zUfiSms_CurSmsPara.status_report_on=(0x44d+3061-0x1042);g_zUfiSms_CurSmsPara.
+default_store)-(0x1d3d+2199-0x25d3));}}void zUfiSms_GetDefaultPara(void){memset(
+&g_zUfiSms_CurSmsPara,(0x1224+3689-0x208d),sizeof(T_zUfiSms_ParaInfo));
+g_zUfiSms_CurSmsPara.status_report_on=(0xabc+6242-0x231e);g_zUfiSms_CurSmsPara.
 mem_store=WMS_STORAGE_TYPE_NV_V01;g_zUfiSms_CurSmsPara.tp_validity_period=
 ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW;g_zUfiSms_CurSmsPara.sendfail_retry_on
-=(0xbd+367-0x22c);g_zUfiSms_CurSmsPara.outdate_delete_on=(0xba4+1738-0x126e);
+=(0xae1+6102-0x22b7);g_zUfiSms_CurSmsPara.outdate_delete_on=(0xebd+5393-0x23ce);
 strncpy(g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(
-g_zUfiSms_CurSmsPara.default_store)-(0x615+7273-0x227d));}
-#if (0x2c5+141-0x352)

+g_zUfiSms_CurSmsPara.default_store)-(0x51+9517-0x257d));}
+#if (0x1c25+1552-0x2235)

 T_zUfiSms_CmdStatus zUfiSms_SetParameters(T_zUfiSms_CmdMsgBuff*ptSmsBuffer){
 T_zUfiSms_ParaInfo*ptSmsParameter=NULL;T_zUfiSms_ParaInfo tNewSmsParameter={
-(0x229+5078-0x15ff)};if(NULL==ptSmsBuffer){return WMS_CMD_FAILED;}ptSmsParameter
-=(T_zUfiSms_ParaInfo*)(&(ptSmsBuffer->cmd_info.set_sms_para));memcpy((void*)&
-tNewSmsParameter,(void*)ptSmsParameter,sizeof(T_zUfiSms_ParaInfo));
+(0x1e21+1231-0x22f0)};if(NULL==ptSmsBuffer){return WMS_CMD_FAILED;}
+ptSmsParameter=(T_zUfiSms_ParaInfo*)(&(ptSmsBuffer->cmd_info.set_sms_para));
+memcpy((void*)&tNewSmsParameter,(void*)ptSmsParameter,sizeof(T_zUfiSms_ParaInfo)
+);
 #ifndef TSP_MODEL

 if((g_zUfiSms_CurSmsPara.mem_store!=ptSmsParameter->mem_store)){if(
 ZUFI_SMS_FAILURE==zUfiSms_SetCpms(ptSmsParameter)){at_print(LOG_ERR,
 "\x73\x65\x74\x20\x63\x66\x67\x20\x72\x6f\x75\x74\x65\x73\x20\x66\x61\x69\x6c\x65\x64\x2e"
 );return WMS_CMD_FAILED;}}
 #endif

-if(strlen(ptSmsParameter->sca)!=(0x61b+2057-0xe24)){if(ZUFI_SMS_FAILURE==
+if(strlen(ptSmsParameter->sca)!=(0x2043+658-0x22d5)){if(ZUFI_SMS_FAILURE==
 zUfiSms_SetCsca(ptSmsParameter)){return WMS_CMD_FAILED;}}if(ZUFI_SMS_FAILURE==
 zUfiSms_SetDbParameters(ptSmsParameter)){return WMS_CMD_FAILED;}else{sc_cfg_set(
 "\x73\x6d\x73\x5f\x63\x65\x6e\x74\x65\x72\x5f\x6e\x75\x6d",ptSmsParameter->sca);
 }memcpy((void*)&g_zUfiSms_CurSmsPara,(void*)&tNewSmsParameter,sizeof(
 T_zUfiSms_ParaInfo));return WMS_CMD_SUCCESS;}
 #endif

-int zUfiSms_LoadSmsPara(){int count=(0x1bd+782-0x4cb);if(ZUFI_SUCC!=
+int zUfiSms_LoadSmsPara(){int count=(0x8cf+981-0xca4);if(ZUFI_SUCC!=
 zUfiSms_IsDbEmpty(ZTE_WMS_DB_PARAMETER_TABLE,&count)){return ZUFI_FAIL;}if(count
-==(0xcef+4954-0x2049)){zUfiSms_GetDefaultCfgPara();if((0xfd6+3997-0x1f73)!=
+==(0x6fc+570-0x936)){zUfiSms_GetDefaultCfgPara();if((0x135+3529-0xefe)!=
 zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){return ZUFI_FAIL;}}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x68\x61\x76\x65\x20\x64\x65\x66\x61\x75\x6c\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x20\x69\x6e\x20\x64\x61\x74\x61\x62\x61\x73\x65\x2e" "\n"
 );if(ZUFI_SUCC!=zUfiSms_GetDbParameters()){return ZUFI_FAIL;}if(
 WMS_STORAGE_TYPE_NV_V01!=g_zUfiSms_CurSmsPara.mem_store&&
 WMS_STORAGE_TYPE_UIM_V01!=g_zUfiSms_CurSmsPara.mem_store){zUfiSms_GetDefaultPara
-();if((0x78d+6174-0x1fab)!=zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){
+();if((0x1263+1317-0x1788)!=zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){
 printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x20\x66\x61\x69\x6c\x73\x20\x32\x2e" "\n"
 );return ZUFI_FAIL;}}}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4c\x6f\x61\x64\x53\x6d\x73\x50\x61\x72\x61\x20\x73\x75\x63\x63\x2e" "\n"
 );return ZUFI_SUCC;}int zUfiSms_CheckMemoryFull(T_zUfiSms_MemoryType mem_store){
-int total_count=(0xb8+2679-0xb2f);if((ZTE_WMS_MEMORY_SIM==mem_store)||(
+int total_count=(0x1d23+2242-0x25e5);if((ZTE_WMS_MEMORY_SIM==mem_store)||(
 ZTE_WMS_MEMORY_MAX==mem_store)){if(ZUFI_FAIL==zUfiSms_GetTotalCount(
 ZTE_WMS_DB_SIM_TABLE,&total_count)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x3a\x67\x65\x74\x20\x74\x61\x62\x6c\x65\x20\x74\x6f\x74\x61\x6c\x20\x63\x6f\x75\x6e\x74\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
@@ -174,13 +175,13 @@
 ,total_count);if(total_count>=(int)g_zUfiSms_StoreCapablity[
 WMS_STORAGE_TYPE_NV_V01]){g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]=TRUE;}
 else{g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]=FALSE;}}return ZUFI_SUCC;}
-int zUfiSms_SetStorePara(char*mem_store){if((0x8d6+6399-0x21d5)==strcmp(
+int zUfiSms_SetStorePara(char*mem_store){if((0xe75+4233-0x1efe)==strcmp(
 mem_store,"\x53\x4d")){g_zUfiSms_CurSmsPara.mem_store=(unsigned int)
 WMS_STORAGE_TYPE_UIM_V01;(void)sc_cfg_set(NV_SMS_LOCATION_SET,"\x30");}else if(
-(0x783+7320-0x241b)==strcmp(mem_store,"\x4d\x45")){g_zUfiSms_CurSmsPara.
+(0x12f6+4389-0x241b)==strcmp(mem_store,"\x4d\x45")){g_zUfiSms_CurSmsPara.
 mem_store=(unsigned int)WMS_STORAGE_TYPE_NV_V01;(void)sc_cfg_set(
-NV_SMS_LOCATION_SET,"\x31");}else if((0x14a8+4121-0x24c1)==strcmp(mem_store,
-"\x53\x52")){g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0x1cb+8670-0x23a7);(
+NV_SMS_LOCATION_SET,"\x31");}else if((0xf3f+5001-0x22c8)==strcmp(mem_store,
+"\x53\x52")){g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0x16e2+3164-0x233c);(
 void)sc_cfg_set(NV_SMS_LOCATION_SET,"\x32");}else{g_zUfiSms_CurSmsPara.mem_store
 =(unsigned int)WMS_STORAGE_TYPE_NONE_V01;(void)sc_cfg_set(NV_SMS_LOCATION_SET,
 "\x2d\x31");}if(ZUFI_FAIL==zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){
@@ -188,41 +189,41 @@
 "\x63\x61\x6e\x20\x6e\x6f\x74\x20\x73\x65\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x2e" "\n"
 );return ZUFI_FAIL;}return ZUFI_SUCC;}int zUfiSms_SetScaPara(char*sca){strncpy(
 g_zUfiSms_CurSmsPara.sca,sca,sizeof(g_zUfiSms_CurSmsPara.sca)-
-(0x10cc+3717-0x1f50));if(ZUFI_FAIL==zUfiSms_SetDbParameters(&
-g_zUfiSms_CurSmsPara)){at_print(LOG_ERR,
+(0x100d+790-0x1322));if(ZUFI_FAIL==zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara
+)){at_print(LOG_ERR,
 "\x63\x61\x6e\x20\x6e\x6f\x74\x20\x73\x65\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x2e" "\n"
 );return ZUFI_FAIL;}return ZUFI_SUCC;}void zUfiSms_SetGlobalDcsLang(unsigned 
-char cDcs){if(cDcs==(0xa5b+7217-0x268b)){g_zUfiSms_Dcs=DCS_ASC;
-g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0x1df4+40-0x1e1a)){
+char cDcs){if(cDcs==(0x9b5+2327-0x12cb)){g_zUfiSms_Dcs=DCS_ASC;
+g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0x945+1484-0xf0f)){
 g_zUfiSms_Dcs=DCS_USC;g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==
-(0x30a+7203-0x1f2a)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;}
-else if(cDcs==(0x39+7084-0x1be0)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=
+(0x1c00+1146-0x2077)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;
+}else if(cDcs==(0x6e2+6015-0x1e5c)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=
 DCS_GSM7_PORTUGUESE;}else{g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=
 DCS_GSM7_DEFAULT;}}int zUfiSms_FillGroupSms(T_zUfiSms_SendReq*ptSendMsg,
 T_zUfiSms_GroupInfo*ptGroupSms){int i;if(NULL==ptSendMsg||NULL==ptGroupSms||
 ZTE_WMS_SEND_NUM_MAX<ptSendMsg->receiver_count){return ZUFI_FAIL;}ptGroupSms->
-total_receiver=ptSendMsg->receiver_count;for(i=(0x135b+2952-0x1ee3);i<ptGroupSms
+total_receiver=ptSendMsg->receiver_count;for(i=(0x38c+5809-0x1a3d);i<ptGroupSms
 ->total_receiver;i++){strncpy(ptGroupSms->receivers[i],ptSendMsg->dest_num[i],
 ZTE_WMS_ADDRESS_LEN_MAX);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x46\x69\x6c\x6c\x47\x72\x6f\x75\x70\x53\x6d\x73\x20\x72\x65\x63\x65\x69\x76\x65\x72\x73\x5b\x25\x64\x5d\x3d\x25\x73" "\n"
-,i,ptGroupSms->receivers[i]);}ptGroupSms->current_receiver=(0xb1d+5890-0x221f);
+,i,ptGroupSms->receivers[i]);}ptGroupSms->current_receiver=(0x15d2+503-0x17c9);
 return ZUFI_SUCC;}int zUfiSms_FillConcatSms(T_zUfiSms_SendReq*pSendSrcMsg,
-T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x1279+2497-0x1c3a);int 
-iUnitlen=(0x632+6378-0x1f1c);int iSegNo=(0x2203+334-0x2351);unsigned char*
+T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x3dd+2203-0xc78);int 
+iUnitlen=(0x6f6+2837-0x120b);int iSegNo=(0x25+3317-0xd1a);unsigned char*
 pSmsConverted=NULL;unsigned char acConvertContent[
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*(0x231c+432-0x24c8)
-+(0x604+1637-0xc65)]={(0xb89+5994-0x22f3)};unsigned char acTmpContent[
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*(0x5+8206-0x200f)+
-(0x276+6242-0x1ad4)]={(0x5dc+5093-0x19c1)};int iTimeZone=(0x1431+976-0x1801);int
- tmp_i=(0x1d9+6611-0x1bac);if(NULL==pSendSrcMsg||NULL==pDestConcatMsg){return-
-(0x2244+799-0x2562);}iTotalLen=pSendSrcMsg->msg_len;if(ZUFI_FAIL==
-zUfiSms_GetSmsContent(acTmpContent,sizeof(acTmpContent))){printf(
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
+(0x1593+3912-0x24d7)+(0xc80+2816-0x177c)]={(0x4a8+1485-0xa75)};unsigned char 
+acTmpContent[ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
+(0x2099+1590-0x26cb)+(0x884+1274-0xd7a)]={(0x962+4296-0x1a2a)};int iTimeZone=
+(0x2024+283-0x213f);int tmp_i=(0x12b1+1936-0x1a41);if(NULL==pSendSrcMsg||NULL==
+pDestConcatMsg){return-(0x1ffa+582-0x223f);}iTotalLen=pSendSrcMsg->msg_len;if(
+ZUFI_FAIL==zUfiSms_GetSmsContent(acTmpContent,sizeof(acTmpContent))){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x53\x6d\x73\x43\x6f\x6e\x74\x65\x6e\x74\x20\x46\x61\x69\x6c\x2e" "\n"
-);return-(0x409+6163-0x1c1b);}printf(
+);return-(0xb9a+4099-0x1b9c);}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x53\x6d\x73\x43\x6f\x6e\x74\x65\x6e\x74\x3a\x25\x73\x2e" "\n"
 ,acTmpContent);(void)String2Bytes(acTmpContent,acConvertContent,(int)strlen(
-acTmpContent));memset(acTmpContent,(0xa6f+5511-0x1ff6),sizeof(acTmpContent));if(
-DCS_USC==g_zUfiSms_Dcs){pSmsConverted=acConvertContent;}else{if(
+acTmpContent));memset(acTmpContent,(0x1078+1594-0x16b2),sizeof(acTmpContent));if
+(DCS_USC==g_zUfiSms_Dcs){pSmsConverted=acConvertContent;}else{if(
 NOT_DEFINE_LANGUAGE==g_zUfiSms_Language){iTotalLen=
 zUfiSms_ConvertAsciiToGsmDefault(acConvertContent,acTmpContent,pSendSrcMsg->
 msg_len);}else if(DCS_GSM7_SPANISH==g_zUfiSms_Language){iTotalLen=
@@ -231,96 +232,97 @@
 zUfiSms_ConvertUcs2ToPortuguese(acConvertContent,acTmpContent,pSendSrcMsg->
 msg_len);}else{iTotalLen=zUfiSms_ConvertUcs2ToGsmDefault(acConvertContent,
 acTmpContent,pSendSrcMsg->msg_len);}pSendSrcMsg->msg_len=iTotalLen;pSmsConverted
-=acTmpContent;}if(iTotalLen>(sizeof(acConvertContent)-(0x177c+2667-0x21e6))){
-iTotalLen=sizeof(acConvertContent)-(0x1370+2546-0x1d61);}pDestConcatMsg->sms_len
+=acTmpContent;}if(iTotalLen>(sizeof(acConvertContent)-(0x1e4f+2167-0x26c5))){
+iTotalLen=sizeof(acConvertContent)-(0x1839+2495-0x21f7);}pDestConcatMsg->sms_len
 =iTotalLen;if((iTotalLen>ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX)||(g_zUfiSms_Language==
-DCS_PORTUGUESE&&iTotalLen>(0x2139+7-0x20a5))||((g_zUfiSms_Dcs==DCS_USC)&&
+DCS_PORTUGUESE&&iTotalLen>(0x19b+9156-0x24c4))||((g_zUfiSms_Dcs==DCS_USC)&&
 iTotalLen>ZTE_WMS_SMS_MSG_CHAR_MAX)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x3d\x3d\x3d\x3d\x3d\x73\x65\x6e\x64\x20\x63\x6f\x6e\x74\x61\x63\x74\x20\x73\x6d\x73\x2e" "\n"
 );if(g_zUfiSms_Dcs==DCS_USC){iUnitlen=ZTE_WMS_SMS_CONCAT_ELEMNT_UCS_LEN*
-(0xf54+5389-0x245f);}else{if(g_zUfiSms_Language==NOT_DEFINE_LANGUAGE||
+(0x149b+4050-0x246b);}else{if(g_zUfiSms_Language==NOT_DEFINE_LANGUAGE||
 g_zUfiSms_Language==DCS_GSM7_DEFAULT){iUnitlen=ZTE_WMS_SMS_CONCAT_ELEMNT_ASC_LEN
 ;}else{iUnitlen=ZTE_WMS_SMS_CONCAT_ELEMNT_LANGUAGE_LEN;}}while(iTotalLen>
-(0x183f+121-0x18b8)&&iSegNo<ZTE_WMS_CONCAT_SMS_COUNT_MAX){memcpy(pDestConcatMsg
+(0x8c9+4816-0x1b99)&&iSegNo<ZTE_WMS_CONCAT_SMS_COUNT_MAX){memcpy(pDestConcatMsg
 ->msg_contents[iSegNo],pSmsConverted,iUnitlen);iTotalLen-=iUnitlen;pSmsConverted
 +=iUnitlen;iSegNo++;}pDestConcatMsg->total_msg=iSegNo;}else{iUnitlen=iTotalLen;
-pDestConcatMsg->total_msg=(0x2f9+860-0x654);memcpy(pDestConcatMsg->msg_contents[
-(0x11d8+2477-0x1b85)],pSmsConverted,iTotalLen);printf(
+pDestConcatMsg->total_msg=(0x39d+7496-0x20e4);memcpy(pDestConcatMsg->
+msg_contents[(0x289+3842-0x118b)],pSmsConverted,iTotalLen);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x3d\x3d\x3d\x3d\x3d\x73\x65\x6e\x64\x20\x6e\x6f\x72\x6d\x61\x6c\x20\x73\x6d\x73\x2e\x6c\x65\x6e\x3a\x25\x64\x2e\x63\x6f\x6e\x74\x65\x6e\x74\x3a\x25\x73\x2e" "\n"
-,iUnitlen,pDestConcatMsg->msg_contents[(0xa0+5680-0x16d0)]);}
+,iUnitlen,pDestConcatMsg->msg_contents[(0xaf9+69-0xb3e)]);}
 g_zUfiSms_ConcatTotalNum=pDestConcatMsg->total_msg;pDestConcatMsg->
-current_sending=(0xd96+3331-0x1a99);memcpy(&(pDestConcatMsg->date),&(pSendSrcMsg
-->date),sizeof(T_zUfiSms_Date));tmp_i=atoi(pDestConcatMsg->date.timezone);if(
-tmp_i<INT_MIN+(0xe81+5588-0x2454)||tmp_i>INT_MAX-(0xe6+6216-0x192d)){printf(
+current_sending=(0x1006+1650-0x1678);memcpy(&(pDestConcatMsg->date),&(
+pSendSrcMsg->date),sizeof(T_zUfiSms_Date));tmp_i=atoi(pDestConcatMsg->date.
+timezone);if(tmp_i<INT_MIN+(0x1740+506-0x1939)||tmp_i>INT_MAX-
+(0x1f09+163-0x1fab)){printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x70\x44\x65\x73\x74\x43\x6f\x6e\x63\x61\x74\x4d\x73\x67\x20\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x3a\x25\x64\x2e" "\n"
-,tmp_i);return ZUFI_FAIL;}iTimeZone=tmp_i*(0x211d+954-0x24d3);memset(
-pDestConcatMsg->date.timezone,(0x847+3482-0x15e1),sizeof(pDestConcatMsg->date.
-timezone));if(iTimeZone>(0xe5+7755-0x1f30)){snprintf(pDestConcatMsg->date.
+,tmp_i);return ZUFI_FAIL;}iTimeZone=tmp_i*(0x7c0+5041-0x1b6d);memset(
+pDestConcatMsg->date.timezone,(0xe0d+4195-0x1e70),sizeof(pDestConcatMsg->date.
+timezone));if(iTimeZone>(0xc46+1279-0x1145)){snprintf(pDestConcatMsg->date.
 timezone,sizeof(pDestConcatMsg->date.timezone),"\x2b\x25\x64",iTimeZone);}else{
 snprintf(pDestConcatMsg->date.timezone,sizeof(pDestConcatMsg->date.timezone),
 "\x25\x64",iTimeZone);}pSmsConverted=NULL;return iUnitlen;}void 
 zUfiSms_FillDateheader(T_zUfiSms_SubmitTpdu*ptSubmit,T_zUfiSms_ConcatInfo*
 ptConcatSms,T_zUfiSms_DbStoreData*ptDbSaveData){unsigned char iHeaderNum=
-(0xf51+4404-0x2085);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
-user_data_header_present=TRUE;if((0x11a8+5239-0x261f)==ptConcatSms->
+(0x910+3299-0x15f3);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
+user_data_header_present=TRUE;if((0x1a29+513-0x1c2a)==ptConcatSms->
 current_sending){g_zUfiSms_ConcatSmsReference++;(void)zUfiSms_SetConcatMaxRefer(
 g_zUfiSms_ConcatSmsReference);}ptSubmit->user_data.headers[iHeaderNum].header_id
 =WMS_UDH_CONCAT_8;ptSubmit->user_data.headers[iHeaderNum].u.concat_8.total_sm=
 ptConcatSms->total_msg;ptSubmit->user_data.headers[iHeaderNum].u.concat_8.
-seq_num=ptConcatSms->current_sending+(0x24f0+474-0x26c9);ptSubmit->user_data.
+seq_num=ptConcatSms->current_sending+(0x8d0+4988-0x1c4b);ptSubmit->user_data.
 headers[iHeaderNum].u.concat_8.msg_ref=g_zUfiSms_ConcatSmsReference%
-(0x235+4219-0x11b1);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
-(0x55a+430-0x707);ptDbSaveData->concat_info[(0xa6d+1537-0x106e)]=
+(0x2614+86-0x256b);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
+(0x152+8022-0x20a7);ptDbSaveData->concat_info[(0x1b21+895-0x1ea0)]=
 g_zUfiSms_ConcatSmsReference;}int zUfiSms_MakeFinalCmgsBuf(){SMS_PARAM tSmsData;
-int iPduLength=(0xc46+4954-0x1fa0);int nSmscLength=(0x1c8d+2462-0x262b);char 
-Tempstrr[(0x1a33+802-0x1d53)]={(0x472+3142-0x10b8)};char Temp_sms_vp[
-(0x1762+1360-0x1caa)]={(0x1cd7+2041-0x24d0)};char tmpBuf1[(0xe29+943-0x11d5)]={
-(0x19b0+571-0x1beb)};char tmpBuf2[(0x1816+2004-0x1fe4)]={(0xf8c+5460-0x24e0)};
-CHAR smsCenter[(0x1c0f+2141-0x243a)]={(0x18ab+356-0x1a0f)};memset(&tSmsData,
-(0xcb5+5149-0x20d2),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
-(0xda3+857-0x10fc),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==g_zUfiSms_SendingSms
-.TP_DCS){int i=(0x1af+4833-0x1490);for(;i<g_zUfiSms_SendingSms.TP_UDLength;i++){
-tSmsData.TP_UD[i]=g_zUfiSms_SendingSms.TP_UD[i];}tSmsData.TP_UDLength=
-g_zUfiSms_SendingSms.TP_UDLength;}else{snprintf(tSmsData.TP_UD,sizeof(tSmsData.
-TP_UD),"\x25\x73",g_zUfiSms_SendingSms.TP_UD);tSmsData.TP_UDLength=strlen(
-tSmsData.TP_UD);}sc_cfg_get(NV_SMS_CENTER_NUM,smsCenter,sizeof(smsCenter));
-snprintf(tSmsData.SCA,sizeof(tSmsData.SCA),"\x25\x73",smsCenter);snprintf(
-tSmsData.TPA,sizeof(tSmsData.TPA),"\x25\x73",g_zUfiSms_SendingSms.TPA);tSmsData.
-TP_DCS=g_zUfiSms_SendingSms.TP_DCS;sc_cfg_get(NV_REPORT_ENABLE,Tempstrr,sizeof(
-Tempstrr));if(((0xcc3+865-0x1024)==strncmp(Tempstrr,"\x31",(0x744+1055-0xb62)))
-&&(g_zUfiSms_ConcatSms.current_sending==g_zUfiSms_ConcatSms.total_msg-
-(0x1fc9+1775-0x26b7))){tSmsData.TP_SRR=(0xf83+1797-0x1687);}else{tSmsData.TP_SRR
-=(0xbf3+2410-0x155d);}tSmsData.TP_UDHI=g_zUfiSms_SendingSms.TP_UDHI;tSmsData.
-TP_VP=(0x4f8+1594-0xa33);sc_cfg_get(NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));
-if((0x86+8239-0x20b5)==strncmp(Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",
-(0x12f2+4795-0x25a6))){tSmsData.TP_VP=(0x2fc+5037-0x15aa);}else if(
-(0x1dad+1544-0x23b5)==strncmp(Temp_sms_vp,"\x6f\x6e\x65\x5f\x64\x61\x79",
-(0x1f4c+1921-0x26c6))){tSmsData.TP_VP=(0x3fa+790-0x669);}else if(
-(0x1616+3386-0x2350)==strncmp(Temp_sms_vp,"\x6f\x6e\x65\x77\x65\x65\x6b",
-(0x15c1+3834-0x24b4))){tSmsData.TP_VP=(0xc29+3620-0x19a0);}else if(
-(0x86+1963-0x831)==strncmp(Temp_sms_vp,"\x74\x77\x65\x6c\x76\x65\x68",
-(0xfa7+4962-0x2302))){tSmsData.TP_VP=(0x20d+1100-0x5ca);}tSmsData.TP_PID=
-(0x1e95+490-0x207f);
-#if (0x1b08+2658-0x2569)
+int iPduLength=(0xc1+7631-0x1e90);int nSmscLength=(0x6ea+135-0x771);char 
+Tempstrr[(0x712+5341-0x1bed)]={(0x6a8+5142-0x1abe)};char Temp_sms_vp[
+(0x58b+3124-0x11b7)]={(0x2046+1531-0x2641)};char tmpBuf1[(0x1305+4864-0x2602)]={
+(0x17a3+1394-0x1d15)};char tmpBuf2[(0x9c8+103-0xa29)]={(0xa20+4300-0x1aec)};CHAR
+ smsCenter[(0xb49+4803-0x1dda)]={(0x931+2546-0x1323)};memset(&tSmsData,
+(0x4e9+1588-0xb1d),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
+(0x702+2597-0x1127),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==
+g_zUfiSms_SendingSms.TP_DCS){int i=(0xe0d+705-0x10ce);for(;i<
+g_zUfiSms_SendingSms.TP_UDLength;i++){tSmsData.TP_UD[i]=g_zUfiSms_SendingSms.
+TP_UD[i];}tSmsData.TP_UDLength=g_zUfiSms_SendingSms.TP_UDLength;}else{snprintf(
+tSmsData.TP_UD,sizeof(tSmsData.TP_UD),"\x25\x73",g_zUfiSms_SendingSms.TP_UD);
+tSmsData.TP_UDLength=strlen(tSmsData.TP_UD);}sc_cfg_get(NV_SMS_CENTER_NUM,
+smsCenter,sizeof(smsCenter));snprintf(tSmsData.SCA,sizeof(tSmsData.SCA),
+"\x25\x73",smsCenter);snprintf(tSmsData.TPA,sizeof(tSmsData.TPA),"\x25\x73",
+g_zUfiSms_SendingSms.TPA);tSmsData.TP_DCS=g_zUfiSms_SendingSms.TP_DCS;sc_cfg_get
+(NV_REPORT_ENABLE,Tempstrr,sizeof(Tempstrr));if(((0x103b+3796-0x1f0f)==strncmp(
+Tempstrr,"\x31",(0xb2d+92-0xb88)))&&(g_zUfiSms_ConcatSms.current_sending==
+g_zUfiSms_ConcatSms.total_msg-(0x135+2164-0x9a8))){tSmsData.TP_SRR=
+(0x9a3+6412-0x22ae);}else{tSmsData.TP_SRR=(0xc08+1931-0x1393);}tSmsData.TP_UDHI=
+g_zUfiSms_SendingSms.TP_UDHI;tSmsData.TP_VP=(0x1224+2369-0x1a66);sc_cfg_get(
+NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));if((0x343+2922-0xead)==strncmp(
+Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0x14b7+701-0x176d))){tSmsData.TP_VP=
+(0x1f95+1776-0x2586);}else if((0x1c09+2408-0x2571)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0xd20+1838-0x1447))){tSmsData.TP_VP=
+(0x1154+3274-0x1d77);}else if((0x1735+1945-0x1ece)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0x921+2616-0x1352))){tSmsData.TP_VP=
+(0x185c+1686-0x1e45);}else if((0x1a+4356-0x111e)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0x630+3278-0x12f7))){tSmsData.TP_VP=
+(0x14dc+1851-0x1b88);}tSmsData.TP_PID=(0xcac+419-0xe4f);
+#if (0xfcb+623-0x1239)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x62\x65\x67\x69\x6e\x3a\x25\x73" "\n",
 g_zUfiSms_FinalCmgsBuf.pdu);
 #endif    
 iPduLength=EncodePdu_Submit(&tSmsData,g_zUfiSms_FinalCmgsBuf.pdu);
-#if (0xa26+5001-0x1dae)
+#if (0x950+2011-0x112a)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4d\x61\x6b\x65\x46\x69\x6e\x61\x6c\x43\x6d\x67\x73\x42\x75\x66\x20\x6d\x61\x6b\x65\x20\x70\x64\x75\x20\x64\x61\x74\x61" "\n"
 );printf("\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x25\x73" "\n",
 g_zUfiSms_FinalCmgsBuf.pdu);
 #endif

-(void)String2Bytes(g_zUfiSms_FinalCmgsBuf.pdu,tmpBuf1,(0xe11+1585-0x1440));
+(void)String2Bytes(g_zUfiSms_FinalCmgsBuf.pdu,tmpBuf1,(0x178+4467-0x12e9));
 Bytes2String(tmpBuf1,tmpBuf2,strlen(tmpBuf1));nSmscLength=atoi(tmpBuf2);if(
-nSmscLength<(0x590+272-0x6a0)||nSmscLength>INT_MAX-(0xaf2+3450-0x186b)){at_print
-(LOG_ERR,
+nSmscLength<(0x34d+3020-0xf19)||nSmscLength>INT_MAX-(0xda+559-0x308)){at_print(
+LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x6e\x53\x6d\x73\x63\x4c\x65\x6e\x67\x74\x68\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,nSmscLength);nSmscLength=(0xf68+3494-0x1d0e);;}nSmscLength++;
-g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0x11b+4750-0x13a7)-nSmscLength;
-#if (0x4f1+1049-0x909)
+,nSmscLength);nSmscLength=(0xf3+5095-0x14da);;}nSmscLength++;
+g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0x20c1+1508-0x26a3)-nSmscLength;
+#if (0x319+3907-0x125b)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4d\x61\x6b\x65\x46\x69\x6e\x61\x6c\x43\x6d\x67\x73\x42\x75\x66\x20\x6d\x61\x6b\x65\x20\x65\x6e\x64\x20\x70\x64\x75\x20\x64\x61\x74\x61" "\n"
 );printf(
@@ -330,22 +332,22 @@
 return ZUFI_SUCC;}int zUfiSms_FillSubmitTpdu(T_zUfiSms_ConcatInfo*ptConcatSms,
 T_zUfiSms_GroupInfo*ptGroupSms,int iSmsLen,T_zUfiSms_SubmitTpdu*ptSubmit,
 T_zUfiSms_DbStoreData*ptDbSaveData){if(NULL==ptSubmit||NULL==ptConcatSms||NULL==
-ptGroupSms||NULL==ptDbSaveData){return-(0x1d78+611-0x1fda);}ptSubmit->
+ptGroupSms||NULL==ptDbSaveData){return-(0xb77+5438-0x20b4);}ptSubmit->
 reject_duplicates=FALSE;ptSubmit->reply_path_present=FALSE;ptSubmit->
 user_data_header_present=FALSE;ptSubmit->status_report_enabled=
-g_zUfiSms_CurSmsPara.status_report_on;if(((0x16c4+156-0x175f)<ptConcatSms->
-total_msg)&&(ptConcatSms->current_sending+(0x1484+371-0x15f6)<ptConcatSms->
-total_msg)){ptSubmit->status_report_enabled=(0x752+6433-0x2073);}ptSubmit->
+g_zUfiSms_CurSmsPara.status_report_on;if(((0xe52+5935-0x2580)<ptConcatSms->
+total_msg)&&(ptConcatSms->current_sending+(0x173a+1977-0x1ef2)<ptConcatSms->
+total_msg)){ptSubmit->status_report_enabled=(0x929+7209-0x2552);}ptSubmit->
 message_reference=g_zUfiSms_MsgRefer;ptSubmit->pid=WMS_PID_DEFAULT;ptSubmit->dcs
-.msg_class=(wms_message_class_e_type)(0x6d9+4491-0x1860);ptSubmit->dcs.
-is_compressed=(0xd4a+2405-0x16af);ptSubmit->dcs.alphabet=(g_zUfiSms_Dcs==DCS_ASC
+.msg_class=(wms_message_class_e_type)(0x222+4687-0x146d);ptSubmit->dcs.
+is_compressed=(0x514+4707-0x1777);ptSubmit->dcs.alphabet=(g_zUfiSms_Dcs==DCS_ASC
 )?WMS_GW_ALPHABET_7_BIT_DEFAULT:WMS_GW_ALPHABET_UCS2;ptSubmit->validity.format=
 WMS_GW_VALIDITY_RELATIVE;zUfiSms_DecodeRelativeTime(g_zUfiSms_CurSmsPara.
 tp_validity_period,&ptSubmit->validity.u.time);ptSubmit->user_data.num_headers=
-(0x1c9b+2497-0x265c);if(ptConcatSms->total_msg>(0xf5a+5347-0x243c)){
+(0x142+4776-0x13ea);if(ptConcatSms->total_msg>(0xd3+6616-0x1aaa)){
 zUfiSms_FillDateheader(ptSubmit,ptConcatSms,ptDbSaveData);ptDbSaveData->
-concat_info[(0x108a+1544-0x1690)]=ptConcatSms->current_sending+
-(0x13a7+4893-0x26c3);ptDbSaveData->concat_info[(0x47d+7434-0x2186)]=ptConcatSms
+concat_info[(0x1204+3290-0x1edc)]=ptConcatSms->current_sending+
+(0x14d6+2016-0x1cb5);ptDbSaveData->concat_info[(0x1131+2999-0x1ce7)]=ptConcatSms
 ->total_msg;}if(g_zUfiSms_Language==DCS_PORTUGUESE){UINT8 i=ptSubmit->user_data.
 num_headers;ptSubmit->user_data_header_present=TRUE;ptSubmit->user_data.headers[
 i].header_id=WMS_UDH_NAT_LANG_SS;ptSubmit->user_data.headers[ptSubmit->user_data
@@ -353,52 +355,51 @@
 user_data.num_headers++;g_zUfiSms_IsLanguageShift=WMS_UDH_NAT_LANG_SS;}ptSubmit
 ->user_data.sm_len=iSmsLen;memcpy(ptSubmit->user_data.sm_data,ptConcatSms->
 msg_contents[ptConcatSms->current_sending],iSmsLen);if(ptGroupSms->receivers[
-ptGroupSms->current_receiver][(0x797+7220-0x23cb)]==((char)(0x10cf+243-0x1197)))
-{(void)zUfiSms_CharToInt(ptGroupSms->receivers[ptGroupSms->current_receiver]+
-(0x423+7481-0x215b),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])-
-(0x85d+1939-0xfef),ptSubmit->address.digits);ptSubmit->address.number_type=
+ptGroupSms->current_receiver][(0x6a2+6521-0x201b)]==((char)(0x422+1216-0x8b7))){
+(void)zUfiSms_CharToInt(ptGroupSms->receivers[ptGroupSms->current_receiver]+
+(0x763+4564-0x1936),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])-
+(0x261+5211-0x16bb),ptSubmit->address.digits);ptSubmit->address.number_type=
 WMS_NUMBER_INTERNATIONAL;ptSubmit->address.number_of_digits=strlen(ptGroupSms->
-receivers[ptGroupSms->current_receiver])-(0x82+3122-0xcb3);}else if(ptGroupSms->
-receivers[ptGroupSms->current_receiver][(0x120f+2415-0x1b7e)]==
-((char)(0xd55+3830-0x1c1b))&&ptGroupSms->receivers[ptGroupSms->current_receiver]
-[(0xbd1+3678-0x1a2e)]==((char)(0x18f6+1243-0x1da1))){(void)zUfiSms_CharToInt(
-ptGroupSms->receivers[ptGroupSms->current_receiver]+(0x1429+3164-0x2083),strlen(
-ptGroupSms->receivers[ptGroupSms->current_receiver])-(0x2b7+213-0x38a),ptSubmit
-->address.digits);ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL;
-ptSubmit->address.number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->
-current_receiver])-(0x6d2+3788-0x159c);}else{(void)zUfiSms_CharToInt(ptGroupSms
-->receivers[ptGroupSms->current_receiver],strlen(ptGroupSms->receivers[
-ptGroupSms->current_receiver]),ptSubmit->address.digits);ptSubmit->address.
-number_type=WMS_NUMBER_UNKNOWN;ptSubmit->address.number_of_digits=strlen(
-ptGroupSms->receivers[ptGroupSms->current_receiver]);}ptSubmit->address.
-digit_mode=(wms_digit_mode_e_type)(0x1106+4302-0x21d4);ptSubmit->address.
-number_mode=(wms_number_mode_e_type)(0xe79+4238-0x1f07);ptSubmit->address.
-number_plan=WMS_NUMBER_PLAN_TELEPHONY;memset(&g_zUfiSms_SendingSms,
-(0x15ff+2936-0x2177),sizeof(SMS_PARAM));snprintf(g_zUfiSms_SendingSms.TPA,sizeof
-(g_zUfiSms_SendingSms.TPA),"\x25\x73",ptGroupSms->receivers[ptGroupSms->
-current_receiver]);if(g_zUfiSms_Language!=NOT_DEFINE_LANGUAGE){
-g_zUfiSms_SendingSms.TP_DCS=CODE_GSM7;}else{if(g_zUfiSms_Dcs==DCS_USC){
-g_zUfiSms_SendingSms.TP_DCS=CODE_UCS2;}else{g_zUfiSms_SendingSms.TP_DCS=
-CODE_GSM8;}}if(g_zUfiSms_SendingSms.TP_DCS==CODE_GSM7){
-zUfiSms_FillGlobalTpudGsm7(ptSubmit,ptConcatSms,ptDbSaveData);}else{
+receivers[ptGroupSms->current_receiver])-(0x191c+220-0x19f7);}else if(ptGroupSms
+->receivers[ptGroupSms->current_receiver][(0x665+6912-0x2165)]==
+((char)(0xe82+4511-0x1ff1))&&ptGroupSms->receivers[ptGroupSms->current_receiver]
+[(0x15fa+1355-0x1b44)]==((char)(0x16cb+1188-0x1b3f))){(void)zUfiSms_CharToInt(
+ptGroupSms->receivers[ptGroupSms->current_receiver]+(0x326+2898-0xe76),strlen(
+ptGroupSms->receivers[ptGroupSms->current_receiver])-(0x62d+4332-0x1717),
+ptSubmit->address.digits);ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL
+;ptSubmit->address.number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->
+current_receiver])-(0xae4+435-0xc95);}else{(void)zUfiSms_CharToInt(ptGroupSms->
+receivers[ptGroupSms->current_receiver],strlen(ptGroupSms->receivers[ptGroupSms
+->current_receiver]),ptSubmit->address.digits);ptSubmit->address.number_type=
+WMS_NUMBER_UNKNOWN;ptSubmit->address.number_of_digits=strlen(ptGroupSms->
+receivers[ptGroupSms->current_receiver]);}ptSubmit->address.digit_mode=(
+wms_digit_mode_e_type)(0x32b+4369-0x143c);ptSubmit->address.number_mode=(
+wms_number_mode_e_type)(0x74f+780-0xa5b);ptSubmit->address.number_plan=
+WMS_NUMBER_PLAN_TELEPHONY;memset(&g_zUfiSms_SendingSms,(0x971+5424-0x1ea1),
+sizeof(SMS_PARAM));snprintf(g_zUfiSms_SendingSms.TPA,sizeof(g_zUfiSms_SendingSms
+.TPA),"\x25\x73",ptGroupSms->receivers[ptGroupSms->current_receiver]);if(
+g_zUfiSms_Language!=NOT_DEFINE_LANGUAGE){g_zUfiSms_SendingSms.TP_DCS=CODE_GSM7;}
+else{if(g_zUfiSms_Dcs==DCS_USC){g_zUfiSms_SendingSms.TP_DCS=CODE_UCS2;}else{
+g_zUfiSms_SendingSms.TP_DCS=CODE_GSM8;}}if(g_zUfiSms_SendingSms.TP_DCS==
+CODE_GSM7){zUfiSms_FillGlobalTpudGsm7(ptSubmit,ptConcatSms,ptDbSaveData);}else{
 zUfiSms_FillGlobalTpudUcs2(ptSubmit,ptConcatSms,ptDbSaveData);}(void)
 zUfiSms_MakeFinalCmgsBuf();return ZUFI_SUCC;}void zUfiSms_FillSca(
 T_zUfiSms_ClientMsg*ptClientMsg){char sca[ZTE_WMS_SCA_LEN_MAX]={
-(0xbbc+6579-0x256f)};int i=(0x15e4+4203-0x264f);if(NULL==ptClientMsg){return;}
+(0x1bfd+2454-0x2593)};int i=(0x1049+3871-0x1f68);if(NULL==ptClientMsg){return;}
 memcpy((void*)sca,(void*)(g_zUfiSms_CurSmsPara.sca),sizeof(g_zUfiSms_CurSmsPara.
-sca));if(sca[(0x101f+718-0x12ed)]==((char)(0xfd6+1831-0x16d2))){ptClientMsg->u.
+sca));if(sca[(0xccd+1714-0x137f)]==((char)(0x14d4+1993-0x1c72))){ptClientMsg->u.
 gw_message.sc_address.number_type=WMS_NUMBER_INTERNATIONAL;}ptClientMsg->u.
 gw_message.sc_address.digit_mode=WMS_DIGIT_MODE_8_BIT;ptClientMsg->u.gw_message.
 sc_address.number_plan=WMS_NUMBER_PLAN_TELEPHONY;ptClientMsg->u.gw_message.
-sc_address.number_of_digits=strlen(sca);if(sca[(0x1d60+1958-0x2506)]==
-((char)(0x145d+3886-0x2360))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits--;for(i=(0x1de9+252-0x1ee5);i<ptClientMsg->u.gw_message.
-sc_address.number_of_digits;i++){sca[i]=sca[i+(0x16a0+1270-0x1b95)];}}else if(
-sca[(0xac7+1663-0x1146)]==((char)(0x19bc+1592-0x1fc4))&&sca[(0x5f8+6486-0x1f4d)]
-==((char)(0x12e4+3975-0x223b))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits-=(0x435+6659-0x1e36);for(i=(0x5b5+8421-0x269a);i<ptClientMsg->u
-.gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0x309+8325-0x238c)];}
-}(void)zUfiSms_CharToInt(sca,ptClientMsg->u.gw_message.sc_address.
+sc_address.number_of_digits=strlen(sca);if(sca[(0x86+2105-0x8bf)]==
+((char)(0x54d+8647-0x26e9))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits--;for(i=(0x1585+2357-0x1eba);i<ptClientMsg->u.gw_message.
+sc_address.number_of_digits;i++){sca[i]=sca[i+(0x1778+691-0x1a2a)];}}else if(sca
+[(0x561+3481-0x12fa)]==((char)(0x1a3d+1302-0x1f23))&&sca[(0xf72+5247-0x23f0)]==
+((char)(0x1453+4464-0x2593))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits-=(0x167+1128-0x5cd);for(i=(0xe01+19-0xe14);i<ptClientMsg->u.
+gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0x467+8139-0x2430)];}}
+(void)zUfiSms_CharToInt(sca,ptClientMsg->u.gw_message.sc_address.
 number_of_digits,ptClientMsg->u.gw_message.sc_address.digits);}void 
 zUfiSms_FillDbSaveData(T_zUfiSms_ClientMsg*ptClientMsg,T_zUfiSms_ClientTsData*
 ptClientData,T_zUfiSms_ConcatInfo*ptConcatSms,T_zUfiSms_GroupInfo*ptGroupSms,int
@@ -408,12 +409,12 @@
 }ptDbSaveData->mem_store=ptClientMsg->msg_hdr.mem_store;ptDbSaveData->index=
 ptClientMsg->msg_hdr.index;ptDbSaveData->mode=ptClientMsg->msg_hdr.message_mode;
 ptDbSaveData->tag=ptClientMsg->msg_hdr.tag;memset(ptDbSaveData->number,
-(0xaf5+6169-0x230e),ZTE_WMS_ADDRESS_LEN_MAX+(0x1441+3116-0x206c));memcpy(
+(0x1353+4706-0x25b5),ZTE_WMS_ADDRESS_LEN_MAX+(0x2f+4659-0x1261));memcpy(
 ptDbSaveData->number,ptGroupSms->receivers[ptGroupSms->current_receiver],strlen(
 ptGroupSms->receivers[ptGroupSms->current_receiver]));ptDbSaveData->tp_dcs=
 DCS_USC;ptDbSaveData->tp_pid=ptClientData->u.gw_pp.u.submit.pid;ptDbSaveData->
 msg_ref=ptClientData->u.gw_pp.u.submit.message_reference;memset(ptDbSaveData->
-sms_content,(0xd98+6070-0x254e),sizeof(ptDbSaveData->sms_content));if(
+sms_content,(0x362+7840-0x2202),sizeof(ptDbSaveData->sms_content));if(
 g_zUfiSms_Dcs==DCS_USC){ptDbSaveData->alphabet=WMS_GW_ALPHABET_UCS2;}else if(
 g_zUfiSms_Dcs==DCS_ASC){ptDbSaveData->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}(
 void)zUfiSms_DispatchWtoi(ptConcatSms->msg_contents[ptConcatSms->current_sending
@@ -424,7 +425,7 @@
 ptDbSaveData){T_zUfiSms_ClientTsData tClientTsData;ptClientMsg->msg_hdr.
 mem_store=WMS_MEMORY_STORE_NV_GW;ptClientMsg->msg_hdr.tag=WMS_TAG_MO_NOT_SENT;
 ptClientMsg->msg_hdr.message_mode=WMS_MESSAGE_MODE_GW;ptClientMsg->u.gw_message.
-is_broadcast=FALSE;memset((void*)&tClientTsData,(0xcfd+1200-0x11ad),sizeof(
+is_broadcast=FALSE;memset((void*)&tClientTsData,(0x433+3841-0x1334),sizeof(
 wms_client_ts_data_s_type));tClientTsData.format=WMS_FORMAT_GW_PP;tClientTsData.
 u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)zUfiSms_FillSubmitTpdu(&
 g_zUfiSms_ConcatSms,&g_zUfiSms_GroupSms,g_zUfiSms_UnitLen,&tClientTsData.u.gw_pp
@@ -433,95 +434,97 @@
 ptClientMsg,&tClientTsData,&g_zUfiSms_ConcatSms,&g_zUfiSms_GroupSms,
 g_zUfiSms_UnitLen,ptDbSaveData);}int zUfiSms_StoreNormalSmsToDb(
 T_zUfiSms_DbStoreData*ptDbSaveData,const char*pMemStore,long iSmsId){int result=
-ZUFI_SUCC;char*pContent=NULL;int iTotalCount=(0x2d7+7392-0x1fb7);pContent=(char*
-)malloc((0xb78+2947-0x16f7)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent==
-NULL){return ZUFI_FAIL;}memset(pContent,(0xd7a+4421-0x1ebf),(0x150b+4185-0x2560)
+ZUFI_SUCC;char*pContent=NULL;int iTotalCount=(0x14b4+4680-0x26fc);pContent=(char
+*)malloc((0x934+5904-0x2040)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent
+==NULL){return ZUFI_FAIL;}memset(pContent,(0x2217+363-0x2382),(0xf3+5037-0x149c)
 *ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(WMS_GW_ALPHABET_7_BIT_DEFAULT==
-ptDbSaveData->alphabet){static char data[(0x145b+4725-0x26cc)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x10f7+4660-0x232a)]={(0xbd6+3353-0x18ef)};
-memset(data,(0x451+4687-0x16a0),(0xc90+3581-0x1a89)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x824+3967-0x17a2));(void)zUfiSms_DecodeContent
-((char*)ptDbSaveData->sms_content,strlen(ptDbSaveData->sms_content),FALSE,data);
-strncpy(pContent,data,(0x1a49+355-0x1ba8)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-
-(0x266+7058-0x1df7));}else{strncpy(pContent,ptDbSaveData->sms_content,
-(0x5e2+6777-0x2057)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x1191+3081-0x1d99));
-}ptDbSaveData->tp_dcs=(unsigned char)(0x58+2271-0x935);if(-(0x4cf+4132-0x14f2)==
-iSmsId){if(ZUFI_FAIL==zUfiSms_GetTotalCount(pMemStore,&iTotalCount)){free(
-pContent);pContent=NULL;return ZUFI_FAIL;}printf(
+ptDbSaveData->alphabet){static char data[(0x901+5761-0x1f7e)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x3b0+7600-0x215f)]={(0x694+8050-0x2606)};
+memset(data,(0x8e7+5903-0x1ff6),(0xb79+962-0xf37)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x1278+5045-0x262c));(void)
+zUfiSms_DecodeContent((char*)ptDbSaveData->sms_content,strlen(ptDbSaveData->
+sms_content),FALSE,data);strncpy(pContent,data,(0x2da+7613-0x2093)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x13a4+1493-0x1978));}else{strncpy(
+pContent,ptDbSaveData->sms_content,(0xdd1+4137-0x1df6)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x16a1+862-0x19fe));}ptDbSaveData->tp_dcs
+=(unsigned char)(0x1044+2383-0x1991);if(-(0x1b25+667-0x1dbf)==iSmsId){if(
+ZUFI_FAIL==zUfiSms_GetTotalCount(pMemStore,&iTotalCount)){free(pContent);
+pContent=NULL;return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x74\x6f\x72\x65\x4e\x6f\x72\x6d\x61\x6c\x53\x6d\x73\x54\x6f\x44\x62\x20\x69\x54\x6f\x74\x61\x6c\x43\x6f\x75\x6e\x74\x3d\x25\x64" "\n"
 ,iTotalCount);if(iTotalCount>=g_zUfiSms_StoreCapablity[(strcmp(pMemStore,
 "\x6e\x76")?ZTE_WMS_MEMORY_SIM:ZTE_WMS_MEMORY_NV)]){free(pContent);pContent=NULL
-;return-(0x3fd+1079-0x833);}if(ZUFI_FAIL==zUfiSms_InsertNormalSmsToDb(
+;return-(0x21b+702-0x4d8);}if(ZUFI_FAIL==zUfiSms_InsertNormalSmsToDb(
 ptDbSaveData,pMemStore,pContent)){result=ZUFI_FAIL;}}else{if(ZUFI_FAIL==
 zUfiSms_UpdateNormalSmsToDb(ptDbSaveData,pMemStore,pContent,iSmsId)){result=
 ZUFI_FAIL;}}free(pContent);pContent=NULL;return result;}static int 
 zUfiSms_ConcatDataFree(T_zUfiSms_DbStoreData*ptDbSaveData,int count,char**
-out_result){int i=(0xbb4+3654-0x19fa);for(i=(0xcca+1145-0x1143);i<count;i++){if(
-ptDbSaveData->concat_info[(0x1f66+854-0x22ba)]==i+(0x1c+54-0x51)){free(
-out_result[i]);out_result[i]=NULL;break;}}return(0x1301+4097-0x2302);}int 
+out_result){int i=(0xbb9+4313-0x1c92);for(i=(0x95f+1531-0xf5a);i<count;i++){if(
+ptDbSaveData->concat_info[(0x740+2414-0x10ac)]==i+(0x1d5b+472-0x1f32)){free(
+out_result[i]);out_result[i]=NULL;break;}}return(0x15a2+3104-0x21c2);}int 
 zUfiSms_AddNewSmsToConcatData(T_zUfiSms_DbStoreData*ptDbSaveData,char*
 pOldContent,char*pFormatNewContent,char*pRealNewContent,T_zUfiSms_DbStoreStr*pac
-,int*pConcatTotalNum,int len){int count=(0x7da+108-0x846);char**out_result=NULL;
-char cSegChar=((char)(0xc0f+3159-0x182b));int i=(0x16c1+2108-0x1efd);int 
-iTotalSegNum=(0x1d48+317-0x1e85);char acContentSeg[(0x1253+4494-0x23df)*
+,int*pConcatTotalNum,int len){int count=(0xbeb+4325-0x1cd0);char**out_result=
+NULL;char cSegChar=((char)(0xc1d+6040-0x237a));int i=(0x117c+3775-0x203b);int 
+iTotalSegNum=(0x5bc+6241-0x1e1d);char acContentSeg[(0x15ef+463-0x17bc)*
 ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX*ZTE_WMS_SMS_COUNT_MAX]={
-(0x9a1+7144-0x2589)};char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==
-pOldContent){return-(0xcd3+6014-0x2450);}count=zUfiSms_SplitString(pOldContent,&
-out_result,cSegChar);for(i=(0x10cb+4120-0x20e3);i<count;i++){if(ptDbSaveData->
-concat_info[(0xc7a+3820-0x1b64)]==i+(0x1bc5+224-0x1ca4)){out_result[i]=(char*)
+(0x2164+1038-0x2572)};char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==
+pOldContent){return-(0xc9a+5442-0x21db);}count=zUfiSms_SplitString(pOldContent,&
+out_result,cSegChar);for(i=(0xd43+5300-0x21f7);i<count;i++){if(ptDbSaveData->
+concat_info[(0xff+6567-0x1aa4)]==i+(0x1aff+548-0x1d22)){out_result[i]=(char*)
 malloc(sizeof(ptDbSaveData->sms_content));memset(out_result[i],
-(0x1e01+696-0x20b9),sizeof(ptDbSaveData->sms_content));if(
+(0x15df+2178-0x1e61),sizeof(ptDbSaveData->sms_content));if(
 WMS_GW_ALPHABET_7_BIT_DEFAULT==ptDbSaveData->alphabet){isEsc=
 zUfiSms_DecodeContent(ptDbSaveData->sms_content,strlen(ptDbSaveData->sms_content
 ),isEsc,out_result[i]);}else{strncpy(out_result[i],ptDbSaveData->sms_content,
-sizeof(ptDbSaveData->sms_content)-(0x1831+3028-0x2404));}break;}}for(i=
-(0x240f+753-0x2700);i<count;i++){snprintf(acContentSeg+strlen(acContentSeg),
+sizeof(ptDbSaveData->sms_content)-(0x563+4265-0x160b));}break;}}for(i=
+(0xdd6+2801-0x18c7);i<count;i++){snprintf(acContentSeg+strlen(acContentSeg),
 sizeof(acContentSeg)-strlen(acContentSeg),"\x25\x73",out_result[i]);strcat(
-pFormatNewContent,out_result[i]);if(i!=count-(0x8a4+2955-0x142e)){strcat(
+pFormatNewContent,out_result[i]);if(i!=count-(0xd2c+2311-0x1632)){strcat(
 pFormatNewContent,"\x3b");}}strncpy(pRealNewContent,acContentSeg,len);
 zUfiSms_ConcatDataFree(ptDbSaveData,count,out_result);free(out_result);
 out_result=NULL;count=zUfiSms_SplitString(pac->IndStr,&out_result,cSegChar);for(
-i=(0xb73+1519-0x1162);i<count;i++){if(ptDbSaveData->concat_info[
-(0x1fc+8118-0x21b0)]==i+(0xcb3+2699-0x173d)){out_result[i]=(char*)malloc(
-SHORT_INT_LEN);memset(out_result[i],(0x2b0+3400-0xff8),SHORT_INT_LEN);snprintf(
+i=(0x2c6+7821-0x2153);i<count;i++){if(ptDbSaveData->concat_info[
+(0x1fa9+706-0x2269)]==i+(0x617+2475-0xfc1)){out_result[i]=(char*)malloc(
+SHORT_INT_LEN);memset(out_result[i],(0xcaa+6087-0x2471),SHORT_INT_LEN);snprintf(
 out_result[i],SHORT_INT_LEN,"\x25\x64",ptDbSaveData->index);break;}}for(i=
-(0xf9d+3227-0x1c38);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd),
-sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x25\x73",out_result[i]);if(i!=
-count-(0x104+2213-0x9a8)){snprintf(pac->FormatInd+strlen(pac->FormatInd),sizeof(
-pac->FormatInd)-strlen(pac->FormatInd),"\x3b");}}zUfiSms_ConcatDataFree(
+(0x1cb1+1736-0x2379);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd)
+,sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x25\x73",out_result[i]);if(i!=
+count-(0x1f72+1586-0x25a3)){snprintf(pac->FormatInd+strlen(pac->FormatInd),
+sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x3b");}}zUfiSms_ConcatDataFree(
 ptDbSaveData,count,out_result);free(out_result);out_result=NULL;count=
-zUfiSms_SplitString(pac->Seg_Seq,&out_result,cSegChar);for(i=(0x1d13+793-0x202c)
-;i<count;i++){if(ptDbSaveData->concat_info[(0x97d+4371-0x1a8e)]==i+
-(0xe6c+5095-0x2252)){out_result[i]=(char*)malloc(SHORT_INT_LEN);memset(
-out_result[i],(0x675+7869-0x2532),SHORT_INT_LEN);snprintf(out_result[i],
-SHORT_INT_LEN,"\x25\x64",ptDbSaveData->concat_info[(0x156b+3582-0x2367)]);break;
-}}for(i=(0x4da+4168-0x1522);i<count;i++){snprintf(pac->FormatSeq+strlen(pac->
-FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x25\x73",out_result[i
-]);if(i!=count-(0x10a+4605-0x1306)){snprintf(pac->FormatSeq+strlen(pac->
-FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x3b");}if(
-(0xbfa+5411-0x211d)!=strcmp(out_result[i],"")){iTotalSegNum++;}}*pConcatTotalNum
-=iTotalSegNum;zUfiSms_ConcatDataFree(ptDbSaveData,count,out_result);free(
-out_result);out_result=NULL;return(0x2032+384-0x21b2);}int 
-zUfiSms_UpdateConcatSms(T_zUfiSms_DbStoreData*ptDbSaveData,const char*pStorePos,
-long iSmsId){T_zUfiSms_DbStoreStr ac={(0x18bd+1337-0x1df6)};char*pOldContent=
-NULL;char*pFormatNewContent=NULL;char*pRealNewContent=NULL;int iTotalNum=
-(0xcf8+5623-0x22ef);int result=ZUFI_SUCC;int spaceLen=(0x7dc+1531-0xdd3)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+
-(0x1366+4355-0x2465);pOldContent=(char*)malloc(spaceLen);pFormatNewContent=(char
-*)malloc(spaceLen);pRealNewContent=(char*)malloc(spaceLen);if(pOldContent==NULL
-||pFormatNewContent==NULL||pRealNewContent==NULL){if(pOldContent)free(
-pOldContent);if(pFormatNewContent)free(pFormatNewContent);if(pRealNewContent)
-free(pRealNewContent);return ZUFI_FAIL;}memset(pRealNewContent,(0x309+262-0x40f)
-,spaceLen);memset(pOldContent,(0x1373+1829-0x1a98),spaceLen);memset(
-pFormatNewContent,(0x4eb+2952-0x1073),spaceLen);(void)zUfiSms_GetConcatInfo(
-pStorePos,iSmsId,&ac,pOldContent,spaceLen);printf(
+zUfiSms_SplitString(pac->Seg_Seq,&out_result,cSegChar);for(i=
+(0x1352+2136-0x1baa);i<count;i++){if(ptDbSaveData->concat_info[
+(0x63a+7523-0x239b)]==i+(0x2db+2616-0xd12)){out_result[i]=(char*)malloc(
+SHORT_INT_LEN);memset(out_result[i],(0xaba+4254-0x1b58),SHORT_INT_LEN);snprintf(
+out_result[i],SHORT_INT_LEN,"\x25\x64",ptDbSaveData->concat_info[
+(0x112+5785-0x17a9)]);break;}}for(i=(0xb31+6797-0x25be);i<count;i++){snprintf(
+pac->FormatSeq+strlen(pac->FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->
+FormatSeq),"\x25\x73",out_result[i]);if(i!=count-(0x1df6+674-0x2097)){snprintf(
+pac->FormatSeq+strlen(pac->FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->
+FormatSeq),"\x3b");}if((0x961+2137-0x11ba)!=strcmp(out_result[i],"")){
+iTotalSegNum++;}}*pConcatTotalNum=iTotalSegNum;zUfiSms_ConcatDataFree(
+ptDbSaveData,count,out_result);free(out_result);out_result=NULL;return
+(0x1144+810-0x146e);}int zUfiSms_UpdateConcatSms(T_zUfiSms_DbStoreData*
+ptDbSaveData,const char*pStorePos,long iSmsId){T_zUfiSms_DbStoreStr ac={
+(0x19dd+204-0x1aa9)};char*pOldContent=NULL;char*pFormatNewContent=NULL;char*
+pRealNewContent=NULL;int iTotalNum=(0x118f+5175-0x25c6);int result=ZUFI_SUCC;int
+ spaceLen=(0x8f6+5400-0x1e0a)*ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*
+ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x781+3217-0x140e);pOldContent=(char*)malloc(
+spaceLen);pFormatNewContent=(char*)malloc(spaceLen);pRealNewContent=(char*)
+malloc(spaceLen);if(pOldContent==NULL||pFormatNewContent==NULL||pRealNewContent
+==NULL){if(pOldContent)free(pOldContent);if(pFormatNewContent)free(
+pFormatNewContent);if(pRealNewContent)free(pRealNewContent);return ZUFI_FAIL;}
+memset(pRealNewContent,(0xfb6+4074-0x1fa0),spaceLen);memset(pOldContent,
+(0x25f+2014-0xa3d),spaceLen);memset(pFormatNewContent,(0xc6+6268-0x1942),
+spaceLen);(void)zUfiSms_GetConcatInfo(pStorePos,iSmsId,&ac,pOldContent,spaceLen)
+;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x20\x2d\x30\x20\x49\x6e\x64\x53\x74\x72\x3a\x25\x73\x2c\x53\x65\x67\x5f\x53\x65\x71\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x49\x6e\x64\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x53\x65\x71\x3a\x25\x73" "\n"
-,ac.IndStr,ac.Seg_Seq,ac.FormatInd,ac.FormatSeq);if(-(0xd31+1154-0x11b2)==
+,ac.IndStr,ac.Seg_Seq,ac.FormatInd,ac.FormatSeq);if(-(0xc51+3663-0x1a9f)==
 zUfiSms_AddNewSmsToConcatData(ptDbSaveData,pOldContent,pFormatNewContent,
 pRealNewContent,&ac,&iTotalNum,spaceLen)){result=ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x20\x30\x20\x49\x6e\x64\x53\x74\x72\x3a\x25\x73\x2c\x53\x65\x67\x5f\x53\x65\x71\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x49\x6e\x64\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x53\x65\x71\x3a\x25\x73" "\n"
 ,ac.IndStr,ac.Seg_Seq,ac.FormatInd,ac.FormatSeq);ptDbSaveData->tp_dcs=
-(0x8cd+3680-0x172b);if(ZUFI_FAIL==zUfiSms_UpdateConcatSmsToDb(ptDbSaveData,
+(0x527+7163-0x2120);if(ZUFI_FAIL==zUfiSms_UpdateConcatSmsToDb(ptDbSaveData,
 pStorePos,pFormatNewContent,pRealNewContent,&ac,iTotalNum,iSmsId)){result=
 ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x20\x31\x20\x49\x6e\x64\x53\x74\x72\x3a\x25\x73\x2c\x53\x65\x67\x5f\x53\x65\x71\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x49\x6e\x64\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x53\x65\x71\x3a\x25\x73" "\n"
@@ -530,33 +533,33 @@
 pFormatNewContent=NULL;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x55\x70\x64\x61\x74\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x20\x73\x75\x63\x63\x65\x73\x73\x2e" "\n"
 );return result;}int zUfiSms_InsertConcatSms(T_zUfiSms_DbStoreData*ptDbSaveData,
-const char*pStorePos){T_zUfiSms_DbStoreStr ac={(0xb2d+5137-0x1f3e)};int 
-iSms_TotalCount=(0x1b3+4930-0x14f5);int i=(0x1285+320-0x13c5);char acTmpContent[
-(0xe8c+749-0x1079)];int iConcatNum=(0x9cc+5497-0x1f45);char*pFormatConcat=NULL;
-char*pContent=NULL;int spaceLen=(0x17e3+2367-0x211e)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0xd13+4955-0x206a)
-;if(NULL==ptDbSaveData||NULL==pStorePos){return ZUFI_FAIL;}printf(
+const char*pStorePos){T_zUfiSms_DbStoreStr ac={(0x1739+379-0x18b4)};int 
+iSms_TotalCount=(0x15ba+4319-0x2699);int i=(0x103c+3305-0x1d25);char 
+acTmpContent[(0x14dd+3754-0x2287)];int iConcatNum=(0xc81+2764-0x174d);char*
+pFormatConcat=NULL;char*pContent=NULL;int spaceLen=(0x416+3023-0xfe1)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x1bf+3520-0xf7b);
+if(NULL==ptDbSaveData||NULL==pStorePos){return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x65\x6e\x74\x65\x72\x20\x49\x6e\x73\x65\x72\x74\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x2e" "\n"
-);memset(acTmpContent,(0xb5+3497-0xe5e),sizeof(acTmpContent));iSms_TotalCount=
-ptDbSaveData->concat_info[(0xaf0+2848-0x160f)];for(i=(0x1890+1165-0x1d1c);i<
+);memset(acTmpContent,(0xc93+6330-0x254d),sizeof(acTmpContent));iSms_TotalCount=
+ptDbSaveData->concat_info[(0x4fc+2012-0xcd7)];for(i=(0xc0a+673-0xeaa);i<
 iSms_TotalCount;i++){strcat(ac.IndStr,"\x3b");strcat(ac.Seg_Seq,"\x3b");strcat(
 acTmpContent,"\x3b");}pFormatConcat=(char*)malloc(spaceLen);if(NULL==
-pFormatConcat){return ZUFI_FAIL;}memset(pFormatConcat,(0x1670+17-0x1681),
+pFormatConcat){return ZUFI_FAIL;}memset(pFormatConcat,(0x14c0+3601-0x22d1),
 spaceLen);pContent=(char*)malloc(spaceLen);if(pContent==NULL){free(pFormatConcat
-);return ZUFI_FAIL;}memset(pContent,(0x17e6+1278-0x1ce4),spaceLen);if(-
-(0x197f+2445-0x230b)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
+);return ZUFI_FAIL;}memset(pContent,(0x1bfb+278-0x1d11),spaceLen);if(-
+(0x1713+2438-0x2098)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
 pFormatConcat,pContent,&ac,&iConcatNum,spaceLen)){free(pFormatConcat);free(
 pContent);pFormatConcat=NULL;pContent=NULL;return ZUFI_FAIL;}ptDbSaveData->
-tp_dcs=(0x172+5186-0x15b2);if(ZUFI_FAIL==zUfiSms_InsertConcatSmsToDb(
+tp_dcs=(0xa6d+5240-0x1ee3);if(ZUFI_FAIL==zUfiSms_InsertConcatSmsToDb(
 ptDbSaveData,pStorePos,pFormatConcat,pContent,&ac,iConcatNum)){free(
 pFormatConcat);free(pContent);pFormatConcat=NULL;pContent=NULL;return ZUFI_FAIL;
 }free(pFormatConcat);free(pContent);pFormatConcat=NULL;pContent=NULL;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x49\x6e\x73\x65\x72\x74\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x20\x73\x75\x63\x63\x65\x73\x73\x2e" "\n"
 );return ZUFI_SUCC;}int zUfiSms_StoreConcatSmsToDb(T_zUfiSms_DbStoreData*
-ptDbSaveData,char*pMemStore){long iSmsId=(0xd46+3441-0x1ab7);int total_count=
-(0xe12+2811-0x190d);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
+ptDbSaveData,char*pMemStore){long iSmsId=(0xc25+3481-0x19be);int total_count=
+(0xad3+1496-0x10ab);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
 iSmsId=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,pMemStore);if(-
-(0x1112+2449-0x1aa2)!=iSmsId){printf(
+(0x278+8753-0x24a8)!=iSmsId){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x74\x6f\x72\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x54\x6f\x44\x62\x20\x45\x6e\x74\x65\x72\x20\x55\x70\x64\x61\x74\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x20\x53\x6d\x73\x49\x64\x3a\x25\x64\x2e" "\n"
 ,iSmsId);return zUfiSms_UpdateConcatSms(ptDbSaveData,pMemStore,iSmsId);}else{if(
 ZUFI_FAIL==zUfiSms_GetTotalCount(pMemStore,&total_count)){printf(
@@ -568,102 +571,102 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x74\x6f\x72\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x54\x6f\x44\x62\x20\x53\x6d\x73\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x46\x75\x6c\x6c\x2e" "\n"
 );return ZUFI_FAIL;}return zUfiSms_InsertConcatSms(ptDbSaveData,pMemStore);}}int
  zUfiSms_WriteSmsToDb(T_zUfiSms_DbStoreData*ptDbSaveData,zUfiSms_StoreType 
-iMemStore,long iSmsId){char acDbMemStore[(0x35f+33-0x376)];int iTotalCount=
-(0xe76+5705-0x24bf);int id=(0x11b4+4387-0x22d7);UINT8 needCheckMemory=
-(0x1d9+7624-0x1fa0);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore
-,(0xf81+1144-0x13f9),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==
-iMemStore){strncpy(acDbMemStore,ZTE_WMS_DB_SIM_TABLE,sizeof(acDbMemStore)-
-(0x2282+654-0x250f));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
-acDbMemStore)-(0xd20+3272-0x19e7));}if((0x119f+4366-0x22ac)==ptDbSaveData->
+iMemStore,long iSmsId){char acDbMemStore[(0xbd2+830-0xf06)];int iTotalCount=
+(0xf6f+1177-0x1408);int id=(0x6d1+1583-0xd00);UINT8 needCheckMemory=
+(0x2b4+1404-0x82f);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore,
+(0x23d+9269-0x2672),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==iMemStore
+){strncpy(acDbMemStore,ZTE_WMS_DB_SIM_TABLE,sizeof(acDbMemStore)-
+(0x270+9286-0x26b5));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
+acDbMemStore)-(0xfcf+1278-0x14cc));}if((0x1738+3475-0x24ca)==ptDbSaveData->
 concat_sms){id=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,&acDbMemStore);if(-
-(0x650+6814-0x20ed)!=id){needCheckMemory=(0x1611+3993-0x25aa);}}if(
-needCheckMemory==(0x1ec+6920-0x1cf3)){if(ZUFI_FAIL==zUfiSms_GetTotalCount(
+(0x1cfd+2325-0x2611)!=id){needCheckMemory=(0x657+2202-0xef1);}}if(
+needCheckMemory==(0x3cb+801-0x6eb)){if(ZUFI_FAIL==zUfiSms_GetTotalCount(
 acDbMemStore,&iTotalCount)){return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x53\x6d\x73\x54\x6f\x44\x62\x20\x69\x54\x6f\x74\x61\x6c\x43\x6f\x75\x6e\x74\x3d\x25\x64\x28\x6e\x65\x65\x64\x43\x68\x65\x63\x6b\x4d\x65\x6d\x6f\x72\x79\x3d\x3d\x31\x29" "\n"
 ,iTotalCount);if(iTotalCount>=g_zUfiSms_StoreCapablity[(strcmp(acDbMemStore,
 "\x6e\x76")?ZTE_WMS_MEMORY_SIM:ZTE_WMS_MEMORY_NV)]){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x53\x6d\x73\x54\x6f\x44\x62\x20\x6d\x65\x6d\x6f\x72\x79\x20\x66\x75\x6c\x6c\x2c\x20\x65\x72\x72\x6f\x72" "\n"
 );return ZTE_WMS_NV_MEMORY_FULL;}}if(ptDbSaveData->concat_info[
-(0xca9+2612-0x16db)]==(0x249+4548-0x140d)||ptDbSaveData->concat_info[
-(0x4e2+3300-0x11c4)]>ptDbSaveData->concat_info[(0x1304+4010-0x22ad)]){
-ptDbSaveData->concat_sms=(0xc93+1464-0x124b);}printf(
+(0xae8+4634-0x1d00)]==(0xfa9+115-0x101c)||ptDbSaveData->concat_info[
+(0x8b+9469-0x2586)]>ptDbSaveData->concat_info[(0x3bf+2143-0xc1d)]){ptDbSaveData
+->concat_sms=(0x1333+1362-0x1885);}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x53\x6d\x73\x54\x6f\x44\x62\x20\x54\x6f\x74\x61\x6c\x43\x6f\x75\x6e\x74\x3a\x25\x64\x2e\x63\x6f\x6e\x63\x61\x74\x5f\x73\x6d\x73\x3a\x25\x64\x2e\x63\x6f\x6e\x63\x61\x74\x5f\x69\x6e\x66\x6f\x5b\x31\x5d\x3a\x25\x64" "\n"
 ,iTotalCount,ptDbSaveData->concat_sms,ptDbSaveData->concat_info[
-(0x236+1931-0x9c0)]);if((0xe07+3527-0x1bcd)==ptDbSaveData->concat_sms){if(
-ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x1b3f+719-0x1e0d)]){
+(0xc6+9551-0x2614)]);if((0x188c+1994-0x2055)==ptDbSaveData->concat_sms){if(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x155b+1045-0x196f)]){
 return ZUFI_FAIL;}else{return zUfiSms_StoreConcatSmsToDb(ptDbSaveData,
 acDbMemStore);}}else{return zUfiSms_StoreNormalSmsToDb(ptDbSaveData,acDbMemStore
 ,iSmsId);}}T_zUfiSms_CmdStatus zUfiSms_SendOutSms(T_zUfiSms_DbStoreData*
-ptDbSaveData,int cid){int atRes=(0x305+82-0x357);if(NULL==ptDbSaveData){return 
-WMS_CMD_FAILED;}if(!g_zUfiSms_IsConcatSendSuc){ptDbSaveData->tag=
+ptDbSaveData,int cid){int atRes=(0x3a7+7393-0x2088);if(NULL==ptDbSaveData){
+return WMS_CMD_FAILED;}if(!g_zUfiSms_IsConcatSendSuc){ptDbSaveData->tag=
 WMS_TAG_TYPE_MO_NOT_SENT_V01;if(ZUFI_SUCC==zUfiSms_WriteSmsToDb(ptDbSaveData,
-WMS_STORAGE_TYPE_NV_V01,-(0xc03+5689-0x223b))){g_zUfiSms_MsgRefer++;ptDbSaveData
-->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(g_zUfiSms_MsgRefer);}
-}else{CHAR sendfailRetry[(0x12bb+4029-0x2246)]={(0x1bd5+2196-0x2469)};sc_cfg_get
-(NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x11d9+2260-0x1aad)
-==strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x17bf+3616-0x25dc);}
-atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{
-zSms_RecvCmgsOk();}}return WMS_CMD_SUCCESS;}int zUfiSms_SendConcatSms(int cid){
-int atRes=(0x344+2864-0xe74);T_zUfiSms_ClientMsg tClientMsg;
-T_zUfiSms_DbStoreData tDbSaveData;int result=ZUFI_FAIL;if(g_zUfiSms_ConcatSms.
-current_sending>=g_zUfiSms_ConcatSms.total_msg){return ZUFI_FAIL;}memset((void*)
-&tClientMsg,(0x8c8+7586-0x266a),sizeof(T_zUfiSms_ClientMsg));memset((void*)&
-tDbSaveData,(0x1517+2219-0x1dc2),sizeof(tDbSaveData));zUfiSms_SetPduData(&
-tClientMsg,&tDbSaveData);if(!g_zUfiSms_IsConcatSendSuc){tDbSaveData.tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;(void)zUfiSms_WriteSmsToDb(&tDbSaveData,
-WMS_STORAGE_TYPE_NV_V01,-(0xf33+4604-0x212e));g_zUfiSms_SendFailedCount++;}else{
-CHAR sendfailRetry[(0x267+5673-0x185e)]={(0xbfb+4747-0x1e86)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x1146+2689-0x1bc7)==
-strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x26c+8823-0x24e0);}
-atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{
-zSms_RecvCmgsOk();}}g_zUfiSms_ConcatSms.current_sending++;if(g_zUfiSms_ConcatSms
-.current_sending<g_zUfiSms_ConcatSms.total_msg){if(g_zUfiSms_ConcatSms.sms_len<
-g_zUfiSms_UnitLen*(g_zUfiSms_ConcatSms.current_sending+(0x13dc+154-0x1475))){
-g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.sms_len-g_zUfiSms_UnitLen*
-g_zUfiSms_ConcatSms.current_sending;}}if(g_zUfiSms_ConcatSms.current_sending==
-g_zUfiSms_ConcatSms.total_msg&&!g_zUfiSms_IsConcatSendSuc){T_zUfiSms_StatusInfo 
-tSendStatus;memset((void*)&tSendStatus,(0x645+2333-0xf62),sizeof(
-T_zUfiSms_StatusInfo));tSendStatus.err_code=ZTE_SMS_CMS_NONE;tSendStatus.
-send_failed_count=g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=
-(0x924+1014-0xd1a);tSendStatus.cmd_status=WMS_CMD_FAILED;tSendStatus.cmd=
-WMS_SMS_CMD_MSG_SEND;(void)zUfiSms_SetCmdStatus(&tSendStatus);sc_cfg_set(
-NV_SMS_SEND_RESULT,"\x66\x61\x69\x6c");sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");
-return ZUFI_FAIL;}if(!g_zUfiSms_IsConcatSendSuc){zUfiSms_SendConcatSms(cid);}
-return result;}int zSvr_sendCmgs(VOID){int atRes=(0x216d+458-0x2337);int i=
-(0xebd+5885-0x25ba);atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){CHAR 
-sendfailRetry[(0x6df+6000-0x1e1d)]={(0x1d4+3838-0x10d2)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0xa04+6900-0x24f8)==
-strcmp("\x31",sendfailRetry)){for(i=(0x11e8+4114-0x21fa);i<SMS_RETRY_COUNT;i++){
-atRes=zSms_SendCmgsReq();if(atRes==ZSMS_RESULT_OK){break;}}}}return atRes;}
-T_zUfiSms_CmdStatus zUfiSms_SendSms(VOID){T_zUfiSms_ClientMsg tClientMsg;
-T_zUfiSms_DbStoreData tDbSaveData;int res=(0x108d+1151-0x150c);if(-
-(0xb57+5482-0x20c0)==g_zUfiSms_UnitLen){printf(
+WMS_STORAGE_TYPE_NV_V01,-(0x1231+1948-0x19cc))){g_zUfiSms_MsgRefer++;
+ptDbSaveData->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(
+g_zUfiSms_MsgRefer);}}else{CHAR sendfailRetry[(0xcf3+1687-0x1358)]={
+(0x170+5512-0x16f8)};sc_cfg_get(NV_SENDFAIL_RETRY,sendfailRetry,sizeof(
+sendfailRetry));if((0x1af8+2605-0x2525)==strcmp("\x31",sendfailRetry)){
+g_zUfiSms_SendFailedRetry=(0x46a+8338-0x24f9);}atRes=zSms_SendCmgsReq();if(atRes
+!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{zSms_RecvCmgsOk();}}return 
+WMS_CMD_SUCCESS;}int zUfiSms_SendConcatSms(int cid){int atRes=(0x1d0+2789-0xcb5)
+;T_zUfiSms_ClientMsg tClientMsg;T_zUfiSms_DbStoreData tDbSaveData;int result=
+ZUFI_FAIL;if(g_zUfiSms_ConcatSms.current_sending>=g_zUfiSms_ConcatSms.total_msg)
+{return ZUFI_FAIL;}memset((void*)&tClientMsg,(0x21f+5562-0x17d9),sizeof(
+T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0xef+7148-0x1cdb),sizeof(
+tDbSaveData));zUfiSms_SetPduData(&tClientMsg,&tDbSaveData);if(!
+g_zUfiSms_IsConcatSendSuc){tDbSaveData.tag=WMS_TAG_TYPE_MO_NOT_SENT_V01;(void)
+zUfiSms_WriteSmsToDb(&tDbSaveData,WMS_STORAGE_TYPE_NV_V01,-(0x1f7+3304-0xede));
+g_zUfiSms_SendFailedCount++;}else{CHAR sendfailRetry[(0x79+232-0x12f)]={
+(0x22b7+915-0x264a)};sc_cfg_get(NV_SENDFAIL_RETRY,sendfailRetry,sizeof(
+sendfailRetry));if((0xc47+2328-0x155f)==strcmp("\x31",sendfailRetry)){
+g_zUfiSms_SendFailedRetry=(0x86+3300-0xd67);}atRes=zSms_SendCmgsReq();if(atRes!=
+ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{zSms_RecvCmgsOk();}}g_zUfiSms_ConcatSms
+.current_sending++;if(g_zUfiSms_ConcatSms.current_sending<g_zUfiSms_ConcatSms.
+total_msg){if(g_zUfiSms_ConcatSms.sms_len<g_zUfiSms_UnitLen*(g_zUfiSms_ConcatSms
+.current_sending+(0x629+1126-0xa8e))){g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.
+sms_len-g_zUfiSms_UnitLen*g_zUfiSms_ConcatSms.current_sending;}}if(
+g_zUfiSms_ConcatSms.current_sending==g_zUfiSms_ConcatSms.total_msg&&!
+g_zUfiSms_IsConcatSendSuc){T_zUfiSms_StatusInfo tSendStatus;memset((void*)&
+tSendStatus,(0x20b+185-0x2c4),sizeof(T_zUfiSms_StatusInfo));tSendStatus.err_code
+=ZTE_SMS_CMS_NONE;tSendStatus.send_failed_count=g_zUfiSms_SendFailedCount;
+tSendStatus.delete_failed_count=(0xc1b+355-0xd7e);tSendStatus.cmd_status=
+WMS_CMD_FAILED;tSendStatus.cmd=WMS_SMS_CMD_MSG_SEND;(void)zUfiSms_SetCmdStatus(&
+tSendStatus);sc_cfg_set(NV_SMS_SEND_RESULT,"\x66\x61\x69\x6c");sc_cfg_set(
+NV_SMS_DB_CHANGE,"\x31");return ZUFI_FAIL;}if(!g_zUfiSms_IsConcatSendSuc){
+zUfiSms_SendConcatSms(cid);}return result;}int zSvr_sendCmgs(VOID){int atRes=
+(0x41c+3786-0x12e6);int i=(0x13b5+252-0x14b1);atRes=zSms_SendCmgsReq();if(atRes
+!=ZSMS_RESULT_OK){CHAR sendfailRetry[(0x1831+1724-0x1ebb)]={(0x1017+4274-0x20c9)
+};sc_cfg_get(NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if(
+(0xd16+1883-0x1471)==strcmp("\x31",sendfailRetry)){for(i=(0x11b7+3811-0x209a);i<
+SMS_RETRY_COUNT;i++){atRes=zSms_SendCmgsReq();if(atRes==ZSMS_RESULT_OK){break;}}
+}}return atRes;}T_zUfiSms_CmdStatus zUfiSms_SendSms(VOID){T_zUfiSms_ClientMsg 
+tClientMsg;T_zUfiSms_DbStoreData tDbSaveData;int res=(0x1df4+2322-0x2706);if(-
+(0x1439+574-0x1676)==g_zUfiSms_UnitLen){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x3a\x20\x4e\x6f\x20\x63\x6f\x6e\x74\x65\x6e\x74\x21\x2e" "\n"
 );return WMS_CMD_FAILED;}while(g_zUfiSms_ConcatSms.current_sending<
-g_zUfiSms_ConcatSms.total_msg){memset((void*)&tClientMsg,(0x142+6487-0x1a99),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x42c+8288-0x248c),
+g_zUfiSms_ConcatSms.total_msg){memset((void*)&tClientMsg,(0x110+8508-0x224c),
+sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x69b+3714-0x151d),
 sizeof(tDbSaveData));zUfiSms_SetPduData(&tClientMsg,&tDbSaveData);if(!
 g_zUfiSms_IsConcatSendSuc){tDbSaveData.tag=WMS_TAG_TYPE_MO_NOT_SENT_V01;(void)
-zUfiSms_WriteSmsToDb(&tDbSaveData,WMS_STORAGE_TYPE_NV_V01,-(0x458+1172-0x8eb));
+zUfiSms_WriteSmsToDb(&tDbSaveData,WMS_STORAGE_TYPE_NV_V01,-(0xce4+3878-0x1c09));
 g_zUfiSms_SendFailedCount++;}else{res=zSvr_sendCmgs();if(res!=ZSMS_RESULT_OK){
 zSms_RecvCmgsErr();}else{zSms_RecvCmgsOk();}}g_zUfiSms_ConcatSms.current_sending
 ++;if(g_zUfiSms_ConcatSms.current_sending<g_zUfiSms_ConcatSms.total_msg){if(
 g_zUfiSms_ConcatSms.sms_len<g_zUfiSms_UnitLen*(g_zUfiSms_ConcatSms.
-current_sending+(0x15ed+101-0x1651))){g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.
+current_sending+(0x14b8+1843-0x1bea))){g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.
 sms_len-g_zUfiSms_UnitLen*g_zUfiSms_ConcatSms.current_sending;}}if(
 g_zUfiSms_ConcatSms.current_sending==g_zUfiSms_ConcatSms.total_msg&&!
 g_zUfiSms_IsConcatSendSuc){T_zUfiSms_StatusInfo tSendStatus;memset((void*)&
-tSendStatus,(0xddf+5028-0x2183),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
+tSendStatus,(0x13d2+3365-0x20f7),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
 err_code=ZTE_SMS_CMS_NONE;tSendStatus.send_failed_count=
-g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0x88a+4654-0x1ab8);
+g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0x1c94+1914-0x240e);
 tSendStatus.cmd_status=WMS_CMD_FAILED;tSendStatus.cmd=WMS_SMS_CMD_MSG_SEND;(void
 )zUfiSms_SetCmdStatus(&tSendStatus);sc_cfg_set(NV_SMS_SEND_RESULT,
 "\x66\x61\x69\x6c");sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");}}
-#if (0x70b+4385-0x182c)	

-if(g_zUfiSms_ConcatSms.total_msg>(0x99+5759-0x1717)){printf(
+#if (0x95f+4593-0x1b50)	

+if(g_zUfiSms_ConcatSms.total_msg>(0x19b+2942-0xd18)){printf(
 "\x3d\x3d\x3d\x3d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x2e" "\n"
-);zUfiSms_SendConcatSms(cid);}else{memset((void*)&tClientMsg,(0x798+692-0xa4c),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x1d1+8352-0x2271),
+);zUfiSms_SendConcatSms(cid);}else{memset((void*)&tClientMsg,(0xc72+1085-0x10af)
+,sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0xd0d+524-0xf19),
 sizeof(tDbSaveData));zUfiSms_SetPduData(&tClientMsg,&tDbSaveData);printf(
 "\x3d\x3d\x3d\x3d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x6e\x6f\x72\x61\x6d\x6c\x53\x6d\x73\x2e" "\n"
 );if(WMS_CMD_FAILED==zUfiSms_SendOutSms(&tDbSaveData,cid)){printf(
@@ -671,102 +674,103 @@
 );g_zUfiSms_SendFailedCount++;return WMS_CMD_FAILED;}}
 #endif

 return WMS_CMD_SUCCESS;}int zUfiSms_FormatDeliverTimestamp(T_zUfiSms_Date tData,
-T_zUfiSms_TimeStamp*ptTimestamp){unsigned char tTimeZone[(0xd0+5152-0x14eb)]={
-(0x1546+2705-0x1fd7)};int tmp_i=(0x10e0+3641-0x1f19);memset(ptTimestamp,
-(0x1954+3060-0x2548),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
-(0xed6+180-0xf89)){ptTimestamp->year=zUfiSms_atohex(((char)(0x151b+2494-0x1ea9))
-)*(0x1094+873-0x13ed)+zUfiSms_atohex(tData.year[(0x608+8243-0x263b)]);}else if(
-strlen(tData.year)==(0x10a+2874-0xc42)){ptTimestamp->year=zUfiSms_atohex(tData.
-year[(0x1c5b+1255-0x2142)])*(0x1ab5+2340-0x23c9)+zUfiSms_atohex(tData.year[
-(0xc06+958-0xfc3)]);}else if(strlen(tData.year)==(0x6a6+2602-0x10cc)){
-ptTimestamp->year=zUfiSms_atohex(tData.year[(0x14c3+2970-0x205b)])*
-(0x7ad+4013-0x174a)+zUfiSms_atohex(tData.year[(0xdf+3458-0xe5e)]);}else{printf(
+T_zUfiSms_TimeStamp*ptTimestamp){unsigned char tTimeZone[(0x1735+2209-0x1fd1)]={
+(0xe1d+1897-0x1586)};int tmp_i=(0x11aa+4407-0x22e1);memset(ptTimestamp,
+(0xe1a+3017-0x19e3),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
+(0x11ad+631-0x1423)){ptTimestamp->year=zUfiSms_atohex(
+((char)(0xed3+5565-0x2460)))*(0x862+1891-0xfb5)+zUfiSms_atohex(tData.year[
+(0x80c+316-0x948)]);}else if(strlen(tData.year)==(0x3a0+8853-0x2633)){
+ptTimestamp->year=zUfiSms_atohex(tData.year[(0x108d+2427-0x1a08)])*
+(0x577+7585-0x2308)+zUfiSms_atohex(tData.year[(0xa32+7350-0x26e7)]);}else if(
+strlen(tData.year)==(0xb70+377-0xce5)){ptTimestamp->year=zUfiSms_atohex(tData.
+year[(0x1eed+764-0x21e7)])*(0x291+8838-0x2507)+zUfiSms_atohex(tData.year[
+(0x665+877-0x9cf)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x79\x65\x61\x72\x2e");return ZUFI_FAIL;}if(
-strlen(tData.month)==(0x691+2562-0x1092)){ptTimestamp->month=zUfiSms_atohex(
-((char)(0x3bb+4147-0x13be)))*(0x135a+884-0x16be)+zUfiSms_atohex(tData.month[
-(0xdb1+1427-0x1344)]);}else if(strlen(tData.month)==(0x1817+3072-0x2415)){
-ptTimestamp->month=zUfiSms_atohex(tData.month[(0x219a+352-0x22fa)])*
-(0x1470+2331-0x1d7b)+zUfiSms_atohex(tData.month[(0xf61+3446-0x1cd6)]);}else{
-printf("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)
-==(0xa34+4593-0x1c24)){ptTimestamp->day=zUfiSms_atohex(
-((char)(0x6b3+2052-0xe87)))*(0x535+8541-0x2682)+zUfiSms_atohex(tData.day[
-(0x1a72+2071-0x2289)]);}else if(strlen(tData.day)==(0x22ff+271-0x240c)){
-ptTimestamp->day=zUfiSms_atohex(tData.day[(0xaa2+3248-0x1752)])*
-(0x2089+708-0x233d)+zUfiSms_atohex(tData.day[(0x1d4+3367-0xefa)]);}else{printf(
+strlen(tData.month)==(0xf21+1856-0x1660)){ptTimestamp->month=zUfiSms_atohex(
+((char)(0x15b2+2666-0x1fec)))*(0xcf7+3073-0x18e8)+zUfiSms_atohex(tData.month[
+(0x106+408-0x29e)]);}else if(strlen(tData.month)==(0xb5c+5273-0x1ff3)){
+ptTimestamp->month=zUfiSms_atohex(tData.month[(0x686+856-0x9de)])*
+(0x1e72+237-0x1f4f)+zUfiSms_atohex(tData.month[(0x164+2518-0xb39)]);}else{printf
+("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)==
+(0x707+3176-0x136e)){ptTimestamp->day=zUfiSms_atohex(((char)(0x2219+577-0x242a))
+)*(0x11f1+4498-0x2373)+zUfiSms_atohex(tData.day[(0x1179+1004-0x1565)]);}else if(
+strlen(tData.day)==(0xc01+2320-0x150f)){ptTimestamp->day=zUfiSms_atohex(tData.
+day[(0x1067+1927-0x17ee)])*(0xa3b+2207-0x12ca)+zUfiSms_atohex(tData.day[
+(0xf7d+1486-0x154a)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.hour)==
-(0x8b0+5029-0x1c54)){ptTimestamp->hour=zUfiSms_atohex(((char)(0x7e3+484-0x997)))
-*(0x17f8+2383-0x2137)+zUfiSms_atohex(tData.hour[(0x972+3957-0x18e7)]);}else if(
-strlen(tData.hour)==(0x2207+703-0x24c4)){ptTimestamp->hour=zUfiSms_atohex(tData.
-hour[(0x5e8+2627-0x102b)])*(0x1a3+7995-0x20ce)+zUfiSms_atohex(tData.hour[
-(0x53b+6167-0x1d51)]);}else{printf(
-"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.min)==
-(0x220f+977-0x25df)){ptTimestamp->minute=zUfiSms_atohex(
-((char)(0x1455+2825-0x1f2e)))*(0xb81+2222-0x141f)+zUfiSms_atohex(tData.min[
-(0x13b6+3991-0x234d)]);}else if(strlen(tData.min)==(0x1538+1178-0x19d0)){
-ptTimestamp->minute=zUfiSms_atohex(tData.min[(0x118c+382-0x130a)])*
-(0x1c33+740-0x1f07)+zUfiSms_atohex(tData.min[(0xd19+6525-0x2695)]);}else{printf(
+(0xbf9+4402-0x1d2a)){ptTimestamp->hour=zUfiSms_atohex(
+((char)(0x4b7+7185-0x2098)))*(0x1be0+1594-0x220a)+zUfiSms_atohex(tData.hour[
+(0x101+1233-0x5d2)]);}else if(strlen(tData.hour)==(0x1350+600-0x15a6)){
+ptTimestamp->hour=zUfiSms_atohex(tData.hour[(0xf1d+2090-0x1747)])*
+(0x101c+5147-0x2427)+zUfiSms_atohex(tData.hour[(0x40b+5577-0x19d3)]);}else{
+printf("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.
+min)==(0x1756+963-0x1b18)){ptTimestamp->minute=zUfiSms_atohex(
+((char)(0x17c8+1190-0x1c3e)))*(0x23c+1518-0x81a)+zUfiSms_atohex(tData.min[
+(0x184c+526-0x1a5a)]);}else if(strlen(tData.min)==(0x8e5+5403-0x1dfe)){
+ptTimestamp->minute=zUfiSms_atohex(tData.min[(0xf22+3725-0x1daf)])*
+(0xf3b+129-0xfac)+zUfiSms_atohex(tData.min[(0x962+6193-0x2192)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x6d\x69\x6e\x75\x74\x65\x2e");}if(strlen(tData
-.sec)==(0x31b+8637-0x24d7)){ptTimestamp->second=zUfiSms_atohex(
-((char)(0x26d+7470-0x1f6b)))*(0x1850+1687-0x1ed7)+zUfiSms_atohex(tData.sec[
-(0x12e9+208-0x13b9)]);}else if(strlen(tData.sec)==(0x43+7178-0x1c4b)){
-ptTimestamp->second=zUfiSms_atohex(tData.sec[(0xf46+2722-0x19e8)])*
-(0x26a8+38-0x26be)+zUfiSms_atohex(tData.sec[(0x2380+774-0x2685)]);}else{printf(
+.sec)==(0x8f6+1144-0xd6d)){ptTimestamp->second=zUfiSms_atohex(
+((char)(0x159d+3923-0x24c0)))*(0xa78+2854-0x158e)+zUfiSms_atohex(tData.sec[
+(0xde4+5931-0x250f)]);}else if(strlen(tData.sec)==(0x49a+2827-0xfa3)){
+ptTimestamp->second=zUfiSms_atohex(tData.sec[(0xbe6+237-0xcd3)])*
+(0xf8d+1446-0x1523)+zUfiSms_atohex(tData.sec[(0xd84+6118-0x2569)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x73\x65\x63\x6f\x6e\x64\x2e");}tmp_i=atoi(
-tData.timezone);if(tmp_i<INT_MIN+(0x249+6133-0x1a3d)||tmp_i>INT_MAX-
-(0x114a+1843-0x187c)){printf(
+tData.timezone);if(tmp_i<INT_MIN+(0x201+443-0x3bb)||tmp_i>INT_MAX-
+(0x472+6379-0x1d5c)){printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x74\x44\x61\x74\x61\x20\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x3a\x25\x64\x2e" "\n"
-,tmp_i);return ZUFI_FAIL;}memset(tTimeZone,(0x1150+1522-0x1742),sizeof(tTimeZone
-));snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0xb9c+3135-0x17d7));if
-(tData.timezone[(0x13a9+972-0x1775)]==((char)(0x938+2225-0x11bc))){if(strlen(
-tTimeZone)==(0x138c+1714-0x1a3c)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0x1028+111-0x1067)))*(0x139f+2484-0x1d43)+zUfiSms_atohex(tTimeZone[
-(0x17d+4611-0x137f)]);}else if(strlen(tTimeZone)==(0x9e8+3208-0x166d)){
-ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x1d1+5755-0x184b)])*
-(0x415+5638-0x1a11)+zUfiSms_atohex(tTimeZone[(0x22d+8454-0x2331)]);}else{printf(
+,tmp_i);return ZUFI_FAIL;}memset(tTimeZone,(0x494+2281-0xd7d),sizeof(tTimeZone))
+;snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0x58c+1875-0xcdb));if(
+tData.timezone[(0xae3+4524-0x1c8f)]==((char)(0x692+4909-0x1992))){if(strlen(
+tTimeZone)==(0x8c+3192-0xd02)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0x2ea+6349-0x1b87)))*(0x15a2+2172-0x1e0e)+zUfiSms_atohex(tTimeZone[
+(0xff5+782-0x1302)]);}else if(strlen(tTimeZone)==(0xe85+2541-0x186f)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x964+4773-0x1c08)])*
+(0x440+678-0x6dc)+zUfiSms_atohex(tTimeZone[(0xc5+6012-0x183f)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x2d\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x2e");}
-ptTimestamp->timezone=(0x801+5291-0x1cac)-ptTimestamp->timezone;}else{if(strlen(
-tTimeZone)==(0xef7+604-0x1152)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0x4e3+1256-0x99b)))*(0x6fb+7584-0x248b)+zUfiSms_atohex(tTimeZone[
-(0xd7a+3242-0x1a24)]);}else if(strlen(tTimeZone)==(0x1d6a+1588-0x239c)){
-ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0xf93+427-0x113e)])*
-(0x354+263-0x451)+zUfiSms_atohex(tTimeZone[(0xd35+4081-0x1d25)]);}else{printf(
+ptTimestamp->timezone=(0x16e3+3022-0x22b1)-ptTimestamp->timezone;}else{if(strlen
+(tTimeZone)==(0xb1b+2277-0x13ff)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0x1725+1153-0x1b76)))*(0x1742+1641-0x1d9b)+zUfiSms_atohex(tTimeZone[
+(0x14+7265-0x1c75)]);}else if(strlen(tTimeZone)==(0x126d+1174-0x1701)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x93a+3927-0x1891)])*
+(0xc75+3807-0x1b4a)+zUfiSms_atohex(tTimeZone[(0xff8+1101-0x1444)]);}else{printf(
 "\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x2b\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x2e");}}
 return ZUFI_SUCC;}void zUfiSms_FillDeliver(T_zUfiSms_DeliverPdu*deliver,
 T_zUfiSms_ConcatInfo*concat_sms,T_zUfiSms_DbStoreData*ptDbSaveData){static 
-UINT16 msg_ref=(0x21f5+24-0x220d);deliver->user_data_header_present=TRUE;if(
-(0x1cbc+1797-0x23c1)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference
-++;(void)zUfiSms_SetConcatMaxRefer(g_zUfiSms_ConcatSmsReference);}deliver->
-user_data_header_present=TRUE;deliver->user_data.num_headers=(0x304+8647-0x24ca)
-;deliver->user_data.headers[(0xe62+162-0xf04)].header_id=WMS_UDH_CONCAT_8;
-deliver->user_data.headers[(0x233c+722-0x260e)].u.concat_8.msg_ref=msg_ref;
-deliver->user_data.headers[(0x4b5+4646-0x16db)].u.concat_8.total_sm=concat_sms->
-total_msg;deliver->user_data.headers[(0x1a7+3901-0x10e4)].u.concat_8.seq_num=
-concat_sms->current_sending+(0x1b2+9173-0x2586);ptDbSaveData->concat_sms=
-(0x135+3238-0xdda);ptDbSaveData->concat_info[(0x1845+1204-0x1cf9)]=msg_ref;}void
- zUfiSms_FillDeliverPdu(T_zUfiSms_DeliverPdu*ptDeliver,T_zUfiSms_ConcatInfo*
-concat_sms,T_zUfiSms_GroupInfo*group_sms,int iSmsLen,T_zUfiSms_DbStoreData*
-ptDbSaveData){if(NULL==concat_sms||NULL==group_sms){return;}ptDeliver->more=
-FALSE;ptDeliver->reply_path_present=FALSE;ptDeliver->status_report_enabled=
-g_zUfiSms_CurSmsPara.status_report_on;ptDeliver->pid=WMS_PID_DEFAULT;ptDeliver->
-dcs.msg_class=WMS_MESSAGE_CLASS_NONE;ptDeliver->dcs.is_compressed=FALSE;if(
-g_zUfiSms_Dcs==DCS_ASC){ptDeliver->dcs.alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}
-else{ptDeliver->dcs.alphabet=WMS_GW_ALPHABET_UCS2;}if(concat_sms->total_msg>
-(0x20bd+900-0x2440)){zUfiSms_FillDeliver(ptDeliver,concat_sms,ptDbSaveData);
-ptDbSaveData->concat_sms=(0x6a1+4302-0x176e);ptDbSaveData->concat_info[
-(0x800+1170-0xc90)]=concat_sms->current_sending+(0x1aac+395-0x1c36);ptDbSaveData
-->concat_info[(0x252+8606-0x23ef)]=concat_sms->total_msg;ptDbSaveData->
-concat_info[(0x1d59+1751-0x2430)]=ptDeliver->user_data.headers[
-(0x980+7432-0x2688)].u.concat_8.msg_ref;}else{ptDeliver->
+UINT16 msg_ref=(0x83a+4944-0x1b8a);deliver->user_data_header_present=TRUE;if(
+(0x7c2+4668-0x19fe)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference++
+;(void)zUfiSms_SetConcatMaxRefer(g_zUfiSms_ConcatSmsReference);}deliver->
+user_data_header_present=TRUE;deliver->user_data.num_headers=
+(0x1a4a+2576-0x2459);deliver->user_data.headers[(0xfa0+4105-0x1fa9)].header_id=
+WMS_UDH_CONCAT_8;deliver->user_data.headers[(0xcf5+5097-0x20de)].u.concat_8.
+msg_ref=msg_ref;deliver->user_data.headers[(0x1672+314-0x17ac)].u.concat_8.
+total_sm=concat_sms->total_msg;deliver->user_data.headers[(0xbfa+33-0xc1b)].u.
+concat_8.seq_num=concat_sms->current_sending+(0x8a4+3857-0x17b4);ptDbSaveData->
+concat_sms=(0x22b+5256-0x16b2);ptDbSaveData->concat_info[(0xeed+3122-0x1b1f)]=
+msg_ref;}void zUfiSms_FillDeliverPdu(T_zUfiSms_DeliverPdu*ptDeliver,
+T_zUfiSms_ConcatInfo*concat_sms,T_zUfiSms_GroupInfo*group_sms,int iSmsLen,
+T_zUfiSms_DbStoreData*ptDbSaveData){if(NULL==concat_sms||NULL==group_sms){return
+;}ptDeliver->more=FALSE;ptDeliver->reply_path_present=FALSE;ptDeliver->
+status_report_enabled=g_zUfiSms_CurSmsPara.status_report_on;ptDeliver->pid=
+WMS_PID_DEFAULT;ptDeliver->dcs.msg_class=WMS_MESSAGE_CLASS_NONE;ptDeliver->dcs.
+is_compressed=FALSE;if(g_zUfiSms_Dcs==DCS_ASC){ptDeliver->dcs.alphabet=
+WMS_GW_ALPHABET_7_BIT_DEFAULT;}else{ptDeliver->dcs.alphabet=WMS_GW_ALPHABET_UCS2
+;}if(concat_sms->total_msg>(0x128a+382-0x1407)){zUfiSms_FillDeliver(ptDeliver,
+concat_sms,ptDbSaveData);ptDbSaveData->concat_sms=(0x52f+5807-0x1bdd);
+ptDbSaveData->concat_info[(0x1149+2766-0x1c15)]=concat_sms->current_sending+
+(0x154f+4004-0x24f2);ptDbSaveData->concat_info[(0x66+9871-0x26f4)]=concat_sms->
+total_msg;ptDbSaveData->concat_info[(0x359+2187-0xbe4)]=ptDeliver->user_data.
+headers[(0xf36+1678-0x15c4)].u.concat_8.msg_ref;}else{ptDeliver->
 user_data_header_present=FALSE;ptDeliver->user_data.num_headers=
-(0x146+4019-0x10f9);}ptDeliver->user_data.sm_len=iSmsLen;memcpy(ptDeliver->
+(0xfb2+3791-0x1e81);}ptDeliver->user_data.sm_len=iSmsLen;memcpy(ptDeliver->
 user_data.sm_data,concat_sms->msg_contents[concat_sms->current_sending],iSmsLen)
-;if(group_sms->receivers[group_sms->current_receiver][(0x525+2583-0xf3c)]==
-((char)(0x11a4+1648-0x17e9))){(void)zUfiSms_CharToInt(group_sms->receivers[
-group_sms->current_receiver]+(0xa1a+1957-0x11be),strlen(group_sms->receivers[
-group_sms->current_receiver])-(0xc1f+6882-0x2700),ptDeliver->address.digits);
+;if(group_sms->receivers[group_sms->current_receiver][(0x1058+725-0x132d)]==
+((char)(0x19f8+2686-0x244b))){(void)zUfiSms_CharToInt(group_sms->receivers[
+group_sms->current_receiver]+(0x202+9191-0x25e8),strlen(group_sms->receivers[
+group_sms->current_receiver])-(0x240+6107-0x1a1a),ptDeliver->address.digits);
 ptDeliver->address.number_type=WMS_NUMBER_INTERNATIONAL;ptDeliver->address.
 number_of_digits=(UINT8)strlen(group_sms->receivers[group_sms->current_receiver]
-)-(0x536+6727-0x1f7c);}else{(void)zUfiSms_CharToInt(group_sms->receivers[
+)-(0xac1+4559-0x1c8f);}else{(void)zUfiSms_CharToInt(group_sms->receivers[
 group_sms->current_receiver],strlen(group_sms->receivers[group_sms->
 current_receiver]),ptDeliver->address.digits);ptDeliver->address.number_type=
 WMS_NUMBER_UNKNOWN;ptDeliver->address.number_of_digits=(UINT8)strlen(group_sms->
@@ -779,7 +783,7 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x61\x76\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x20\x6d\x65\x6d\x5f\x73\x74\x6f\x72\x65\x3d\x25\x64\x28\x4e\x56\x3d\x3d\x30\x31\x29" "\n"
 ,ptSaveSms->mem_store);if(ptSaveSms->mem_store==WMS_STORAGE_TYPE_NV_V01){if(
 ZUFI_FAIL==zUfiSms_WriteSmsToDb(ptDbSaveData,WMS_STORAGE_TYPE_NV_V01,-
-(0x899+5033-0x1c41))){at_print(LOG_ERR,
+(0x866+1225-0xd2e))){at_print(LOG_ERR,
 "\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x6e\x76\x20\x66\x61\x69\x6c\x65\x64\x2e"
 );return WMS_CMD_FAILED;}}else{return WMS_CMD_FAILED;}g_zUfiSms_MsgRefer++;
 ptDbSaveData->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(
@@ -795,19 +799,19 @@
 ,T_zUfiSms_GroupInfo*ptGroupSms,int iSmsLength){T_zUfiSms_ClientTsData 
 tClientTsData;T_zUfiSms_ClientMsg tClientMsg;T_zUfiSms_DbStoreData tDbSaveData;
 T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;int current_sending=
-(0xf31+3973-0x1eb6);if(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-
-(0x147f+2399-0x1ddd)==iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->
-current_sending=(0x20d+9059-0x2570);ptConcatSms->current_sending<ptConcatSms->
+(0x1be3+2384-0x2533);if(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-
+(0x257+3272-0xf1e)==iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->
+current_sending=(0x3ed+8123-0x23a8);ptConcatSms->current_sending<ptConcatSms->
 total_msg;ptConcatSms->current_sending++){memset((void*)&tClientMsg,
-(0xe8d+3374-0x1bbb),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,
-(0x113a+2822-0x1c40),sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,
-(0xd84+5780-0x2418),sizeof(T_zUfiSms_DbStoreData));tClientMsg.msg_hdr.mem_store=
+(0xb55+291-0xc78),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,
+(0x12ad+2642-0x1cff),sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,
+(0x79d+6695-0x21c4),sizeof(T_zUfiSms_DbStoreData));tClientMsg.msg_hdr.mem_store=
 (ptSaveSms->mem_store==WMS_STORAGE_TYPE_UIM_V01)?WMS_STORAGE_TYPE_UIM_V01:
 WMS_STORAGE_TYPE_NV_V01;tClientMsg.msg_hdr.tag=(T_zUfiSms_SmsTag)ptSaveSms->tags
 ;tClientMsg.msg_hdr.message_mode=WMS_MESSAGE_MODE_GW;tClientMsg.u.gw_message.
 is_broadcast=FALSE;tClientTsData.format=WMS_FORMAT_GW_PP;switch(ptSaveSms->tags)
 {case WMS_TAG_TYPE_MO_SENT_V01:case WMS_TAG_TYPE_MO_NOT_SENT_V01:case
-(0x7ff+7360-0x24bb):{tClientTsData.u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)
+(0x1497+570-0x16cd):{tClientTsData.u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)
 zUfiSms_FillSubmitTpdu(ptConcatSms,ptGroupSms,iSmsLength,&tClientTsData.u.gw_pp.
 u.submit,&tDbSaveData);break;}case WMS_TAG_TYPE_MT_READ_V01:case 
 WMS_TAG_TYPE_MT_NOT_READ_V01:{tClientTsData.u.gw_pp.tpdu_type=WMS_TPDU_DELIVER;(
@@ -819,42 +823,42 @@
 zUfiSms_FillSca(&tClientMsg);zUfiSms_FillDbSaveData(&tClientMsg,&tClientTsData,
 ptConcatSms,ptGroupSms,iSmsLength,&tDbSaveData);strncpy(tDbSaveData.
 draft_group_id,ptSaveSms->draft_group_id,sizeof(tDbSaveData.draft_group_id)-
-(0x1c0f+506-0x1e08));if(TRUE==g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){result=
+(0x1f0f+1674-0x2598));if(TRUE==g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){result=
 WMS_CMD_FAILED;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x61\x76\x65\x53\x6d\x73\x54\x6f\x44\x62\x20\x4e\x56\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x66\x75\x6c\x6c\x2c\x73\x61\x76\x65\x20\x65\x72\x72\x6f\x72" "\n"
-);}else{if(tDbSaveData.concat_sms==(0x1132+4064-0x2111)){result=
+);}else{if(tDbSaveData.concat_sms==(0x1291+2305-0x1b91)){result=
 zUfiSms_SaveConcatSms(ptSaveSms,ptConcatSms,ptGroupSms,&tDbSaveData,iSmsLength);
-current_sending=ptConcatSms->current_sending+(0x440+927-0x7de);if(ptConcatSms->
-sms_len<iSmsLength*(current_sending+(0x9e3+4112-0x19f2))){iSmsLength=ptConcatSms
-->sms_len-iSmsLength*current_sending;}}else{result=zUfiSms_SaveNormalSms(
-ptSaveSms,&tDbSaveData);}}}return result;}int zUfiSms_DeleteSmsInSim(){char 
-str_index[(0x12a7+4285-0x22e4)]={(0x124+3834-0x101e)};int index=
-(0x19+6653-0x1a16);int is_cc=(0x9e9+3864-0x1901);int iSmsId=(0xf95+5935-0x26c4);
-T_zUfiSms_ModifyTag tDeleteInfo={(0x1278+3821-0x2165)};char StrValue[
-(0xff5+1223-0x14b2)]={(0x5c9+3528-0x1391)};memset(&tDeleteInfo,
-(0x110f+2969-0x1ca8),sizeof(T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_DelMsg.sim_id
-[g_zUfiSms_DelMsg.sim_index];if(-(0x1495+2466-0x1e36)==(is_cc=
-zUfiSms_IsConcatSms(iSmsId))){printf(
+current_sending=ptConcatSms->current_sending+(0x1c84+510-0x1e81);if(ptConcatSms
+->sms_len<iSmsLength*(current_sending+(0x23a0+541-0x25bc))){iSmsLength=
+ptConcatSms->sms_len-iSmsLength*current_sending;}}else{result=
+zUfiSms_SaveNormalSms(ptSaveSms,&tDbSaveData);}}}return result;}int 
+zUfiSms_DeleteSmsInSim(){char str_index[(0xdc+9044-0x23b0)]={(0xcb3+3509-0x1a68)
+};int index=(0xa11+4899-0x1d34);int is_cc=(0x514+3376-0x1244);int iSmsId=
+(0x8c7+5715-0x1f1a);T_zUfiSms_ModifyTag tDeleteInfo={(0x1cda+2389-0x262f)};char 
+StrValue[(0x7a2+2216-0x1040)]={(0xfb0+1661-0x162d)};memset(&tDeleteInfo,
+(0x206f+1680-0x26ff),sizeof(T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_DelMsg.sim_id
+[g_zUfiSms_DelMsg.sim_index];if(-(0x79+3899-0xfb3)==(is_cc=zUfiSms_IsConcatSms(
+iSmsId))){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x49\x6e\x53\x69\x6d\x20\x63\x68\x65\x63\x6b\x20\x63\x6f\x6e\x63\x61\x74\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
 );return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x49\x6e\x53\x69\x6d\x20\x69\x73\x5f\x63\x63\x3a\x25\x64\x2c\x20\x69\x64\x3d\x25\x64" "\n"
-,is_cc,iSmsId);if((0x11b+6257-0x198b)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(
+,is_cc,iSmsId);if((0x127+9284-0x256a)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(
 iSmsId,&tDeleteInfo,is_cc)){return ZUFI_FAIL;}g_zUfiSms_DelMsg.sim_index++;
 g_zUfiSms_DelMsg.sim_index_count--;while(tDeleteInfo.num_of_indices>
-(0x42+6752-0x1aa2)){index=tDeleteInfo.indices[tDeleteInfo.id_index];
+(0x705+6716-0x2141)){index=tDeleteInfo.indices[tDeleteInfo.id_index];
 g_deleteIndex.index[g_deleteIndex.total]=index;g_deleteIndex.total++;tDeleteInfo
 .id_index++;tDeleteInfo.num_of_indices--;}}else{memset(str_index,
-(0x1222+1734-0x18e8),sizeof(str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+(0x2e7+2523-0xcc2),sizeof(str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
 "\x69\x6e\x64",str_index,sizeof(str_index),iSmsId)){at_print(LOG_ERR,
 "\x67\x65\x74\x20\x69\x6e\x64\x65\x78\x20\x66\x72\x6f\x6d\x20\x64\x62\x20\x66\x61\x69\x6c\x64\x2e"
 );return ZUFI_FAIL;}index=atoi(str_index);g_deleteIndex.index[g_deleteIndex.
 total]=index;g_deleteIndex.total++;g_zUfiSms_DelMsg.sim_index++;g_zUfiSms_DelMsg
 .sim_index_count--;}(void)zUfiSms_DeleteSmsInDb();return ZUFI_SUCC;}
-T_zUfiSms_CmdStatus zUfiSms_DeleteSimSms(VOID){int atRes=(0xcf6+2841-0x180f);
-char StrValue[(0x387+5148-0x1799)]={(0x101c+765-0x1319)};zUfiSms_SetSmsLocation(
-SMS_LOCATION_SIM);memset(&g_deleteIndex,(0x1e7+224-0x2c7),sizeof(
+T_zUfiSms_CmdStatus zUfiSms_DeleteSimSms(VOID){int atRes=(0x1f89+400-0x2119);
+char StrValue[(0x1d39+1059-0x2152)]={(0x64b+6757-0x20b0)};zUfiSms_SetSmsLocation
+(SMS_LOCATION_SIM);memset(&g_deleteIndex,(0x30b+275-0x41e),sizeof(
 T_zUfiSms_DelIndexInfo));while(g_zUfiSms_DelMsg.sim_index_count>
-(0x1c70+163-0x1d13)){if(ZUFI_FAIL==zUfiSms_DeleteSmsInSim()){printf(
+(0x1673+662-0x1909)){if(ZUFI_FAIL==zUfiSms_DeleteSmsInSim()){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x69\x6d\x53\x6d\x73\x20\x64\x65\x6c\x65\x74\x65\x20\x61\x6c\x6c\x3a\x25\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64" "\n"
 ,WMS_STORAGE_TYPE_UIM_V01);return WMS_CMD_FAILED;}}while(g_deleteIndex.cur_index
 <g_deleteIndex.total){atRes=zSms_SendCmgdReq(g_deleteIndex.index[g_deleteIndex.
@@ -863,131 +867,130 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x69\x6d\x53\x6d\x73\x20\x73\x75\x63\x63\x65\x73\x73" "\n"
 );return WMS_CMD_SUCCESS;}void zUfiSms_GetReportStatus(char*pdu_tmp,int*stat){
 unsigned char tmp;unsigned char first_octet;if(pdu_tmp==NULL){return;}(void)
-String2Bytes(pdu_tmp,&tmp,(0x207+2668-0xc71));if(tmp==(0x986+1115-0xde1)){
-pdu_tmp+=(0xc79+974-0x1045);}else{tmp=(tmp+(0xf5b+2903-0x1ab1))*
-(0xeab+1276-0x13a5);pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,
-(0xf0f+2409-0x1876));first_octet=tmp;if(first_octet&(0xfaf+5006-0x233b)){*stat=
-(0x3d2+4698-0x1627);}}T_zUfiSms_TpduType zUfiSms_GetTpduType(UINT8*pData){
-T_zUfiSms_TpduType iTpduType;UINT8 mti=(0x180f+743-0x1af6);mti=(
-T_zUfiSms_TpduType)(pData[(0x3d7+4204-0x1443)]&(0x1607+1127-0x1a6b));switch(mti)
-{case(0x12f+5361-0x1620):iTpduType=WMS_TPDU_DELIVER;break;case
-(0x1193+4281-0x224b):iTpduType=WMS_TPDU_SUBMIT;break;case(0x1a5f+2102-0x2293):
-iTpduType=WMS_TPDU_STATUS_REPORT;break;default:iTpduType=WMS_TPDU_MAX;break;}
-return iTpduType;}static void zUfiSms_FormatDeliverNumber(wms_address_s_type 
-tAddress,unsigned char*pNumber){UINT8 number_type=(0x288+6649-0x1c81);memset(
-pNumber,(0xb20+4910-0x1e4e),ZTE_WMS_ADDRESS_LEN_MAX+(0x11b6+5457-0x2706));if(
-tAddress.number_type==WMS_NUMBER_INTERNATIONAL){pNumber[(0x1bca+754-0x1ebc)]=
-((char)(0x604+485-0x7be));pNumber++;}if(tAddress.digit_mode!=
+String2Bytes(pdu_tmp,&tmp,(0x225+1597-0x860));if(tmp==(0x11f9+1507-0x17dc)){
+pdu_tmp+=(0x583+7116-0x214d);}else{tmp=(tmp+(0x810+4013-0x17bc))*
+(0x19d8+1231-0x1ea5);pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,
+(0x83f+1244-0xd19));first_octet=tmp;if(first_octet&(0xacd+3266-0x178d)){*stat=
+(0x98+3004-0xc4f);}}T_zUfiSms_TpduType zUfiSms_GetTpduType(UINT8*pData){
+T_zUfiSms_TpduType iTpduType;UINT8 mti=(0xcdc+477-0xeb9);mti=(T_zUfiSms_TpduType
+)(pData[(0x1ef4+41-0x1f1d)]&(0x8bf+5443-0x1dff));switch(mti){case
+(0x78a+4741-0x1a0f):iTpduType=WMS_TPDU_DELIVER;break;case(0x20+9513-0x2548):
+iTpduType=WMS_TPDU_SUBMIT;break;case(0x980+2939-0x14f9):iTpduType=
+WMS_TPDU_STATUS_REPORT;break;default:iTpduType=WMS_TPDU_MAX;break;}return 
+iTpduType;}static void zUfiSms_FormatDeliverNumber(wms_address_s_type tAddress,
+unsigned char*pNumber){UINT8 number_type=(0x11ad+4602-0x23a7);memset(pNumber,
+(0x637+3345-0x1348),ZTE_WMS_ADDRESS_LEN_MAX+(0x478+1631-0xad6));if(tAddress.
+number_type==WMS_NUMBER_INTERNATIONAL){pNumber[(0x4e8+888-0x860)]=
+((char)(0x59+3993-0xfc7));pNumber++;}if(tAddress.digit_mode!=
 WMS_DIGIT_MODE_8_BIT){(void)zUfiSms_SmsiAddrToStr(tAddress,(byte*)pNumber,&
 number_type);}else{memcpy(pNumber,tAddress.digits,tAddress.number_of_digits*
-sizeof(tAddress.digits[(0x1c35+2607-0x2664)]));}}byte*zUfiSms_UtilTimeStamp(
+sizeof(tAddress.digits[(0x78+6864-0x1b48)]));}}byte*zUfiSms_UtilTimeStamp(
 T_zUfiSms_TimeStamp zte_wms_time,byte*res_ptr,T_zUfiSms_Date*date){UINT8 tmp;if(
-NULL==date){return NULL;}*res_ptr++=((char)(0x20d+510-0x3e9));tmp=zte_wms_time.
-year;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x102c+4120-0x2035))+((tmp>>
-(0x1397+2371-0x1cd6))*(0x1be1+1111-0x202e)),res_ptr);zUfiSms_SprintfTime(date->
-year,sizeof(date->year),zte_wms_time.year);*res_ptr++=
-((char)(0xbdd+6363-0x2489));tmp=zte_wms_time.month;res_ptr=
-zUfiSms_SmsiUtilitoaFill((tmp&(0x83+6455-0x19ab))+((tmp>>(0xf7d+2738-0x1a2b))*
-(0xd6d+1486-0x1331)),res_ptr);zUfiSms_SprintfTime(date->month,sizeof(date->month
-),zte_wms_time.month);*res_ptr++=((char)(0x1785+2937-0x22cf));tmp=zte_wms_time.
-day;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x13da+3031-0x1fa2))+((tmp>>
-(0x9c7+4371-0x1ad6))*(0xe2c+2058-0x162c)),res_ptr);zUfiSms_SprintfTime(date->day
-,sizeof(date->day),zte_wms_time.day);*res_ptr++=((char)(0x9f3+810-0xcf1));tmp=
-zte_wms_time.hour;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xc33+1743-0x12f3))+((
-tmp>>(0xa65+1691-0x10fc))*(0x248d+1-0x2484)),res_ptr);zUfiSms_SprintfTime(date->
+NULL==date){return NULL;}*res_ptr++=((char)(0x5c1+1634-0xc01));tmp=zte_wms_time.
+year;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x1e04+1808-0x2505))+((tmp>>
+(0x33a+2535-0xd1d))*(0x84d+3441-0x15b4)),res_ptr);zUfiSms_SprintfTime(date->year
+,sizeof(date->year),zte_wms_time.year);*res_ptr++=((char)(0xc02+3496-0x197b));
+tmp=zte_wms_time.month;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x4fb+7952-0x23fc)
+)+((tmp>>(0x69f+3750-0x1541))*(0x636+6452-0x1f60)),res_ptr);zUfiSms_SprintfTime(
+date->month,sizeof(date->month),zte_wms_time.month);*res_ptr++=
+((char)(0x55f+3864-0x1448));tmp=zte_wms_time.day;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0xbf9+6686-0x2608))+((tmp>>(0x17fc+818-0x1b2a))*
+(0x1933+3274-0x25f3)),res_ptr);zUfiSms_SprintfTime(date->day,sizeof(date->day),
+zte_wms_time.day);*res_ptr++=((char)(0x58b+1794-0xc61));tmp=zte_wms_time.hour;
+res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x208+5422-0x1727))+((tmp>>
+(0x105b+4305-0x2128))*(0xcfc+3220-0x1986)),res_ptr);zUfiSms_SprintfTime(date->
 hour,sizeof(date->hour),zte_wms_time.hour);*res_ptr++=
-((char)(0x1804+1353-0x1d13));tmp=zte_wms_time.minute;res_ptr=
-zUfiSms_SmsiUtilitoaFill((tmp&(0xc40+3767-0x1ae8))+((tmp>>(0x17cd+1838-0x1ef7))*
-(0xbd3+277-0xcde)),res_ptr);zUfiSms_SprintfTime(date->min,sizeof(date->min),
-zte_wms_time.minute);*res_ptr++=((char)(0x4d5+5369-0x1994));tmp=zte_wms_time.
-second;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x5d3+6182-0x1dea))+((tmp>>
-(0xef+4334-0x11d9))*(0x111f+589-0x1362)),res_ptr);zUfiSms_SprintfTime(date->sec,
-sizeof(date->sec),zte_wms_time.second);if(zte_wms_time.timezone<
-(0xd27+4198-0x1d8d)){*res_ptr++=((char)(0x169+9476-0x2640));tmp=(UINT8)(
-zte_wms_time.timezone*(-(0xe7d+4791-0x2133)));snprintf(date->timezone,sizeof(
-date->timezone),"\x2d\x25\x64",-(0x74c+8074-0x26d5)*zte_wms_time.timezone);}else
-{*res_ptr++=((char)(0x1116+146-0x117d));tmp=(UINT8)zte_wms_time.timezone;
-snprintf(date->timezone,sizeof(date->timezone),"\x2b\x25\x64",zte_wms_time.
-timezone);}res_ptr=zUfiSms_SmsiUtilitoaFill(tmp,res_ptr);*res_ptr++=
-((char)(0x1a4+5328-0x1652));return res_ptr;}T_zUfiSms_CmdStatus 
+((char)(0x7b3+4166-0x17bf));tmp=zte_wms_time.minute;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x901+5749-0x1f67))+((tmp>>(0x13ba+2163-0x1c29))*
+(0x95d+1341-0xe90)),res_ptr);zUfiSms_SprintfTime(date->min,sizeof(date->min),
+zte_wms_time.minute);*res_ptr++=((char)(0xa2a+5443-0x1f33));tmp=zte_wms_time.
+second;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xb36+5707-0x2172))+((tmp>>
+(0x21cb+188-0x2283))*(0x2f8+7156-0x1ee2)),res_ptr);zUfiSms_SprintfTime(date->sec
+,sizeof(date->sec),zte_wms_time.second);if(zte_wms_time.timezone<
+(0xf5c+3852-0x1e68)){*res_ptr++=((char)(0x466+7982-0x2367));tmp=(UINT8)(
+zte_wms_time.timezone*(-(0x1a0a+3070-0x2607)));snprintf(date->timezone,sizeof(
+date->timezone),"\x2d\x25\x64",-(0x689+978-0xa5a)*zte_wms_time.timezone);}else{*
+res_ptr++=((char)(0x600+2775-0x10ac));tmp=(UINT8)zte_wms_time.timezone;snprintf(
+date->timezone,sizeof(date->timezone),"\x2b\x25\x64",zte_wms_time.timezone);}
+res_ptr=zUfiSms_SmsiUtilitoaFill(tmp,res_ptr);*res_ptr++=
+((char)(0x3b8+8203-0x23a1));return res_ptr;}T_zUfiSms_CmdStatus 
 zUfiSms_HandleReport(unsigned char*ptPduData){T_zUfiSms_RawTsData tRawTsData;
-T_zUfiSms_ClientTsData tClientTsData;int iReportStatus=(0x195c+3325-0x2659);
-unsigned char acDeliverNumber[ZTE_WMS_ADDRESS_LEN_MAX+(0x31+6356-0x1904)];
-unsigned char tTpScts[ZTE_WMS_TP_SCTS_LEN_MAX+(0x712+4424-0x1859)];
-T_zUfiSms_Date tSmsDate;char acRecFlag[(0xb99+1957-0x1339)]={
-(0x1129+2691-0x1bac)};int iRpCount=(0x124+2578-0xb36);char tmp[
-(0x1191+301-0x12b4)];int tmp_i=(0x804+659-0xa97);unsigned int pos=
-(0x887+3976-0x180f);if(NULL==ptPduData){return WMS_CMD_FAILED;}memset(
-acDeliverNumber,(0x18a3+3203-0x2526),sizeof(acDeliverNumber));memset(&tSmsDate,
-(0x111b+2971-0x1cb6),sizeof(T_zUfiSms_Date));memset(tTpScts,(0xf61+3778-0x1e23),
-sizeof(tTpScts));memset(&tRawTsData,(0x1c2b+347-0x1d86),sizeof(
-T_zUfiSms_RawTsData));memset(&tClientTsData,(0x1adc+625-0x1d4d),sizeof(
-T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),"\x25\x58",ptPduData[
-(0x114f+3816-0x2037)]);tmp_i=atoi(tmp);if(tmp_i<(0xf1+3949-0x105e)||tmp_i>
-INT_MAX-(0x878+6159-0x2086)){at_print(LOG_ERR,
+T_zUfiSms_ClientTsData tClientTsData;int iReportStatus=(0x415+4069-0x13fa);
+unsigned char acDeliverNumber[ZTE_WMS_ADDRESS_LEN_MAX+(0xbf0+2414-0x155d)];
+unsigned char tTpScts[ZTE_WMS_TP_SCTS_LEN_MAX+(0x103c+2832-0x1b4b)];
+T_zUfiSms_Date tSmsDate;char acRecFlag[(0x1c67+44-0x1c8e)]={(0x1042+1198-0x14f0)
+};int iRpCount=(0x4af+8112-0x245f);char tmp[(0x36a+5787-0x19fb)];int tmp_i=
+(0x42+7054-0x1bd0);unsigned int pos=(0x13df+2905-0x1f38);if(NULL==ptPduData){
+return WMS_CMD_FAILED;}memset(acDeliverNumber,(0xc83+4915-0x1fb6),sizeof(
+acDeliverNumber));memset(&tSmsDate,(0x2c6+74-0x310),sizeof(T_zUfiSms_Date));
+memset(tTpScts,(0xd86+322-0xec8),sizeof(tTpScts));memset(&tRawTsData,
+(0x580+3483-0x131b),sizeof(T_zUfiSms_RawTsData));memset(&tClientTsData,
+(0x4a5+1024-0x8a5),sizeof(T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),
+"\x25\x58",ptPduData[(0x2dd+1775-0x9cc)]);tmp_i=atoi(tmp);if(tmp_i<
+(0xafb+3981-0x1a88)||tmp_i>INT_MAX-(0xd06+3369-0x1a2e)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x70\x74\x50\x64\x75\x44\x61\x74\x61\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return WMS_CMD_FAILED;}pos=tmp_i+(0x771+726-0xa46);if(pos>=ZSMS_PDU_SIZE
-){return WMS_CMD_FAILED;}memcpy((void*)tRawTsData.data,(void*)(ptPduData+pos),
-sizeof(tRawTsData.data));tRawTsData.tpdu_type=zUfiSms_GetTpduType(ptPduData+pos)
-;tRawTsData.format=WMS_FORMAT_GW_PP;(void)wms_ts_decode(&tRawTsData,&
-tClientTsData);if(WMS_TPDU_STATUS_REPORT!=tClientTsData.u.gw_pp.tpdu_type){
-at_print(LOG_ERR,
+,tmp_i);return WMS_CMD_FAILED;}pos=tmp_i+(0x905+7636-0x26d8);if(pos>=
+ZSMS_PDU_SIZE){return WMS_CMD_FAILED;}memcpy((void*)tRawTsData.data,(void*)(
+ptPduData+pos),sizeof(tRawTsData.data));tRawTsData.tpdu_type=zUfiSms_GetTpduType
+(ptPduData+pos);tRawTsData.format=WMS_FORMAT_GW_PP;(void)wms_ts_decode(&
+tRawTsData,&tClientTsData);if(WMS_TPDU_STATUS_REPORT!=tClientTsData.u.gw_pp.
+tpdu_type){at_print(LOG_ERR,
 "\x64\x6f\x65\x73\x20\x6e\x6f\x74\x20\x67\x77\x2f\x77\x63\x64\x6d\x61\x20\x73\x6d\x73\x20\x72\x65\x70\x6f\x72\x74\x20\x73\x74\x61\x74\x75\x73\x2e"
 );return WMS_CMD_FAILED;}switch(tClientTsData.u.gw_pp.u.status_report.tp_status)
 {case WMS_TP_STATUS_RECEIVED_OK:case WMS_TP_STATUS_UNABLE_TO_CONFIRM_DELIVERY:
-case WMS_TP_STATUS_REPLACED:{iReportStatus=(0x76d+8000-0x26ac);break;}case 
+case WMS_TP_STATUS_REPLACED:{iReportStatus=(0x1484+3840-0x2383);break;}case 
 WMS_TP_STATUS_TRYING_CONGESTION:case WMS_TP_STATUS_TRYING_SME_BUSY:case 
 WMS_TP_STATUS_TRYING_NO_RESPONSE_FROM_SME:case 
 WMS_TP_STATUS_TRYING_SERVICE_REJECTED:case 
 WMS_TP_STATUS_TRYING_QOS_NOT_AVAILABLE:case WMS_TP_STATUS_TRYING_SME_ERROR:{
-iReportStatus=(0x1b24+2043-0x231c);break;}default:{iReportStatus=
-(0x23c+4116-0x124e);break;}}zUfiSms_FormatDeliverNumber(tClientTsData.u.gw_pp.u.
-status_report.address,acDeliverNumber);(void)zUfiSms_UtilTimeStamp(tClientTsData
-.u.gw_pp.u.status_report.timestamp,tTpScts,&tSmsDate);if(ZUFI_FAIL==
-zUfiSms_InsertReportStatusToDb(acDeliverNumber,&tSmsDate,iReportStatus)){
+iReportStatus=(0x390+2803-0xe80);break;}default:{iReportStatus=
+(0x141d+4556-0x25e7);break;}}zUfiSms_FormatDeliverNumber(tClientTsData.u.gw_pp.u
+.status_report.address,acDeliverNumber);(void)zUfiSms_UtilTimeStamp(
+tClientTsData.u.gw_pp.u.status_report.timestamp,tTpScts,&tSmsDate);if(ZUFI_FAIL
+==zUfiSms_InsertReportStatusToDb(acDeliverNumber,&tSmsDate,iReportStatus)){
 at_print(LOG_ERR,
 "\x75\x70\x64\x61\x74\x65\x20\x73\x6d\x73\x20\x72\x65\x70\x6f\x72\x74\x20\x73\x74\x61\x74\x75\x73\x20\x66\x61\x69\x6c\x65\x64\x2e"
-);return WMS_CMD_FAILED;}memset(acRecFlag,(0x927+392-0xaaf),sizeof(acRecFlag));
+);return WMS_CMD_FAILED;}memset(acRecFlag,(0x606+1346-0xb48),sizeof(acRecFlag));
 sc_cfg_get(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag,sizeof(acRecFlag));iRpCount=
-atoi(acRecFlag);if(iRpCount<(0x81c+4352-0x191c)||iRpCount>INT_MAX-
-(0x359+3955-0x12cb)){at_print(LOG_ERR,
+atoi(acRecFlag);if(iRpCount<(0x4b0+6564-0x1e54)||iRpCount>INT_MAX-
+(0x2164+72-0x21ab)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x69\x52\x70\x43\x6f\x75\x6e\x74\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,iRpCount);return WMS_CMD_FAILED;}memset(acRecFlag,(0xe6a+2172-0x16e6),sizeof(
+,iRpCount);return WMS_CMD_FAILED;}memset(acRecFlag,(0x8dd+1649-0xf4e),sizeof(
 acRecFlag));snprintf(acRecFlag,sizeof(acRecFlag),"\x25\x64",iRpCount+
-(0x3f2+7466-0x211b));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return 
+(0x2586+46-0x25b3));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return 
 WMS_CMD_SUCCESS;}void zUfiSms_DelModemSms(int in_index){
-#if (0x3df+1999-0xbae) 
-char StrValue[(0x1c32+1327-0x2157)]={(0x86b+6924-0x2377)};printf(
+#if (0x111c+4073-0x2105) 
+char StrValue[(0x735+3646-0x1569)]={(0x4a2+5945-0x1bdb)};printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x4d\x6f\x64\x65\x6d\x53\x6d\x73\x20\x66\x75\x6e\x20\x75\x73\x65\x64\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21" "\n"
 );snat_print(LOG_DEBUGStrValue,sizeof(StrValue),"\x25\x64",in_index);
 zSvr_InnerSendMsg(ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,
 MSG_CMD_AT_DEL_SIM_SMS,strlen(StrValue),StrValue);
 #endif

-int atRes=(0xe52+741-0x1137);atRes=zSms_SendCmgdReq(in_index);if(atRes==
+int atRes=(0x28a+1048-0x6a2);atRes=zSms_SendCmgdReq(in_index);if(atRes==
 ZSMS_RESULT_OK){zSms_RecvCmgdOk();}else{zSms_RecvCmgdErr();}zSms_RecvCmgdFinish(
 );}VOID zUfiSms_getModifyInfo(T_zUfiSms_ModifyFlag*ptModifyBuff){int i=
-(0x229+7703-0x2040);memset(&g_zUfiSms_modifyMsg,(0x137+1339-0x672),sizeof(
-T_zUfiSms_ModifySms));for(i=(0x236c+818-0x269e);i<ptModifyBuff->total_id;i++){
+(0x952+6674-0x2364);memset(&g_zUfiSms_modifyMsg,(0xb9d+5695-0x21dc),sizeof(
+T_zUfiSms_ModifySms));for(i=(0x1956+2987-0x2501);i<ptModifyBuff->total_id;i++){
 g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.sim_count]=ptModifyBuff->id[i];
 g_zUfiSms_modifyMsg.sim_count++;g_zUfiSms_modifyMsg.sim_index_count++;}}int 
-zUfiSms_GetUnreadSmsIndexInSim(){char str_index[(0x259f+86-0x2575)]={
-(0xf83+1053-0x13a0)};int index=(0x1b85+879-0x1ef4);int is_cc=(0xfca+1508-0x15ae)
-;int iSmsId=(0x5cf+5209-0x1a28);T_zUfiSms_ModifyTag tModifyInfo={
-(0x575+1206-0xa2b)};char StrValue[(0x4c1+7774-0x2315)]={(0x1919+3438-0x2687)};
-memset(&tModifyInfo,(0xa62+53-0xa97),sizeof(T_zUfiSms_ModifyTag));iSmsId=
-g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.sim_index];if(-(0x4f7+1350-0xa3c)
+zUfiSms_GetUnreadSmsIndexInSim(){char str_index[(0x2134+490-0x229e)]={
+(0x1b72+1126-0x1fd8)};int index=(0x839+1486-0xe07);int is_cc=(0xcbc+687-0xf6b);
+int iSmsId=(0x1da6+2406-0x270c);T_zUfiSms_ModifyTag tModifyInfo={
+(0x3a2+1789-0xa9f)};char StrValue[(0xe1b+3348-0x1b25)]={(0x17b+8444-0x2277)};
+memset(&tModifyInfo,(0x145a+2124-0x1ca6),sizeof(T_zUfiSms_ModifyTag));iSmsId=
+g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.sim_index];if(-(0xec8+202-0xf91)
 ==(is_cc=zUfiSms_IsConcatSms(iSmsId))){at_print(LOG_ERR,
 "\x63\x68\x65\x63\x6b\x20\x63\x6f\x6e\x63\x61\x74\x20\x66\x61\x69\x6c\x65\x64\x2e"
 );return ZUFI_FAIL;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x55\x6e\x72\x65\x61\x64\x53\x6d\x73\x49\x6e\x64\x65\x78\x49\x6e\x53\x69\x6d\x20\x69\x73\x5f\x63\x63\x3a\x25\x64"
-,is_cc);if((0x1e62+871-0x21c8)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(iSmsId,
+,is_cc);if((0xb78+6440-0x249f)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(iSmsId,
 &tModifyInfo,is_cc)){return ZUFI_FAIL;}g_zUfiSms_modifyMsg.sim_index++;
 g_zUfiSms_modifyMsg.sim_index_count--;while(tModifyInfo.num_of_indices>
-(0xa41+5686-0x2077)){index=tModifyInfo.indices[tModifyInfo.id_index];
+(0x708+3951-0x1677)){index=tModifyInfo.indices[tModifyInfo.id_index];
 g_modifyIndex.index[g_modifyIndex.total]=index;g_modifyIndex.total++;tModifyInfo
 .id_index++;tModifyInfo.num_of_indices--;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x55\x6e\x72\x65\x61\x64\x53\x6d\x73\x49\x6e\x64\x65\x78\x49\x6e\x53\x69\x6d\x20\x5b\x31\x20\x3d\x3d\x20\x69\x73\x5f\x63\x63\x5d\x20\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64\x2c\x20\x74\x6f\x74\x61\x6c\x3d\x25\x64" "\n"
-,index,g_modifyIndex.total);}}else{memset(str_index,(0x14af+4297-0x2578),sizeof(
+,index,g_modifyIndex.total);}}else{memset(str_index,(0x17cb+2463-0x216a),sizeof(
 str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById("\x69\x6e\x64",str_index,
 sizeof(str_index),iSmsId)){at_print(LOG_ERR,
 "\x67\x65\x74\x20\x69\x6e\x64\x65\x78\x20\x66\x72\x6f\x6d\x20\x64\x62\x20\x66\x61\x69\x6c\x64\x2e"
@@ -996,14 +999,14 @@
 g_zUfiSms_modifyMsg.sim_index_count--;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x47\x65\x74\x55\x6e\x72\x65\x61\x64\x53\x6d\x73\x49\x6e\x64\x65\x78\x49\x6e\x53\x69\x6d\x20\x5b\x31\x20\x21\x3d\x20\x69\x73\x5f\x63\x63\x5d\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64\x2c\x20\x74\x6f\x74\x61\x6c\x3d\x25\x64" "\n"
 ,index,g_modifyIndex.total);}return ZUFI_SUCC;}void zUfiSms_ModifyModemSms(
-T_zUfiSms_ModifyFlag*ptModifyBuff){int atRes=(0x180+7600-0x1f30);char StrValue[
-(0xd12+756-0xffc)]={(0x12b3+2569-0x1cbc)};printf(
+T_zUfiSms_ModifyFlag*ptModifyBuff){int atRes=(0x734+2322-0x1046);char StrValue[
+(0xf1+5892-0x17eb)]={(0x1214+2682-0x1c8e)};printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4d\x6f\x64\x69\x66\x79\x4d\x6f\x64\x65\x6d\x53\x6d\x73\x20\x70\x74\x4d\x6f\x64\x69\x66\x79\x42\x75\x66\x66\x2d\x3e\x74\x79\x70\x65\x20\x3d\x20\x25\x64\x21" "\n"
 ,ptModifyBuff->type);{zUfiSms_getModifyInfo(ptModifyBuff);memset(&g_modifyIndex,
-(0x790+3846-0x1696),sizeof(T_zUfiSms_ModifyIndexInfo));printf(
+(0x15ff+2359-0x1f36),sizeof(T_zUfiSms_ModifyIndexInfo));printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4d\x6f\x64\x69\x66\x79\x4d\x6f\x64\x65\x6d\x53\x6d\x73\x20\x70\x74\x4d\x6f\x64\x69\x66\x79\x42\x75\x66\x66\x2d\x3e\x74\x6f\x74\x61\x6c\x5f\x69\x64\x20\x3d\x20\x25\x64\x21" "\n"
 ,ptModifyBuff->total_id);while(g_zUfiSms_modifyMsg.sim_index_count>
-(0x1439+1783-0x1b30)){if(ZUFI_FAIL==zUfiSms_GetUnreadSmsIndexInSim()){at_print(
+(0xd11+4571-0x1eec)){if(ZUFI_FAIL==zUfiSms_GetUnreadSmsIndexInSim()){at_print(
 LOG_ERR,
 "\x64\x65\x6c\x65\x74\x65\x20\x61\x6c\x6c\x3a\x25\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64" "\n"
 ,WMS_STORAGE_TYPE_UIM_V01);return;}}while(g_modifyIndex.cur_index<g_modifyIndex.
@@ -1022,22 +1025,22 @@
 zUfiSms_DecodeSmsData(T_zUfiSms_DbStoreData*pDb_Data,int msg_index,
 zUfiSms_StoreType iStorePos,T_SmsStatus bSms_Status,wms_message_format_enum_v01 
 format,long iPdu_Len,unsigned char*pPdu_Received){T_zUfiSms_RawTsData raw_ts;
-T_zUfiSms_ClientTsData ts_data_ptr;char tmp[(0xc6a+1340-0x119c)];int tmp_i=
-(0x127b+2496-0x1c3b);unsigned int pos=(0x5b3+4560-0x1783);int result=ZUFI_SUCC;
-if(NULL==pDb_Data){return ZUFI_FAIL;}pDb_Data->mem_store=(unsigned long)
-iStorePos;pDb_Data->index=(unsigned short)msg_index;if(RECEIVED_UNREAD==
-bSms_Status){pDb_Data->tag=WMS_TAG_TYPE_MT_NOT_READ_V01;}else if(RECEIVED_READ==
-bSms_Status){pDb_Data->tag=WMS_TAG_TYPE_MT_READ_V01;}else if(STORED_UNSEND==
-bSms_Status){pDb_Data->tag=WMS_TAG_TYPE_MO_NOT_SENT_V01;}else{pDb_Data->tag=
+T_zUfiSms_ClientTsData ts_data_ptr;char tmp[(0x2074+1222-0x2530)];int tmp_i=
+(0x453+1531-0xa4e);unsigned int pos=(0x54b+7314-0x21dd);int result=ZUFI_SUCC;if(
+NULL==pDb_Data){return ZUFI_FAIL;}pDb_Data->mem_store=(unsigned long)iStorePos;
+pDb_Data->index=(unsigned short)msg_index;if(RECEIVED_UNREAD==bSms_Status){
+pDb_Data->tag=WMS_TAG_TYPE_MT_NOT_READ_V01;}else if(RECEIVED_READ==bSms_Status){
+pDb_Data->tag=WMS_TAG_TYPE_MT_READ_V01;}else if(STORED_UNSEND==bSms_Status){
+pDb_Data->tag=WMS_TAG_TYPE_MO_NOT_SENT_V01;}else{pDb_Data->tag=
 WMS_TAG_TYPE_MO_SENT_V01;}pDb_Data->mode=(unsigned short)format;memset(&raw_ts,
-(0xf15+5358-0x2403),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
-(0xd5f+728-0x1037),sizeof(wms_client_ts_data_s_type));memset(tmp,
-(0x14d9+461-0x16a6),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
-pPdu_Received[(0x1979+1937-0x210a)]);tmp_i=atoi(tmp);if(tmp_i<
-(0x1ca8+1132-0x2114)||tmp_i>INT_MAX-(0x13aa+3809-0x228a)){at_print(LOG_ERR,
+(0x1de4+1155-0x2267),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
+(0x65b+3201-0x12dc),sizeof(wms_client_ts_data_s_type));memset(tmp,
+(0x9c0+1697-0x1061),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
+pPdu_Received[(0x8bf+5726-0x1f1d)]);tmp_i=atoi(tmp);if(tmp_i<(0x609+7741-0x2446)
+||tmp_i>INT_MAX-(0x3ef+5467-0x1949)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x70\x50\x64\x75\x5f\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);return ZUFI_FAIL;}pos=tmp_i+(0x1eb+3052-0xdd6);if(pos>=iPdu_Len){return 
-ZUFI_FAIL;}raw_ts.len=iPdu_Len-pos;memcpy((void*)raw_ts.data,(void*)(
+,tmp_i);return ZUFI_FAIL;}pos=tmp_i+(0xe38+1310-0x1355);if(pos>=iPdu_Len){return
+ ZUFI_FAIL;}raw_ts.len=iPdu_Len-pos;memcpy((void*)raw_ts.data,(void*)(
 pPdu_Received+pos),WMS_MAX_LEN);raw_ts.tpdu_type=zUfiSms_GetTpduType(
 pPdu_Received+pos);raw_ts.format=(WMS_MESSAGE_FORMAT_CDMA_V01==format)?
 WMS_FORMAT_CDMA:WMS_FORMAT_GW_PP;(void)wms_ts_decode(&raw_ts,&ts_data_ptr);
@@ -1046,62 +1049,62 @@
 pDb_Data);break;}case WMS_MESSAGE_FORMAT_GW_BC_V01:case 
 WMS_MESSAGE_FORMAT_MWI_V01:{result=ZUFI_FAIL;break;}default:{result=ZUFI_FAIL;
 break;}}return result;}T_zUfiSms_CmdStatus IsSmsLoadSuccess(void){char IsInit[
-(0x861+6389-0x2132)]={(0x1f+74-0x69)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit,
-sizeof(IsInit));if((0x4e3+4688-0x1733)==strcmp("\x6f\x6b",IsInit)){printf(
+(0xaf4+3055-0x16bf)]={(0x14c2+3452-0x223e)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit
+,sizeof(IsInit));if((0x8d0+5921-0x1ff1)==strcmp("\x6f\x6b",IsInit)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x20\x4c\x6f\x61\x64\x20\x73\x75\x63\x63\x65\x73\x73\x21" "\n"
 );return WMS_CMD_SUCCESS;}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x6d\x73\x20\x4c\x6f\x61\x64\x20\x77\x72\x6f\x6e\x67\x20\x21" "\n"
 );return WMS_CMD_FAILED;}}
-#if (0xd3f+5488-0x22af)

+#if (0x5fc+8272-0x264c)

 int zUfiSms_FormatSms(CHAR*pSmsRawContent,int contentSize,T_zUfiSms_SmsItem*
-ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0x10d7+1692-0x1747))
-);if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0x678+7877-0x253c)),
-((char)(0xd6a+1522-0x1330)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
-*)(P2+(0x1118+802-0x1439)),((char)(0x193a+390-0x1a94)));atBase_PreProcRes(
-pSmsRawContent,contentSize);if((0x3e7+600-0x63e)==iCmdId){if(P3==P2+
-(0x60a+8216-0x2621)){sscanf(pSmsRawContent,
+ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0x817+493-0x9d8)));
+if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0x3aa+1431-0x940)),
+((char)(0x1c55+861-0x1f86)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
+*)(P2+(0xca7+501-0xe9b)),((char)(0xac7+3794-0x196d)));atBase_PreProcRes(
+pSmsRawContent,contentSize);if((0x540+3964-0x14bb)==iCmdId){if(P3==P2+
+(0x98d+5639-0x1f93)){sscanf(pSmsRawContent,
 "\x25\x64\x20\x25\x64\x20\x25\x64\x20",&ptSmsPara->index,&ptSmsPara->stat,&
 ptSmsPara->length);}else{sscanf(pSmsRawContent,
 "\x25\x64\x20\x25\x64\x20\x25\x33\x32\x73\x20\x25\x64\x20",&ptSmsPara->index,&
 ptSmsPara->stat,ptSmsPara->alpha,&ptSmsPara->length);}}else if(
-(0x1d82+328-0x1ec8)==iCmdId){if(P2==P1+(0x1753+742-0x1a38)){sscanf(
-pSmsRawContent,"\x25\x64\x20\x25\x64\x20",&ptSmsPara->stat,&ptSmsPara->length);}
-else{sscanf(pSmsRawContent,"\x25\x64\x20\x25\x33\x32\x73\x20\x25\x64\x20",&
-ptSmsPara->stat,ptSmsPara->alpha,&ptSmsPara->length);}}atBase_RestoreString(
-ptSmsPara->alpha);atBase_RestoreString(ptSmsPara->pdu);return ZUFI_SUCC;}
+(0x333+1322-0x85b)==iCmdId){if(P2==P1+(0x4f8+6371-0x1dda)){sscanf(pSmsRawContent
+,"\x25\x64\x20\x25\x64\x20",&ptSmsPara->stat,&ptSmsPara->length);}else{sscanf(
+pSmsRawContent,"\x25\x64\x20\x25\x33\x32\x73\x20\x25\x64\x20",&ptSmsPara->stat,
+ptSmsPara->alpha,&ptSmsPara->length);}}atBase_RestoreString(ptSmsPara->alpha);
+atBase_RestoreString(ptSmsPara->pdu);return ZUFI_SUCC;}
 #endif

 void zUfiSms_CmglRespProc(T_zSms_SmsInd*pSmsItem){T_zUfiSms_CmdStatus result=
-WMS_CMD_PROCESSING;T_zUfiSms_DbStoreData db_data={(0x1994+353-0x1af5)};
+WMS_CMD_PROCESSING;T_zUfiSms_DbStoreData db_data={(0x205+6821-0x1caa)};
 zUfiSms_StoreType mem_store=WMS_STORAGE_TYPE_UIM_V01;unsigned char pdu_tmp[
-ZSMS_PDU_SIZE]={(0xf59+2297-0x1852)};int total_count=(0x82c+5049-0x1be5);int 
-sim_capability=(0x1b70+1197-0x201d);printf(
+ZSMS_PDU_SIZE]={(0x506+2182-0xd8c)};int total_count=(0x7e4+1548-0xdf0);int 
+sim_capability=(0x35+7189-0x1c4a);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x6c\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x21" "\n"
 ,pSmsItem->index,pSmsItem->stat,pSmsItem->length);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x70\x64\x75\x20\x64\x61\x74\x61\x5f\x6c\x65\x6e\x3a\x25\x64\x2c\x20\x73\x74\x72\x3a\x25\x73\x21" "\n"
-,strlen(pSmsItem->pdu),pSmsItem->pdu);memset(&db_data,(0x12d0+1738-0x199a),
-sizeof(db_data));memset(pdu_tmp,(0x781+3445-0x14f6),sizeof(pdu_tmp));(void)
+,strlen(pSmsItem->pdu),pSmsItem->pdu);memset(&db_data,(0x2228+1099-0x2673),
+sizeof(db_data));memset(pdu_tmp,(0x81+773-0x386),sizeof(pdu_tmp));(void)
 String2Bytes(pSmsItem->pdu,pdu_tmp,(int)strlen(pSmsItem->pdu));
-#if (0x938+4403-0x1a6a)
-zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x61a+5772-0x1ca1)==
+#if (0xe60+3056-0x1a4f)
+zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x1fc+4264-0x129f)==
 pSmsItem->stat){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x70\x53\x6d\x73\x49\x74\x65\x6d\x2d\x3e\x73\x74\x61\x74\x20\x3d\x3d\x20\x35" "\n"
 );(void)zUfiSms_HandleReport(pdu_tmp);zUfiSms_DelModemSms(pSmsItem->index);
 return;}
 #endif

-#if (0x98a+4871-0x1c90)
+#if (0x935+4482-0x1ab6)
 printf("\x2a\x2a\x2a\x2a\x75\x6e\x64\x65\x63\x6f\x64\x65\x3a\x25\x73" "\n",
 pdu_tmp);
 #endif

 (void)zUfiSms_DecodeSmsData(&db_data,pSmsItem->index,mem_store,(T_SmsStatus)
 pSmsItem->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,pSmsItem->length,pdu_tmp);
-#if (0xfd3+5194-0x241c)
+#if (0x4ac+539-0x6c6)
 printf("\x2a\x2a\x2a\x2a\x64\x65\x63\x6f\x64\x65\x65\x64\x3a\x25\x73" "\n",
 db_data.sms_content);
 #endif

-(void)zUfiSms_WriteSmsToDb(&db_data,mem_store,-(0x923+3830-0x1818));{}
-#if (0x744+4586-0x192d)
+(void)zUfiSms_WriteSmsToDb(&db_data,mem_store,-(0xc55+4189-0x1cb1));{}
+#if (0x40+9237-0x2454)
 if(SMS_LOCATION_SIM==g_zUfiSms_CurLocation){CHAR simCapability[
-(0x2044+1396-0x2586)]={(0x1aa8+1306-0x1fc2)};sc_cfg_get(
+(0x74a+4312-0x17f0)]={(0x970+6129-0x2161)};sc_cfg_get(
 ZTE_WMS_NVCONFIG_SIM_CAPABILITY,simCapability,sizeof(simCapability));
 sim_capability=atoi(simCapability);(void)zUfiSms_GetTotalCount(
 ZTE_WMS_DB_SIM_TABLE,&total_count);if(total_count==sim_capability){
@@ -1111,18 +1114,18 @@
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x68\x65\x63\x6b\x73\x74\x6f\x72\x65\x44\x69\x72\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
 );return;}
 #ifdef WEBS_SECURITY

-if(access(ZTE_WMS_DB_PATH,F_OK)!=(0xb7f+3043-0x1762)){if((access(
-ZTE_WMS_TMP1_PATH,F_OK)==(0x1039+2035-0x182c))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
-(0x241f+641-0x26a0))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
-(0x288+731-0x563)){printf(
+if(access(ZTE_WMS_DB_PATH,F_OK)!=(0x150+6618-0x1b2a)){if((access(
+ZTE_WMS_TMP1_PATH,F_OK)==(0x3dd+8819-0x2650))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
+(0x2048+172-0x20f4))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
+(0x135b+2790-0x1e41)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x57\x4d\x53\x5f\x54\x4d\x50\x31\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
-);}}if((access(ZTE_WMS_TMP0_PATH,F_OK)==(0x14d0+2373-0x1e15))&&(access(
-ZTE_WMS_SEC_PATH,F_OK)!=(0x10a1+3140-0x1ce5))){if(rename(ZTE_WMS_TMP0_PATH,
-ZTE_WMS_SEC_PATH)!=(0xf73+2091-0x179e)){printf(
+);}}if((access(ZTE_WMS_TMP0_PATH,F_OK)==(0x11c2+4348-0x22be))&&(access(
+ZTE_WMS_SEC_PATH,F_OK)!=(0x10c3+3446-0x1e39))){if(rename(ZTE_WMS_TMP0_PATH,
+ZTE_WMS_SEC_PATH)!=(0x503+1661-0xb80)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x57\x4d\x53\x5f\x54\x4d\x50\x30\x5f\x50\x41\x54\x48\x20\x66\x61\x69\x6c\x65\x64\x2e" "\n"
-);}}if(access(ZTE_WMS_SEC_PATH,F_OK)==(0x1661+2180-0x1ee5)){char rnum_buf[
-(0xb48+5441-0x2071)]={(0x1558+2346-0x1e82)};char cmd[(0x743+1091-0xb06)]={
-(0x832+4156-0x186e)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZTE_WMS_SEC_PATH,F_OK)==(0x207+6748-0x1c63)){char rnum_buf[
+(0x1b82+2755-0x262d)]={(0x854+1258-0xd3e)};char cmd[(0x194c+1247-0x1dab)]={
+(0xab1+2211-0x1354)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
 rnum_buf));snprintf(cmd,sizeof(cmd),
 "\x2f\x62\x69\x6e\x2f\x6f\x70\x65\x6e\x73\x73\x6c\x20\x65\x6e\x63\x20\x2d\x64\x20\x2d\x61\x65\x73\x32\x35\x36\x20\x2d\x73\x61\x6c\x74\x20\x2d\x69\x6e\x20\x25\x73\x20\x2d\x6f\x75\x74\x20\x25\x73\x20\x2d\x70\x61\x73\x73\x20\x70\x61\x73\x73\x3a\x25\x73"
 ,ZTE_WMS_SEC_PATH,ZTE_WMS_DB_PATH,rnum_buf);zxic_system(cmd);}}
@@ -1134,47 +1137,47 @@
 zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_SendSmsStatusInfo(
 MSG_SMS_DEFAULT);g_zUfiSms_MsgRefer=zUfiSms_GetSmsMaxReferInDb();
 g_zUfiSms_ConcatSmsReference=zUfiSms_GetConcatMaxReferInDb();}void 
-zUfiSms_CfgSmsNvInit(void){char tmp[(0x1c21+1686-0x22ad)]={(0x4a5+8755-0x26d8)};
+zUfiSms_CfgSmsNvInit(void){char tmp[(0x13a3+1990-0x1b5f)]={(0xa8+6317-0x1955)};
 sc_cfg_set(NV_SMS_STORE,"");sc_cfg_set(NV_SMS_LOAD_RESULT,"");sc_cfg_set(
 ZTE_WMS_NVCONFIG_RECEVIED,"");sc_cfg_set(NV_SMS_CENTER_NUM,"");snprintf(tmp,
 sizeof(tmp),"\x25\x64",ZTE_WMS_DB_MSG_COUNT_MAX);sc_cfg_set(
 ZTE_WMS_NVCONFIG_NV_CAPABILITY,tmp);}VOID zUfiSms_InitCmdStatus(
 T_zUfiSms_StatusInfo*pStatusInfo,T_zUfiSms_CmdType iCmdId){memset((void*)
-pStatusInfo,(0xd2d+4580-0x1f11),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
+pStatusInfo,(0x700+4490-0x188a),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
 iCmdId;pStatusInfo->cmd_status=WMS_CMD_PROCESSING;pStatusInfo->err_code=
-ZTE_SMS_CMS_NONE;pStatusInfo->send_failed_count=(0x2b3+7265-0x1f14);pStatusInfo
-->delete_failed_count=(0xe16+3287-0x1aed);(void)zUfiSms_SetCmdStatus(pStatusInfo
-);}void zUfiSms_CfgInit(void){char tmp[(0x6d3+3465-0x1452)]={(0x1e86+997-0x226b)
-};sc_cfg_set(NV_SMS_STATE,"");sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,"");
-sc_cfg_set(NV_SMS_LOAD_RESULT,"");sc_cfg_set(NV_SMS_RECV_RESULT,"");snprintf(tmp
-,sizeof(tmp),"\x25\x64",ZTE_WMS_DB_MSG_COUNT_MAX);sc_cfg_set(
-ZTE_WMS_NVCONFIG_NV_CAPABILITY,tmp);sc_cfg_set(ZTE_WMS_NVCONFIG_SIM_CAPABILITY,
-"");sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,"");sc_cfg_set(NV_SMS_DB_CHANGE,
-"\x31");sc_cfg_set(NV_SMS_CENTER_NUM,"");}int zUfiSms_IsUnreadSms(
-T_zUfiSms_MemoryType mem_store){int total_count=(0x1093+869-0x13f8);char buf[
-(0x868+280-0x96c)]={(0xf03+548-0x1127)};if(ZUFI_FAIL==zUfiSms_GetTagCountInDb(
-mem_store,WMS_TAG_TYPE_MT_NOT_READ_V01,&total_count)){return FALSE;}sprintf(buf,
-"\x25\x64",total_count);sc_cfg_set(
+ZTE_SMS_CMS_NONE;pStatusInfo->send_failed_count=(0x1b5b+2498-0x251d);pStatusInfo
+->delete_failed_count=(0x516+6167-0x1d2d);(void)zUfiSms_SetCmdStatus(pStatusInfo
+);}void zUfiSms_CfgInit(void){char tmp[(0x47+902-0x3c3)]={(0x2b6+1818-0x9d0)};
+sc_cfg_set(NV_SMS_STATE,"");sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,"");sc_cfg_set(
+NV_SMS_LOAD_RESULT,"");sc_cfg_set(NV_SMS_RECV_RESULT,"");snprintf(tmp,sizeof(tmp
+),"\x25\x64",ZTE_WMS_DB_MSG_COUNT_MAX);sc_cfg_set(ZTE_WMS_NVCONFIG_NV_CAPABILITY
+,tmp);sc_cfg_set(ZTE_WMS_NVCONFIG_SIM_CAPABILITY,"");sc_cfg_set(
+ZTE_WMS_NVCONFIG_SMS_REPORT,"");sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");sc_cfg_set(
+NV_SMS_CENTER_NUM,"");}int zUfiSms_IsUnreadSms(T_zUfiSms_MemoryType mem_store){
+int total_count=(0x12f+1451-0x6da);char buf[(0x8c6+889-0xc2b)]={
+(0x3c+8722-0x224e)};if(ZUFI_FAIL==zUfiSms_GetTagCountInDb(mem_store,
+WMS_TAG_TYPE_MT_NOT_READ_V01,&total_count)){return FALSE;}sprintf(buf,"\x25\x64"
+,total_count);sc_cfg_set(
 "\x73\x6d\x73\x5f\x75\x6e\x72\x65\x61\x64\x5f\x63\x6f\x75\x6e\x74",buf);if(
-(0x6+6727-0x1a4d)==total_count){return FALSE;}else{return TRUE;}}VOID 
+(0xc71+2771-0x1744)==total_count){return FALSE;}else{return TRUE;}}VOID 
 zUfiSms_SendSmsStatusInfo(wms_message_status_info sms_op){
-T_zUfi_SmsStatusInfoInd ind={(0x1266+488-0x144e)};CHAR temp[(0xd60+4495-0x1ebd)]
-={(0x2319+842-0x2663)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=
-(0x587+2149-0xdeb);}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=
-(0xd49+3574-0x1b3e);}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.
-sms_unread_ind=(0x3e4+3024-0xfb3);}else{ind.sms_unread_ind=(0x300+6691-0x1d23);}
-sc_cfg_get("\x73\x6d\x73\x5f\x75\x6e\x72\x65\x61\x64\x5f\x63\x6f\x75\x6e\x74",
+T_zUfi_SmsStatusInfoInd ind={(0x1235+961-0x15f6)};CHAR temp[(0x1a83+1337-0x1f8a)
+]={(0x2b3+5191-0x16fa)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=
+(0x3c5+2001-0xb95);}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=
+(0x510+8393-0x25d8);}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.
+sms_unread_ind=(0x19e5+2811-0x24df);}else{ind.sms_unread_ind=(0x6f1+3547-0x14cc)
+;}sc_cfg_get("\x73\x6d\x73\x5f\x75\x6e\x72\x65\x61\x64\x5f\x63\x6f\x75\x6e\x74",
 temp,sizeof(temp));ind.sms_unread_count=atoi(temp);if((g_zUfiSms_MemFullFlag[
 WMS_STORAGE_TYPE_NV_V01]==TRUE)||(g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_UIM_V01
-]==TRUE)){ind.sms_memory_full_ind=(0x6a0+6663-0x20a6);}else{ind.
-sms_memory_full_ind=(0xac3+3306-0x17ad);}printf(
+]==TRUE)){ind.sms_memory_full_ind=(0x10cd+3945-0x2035);}else{ind.
+sms_memory_full_ind=(0xa90+4710-0x1cf6);}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x53\x74\x61\x74\x75\x73\x49\x6e\x66\x6f\x20\x75\x6e\x72\x65\x61\x64\x20\x3d\x20\x25\x64\x2c\x20\x66\x75\x6c\x6c\x3d\x25\x64\x2c\x20\x6e\x65\x77\x3d\x25\x64\x2c\x20\x72\x65\x61\x64\x69\x6e\x67\x3d\x25\x64" "\n"
 ,ind.sms_unread_ind,ind.sms_memory_full_ind,ind.sms_new_ind,ind.sms_is_reading);
 ipc_send_message(MODULE_ID_SMS,MODULE_ID_MMI,MSG_CMD_SMS_STATUS_INFO_IND,sizeof(
-T_zUfi_SmsStatusInfoInd),&ind,(0x2085+1650-0x26f7));if(ind.sms_memory_full_ind==
-(0x1da0+1131-0x220a)){sc_cfg_set(NV_SMS_INIT_STATUS,
+T_zUfi_SmsStatusInfoInd),&ind,(0x129a+2843-0x1db5));if(ind.sms_memory_full_ind==
+(0x1c4c+465-0x1e1c)){sc_cfg_set(NV_SMS_INIT_STATUS,
 "\x73\x6d\x73\x5f\x6d\x65\x6d\x6f\x72\x79\x5f\x66\x75\x6c\x6c");}else if(ind.
-sms_unread_ind==(0x561+4921-0x1899)){sc_cfg_set(NV_SMS_INIT_STATUS,
+sms_unread_ind==(0x4d6+8639-0x2694)){sc_cfg_set(NV_SMS_INIT_STATUS,
 "\x73\x6d\x73\x5f\x75\x6e\x72\x65\x61\x64");}else{sc_cfg_set(NV_SMS_INIT_STATUS,
 "\x73\x6d\x73\x5f\x6e\x6f\x72\x6d\x61\x6c");}return;}VOID BakNotificationSms(
 char*pushSms,int pushSmsLen){FILE*fp=NULL;int len;fp=fopen(
@@ -1183,7 +1186,7 @@
 "\x5b\x53\x4d\x53\x5d\x20\x42\x61\x6b\x4e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x53\x6d\x73\x20\x66\x6f\x70\x65\x6e\x20\x65\x72\x72\x6f\x72" "\n"
 );at_print(LOG_ERR,
 "\x66\x6f\x70\x65\x6e\x28\x20\x2f\x75\x73\x72\x2f\x64\x6d\x2f\x66\x6f\x74\x61\x5f\x70\x75\x73\x68\x5f\x6d\x73\x67\x2e\x64\x61\x74\x61\x20\x2c\x20\x27\x77\x2b\x27\x29\x20\x65\x72\x72\x6f\x72\x21"
-);return;}len=fwrite(pushSms,(0x25a7+225-0x2687),pushSmsLen,fp);if(len==
+);return;}len=fwrite(pushSms,(0x11c3+375-0x1339),pushSmsLen,fp);if(len==
 pushSmsLen){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x42\x61\x6b\x4e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x53\x6d\x73\x20\x77\x72\x69\x74\x65\x20\x74\x6f\x20\x4e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x62\x61\x6b\x20\x66\x69\x6c\x65\x20\x4f\x4b\x2c\x20\x6c\x65\x6e\x3d\x25\x64\x20" "\n"
 ,len);printf(
diff --git a/ap/app/zte_comm/sms/src/sms_main.c b/ap/app/zte_comm/sms/src/sms_main.c
index d62807f..4aa8f11 100755
--- a/ap/app/zte_comm/sms/src/sms_main.c
+++ b/ap/app/zte_comm/sms/src/sms_main.c
@@ -15,43 +15,42 @@
 g_zUfiSms_FinalCmgsBuf;extern int g_zUfiSms_CurConcatSegNo;extern 
 T_zUfiSms_DbStoreData g_zUfiSms_DbStoreData[ZTE_WMS_CONCAT_SMS_COUNT_MAX];extern
  int g_zUfiSms_SendFailedCount;extern int g_zUfiSms_ConcatTotalNum;extern UINT8 
-g_zUfiSms_IsConcatSendSuc;int iSmsIndex=(0x8df+7383-0x25b6);int g_zSms_MsqId=-
-(0x916+831-0xc54);int g_zSms_LocalMsqId=-(0xc9b+3484-0x1a36);sem_t g_sms_sem_id;
-T_zSms_optRsp g_smsOptRsp={(0xa06+6855-0x24cd)};static const T_zSmsHandleTable 
-SmsHandleWebTab[]={{MSG_CMD_SEND_SMS,atWeb_SendSms,TRUE},{
+g_zUfiSms_IsConcatSendSuc;int iSmsIndex=(0xaa3+2576-0x14b3);int g_zSms_MsqId=-
+(0x68b+4600-0x1882);int g_zSms_LocalMsqId=-(0x1404+278-0x1519);sem_t 
+g_sms_sem_id;T_zSms_optRsp g_smsOptRsp={(0xa27+1248-0xf07)};static const 
+T_zSmsHandleTable SmsHandleWebTab[]={{MSG_CMD_SEND_SMS,atWeb_SendSms,TRUE},{
 MSG_CMD_DEL_SMS_BY_INDEX,atWeb_DelSmsByIndex,TRUE},{MSG_CMD_SMS_MODIFY_TAG,
 atWeb_ReadSms,TRUE},{MSG_CMD_DRAFTS_SAVE,atWeb_SaveSms,FALSE},{
 MSG_CMD_SMS_LOCATION_SET,atWeb_SetSms,TRUE},{MSG_CMD_SMS_OUTDATE_CHECK,
-atWeb_OutdateSmsCheck,TRUE},{(0x1aa6+1263-0x1f95),NULL,FALSE}};VOID 
-atWeb_SendSms(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;
-T_zUfiSms_StatusInfo tStatus={(0x1771+3062-0x2367)};assert(pDatabuf!=NULL);
-ptMessage=(T_zGoaheadMsgBuf*)pDatabuf;zUfiSms_InitCmdStatus(&tStatus,
-WMS_SMS_CMD_MSG_SEND);(void)zUfiSms_SendRawSms((T_zUfiSms_SendReq*)ptMessage->
-msg_data);}VOID atWeb_DelSmsByIndex(UINT8*pDatabuf){T_zUfiSms_DelReq tDelReq={
-(0x1ac1+174-0x1b6f)};T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;
-T_zUfiSms_StatusInfo tStatus={(0xed4+1612-0x1520)};assert(pDatabuf!=NULL);printf
-("[SMS] atWeb_DelSmsByIndex recv msg\n");memcpy(&tDelReq,pDatabuf,sizeof(
-T_zUfiSms_DelReq));zUfiSms_InitCmdStatus(&tStatus,WMS_SMS_CMD_MSG_DELETE);result
-=zUfiSms_DeleteSms(&tDelReq);tStatus.cmd_status=result;(void)
-zUfiSms_SetCmdStatus(&tStatus);zUfiMmi_SendSmsStatus();}VOID atWeb_DelSmsByType(
-UINT8*pDatabuf){
-#if (0x303+5807-0x19b2)

+atWeb_OutdateSmsCheck,TRUE},{(0x30+9887-0x26cf),NULL,FALSE}};VOID atWeb_SendSms(
+UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;T_zUfiSms_StatusInfo tStatus={
+(0x36c+366-0x4da)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)pDatabuf;
+zUfiSms_InitCmdStatus(&tStatus,WMS_SMS_CMD_MSG_SEND);(void)zUfiSms_SendRawSms((
+T_zUfiSms_SendReq*)ptMessage->msg_data);}VOID atWeb_DelSmsByIndex(UINT8*pDatabuf
+){T_zUfiSms_DelReq tDelReq={(0xecc+62-0xf0a)};T_zUfiSms_CmdStatus result=
+WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={(0x85c+1798-0xf62)};assert(
+pDatabuf!=NULL);printf("[SMS] atWeb_DelSmsByIndex recv msg\n");memcpy(&tDelReq,
+pDatabuf,sizeof(T_zUfiSms_DelReq));zUfiSms_InitCmdStatus(&tStatus,
+WMS_SMS_CMD_MSG_DELETE);result=zUfiSms_DeleteSms(&tDelReq);tStatus.cmd_status=
+result;(void)zUfiSms_SetCmdStatus(&tStatus);zUfiMmi_SendSmsStatus();}VOID 
+atWeb_DelSmsByType(UINT8*pDatabuf){
+#if (0xe25+1588-0x1459)

 WEB_DEL_SMS_BY_TYPE*req=NULL;req=(WEB_DEL_SMS_BY_TYPE*)pDatabuf;assert(req!=NULL
 );if(req->eLocation!=ZSMS_LOCATION_SIM){ZTE_LOG(LOG_ERR,
 "\x7a\x53\x6d\x73\x5f\x50\x72\x65\x70\x44\x65\x6c\x42\x79\x54\x79\x70\x65\x20\x70\x61\x72\x61\x20\x4e\x55\x4c\x4c\x2e" "\n"
 );return;}zSms_ChangeMainState(ZSMS_STATE_DELING);ZTE_LOG(LOG_DEBUG,
 "\x7a\x53\x6d\x73\x5f\x50\x72\x65\x70\x44\x65\x6c\x42\x79\x54\x79\x70\x65\x20\x70\x73\x74\x52\x65\x71\x2d\x3e\x65\x42\x6f\x78\x4e\x61\x6d\x65\x3d\x25\x64" "\n"
-,req->eBoxName);SMS_DeleteRecordFromXML(SMS_LOCATION_SIM,(0x10d1+4449-0x2232),
-req->eBoxName);if(req->eBoxName==SMS_INBOX){sms_LoadSmsFromSim();}
+,req->eBoxName);SMS_DeleteRecordFromXML(SMS_LOCATION_SIM,(0x261+6056-0x1a09),req
+->eBoxName);if(req->eBoxName==SMS_INBOX){sms_LoadSmsFromSim();}
 #endif

 }VOID atWeb_ReadSms(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;
 T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={
-(0x1181+4532-0x2335)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)
-pDatabuf;zUfiSms_InitCmdStatus(&tStatus,WMS_SMS_CMD_MSG_MODIFY_TAG);result=
+(0x95+6333-0x1952)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)pDatabuf
+;zUfiSms_InitCmdStatus(&tStatus,WMS_SMS_CMD_MSG_MODIFY_TAG);result=
 zUfiSms_ModifySmsTag((T_zUfiSms_ModifyFlag*)ptMessage->msg_data);tStatus.
 cmd_status=result;(void)zUfiSms_SetCmdStatus(&tStatus);}VOID atWeb_SaveSms(UINT8
 *pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;T_zUfiSms_CmdStatus result=
-WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={(0x610+414-0x7ae)};assert(
+WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={(0x506+1616-0xb56)};assert(
 pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)pDatabuf;zUfiSms_InitCmdStatus(&
 tStatus,WMS_SMS_CMD_MSG_WRITE);result=zUfiSms_WriteRawSms((T_zUfiSms_SaveReq*)
 ptMessage->msg_data);if(g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){tStatus.
@@ -61,250 +60,251 @@
 zUfiSms_ChangeMainState(SMS_STATE_SAVING);sc_cfg_set(NV_SMS_SAVE_RESULT,
 "\x6f\x6b");}VOID atWeb_SetSms(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;
 T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={
-(0x8ea+3231-0x1589)};printf(
+(0xb6b+561-0xd9c)};printf(
 "\x49\x4e\x54\x4f\x20\x61\x74\x57\x65\x62\x5f\x53\x65\x74\x53\x6d\x73\x2e" "\n")
 ;assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)pDatabuf;
 zUfiSms_InitCmdStatus(&tStatus,WMS_SMS_CMD_CFG_SET_PARAMETERS);result=
 zUfiSms_SetSmsPara((T_zUfiSms_ParaInfo*)ptMessage->msg_data);tStatus.cmd_status=
 result;(void)zUfiSms_SetCmdStatus(&tStatus);}VOID atWeb_OutdateSmsCheck(UINT8*
-pDatabuf){T_zUfiSms_DelReq tSmsDel={(0xc8f+6715-0x26ca)};
+pDatabuf){T_zUfiSms_DelReq tSmsDel={(0x1d76+868-0x20da)};
 zUfiSms_CheckDbOutdateSms(ZTE_WMS_DB_NV_TABLE,&tSmsDel);printf(
 "\x2d\x2d\x2d\x2d\x6f\x75\x74\x20\x63\x6f\x75\x6e\x20\x6e\x76\x74\x3a\x20\x25\x64\x2d\x2d\x2d\x2d" "\n"
-,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0xc10+4637-0x1e2d)){
-atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0x846+7265-0x24a7),sizeof(
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x289+8769-0x24ca)){
+atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0x661+6311-0x1f08),sizeof(
 T_zUfiSms_DelReq));zUfiSms_CheckDbOutdateSms(ZTE_WMS_DB_SIM_TABLE,&tSmsDel);
 printf(
 "\x2d\x2d\x2d\x2d\x6f\x75\x74\x20\x63\x6f\x75\x6e\x74\x20\x73\x69\x6d\x3a\x20\x25\x64\x2d\x2d\x2d\x2d" "\n"
-,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x178b+2310-0x2091)){
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x250+5469-0x17ad)){
 atWeb_DelSmsByIndex(&tSmsDel);}}VOID zSms_HandleWebMsg(MSG_BUF*ptMsgBuf){UINT32 
-i=(0x1b86+2117-0x23cb);assert(ptMsgBuf!=NULL);printf(
+i=(0x21b+4384-0x133b);assert(ptMsgBuf!=NULL);printf(
 "\x73\x6d\x73\x20\x72\x65\x63\x76\x20\x6d\x73\x67\x20\x66\x72\x6f\x6d\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x3a\x25\x64" "\n"
-,ptMsgBuf->usMsgCmd);while((0x5a8+3166-0x1206)!=SmsHandleWebTab[i].msg_id){if(
+,ptMsgBuf->usMsgCmd);while((0x1c10+1035-0x201b)!=SmsHandleWebTab[i].msg_id){if(
 ptMsgBuf->usMsgCmd==SmsHandleWebTab[i].msg_id){if(SmsHandleWebTab[i].need_block
 &&ptMsgBuf->src_id!=MODULE_ID_SMS){ipc_send_message(MODULE_ID_SMS,
 MODULE_ID_SMS_LOCAL,ptMsgBuf->usMsgCmd,ptMsgBuf->usDataLen,(unsigned char*)
-ptMsgBuf->aucDataBuf,(0xea9+5684-0x24dd));}else if(NULL!=SmsHandleWebTab[i].
+ptMsgBuf->aucDataBuf,(0x1e89+1201-0x233a));}else if(NULL!=SmsHandleWebTab[i].
 func_ptr){SmsHandleWebTab[i].func_ptr(ptMsgBuf->aucDataBuf);}break;}i++;}}SINT32
  zSms_SendMsg(USHORT Msg_cmd,USHORT us_DataLen,UCHAR*pData){printf(
 "\x73\x6d\x73\x20\x73\x65\x6e\x64\x20\x6d\x73\x67\x20\x63\x6d\x64\x3a\x25\x64" "\n"
 ,Msg_cmd);ipc_send_message(MODULE_ID_SMS,MODULE_ID_AT_CTL,Msg_cmd,us_DataLen,(
-unsigned char*)pData,(0x1dad+1102-0x21fb));return(0x1424+4583-0x260b);}SINT32 
-zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x254+5988-0x19b8)};
-memset(&sendSmsInfo,(0x58a+6658-0x1f8c),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
+unsigned char*)pData,(0x2fc+159-0x39b));return(0xdfb+1050-0x1215);}SINT32 
+zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x14c8+855-0x181f)};
+memset(&sendSmsInfo,(0x13ec+1841-0x1b1d),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
 length=g_zUfiSms_FinalCmgsBuf.length;if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<
-ZSMS_PDU_SIZE-(0x499+5295-0x1947)){memcpy(sendSmsInfo.pdu,g_zUfiSms_FinalCmgsBuf
-.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));}else{printf(
+ZSMS_PDU_SIZE-(0x11c9+2543-0x1bb7)){memcpy(sendSmsInfo.pdu,
+g_zUfiSms_FinalCmgsBuf.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n"
 ,g_zUfiSms_FinalCmgsBuf.pdu);memcpy(sendSmsInfo.pdu,g_zUfiSms_FinalCmgsBuf.pdu,
-ZSMS_PDU_SIZE-(0x17b3+91-0x180c));}*(sendSmsInfo.pdu+strlen(
+ZSMS_PDU_SIZE-(0x1ebc+792-0x21d2));}*(sendSmsInfo.pdu+strlen(
 g_zUfiSms_FinalCmgsBuf.pdu))=ZSMS_CTRL_Z_CHAR;
-#if (0x65c+3469-0x13e8)
+#if (0x9f7+3471-0x1785)
 printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x73\x65\x6e\x64\x20\x64\x61\x74\x61" "\n"
 );printf("\n" "\x5b\x53\x4d\x53\x5d\x25\x73" "\n",sendSmsInfo.pdu);
 #endif

 zSms_SendMsg(MSG_CMD_SENDSMS_REQ,sizeof(T_zSms_SendSmsReq),&sendSmsInfo);
-sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1276+2489-0x1c2e)){return 
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1bd1+1819-0x22eb)){return 
 ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmgsOk(VOID){
 printf(
 "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x2e\x20" "\n"
 );g_zUfiSms_CurConcatSegNo++;if(g_zUfiSms_CurConcatSegNo>
 ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_DbStoreData[
-g_zUfiSms_CurConcatSegNo-(0xf57+623-0x11c5)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0x16d5+3880-0x25fc)].tag=WMS_TAG_TYPE_MO_SENT_V01;
 zUfiSms_CmgsRespProc();}VOID zSms_RecvCmgsErr(VOID){printf(
 "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x66\x61\x69\x6c\x2e\x20" "\n");
 g_zUfiSms_CurConcatSegNo++;if(g_zUfiSms_CurConcatSegNo>
 ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_SendFailedCount++;printf(
 "\x73\x65\x6e\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64\x2c\x73\x6f\x20\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x64\x72\x61\x66\x74\x62\x6f\x78\x2e" "\n"
-);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x1726+2948-0x22a9)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0xf6d+5221-0x23d1)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x2ba+292-0x3dd)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x1e6c+1165-0x22f8)){
 g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc();}SINT32 zSms_SendCmgdReq
-(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x3d6+7921-0x22c7)};delSmsReq.index=
+(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x4dd+1060-0x901)};delSmsReq.index=
 index;zSms_SendMsg(MSG_CMD_DELSMS_REQ,sizeof(T_zSms_DelSmsReq),&delSmsReq);
-sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1b38+435-0x1cea)){return 
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1608+2855-0x212e)){return 
 ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmgdOk(VOID){CHAR 
-strUsed[(0x1ed0+449-0x2087)]={(0x1456+42-0x1480)};int used=(0x111b+1027-0x151e);
-int tmp_i=(0x2462+158-0x2500);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+strUsed[(0x85a+6031-0x1fdf)]={(0x175c+3245-0x2409)};int used=
+(0x1029+1902-0x1797);int tmp_i=(0x0+760-0x2f8);sc_cfg_set(NV_SMS_DEL_RESULT,
+"\x6f\x6b");printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x4f\x4b\x2e\x20" "\n"
 );sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));tmp_i=atoi(
-strUsed);if(tmp_i<(0xa91+6541-0x241e)||tmp_i>INT_MAX-(0xb58+1179-0xff2)){
+strUsed);if(tmp_i<(0x6b9+8144-0x2689)||tmp_i>INT_MAX-(0xfa1+5338-0x247a)){
 at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x57\x4d\x53\x5f\x4e\x56\x43\x4f\x4e\x46\x49\x47\x5f\x53\x49\x4d\x5f\x43\x41\x52\x44\x5f\x55\x53\x45\x44\x20\x74\x6d\x70\x5f\x69\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,tmp_i);tmp_i=(0x115f+5524-0x26f3);}used=tmp_i-(0x1d4c+1265-0x223c);if(used<
-(0x1aff+265-0x1c08)){used=(0x87b+1794-0xf7d);}memset(&strUsed,
-(0xee8+3380-0x1c1c),(0x5f9+5843-0x1cc2));snprintf(strUsed,sizeof(strUsed),
+,tmp_i);tmp_i=(0x8f4+7283-0x2567);}used=tmp_i-(0x1711+3013-0x22d5);if(used<
+(0x1d04+1712-0x23b4)){used=(0xbc+5169-0x14ed);}memset(&strUsed,
+(0x2d1+6673-0x1ce2),(0x108d+1662-0x1701));snprintf(strUsed,sizeof(strUsed),
 "\x25\x64",used);sc_cfg_set(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed);}VOID 
 zSms_RecvCmgdErr(VOID){sc_cfg_set(NV_SMS_DEL_RESULT,"\x66\x61\x69\x6c");printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x66\x61\x69\x6c\x2e\x20" "\n"
-);}VOID zSms_RecvCmgdFinish(VOID){char StrValue[(0x20da+550-0x22f6)]={
-(0x1b62+899-0x1ee5)};CHAR strTotal[(0x233d+784-0x2643)]={(0x1b59+1395-0x20cc)};
-CHAR strUsed[(0x60d+7326-0x22a1)]={(0x1887+1563-0x1ea2)};int total=
-(0xd73+1140-0x11e7);int used=(0xc0d+2757-0x16d2);int remain=(0x3a7+8144-0x2377);
+);}VOID zSms_RecvCmgdFinish(VOID){char StrValue[(0x182c+1343-0x1d61)]={
+(0x1b67+623-0x1dd6)};CHAR strTotal[(0x6ff+2828-0x1201)]={(0x18d2+91-0x192d)};
+CHAR strUsed[(0x1f7f+1165-0x2402)]={(0x1870+581-0x1ab5)};int total=
+(0xb2d+946-0xedf);int used=(0x1acc+2380-0x2418);int remain=(0x1644+755-0x1937);
 sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(
-strUsed);if(used<(0xd59+5578-0x2323)||used>INT_MAX-(0x1014+537-0x122c)){at_print
-(LOG_ERR,
+strUsed);if(used<(0xe77+184-0xf2f)||used>INT_MAX-(0x349+2213-0xbed)){at_print(
+LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x57\x4d\x53\x5f\x4e\x56\x43\x4f\x4e\x46\x49\x47\x5f\x53\x49\x4d\x5f\x43\x41\x52\x44\x5f\x55\x53\x45\x44\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,used);used=(0x9fc+2110-0x123a);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
-strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0xa03+6517-0x2378)||
-total>INT_MAX-(0x131f+3597-0x212b)){at_print(LOG_ERR,
+,used);used=(0x1696+2417-0x2007);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
+strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0x19e1+219-0x1abc)||
+total>INT_MAX-(0x9e7+6417-0x22f7)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x57\x4d\x53\x5f\x4e\x56\x43\x4f\x4e\x46\x49\x47\x5f\x53\x49\x4d\x5f\x43\x41\x52\x44\x5f\x54\x4f\x54\x41\x4c\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,total);total=(0xec0+2453-0x1855);}remain=total-used;if(remain<
-(0x10e8+1210-0x15a2)){remain=(0x1439+2152-0x1ca1);}memset(&StrValue,
-(0x204+2042-0x9fe),(0xae1+1811-0x11ea));snprintf(StrValue,sizeof(StrValue),
+,total);total=(0xaef+6240-0x234f);}remain=total-used;if(remain<
+(0x2eb+1189-0x790)){remain=(0x10c5+2787-0x1ba8);}memset(&StrValue,
+(0xd21+2240-0x15e1),(0x1bb0+307-0x1cd9));snprintf(StrValue,sizeof(StrValue),
 "\x25\x64",remain);sc_cfg_set(ZTE_WMS_NVCONFIG_SIM_CARD_REMAIN,StrValue);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x69\x6d\x53\x6d\x73\x20\x75\x73\x65\x64\x3d\x25\x64\x2c\x72\x65\x6d\x61\x69\x6e\x3d\x25\x64\x2c\x74\x6f\x74\x61\x6c\x3d\x25\x64" "\n"
 ,used,remain,total);zUfiSms_ChangeMainState(SMS_STATE_DELED);sc_cfg_set(
 NV_SMS_DB_CHANGE,"\x31");}int zSms_SendZmenaReq(SINT32 avail){T_zSms_StroageReq 
-storageReq={(0xbbf+6578-0x2571)};storageReq.type=avail;zSms_SendMsg(
+storageReq={(0x10a+7264-0x1d6a)};storageReq.type=avail;zSms_SendMsg(
 MSG_CMD_STORAGE_CAP_REQ,sizeof(T_zSms_StroageReq),&storageReq);sem_wait(&
-g_sms_sem_id);if(g_smsOptRsp.result==(0x7ea+2096-0x1019)){return ZSMS_RESULT_OK;
-}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCmgrReq(UINT8 index){
-T_zSms_ModifyTagReq modTagReq={(0x5a8+740-0x88c)};modTagReq.index=index;
+g_sms_sem_id);if(g_smsOptRsp.result==(0x2627+68-0x266a)){return ZSMS_RESULT_OK;}
+else{return ZSMS_RESULT_ERROR;}}int zSms_SendCmgrReq(UINT8 index){
+T_zSms_ModifyTagReq modTagReq={(0x242+6425-0x1b5b)};modTagReq.index=index;
 zSms_SendMsg(MSG_CMD_MODIFY_TAG_REQ,sizeof(T_zSms_ModifyTagReq),&modTagReq);
-sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1471+1907-0x1be3)){return 
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0xd9+9767-0x26ff)){return 
 ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}int zSms_SetCscaReq(PSTR sca){
 T_zSms_SetScaReq setscareq;strncpy(setscareq.sca,sca,sizeof(setscareq.sca)-
-(0x1771+3418-0x24ca));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),
-&setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x916+6610-0x22e7)){
+(0x77+4733-0x12f3));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),&
+setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x13ef+1589-0x1a23)){
 return ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCnmiReq(PSTR
- pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x5c1+5488-0x1b31)};if(
-(0x5aa+6638-0x1f98)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
-(0x1272+4085-0x2266);}else{notifySetReq.mt=(0xa2a+5234-0x1e9a);}zSms_SendMsg(
+ pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x431+7313-0x20c2)};if(
+(0xba+618-0x324)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
+(0x759+1047-0xb6f);}else{notifySetReq.mt=(0x2f4+390-0x478);}zSms_SendMsg(
 MSG_CMD_NOTIFY_SET_REQ,sizeof(T_zSms_NotifySetReq),&notifySetReq);sem_wait(&
-g_sms_sem_id);if(g_smsOptRsp.result==(0x1071+3826-0x1f62)){return ZSMS_RESULT_OK
-;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR 
-needSMS[(0x220d+87-0x2232)]={(0x1491+3204-0x2115)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x127+2798-0xc15)==strcmp(
-needSMS,"\x6e\x6f")){printf(
+g_sms_sem_id);if(g_smsOptRsp.result==(0xb53+1513-0x113b)){return ZSMS_RESULT_OK;
+}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR 
+needSMS[(0xf14+3453-0x1c5f)]={(0xd1b+56-0xd53)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x3f9+1983-0xbb8)==strcmp(needSMS,"\x6e\x6f")){
+printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}T_zSms_SmsInd tCmtRsp={(0x1af8+2549-0x24ed)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0x566+7744-0x23a6)};memcpy(&tCmtRsp,(
 T_zSms_SmsInd*)pDatabuf,sizeof(T_zSms_SmsInd));zUfiSms_CmtRespProc(&tCmtRsp);
 zUfiMmi_SendSmsStatus();sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}VOID 
-zSms_RecvCmtiInd(UINT8*pDatabuf){char sms_Main_state[(0x1f88+341-0x20bf)]={
-(0x3c6+2178-0xc48)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
-CHAR needSMS[(0x84d+1686-0xeb1)]={(0xbed+6841-0x26a6)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x871+4147-0x18a4)==strcmp(
+zSms_RecvCmtiInd(UINT8*pDatabuf){char sms_Main_state[(0x33+2986-0xbbf)]={
+(0x11f3+3945-0x215c)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf
+;CHAR needSMS[(0x1735+3918-0x2651)]={(0x15c+4742-0x13e2)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xdb3+4313-0x1e8c)==strcmp(
 needSMS,"\x6e\x6f")){printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
 );return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state));if(
 strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")==
-(0xe8f+3213-0x1b1c)){printf(
+(0x188+166-0x22e)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n"
-);return;}if((0x11df+80-0x122f)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0xd64+2732-0x180e))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0x59+3778-0xf1b)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x3cf+8913-0x269e))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
 zUfiSms_ChangeMainState(SMS_STATE_RECVING);zSms_SendZmgrReq(smsIdxInd->index);}
 else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n"
 );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}VOID zSms_RecvCdsInd(UINT8*pDatabuf){CHAR 
-needSMS[(0x1afa+1125-0x1f2d)]={(0x1635+1274-0x1b2f)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x59d+3557-0x1382)==strcmp(
+needSMS[(0x1dd1+490-0x1f89)]={(0xc86+4421-0x1dcb)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xacc+2112-0x130c)==strcmp(
 needSMS,"\x6e\x6f")){printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}T_zSms_SmsInd tCmtRsp={(0x1623+667-0x18be)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0x4ba+3087-0x10c9)};memcpy(&tCmtRsp,(
 T_zSms_SmsInd*)pDatabuf,sizeof(T_zSms_SmsInd));zUfiSms_CdsRespProc(&tCmtRsp);
 zUfiMmi_SendSmsStatus();sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}VOID 
-zSms_RecvCdsiInd(UINT8*pDatabuf){char sms_Main_state[(0x811+7836-0x268f)]={
-(0xd2a+4247-0x1dc1)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
-CHAR needSMS[(0x612+7275-0x224b)]={(0x13c5+1804-0x1ad1)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x5bb+6003-0x1d2e)==strcmp(
+zSms_RecvCdsiInd(UINT8*pDatabuf){char sms_Main_state[(0x929+1061-0xd30)]={
+(0xb70+5055-0x1f2f)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
+CHAR needSMS[(0x2225+583-0x243a)]={(0xfab+2972-0x1b47)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xc2c+4548-0x1df0)==strcmp(
 needSMS,"\x6e\x6f")){printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
 );return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state));if(
 strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")==
-(0x1db6+1892-0x251a)){printf(
+(0x6a7+5529-0x1c40)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n"
-);return;}if((0x84f+5571-0x1e12)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0x1467+2251-0x1d30))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0x1478+2081-0x1c99)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x9+2942-0xb85))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
 zUfiSms_ChangeMainState(SMS_STATE_RECVING);zSms_SendZmgrReq(smsIdxInd->index);}
 else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n"
 );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}int zSms_SendCnmaReq(int ack_mode){
-T_zSms_SmsAckReq ackReq={(0x22a+4862-0x1528)};CHAR ackPduStr[(0x9a5+2676-0x13e7)
-]={(0x1a44+3015-0x260b)};ackReq.ackmode=ack_mode;if(ack_mode==
-(0xf68+3023-0x1b35)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,
-(0x15da+342-0x165d));memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
-#if (0xd30+5193-0x2179)

-if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0x6a1+5669-0x1cc5)){memcpy(ackReq.pdu,
+T_zSms_SmsAckReq ackReq={(0x1e62+1437-0x23ff)};CHAR ackPduStr[
+(0x350+6206-0x1b5c)]={(0x1ea3+380-0x201f)};ackReq.ackmode=ack_mode;if(ack_mode==
+(0x774+703-0xa31)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,(0x3d7+2785-0xde5))
+;memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
+#if (0xf0+3352-0xe08)

+if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0x50a+1492-0xadd)){memcpy(ackReq.pdu,
 ackPduStr,strlen(ackPduStr));}else{at_print(LOG_DEBUG
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n"
-,ackPduStr);memcpy(ackReq.pdu,ackPduStr,ZSMS_PDU_SIZE-(0x1e3+7022-0x1d4f));}
+,ackPduStr);memcpy(ackReq.pdu,ackPduStr,ZSMS_PDU_SIZE-(0x11d9+3649-0x2018));}
 #endif     

 *(ackReq.pdu+strlen(ackPduStr))=ZSMS_CTRL_Z_CHAR;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x2e\x20\x70\x64\x75\x3d\x20\x25\x73" "\n"
-,ackReq.pdu);ackReq.length=strlen(ackPduStr)/(0xd26+2052-0x1528);}zSms_SendMsg(
+,ackReq.pdu);ackReq.length=strlen(ackPduStr)/(0xbf7+3361-0x1916);}zSms_SendMsg(
 MSG_CMD_SMSACK_REQ,sizeof(T_zSms_SmsAckReq),&ackReq);sem_wait(&g_sms_sem_id);if(
-g_smsOptRsp.result==(0x34b+3045-0xf2f)){return ZSMS_RESULT_OK;}else{return 
+g_smsOptRsp.result==(0x766+1532-0xd61)){return ZSMS_RESULT_OK;}else{return 
 ZSMS_RESULT_ERROR;}}int zSms_SendZmgrReq(int index){T_zSms_ReadSmsReq readSmsReq
-={(0x18b5+1062-0x1cdb)};iSmsIndex=index;printf(
+={(0x38c+3006-0xf4a)};iSmsIndex=index;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x5a\x6d\x67\x72\x52\x65\x71\x20\x47\x65\x74\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2e" "\n"
 ,iSmsIndex);readSmsReq.index=index;zSms_SendMsg(MSG_CMD_READSMS_REQ,sizeof(
-T_zSms_ReadSmsReq),&readSmsReq);return(0xbdf+279-0xcf6);}VOID zSms_RecvZmgrRsp(
-UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0x125b+3878-0x2181)};memcpy(&tCmgrRsp,(
+T_zSms_ReadSmsReq),&readSmsReq);return(0x770+383-0x8ef);}VOID zSms_RecvZmgrRsp(
+UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0x19dc+1304-0x1ef4)};memcpy(&tCmgrRsp,(
 T_zSms_SmsInd*)pDatabuf,sizeof(T_zSms_SmsInd));tCmgrRsp.index=iSmsIndex;
 zUfiSms_ZmgrRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();}VOID zSms_RecvZmgrOk(
-UINT8*pDatabuf){T_zSms_optRsp smsOptRsp={(0xbd9+6168-0x23f1)};memcpy(&smsOptRsp,
+UINT8*pDatabuf){T_zSms_optRsp smsOptRsp={(0x700+2513-0x10d1)};memcpy(&smsOptRsp,
 (T_zSms_optRsp*)pDatabuf,sizeof(T_zSms_optRsp));if(smsOptRsp.result==
-(0x14a7+3183-0x2115)){sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{printf(
+(0x10a7+104-0x110e)){sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x45\x72\x72\x20\x20\x53\x4d\x53\x20\x7a\x6d\x67\x72\x20\x69\x73\x20\x66\x61\x69\x6c" "\n"
 );sc_cfg_set(NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(
 SMS_STATE_RECVED);}}VOID zSms_RecvZpbicInd(UINT8*pDatabuf){T_zAt_ZpbicRes*ptPara
 =ZUFI_NULL;if(pDatabuf==NULL){return;}ptPara=(T_zAt_ZpbicRes*)(pDatabuf);if((
-(0x326+7056-0x1eb5)==ptPara->result)&&((0x5d3+5671-0x1bfa)==ptPara->opertype)){
-CHAR needSms[(0x1710+1500-0x1cba)]={(0x1df7+1807-0x2506)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0x15d7+627-0x184a)!=strcmp(
+(0x26a+4745-0x14f2)==ptPara->result)&&((0x2420+121-0x2499)==ptPara->opertype)){
+CHAR needSms[(0xae9+942-0xe65)]={(0x48+5754-0x16c2)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0xf84+6008-0x26fc)!=strcmp(
 needSms,"\x6e\x6f")){zSvr_Zpbic_Sms_Init();}}}VOID zSms_RecvCpmsInd(UINT8*
 pDatabuf){T_zSms_CpmsInd*cpmsInd=(T_zSms_CpmsInd*)pDatabuf;CHAR strBuf[
-(0x10fd+5327-0x25c2)]={(0x1ec+7679-0x1feb)};int remainSpace=(0x1311+2240-0x1bd1)
-;snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->total);sc_cfg_set(
+(0x248d+77-0x24d0)]={(0xeff+1885-0x165c)};int remainSpace=(0x607+4615-0x180e);
+snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->total);sc_cfg_set(
 ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,strBuf);sc_cfg_set(
-ZTE_WMS_NVCONFIG_SIM_CAPABILITY,strBuf);memset(&strBuf,(0xcbc+1819-0x13d7),
-(0x105c+5206-0x24a8));snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->used);
+ZTE_WMS_NVCONFIG_SIM_CAPABILITY,strBuf);memset(&strBuf,(0xa90+4146-0x1ac2),
+(0x1fad+1337-0x24dc));snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->used);
 sc_cfg_set(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strBuf);remainSpace=cpmsInd->total-
-cpmsInd->used;memset(&strBuf,(0x20fa+18-0x210c),(0x682+6977-0x21b9));snprintf(
+cpmsInd->used;memset(&strBuf,(0x9b1+543-0xbd0),(0x148+4436-0x1292));snprintf(
 strBuf,sizeof(strBuf),"\x25\x64",remainSpace);sc_cfg_set(
 ZTE_WMS_NVCONFIG_SIM_CARD_REMAIN,strBuf);sc_cfg_set(NV_SMS_STORE,"\x6f\x6b");}
-#define AT_CMD_MAX (0x5b4+3333-0x1279)

+#define AT_CMD_MAX (0xef7+5859-0x259a)

 #define ZAT_TAB_REPLACE                     ((unsigned char )(\
-(0x21c0+132-0x2148)))    

-#define ZAT_NULL_FILL                       ((unsigned char )(\
-(0x143f+3018-0x1f0c)))    

-#define ZAT_SPACE_REPLACE                   ((unsigned char )(\
-(0xd12+3200-0x1894)))    

+(0x2268+1267-0x265f)))    

+#define ZAT_NULL_FILL                       ((unsigned char )((0x309+3107-0xe2f)\
+))    

+#define ZAT_SPACE_REPLACE                   ((unsigned char )((0x1736+91-0x1693)\
+))    

 #define ZAT_LF_REPLACE                      ((unsigned char )(\
-(0x16c9+2714-0x2068)))    

+(0x1726+315-0x1766)))    

 #define ZAT_CR_REPLACE                      ((unsigned char )(\
-(0x1759+365-0x17cc)))    

+(0xd32+1413-0x11bd)))    

 static void atBase_PreProcRes(char*pParaLine,int paraSize){signed long flg=
-(0x13c0+1958-0x1b66);unsigned long i=(0x291+1881-0x9ea);unsigned long length=
-(0x6e2+7457-0x2403);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=(
+(0x50c+1111-0x963);unsigned long i=(0x416+2132-0xc6a);unsigned long length=
+(0x310+8550-0x2476);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=(
 char*)malloc(AT_CMD_MAX);if(NULL==pStrDestMalloc){return;}memset(pStrDestMalloc,
-(0xd03+4322-0x1de5),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
-length=strlen(pParaLine);if((length==(0x1507+1561-0x1b20))||(length>=AT_CMD_MAX)
-){free(pStrDestMalloc);return;}for(i=(0x172f+3694-0x259d);(i<length)&&(pDest-
-pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0x1134+2200-0x19aa))==*pSource){flg=(
-(0x14dc+930-0x187e)==flg)?(0x1397+1705-0x1a3f):(0x40c+3800-0x12e4);if(
-((char)(0x1772+2459-0x20eb))==*(pSource+(0xfd3+3087-0x1be1))){*pDest++=(char)
-ZAT_NULL_FILL;}}else if((((char)(0x149+922-0x4b7))==*pSource)&&(
-(0x2389+733-0x2666)==flg)){*pDest++=((char)(0x76c+2830-0x125a));if(
-((char)(0x3d4+1104-0x7f8))==*(pSource+(0x279+9362-0x270a))){*pDest++=
-((char)(0x6e9+3061-0x12a5));}else if('\0'==*(pSource+(0xd49+6247-0x25af))){*
-pDest++=(char)ZAT_NULL_FILL;}}else{if((((char)(0xfb3+4906-0x22bd))==*pSource)&&(
-(0xc8+537-0x2e0)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
-pSource)&&((0xf62+406-0x10f7)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if((
-'\n'==*pSource)&&((0x10c+4329-0x11f4)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}else
- if(('\r'==*pSource)&&((0x150+2660-0xbb3)==flg)){*pDest++=(char)ZAT_CR_REPLACE;}
-else{*pDest++=*pSource;}}pSource++;}memset(pParaLine,(0x253+6609-0x1c24),
-paraSize);strncpy(pParaLine,pStrDestMalloc,paraSize-(0x1bf5+2151-0x245b));free(
+(0x7d0+3398-0x1516),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
+length=strlen(pParaLine);if((length==(0xf61+3574-0x1d57))||(length>=AT_CMD_MAX))
+{free(pStrDestMalloc);return;}for(i=(0x100+5781-0x1795);(i<length)&&(pDest-
+pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0x2f5+1762-0x9b5))==*pSource){flg=(
+(0x180+7011-0x1ce3)==flg)?(0x37a+5311-0x1838):(0x4f7+3102-0x1115);if(
+((char)(0x1382+215-0x1437))==*(pSource+(0x1135+3873-0x2055))){*pDest++=(char)
+ZAT_NULL_FILL;}}else if((((char)(0x12ca+2385-0x1bef))==*pSource)&&(
+(0x12ff+62-0x133d)==flg)){*pDest++=((char)(0x38+1627-0x673));if(
+((char)(0x2619+275-0x2700))==*(pSource+(0xd10+4677-0x1f54))){*pDest++=
+((char)(0x8e3+2908-0x1406));}else if('\0'==*(pSource+(0x7d1+240-0x8c0))){*pDest
+++=(char)ZAT_NULL_FILL;}}else{if((((char)(0x7a+2368-0x99a))==*pSource)&&(
+(0xa18+2810-0x1511)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
+pSource)&&((0x1365+155-0x13ff)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if((
+'\n'==*pSource)&&((0xb2+7598-0x1e5f)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}else 
+if(('\r'==*pSource)&&((0xea2+4129-0x1ec2)==flg)){*pDest++=(char)ZAT_CR_REPLACE;}
+else{*pDest++=*pSource;}}pSource++;}memset(pParaLine,(0x7c+8884-0x2330),paraSize
+);strncpy(pParaLine,pStrDestMalloc,paraSize-(0x12dd+4775-0x2583));free(
 pStrDestMalloc);}VOID zSms_RecvCscaInd(UINT8*pDatabuf){T_zSms_CscaInd cscaInd={
-(0x1c8a+702-0x1f48)};
-#if (0x1579+2974-0x2116)
+(0xdec+5191-0x2233)};
+#if (0xc01+6640-0x25f0)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x7a\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x73\x63\x61\x49\x6e\x64\x20\x64\x61\x74\x61\x62\x75\x66\x3a\x25\x73" "\n"
 ,pDatabuf);
 #endif

 atBase_PreProcRes(pDatabuf,strlen(pDatabuf));sscanf(pDatabuf,
 "\x25\x32\x31\x73\x20\x25\x32\x31\x73",cscaInd.sca,cscaInd.tosca);
-#if (0x986+3241-0x162e)
+#if (0x52+9271-0x2488)
 printf(
 "\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x7a\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x73\x63\x61\x49\x6e\x64\x20\x73\x63\x61\x3a\x25\x73\x2c\x20\x74\x6f\x73\x63\x61\x25\x73" "\n"
 ,cscaInd.sca,cscaInd.tosca);
@@ -312,22 +312,22 @@
 sc_cfg_set(NV_SMS_CENTER_NUM,cscaInd.sca);zUfiSms_SetScaPara(cscaInd.sca);}VOID 
 zSms_RecvZmglInd(UINT8*pDatabuf){zUfiSms_CmglRespProc((T_zSms_SmsInd*)pDatabuf);
 }int zSms_SendSmsInitReq(VOID){zSms_SendMsg(MSG_CMD_SMSINIT_REQ,
-(0x894+3285-0x1569),NULL);return(0x1d9+5823-0x1898);}VOID zSms_initAtOk(VOID){
-T_zUfiSms_StatusInfo tStatus={(0x1be4+615-0x1e4b)};sc_cfg_set(NV_SMS_STORE,
+(0x1c86+1421-0x2213),NULL);return(0x10bf+2294-0x19b5);}VOID zSms_initAtOk(VOID){
+T_zUfiSms_StatusInfo tStatus={(0xd70+31-0xd8f)};sc_cfg_set(NV_SMS_STORE,
 "\x6f\x6b");sc_cfg_set(NV_SMS_LOAD_RESULT,"\x6f\x6b");tStatus.cmd_status=
 WMS_CMD_SUCCESS;tStatus.cmd=WMS_SMS_CMD_INIT;(void)zUfiSms_SetCmdStatus(&tStatus
 );zUfiSms_ChangeMainState(SMS_STATE_LOADED);}VOID zSms_initAtErr(VOID){
-T_zUfiSms_StatusInfo tStatus={(0xf83+303-0x10b2)};sc_cfg_set(NV_SMS_LOAD_RESULT,
-"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_LOADED);tStatus.cmd_status
-=WMS_CMD_FAILED;tStatus.cmd=WMS_SMS_CMD_INIT;(void)zUfiSms_SetCmdStatus(&tStatus
-);}VOID zSms_RecvSmsInitRst(UINT8*pDatabuf){memcpy(&g_smsOptRsp,pDatabuf,sizeof(
-T_zSms_optRsp));if(g_smsOptRsp.result==(0xf0a+170-0xfb3)){zSms_initAtOk();}else{
-zSms_initAtErr();}}UINT8 zSms_SmsMsgCreat(VOID){g_zSms_MsqId=msgget(
-MODULE_ID_SMS,IPC_CREAT|(0x754+4476-0x1750));if(g_zSms_MsqId==-
-(0x6f1+6965-0x2225)){return ZUFI_FAIL;}g_zSms_LocalMsqId=msgget(
-MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x254+6437-0x19f9));if(g_zSms_LocalMsqId==-
-(0x172d+2203-0x1fc7)){return ZUFI_FAIL;}sem_init(&g_sms_sem_id,
-(0x1e7d+402-0x200f),(0x11ab+2290-0x1a9d));return ZUFI_SUCC;}void 
+T_zUfiSms_StatusInfo tStatus={(0x26a+6597-0x1c2f)};sc_cfg_set(NV_SMS_LOAD_RESULT
+,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_LOADED);tStatus.
+cmd_status=WMS_CMD_FAILED;tStatus.cmd=WMS_SMS_CMD_INIT;(void)
+zUfiSms_SetCmdStatus(&tStatus);}VOID zSms_RecvSmsInitRst(UINT8*pDatabuf){memcpy(
+&g_smsOptRsp,pDatabuf,sizeof(T_zSms_optRsp));if(g_smsOptRsp.result==
+(0x5f6+5045-0x19aa)){zSms_initAtOk();}else{zSms_initAtErr();}}UINT8 
+zSms_SmsMsgCreat(VOID){g_zSms_MsqId=msgget(MODULE_ID_SMS,IPC_CREAT|
+(0x558+3203-0x105b));if(g_zSms_MsqId==-(0x670+1765-0xd54)){return ZUFI_FAIL;}
+g_zSms_LocalMsqId=msgget(MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x57c+8680-0x25e4));if(
+g_zSms_LocalMsqId==-(0x272+2471-0xc18)){return ZUFI_FAIL;}sem_init(&g_sms_sem_id
+,(0x54a+1948-0xce6),(0x569+3722-0x13f3));return ZUFI_SUCC;}void 
 zSms_HandleAtctlLocalMsg(MSG_BUF*ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
 "\x73\x6d\x73\x20\x6c\x6f\x63\x61\x6c\x20\x72\x65\x63\x76\x20\x6d\x73\x67\x20\x63\x6d\x64\x3a\x25\x64" "\n"
 ,ptMsgBuf->usMsgCmd);switch(ptMsgBuf->usMsgCmd){case MSG_CMD_ZPBIC_IND:
@@ -351,45 +351,44 @@
 case MSG_CMD_NEWSMS_IND:case MSG_CMD_ZPBIC_IND:case MSG_CMD_ZMGL_IND:case 
 MSG_CMD_NEWSMS_STATUS_IND:ipc_send_message(MODULE_ID_SMS,MODULE_ID_SMS_LOCAL,
 ptMsgBuf->usMsgCmd,ptMsgBuf->usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,
-(0x751+4822-0x1a27));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
- clearSms[(0x1b4+6097-0x1953)]={(0xe40+4811-0x210b)};sc_cfg_get(
+(0x1f09+947-0x22bc));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
+ clearSms[(0x3f2+6740-0x1e14)]={(0x1bf+2156-0xa2b)};sc_cfg_get(
 NV_CLEAR_SMS_WHEN_RESTORE,clearSms,sizeof(clearSms));printf(
 "\x61\x74\x57\x65\x62\x5f\x52\x65\x73\x74\x6f\x72\x65\x46\x61\x63\x74\x6f\x72\x79\x53\x65\x74\x74\x69\x6e\x67\x20\x65\x6e\x74\x65\x72\x65\x64\x21\x20" "\n"
 );printf(
 "\x63\x6c\x65\x61\x72\x5f\x73\x6d\x73\x5f\x77\x68\x65\x6e\x5f\x72\x65\x73\x74\x6f\x72\x65\x3d\x25\x73\x20" "\n"
-,clearSms);if(strcmp(clearSms,"\x79\x65\x73")==(0x255+8527-0x23a4)){printf(
+,clearSms);if(strcmp(clearSms,"\x79\x65\x73")==(0xbcc+4365-0x1cd9)){printf(
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x72\x6f\x70\x41\x6c\x6c\x54\x61\x62\x6c\x65\x20\x65\x6e\x74\x65\x72\x65\x64\x21\x20" "\n"
 );zUfiSms_DropAllTable();}else{printf(
 "\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x72\x6f\x70\x41\x6c\x6c\x54\x61\x62\x6c\x65\x45\x78\x63\x65\x70\x74\x53\x6d\x73\x20\x65\x6e\x74\x65\x72\x65\x64\x21\x20" "\n"
 );zUfiSms_DropAllTableExceptSms();}ipc_send_message(MODULE_ID_SMS,
-MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,(0x31+9113-0x23ca),NULL,
-(0xf5d+5549-0x250a));}void zSms_HandleMainCtrlMsg(MSG_BUF*ptMsgBuf){assert(
+MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,(0xe0d+4554-0x1fd7),NULL,
+(0xcc6+3864-0x1bde));}void zSms_HandleMainCtrlMsg(MSG_BUF*ptMsgBuf){assert(
 ptMsgBuf!=NULL);printf(
 "\x73\x6d\x73\x20\x72\x65\x63\x76\x20\x6d\x61\x69\x6e\x20\x63\x74\x72\x6c\x20\x6d\x73\x67\x20\x63\x6d\x64\x3a\x25\x64" "\n"
 ,ptMsgBuf->usMsgCmd);switch(ptMsgBuf->usMsgCmd){case MSG_CMD_RESET_NOTIFY:
 zSms_HandleResetToFactory(ptMsgBuf->aucDataBuf);break;default:break;}}void 
-sms_msg_thread_proc(void*arg){int iRet=(0xeec+5357-0x23d9);MSG_BUF stMsg={
-(0x2075+778-0x237f)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((int
-*)arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
-(0x195c+3053-0x2549),(0xe28+1571-0x144b),(0xe51+3642-0x1c8b));while(
-(0x1274+1790-0x1971)){iRet=(0x195c+3367-0x2683);memset(&stMsg,
-(0x8b6+6586-0x2270),sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,
-(0x385+149-0x41a),(0x700+7325-0x239d));if(iRet>=(0x63d+1932-0xdc9)){switch(stMsg
-.src_id){case MODULE_ID_WEB_CGI:{zSms_HandleWebMsg(&stMsg);break;}case 
-MODULE_ID_AT_CTL:{zSms_HandleAtctlMsg(&stMsg);break;}case MODULE_ID_SMS:{
-zSms_HandleWebMsg(&stMsg);zSms_HandleAtctlLocalMsg(&stMsg);break;}case 
-MODULE_ID_MAIN_CTRL:{zSms_HandleMainCtrlMsg(&stMsg);break;}default:{break;}}}
-else{at_print(AT_DEBUG,
+sms_msg_thread_proc(void*arg){int iRet=(0x1717+3090-0x2329);MSG_BUF stMsg={
+(0x1778+1803-0x1e83)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((
+int*)arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
+(0x1f+6066-0x17d1),(0x7e4+5419-0x1d0f),(0x5ab+2631-0xff2));while(
+(0x1358+2351-0x1c86)){iRet=(0xc4d+3603-0x1a60);memset(&stMsg,(0xe4d+1160-0x12d5)
+,sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x9e6+1208-0xe9e),
+(0x1964+465-0x1b35));if(iRet>=(0xb59+450-0xd1b)){switch(stMsg.src_id){case 
+MODULE_ID_WEB_CGI:{zSms_HandleWebMsg(&stMsg);break;}case MODULE_ID_AT_CTL:{
+zSms_HandleAtctlMsg(&stMsg);break;}case MODULE_ID_SMS:{zSms_HandleWebMsg(&stMsg)
+;zSms_HandleAtctlLocalMsg(&stMsg);break;}case MODULE_ID_MAIN_CTRL:{
+zSms_HandleMainCtrlMsg(&stMsg);break;}default:{break;}}}else{at_print(AT_DEBUG,
 "\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x2c\x20\x65\x72\x72\x6d\x73\x67\x20\x3d\x20\x25\x73" "\n"
 ,errno,strerror(errno));}}}int sms_main(int argc,char*argv[]){pthread_t 
-recv_thread_tid=(0x3fd+4368-0x150d);MSG_BUF msgBuf={(0xea2+294-0xfc8)};CHAR 
-needSMS[(0xd29+4288-0x1db7)]={(0x569+4503-0x1700)};prctl(PR_SET_NAME,
-"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x96c+201-0xa35),(0x1b1+4106-0x11bb),
-(0x546+2599-0xf6d));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
-sizeof(needSMS));if((0x19ec+2329-0x2305)!=strcmp(needSMS,"\x6e\x6f")){
+recv_thread_tid=(0x14a+1601-0x78b);MSG_BUF msgBuf={(0x59+6228-0x18ad)};CHAR 
+needSMS[(0x23a+118-0x27e)]={(0x123+6660-0x1b27)};prctl(PR_SET_NAME,
+"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x1d30+859-0x208b),(0xf12+4444-0x206e),
+(0xbd+5138-0x14cf));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
+sizeof(needSMS));if((0xcdf+2112-0x151f)!=strcmp(needSMS,"\x6e\x6f")){
 zUfiSms_InitDb();zUfiSms_CfgSmsNvInit();zUfiMmi_SendSmsStatus();zSms_SmsMsgCreat
-();}else{return-(0x2014+98-0x2075);}printf(
+();}else{return-(0x680+494-0x86d);}printf(
 "\x73\x6d\x73\x20\x61\x70\x70\x20\x69\x6e\x69\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64\x2c\x20\x77\x69\x6c\x6c\x20\x74\x6f\x20\x72\x65\x63\x65\x69\x76\x65\x20\x6d\x73\x67\x2c\x20\x6d\x73\x67\x69\x64\x3a\x25\x64" "\n"
 ,g_zSms_MsqId);if(pthread_create(&recv_thread_tid,NULL,sms_msg_thread_proc,(void
-*)(&g_zSms_LocalMsqId))==-(0x21d+4775-0x14c3)){assert((0xa47+1412-0xfcb));}
-sms_msg_thread_proc(&g_zSms_MsqId);return(0x95c+7339-0x2607);}
+*)(&g_zSms_LocalMsqId))==-(0xc9+3044-0xcac)){assert((0x1443+4077-0x2430));}
+sms_msg_thread_proc(&g_zSms_MsqId);return(0x1489+57-0x14c2);}
diff --git a/ap/app/zte_comm/sms/src/sms_proc.c b/ap/app/zte_comm/sms/src/sms_proc.c
index bb24911..136a437 100755
--- a/ap/app/zte_comm/sms/src/sms_proc.c
+++ b/ap/app/zte_comm/sms/src/sms_proc.c
@@ -5,117 +5,117 @@
 T_zUfiSms_ConcatInfo g_zUfiSms_ConcatSms;T_zUfiSms_GroupInfo g_zUfiSms_GroupSms;
 T_zUfiSms_DbStoreData g_zUfiSms_DbStoreData[ZTE_WMS_CONCAT_SMS_COUNT_MAX];UINT8 
 g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_MAX]={FALSE,FALSE};T_zUfiSms_DelSms 
-g_zUfiSms_DelMsg;T_zUfiSms_DelIndexInfo g_deleteIndex={(0x15a8+2269-0x1e85)};
-T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0xcda+2527-0x16b9)};
-T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x1f4c+783-0x225b)};int 
-g_zUfiSms_UnitLen=(0xc36+5045-0x1feb);int g_zUfiSms_ConcatTotalNum=
-(0x50c+4486-0x1692);int g_zUfiSms_CurConcatSegNo=(0x1e86+363-0x1ff1);UINT8 
-g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0x937+5800-0x1fdf)
-;int g_zUfiSms_MsgRefer=(0xbdc+2142-0x143a);int g_zUfiSms_SendFailedRetry=
-(0xf6a+5496-0x24e2);char g_Zmena_value[(0x70+2802-0xb60)]={(0x251+8396-0x231d)};
-int g_displaymode=(0x43b+1258-0x925);extern SMS_LOCATION g_zUfiSms_CurLocation;
-extern T_zUfiSms_CmdStatus zUfiSms_HandleReport(unsigned char*ptPduData);extern 
-void zUfiSms_GetReportStatus(char*pdu_tmp,int*stat);extern VOID 
-zUfiSms_ResendAtCmdZmena(int cid);extern int zUfiSms_DecodeSmsData(
+g_zUfiSms_DelMsg;T_zUfiSms_DelIndexInfo g_deleteIndex={(0x3f0+3392-0x1130)};
+T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0xd87+1300-0x129b)};
+T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x1663+3980-0x25ef)};int 
+g_zUfiSms_UnitLen=(0xae2+5457-0x2033);int g_zUfiSms_ConcatTotalNum=
+(0xe07+140-0xe93);int g_zUfiSms_CurConcatSegNo=(0xd89+6332-0x2645);UINT8 
+g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0x20d+8215-0x2224)
+;int g_zUfiSms_MsgRefer=(0x12a2+3150-0x1ef0);int g_zUfiSms_SendFailedRetry=
+(0x7a9+6105-0x1f82);char g_Zmena_value[(0x15b+8730-0x2373)]={(0x1c5f+704-0x1f1f)
+};int g_displaymode=(0x1976+307-0x1aa9);extern SMS_LOCATION 
+g_zUfiSms_CurLocation;extern T_zUfiSms_CmdStatus zUfiSms_HandleReport(unsigned 
+char*ptPduData);extern void zUfiSms_GetReportStatus(char*pdu_tmp,int*stat);
+extern VOID zUfiSms_ResendAtCmdZmena(int cid);extern int zUfiSms_DecodeSmsData(
 T_zUfiSms_DbStoreData*pDb_Data,int msg_index,zUfiSms_StoreType iStorePos,
 T_SmsStatus bSms_Status,wms_message_format_enum_v01 format,long iPdu_Len,
 unsigned char*pPdu_Received);typedef struct{long mtype;char mtext[
-(0x218a+1177-0x2617)];}FOTA_MSG_BUF;
-#define WEBUI_NOTIFY_PUSH_MSG_  (0xe59+1776-0x1546)

+(0x1d48+1094-0x2182)];}FOTA_MSG_BUF;
+#define WEBUI_NOTIFY_PUSH_MSG_  (0x569+6236-0x1dc2)

 typedef struct{unsigned int isread_record;unsigned int inbox_full;}
 T_zUfiMmi_SmsRecord;void zUfiMmi_SendSmsStatus(void){int iSmsNum=
-(0x550+4425-0x1699);T_zUfiMmi_SmsRecord tRecord={(0x499+4107-0x14a4)};CHAR 
-smsNum[(0x14e2+3185-0x2121)]={(0x986+622-0xbf4)};sc_cfg_get(NV_SMS_IN_NUM,smsNum
-,sizeof(smsNum));iSmsNum=atoi(smsNum);tRecord.isread_record=zUfiSms_IsUnreadSms(
+(0x847+7838-0x26e5);T_zUfiMmi_SmsRecord tRecord={(0xc16+5786-0x22b0)};CHAR 
+smsNum[(0x5d+1268-0x51f)]={(0xadd+2940-0x1659)};sc_cfg_get(NV_SMS_IN_NUM,smsNum,
+sizeof(smsNum));iSmsNum=atoi(smsNum);tRecord.isread_record=zUfiSms_IsUnreadSms(
 ZTE_WMS_MEMORY_MAX);if(iSmsNum>=ZSMS_NUM_MAX_CPE){tRecord.inbox_full=
-(0x1f81+1038-0x238e);}else{tRecord.inbox_full=(0xe4f+2626-0x1891);}}VOID 
+(0x2477+299-0x25a1);}else{tRecord.inbox_full=(0x19e6+1524-0x1fda);}}VOID 
 zUfiSms_Init(VOID){zUfiSms_CfgInit();zUfiSms_ChangeMainState(SMS_STATE_INITING);
-}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0xfac+4836-0x2290);
-T_zUfiSms_StatusInfo tStatus={(0x93f+5575-0x1f06)};CHAR outDate[
-(0x142f+3957-0x2372)]={(0xcb7+5361-0x21a8)};zUfiSms_Init();zUfiSms_InitCmdStatus
-(&tStatus,WMS_SMS_CMD_INIT);zSms_SendSmsInitReq();at_print(LOG_DEBUG,
+}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0xcb+6468-0x1a0f);
+T_zUfiSms_StatusInfo tStatus={(0x1b27+2799-0x2616)};CHAR outDate[
+(0xaf9+1505-0x10a8)]={(0x74a+3038-0x1328)};zUfiSms_Init();zUfiSms_InitCmdStatus(
+&tStatus,WMS_SMS_CMD_INIT);zSms_SendSmsInitReq();at_print(LOG_DEBUG,
 "corem zSvr_Zpbic_Sms_Init has send init req\n");zSms_SendZmenaReq(
-(0x20b1+1453-0x265e));at_print(LOG_DEBUG,
+(0x291+7391-0x1f70));at_print(LOG_DEBUG,
 "\x63\x6f\x72\x65\x6d\x20\x7a\x53\x76\x72\x5f\x5a\x70\x62\x69\x63\x5f\x53\x6d\x73\x5f\x49\x6e\x69\x74\x20\x68\x61\x73\x20\x73\x65\x6e\x64\x20\x7a\x6d\x65\x6e\x61\x20\x72\x65\x71" "\n"
 );sc_cfg_get(NV_OUTDATE_DELETE,outDate,sizeof(outDate));at_print(LOG_DEBUG,
 "\x63\x6f\x72\x65\x6d\x20\x7a\x53\x76\x72\x5f\x5a\x70\x62\x69\x63\x5f\x53\x6d\x73\x5f\x49\x6e\x69\x74\x20\x6f\x75\x74\x64\x61\x74\x65\x20\x63\x68\x65\x63\x6b\x20\x25\x73" "\n"
-,outDate);if((0x12cf+3954-0x2241)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck
-(ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
-#if (0x5bf+1071-0x9ee)

-VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x8b8+6461-0x21c3)]={
-(0x544+5014-0x18da)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
-g_Zmena_rsp&&((0xef2+1117-0x134f)!=strcmp(
-"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0xea5+3293-0x1b82)!=strcmp
+,outDate);if((0x180c+927-0x1bab)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck(
+ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
+#if (0x130d+2932-0x1e81)

+VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0xb7c+6297-0x23e3)]={
+(0x945+1583-0xf74)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
+g_Zmena_rsp&&((0x1a09+2079-0x2228)!=strcmp(
+"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0xad9+1500-0x10b5)!=strcmp
 ("\x4c\x69\x6d\x69\x74\x65\x64\x20\x53\x65\x72\x76\x69\x63\x65",netType))){
 atUnsoli_Report_Zmena(NULL,cid);}}
 #endif

 void zUfiSms_Ack_new_msg(BOOL needAck){
-#if (0x963+4837-0x1c48)

-CHAR ackPduStr[(0x99d+6573-0x21ba)]={(0x95d+2165-0x11d2)};SMS_PARAM reportParam=
-{(0x11a5+1685-0x183a)};int total_length=(0x1eb6+1219-0x2379);UINT8 TP_FCS=
-(0x1f7+3311-0xee6);CHAR strValue[(0x6d9+2416-0x1047)]={(0x60c+7353-0x22c5)};if(
-needAck){TP_FCS=(0xb67+6552-0x24ff);sprintf(strValue,"\x25\x64",
-(0x1745+1730-0x1e06));}else{TP_FCS=(0x1234+2016-0x1941);sprintf(strValue,
-"\x25\x64",(0x1b64+1622-0x21b8));}sprintf(reportParam.SCA,"\x25\x73",cfg_get(
+#if (0x1b4+328-0x2fc)

+CHAR ackPduStr[(0x6e7+2506-0xf21)]={(0x1fc5+1471-0x2584)};SMS_PARAM reportParam=
+{(0x1d17+1124-0x217b)};int total_length=(0x1825+3324-0x2521);UINT8 TP_FCS=
+(0x7a6+3487-0x1545);CHAR strValue[(0x50f+2509-0xeda)]={(0xb89+63-0xbc8)};if(
+needAck){TP_FCS=(0x1e4d+1311-0x236c);sprintf(strValue,"\x25\x64",
+(0x62b+5846-0x1d00));}else{TP_FCS=(0x18ea+762-0x1b11);sprintf(strValue,
+"\x25\x64",(0x141c+1738-0x1ae4));}sprintf(reportParam.SCA,"\x25\x73",cfg_get(
 "\x73\x6d\x73\x5f\x63\x65\x6e\x74\x65\x72\x5f\x6e\x75\x6d"));total_length=
 zUfiSms_EncodePdu_DeliverReport(&reportParam,ackPduStr,TP_FCS);memset(&
-g_zUfiSms_ackPdu,(0x9b6+7392-0x2696),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu.
+g_zUfiSms_ackPdu,(0x4a+1073-0x47b),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu.
 length=String2Bytes(ackPduStr,g_zUfiSms_ackPdu.pdu,strlen(ackPduStr));memset(
-g_zUfiSms_ackPdu.pdu,(0x1228+2492-0x1be4),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
+g_zUfiSms_ackPdu.pdu,(0x21c+7679-0x201b),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
 g_zUfiSms_ackPdu.pdu,&ackPduStr,sizeof(ackPduStr));atBase_SendMsgToSelf(
 ZAT_CNMA_CMD,strValue,sizeof(strValue));
 #endif

-#if (0x1017+4813-0x22e4)
-CHAR strValue[(0x9f5+4020-0x19a7)]={(0x19e0+1351-0x1f27)};if(needAck){snprintf(
-strValue,sizeof(strValue),"\x25\x64",(0x3c0+1546-0x9c9));}else{snprintf(strValue
-,sizeof(strValue),"\x25\x64",(0x17+3958-0xf8b));}zSvr_InnerSendMsg(
+#if (0x1c18+2349-0x2545)
+CHAR strValue[(0x6f6+7276-0x2360)]={(0x2a5+3460-0x1029)};if(needAck){snprintf(
+strValue,sizeof(strValue),"\x25\x64",(0x2f6+3963-0x1270));}else{snprintf(
+strValue,sizeof(strValue),"\x25\x64",(0xc55+5305-0x210c));}zSvr_InnerSendMsg(
 ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,MSG_CMD_AT_CNMA,strlen(strValue
 ),strValue);
 #endif

-if(needAck){zSms_SendCnmaReq((0xfd4+589-0x1220));}else{zSms_SendCnmaReq(
-(0x1f+4750-0x12ab));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq*
-ptSendMsg){if(NULL==ptSendMsg||(0xed9+3193-0x1b52)==ptSendMsg->receiver_count){
+if(needAck){zSms_SendCnmaReq((0x1ff1+929-0x2391));}else{zSms_SendCnmaReq(
+(0xb68+205-0xc33));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq*
+ptSendMsg){if(NULL==ptSendMsg||(0x55a+7704-0x2372)==ptSendMsg->receiver_count){
 return WMS_CMD_FAILED;}at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x52\x61\x77\x53\x6d\x73\x20\x72\x65\x63\x65\x69\x76\x65\x72\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x64\x65\x73\x74\x5f\x6e\x75\x6d\x3a\x25\x73\x2f\x6d\x73\x67\x5f\x6c\x65\x6e\x3a\x25\x64\x2f\x69\x64\x3a\x25\x64\x2e" "\n"
-,ptSendMsg->receiver_count,ptSendMsg->dest_num[(0x14f4+3917-0x2441)],ptSendMsg->
+,ptSendMsg->receiver_count,ptSendMsg->dest_num[(0x555+5439-0x1a94)],ptSendMsg->
 msg_len,ptSendMsg->id);
-#if (0x9a0+3743-0x183e)
+#if (0x321+1164-0x7ac)
 at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x52\x61\x77\x53\x6d\x73\x20\x64\x63\x73\x3a\x25\x64" "\n"
 ,ptSendMsg->dcs);
 #endif

-sc_cfg_set(NV_SMS_SEND_RESULT,"");g_zUfiSms_SendFailedCount=(0x1382+3030-0x1f58)
-;if(ptSendMsg->isDelete==TRUE||-(0x2246+981-0x261a)!=ptSendMsg->id){(void)
+sc_cfg_set(NV_SMS_SEND_RESULT,"");g_zUfiSms_SendFailedCount=(0x11e9+697-0x14a2);
+if(ptSendMsg->isDelete==TRUE||-(0x181b+2903-0x2371)!=ptSendMsg->id){(void)
 zUfiSms_DeleteDraftSms(ptSendMsg->id);}zUfiSms_SetGlobalDcsLang(ptSendMsg->dcs);
-memset(&g_zUfiSms_GroupSms,(0x1fb1+1584-0x25e1),sizeof(g_zUfiSms_GroupSms));if(
+memset(&g_zUfiSms_GroupSms,(0x3c9+746-0x6b3),sizeof(g_zUfiSms_GroupSms));if(
 ZUFI_FAIL==zUfiSms_FillGroupSms(ptSendMsg,&g_zUfiSms_GroupSms)){return 
-WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x8e8+1201-0xd99),sizeof(
+WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x1bf1+1343-0x2130),sizeof(
 g_zUfiSms_ConcatSms));g_zUfiSms_UnitLen=zUfiSms_FillConcatSms(ptSendMsg,&
 g_zUfiSms_ConcatSms);g_zUfiSms_IsConcatSendSuc=TRUE;g_zUfiSms_CurConcatSegNo=
-(0x753+2376-0x109b);memset(g_zUfiSms_DbStoreData,(0xde2+5783-0x2479),sizeof(
-g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x108b+3831-0x1f78)){
-g_displaymode=(0x6dc+1887-0xe3a);at_print(LOG_DEBUG,
+(0x1925+2507-0x22f0);memset(g_zUfiSms_DbStoreData,(0x2d6+3608-0x10ee),sizeof(
+g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x9ba+7133-0x258d)){
+g_displaymode=(0x1cc+9152-0x258b);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x3a\x20\x6d\x73\x67\x5f\x64\x69\x73\x70\x6c\x61\x79\x6d\x6f\x64\x65\x20\x3d\x20\x31" "\n"
-);}else{g_displaymode=(0xe80+759-0x1177);at_print(LOG_DEBUG,
+);}else{g_displaymode=(0xb13+671-0xdb2);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x53\x6d\x73\x3a\x20\x6d\x73\x67\x5f\x64\x69\x73\x70\x6c\x61\x79\x6d\x6f\x64\x65\x20\x3d\x20\x30" "\n"
 );}return zUfiSms_SendSms();}T_zUfiSms_CmdStatus zUfiSms_WriteRawSms(
 T_zUfiSms_SaveReq*pSaveBuff){T_zUfiSms_ConcatInfo tConcatSms;T_zUfiSms_GroupInfo
- tGroupSms;int iSmsLen=(0xe17+990-0x11f5);T_zUfiSms_CmdStatus result=
+ tGroupSms;int iSmsLen=(0xacd+115-0xb40);T_zUfiSms_CmdStatus result=
 WMS_CMD_SUCCESS;if(NULL==pSaveBuff){return WMS_CMD_FAILED;}if(
 g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x6e\x76\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x66\x75\x6c\x6c\x2c\x72\x65\x74\x75\x72\x6e" "\n"
 );return WMS_CMD_FAILED;}if(pSaveBuff->isDelete==TRUE){(void)
 zUfiSms_DeleteDraftSms(pSaveBuff->id);}zUfiSms_SetGlobalDcsLang(pSaveBuff->dcs);
-memset(&tConcatSms,(0x1ad5+1282-0x1fd7),sizeof(T_zUfiSms_ConcatInfo));memset(&
-tGroupSms,(0xadc+97-0xb3d),sizeof(T_zUfiSms_GroupInfo));(void)
+memset(&tConcatSms,(0xb08+909-0xe95),sizeof(T_zUfiSms_ConcatInfo));memset(&
+tGroupSms,(0x19ac+197-0x1a71),sizeof(T_zUfiSms_GroupInfo));(void)
 zUfiSms_FillGroupSms(pSaveBuff,&tGroupSms);iSmsLen=zUfiSms_FillConcatSms(
 pSaveBuff,&tConcatSms);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x74\x6f\x74\x61\x6c\x5f\x72\x65\x63\x65\x69\x76\x65\x72\x3d\x25\x64\x2c\x69\x53\x6d\x73\x4c\x65\x6e\x3d\x25\x64" "\n"
 ,tGroupSms.total_receiver,iSmsLen);for(tGroupSms.current_receiver=
-(0x112+1965-0x8bf);tGroupSms.current_receiver<tGroupSms.total_receiver;tGroupSms
-.current_receiver++){tConcatSms.current_sending=(0x21a+4596-0x140e);result=
-zUfiSms_SaveSmsToDb(pSaveBuff,&tConcatSms,&tGroupSms,iSmsLen);at_print(LOG_DEBUG
-,
+(0x3e9+4466-0x155b);tGroupSms.current_receiver<tGroupSms.total_receiver;
+tGroupSms.current_receiver++){tConcatSms.current_sending=(0x6cd+984-0xaa5);
+result=zUfiSms_SaveSmsToDb(pSaveBuff,&tConcatSms,&tGroupSms,iSmsLen);at_print(
+LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x57\x72\x69\x74\x65\x52\x61\x77\x53\x6d\x73\x20\x63\x75\x72\x72\x65\x6e\x74\x5f\x72\x65\x63\x65\x69\x76\x65\x72\x3d\x25\x64\x2c\x72\x65\x73\x75\x6c\x74\x3d\x25\x64" "\n"
 ,tGroupSms.current_receiver,result);}sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");
 zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);if(g_zUfiSms_MemFullFlag[
@@ -127,16 +127,16 @@
 memoryFullbeforeDelete=FALSE;BOOL unreadBeforeDelete=FALSE;if(NULL==ptDelBuff){
 return WMS_CMD_FAILED;}at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x21\x21\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x69\x64\x5b\x25\x64\x5d\x2e" "\n"
-,ptDelBuff->all_or_count,ptDelBuff->id[(0x19fa+498-0x1bec)]);(void)
+,ptDelBuff->all_or_count,ptDelBuff->id[(0x19ba+2939-0x2535)]);(void)
 zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(
-SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x163d+899-0x19c0),sizeof(
+SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x2ba+6864-0x1d8a),sizeof(
 T_zUfiSms_DelSms));if(ZUFI_FAIL==zUfiSms_SetDeleteInfo(ptDelBuff)){at_print(
 LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x44\x65\x6c\x65\x74\x65\x49\x6e\x66\x6f\x20\x66\x61\x69\x6c\x2e" "\n"
 );zUfiSms_ChangeMainState(SMS_STATE_DELED);return WMS_CMD_FAILED;}at_print(
 LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x44\x65\x6c\x65\x74\x65\x49\x6e\x66\x6f\x20\x52\x65\x61\x64\x20\x74\x6f\x20\x44\x65\x6c\x65\x74\x65\x3a\x6e\x76\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2f\x73\x69\x6d\x5f\x63\x6f\x75\x6e\x74\x3a\x25\x64\x2e" "\n"
-,g_zUfiSms_DelMsg.nv_count,g_zUfiSms_DelMsg.sim_count);if((0xac7+2683-0x1542)<
+,g_zUfiSms_DelMsg.nv_count,g_zUfiSms_DelMsg.sim_count);if((0x7da+449-0x99b)<
 g_zUfiSms_DelMsg.nv_count){if(g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]){
 memoryFullbeforeDelete=TRUE;}unreadBeforeDelete=zUfiSms_IsUnreadSms(
 ZTE_WMS_MEMORY_NV);result=(T_zUfiSms_CmdStatus)zUfiSms_DeleteNvSms();(void)
@@ -147,114 +147,113 @@
 memoryFullbeforeDelete&&!g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]){
 at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x20\x73\x65\x6e\x64\x20\x41\x54\x2b\x5a\x4d\x45\x4e\x41\x3d\x30" "\n"
-);zSms_SendZmenaReq((0x3ea+1063-0x811));}if(memoryFullbeforeDelete&&!
+);zSms_SendZmenaReq((0xfbf+2788-0x1aa3));}if(memoryFullbeforeDelete&&!
 g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]||unreadBeforeDelete&&!
 zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){zUfiSms_SendSmsStatusInfo(
-MSG_SMS_DEFAULT);}}if((0x1061+2882-0x1ba3)<g_zUfiSms_DelMsg.sim_count){result=
+MSG_SMS_DEFAULT);}}if((0xbf3+657-0xe84)<g_zUfiSms_DelMsg.sim_count){result=
 zUfiSms_DeleteSimSms();(void)zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_SIM);}
 at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x6d\x73\x20\x72\x65\x73\x75\x6c\x74\x3d\x25\x64" "\n"
 ,result);return result;}T_zUfiSms_CmdStatus zUfiSms_ModifySmsTag(
-T_zUfiSms_ModifyFlag*ptModifyBuff){unsigned long i=(0x56+3689-0xebf);
-T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0xb20+96-0xb4e)]={
-(0x13c9+3793-0x229a)};if(NULL==ptModifyBuff){at_print(LOG_ERR,
+T_zUfiSms_ModifyFlag*ptModifyBuff){unsigned long i=(0x12b7+4549-0x247c);
+T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0x52b+1268-0x9ed)]={
+(0x748+2376-0x1090)};if(NULL==ptModifyBuff){at_print(LOG_ERR,
 "\x69\x6e\x70\x75\x74\x73\x20\x69\x73\x20\x6e\x75\x6c\x6c\x2e");return 
-WMS_CMD_FAILED;}for(i=(0x14f9+3442-0x226b);i<ptModifyBuff->total_id;i++){if(
-ptModifyBuff->id[i]<(0x14e4+942-0x1891)||ZUFI_FAIL==zUfiSms_UpdateSmsTagInDb(
+WMS_CMD_FAILED;}for(i=(0x21d+6426-0x1b37);i<ptModifyBuff->total_id;i++){if(
+ptModifyBuff->id[i]<(0x1257+684-0x1502)||ZUFI_FAIL==zUfiSms_UpdateSmsTagInDb(
 ptModifyBuff->id[i],ptModifyBuff->tags)){result=WMS_CMD_FAILED;}else{result=
 WMS_CMD_SUCCESS;}}if(ZUFI_FAIL==zUfiSms_GetStorePosById(
 "\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65",acStorePos,sizeof(acStorePos),
-ptModifyBuff->id[(0x132+4592-0x1322)])){return ZUFI_FAIL;}if((0x8f1+5613-0x1ede)
+ptModifyBuff->id[(0x642+6054-0x1de8)])){return ZUFI_FAIL;}if((0xf1a+4866-0x221c)
 ==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){zUfiSms_SendSmsStatusInfo(
-MSG_SMS_READING);}if((0x1239+833-0x157a)==strcmp(acStorePos,ZTE_WMS_DB_SIM_TABLE
-)&&ptModifyBuff->total_id>(0x2f7+4349-0x13f4)){zUfiSms_ModifyModemSms(
-ptModifyBuff);}return result;}T_zUfiSms_CmdStatus zUfiSms_SetSmsPara(
-T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0x36a+5228-0x17d6);CHAR sca[
-ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x49d+5931-0x1bc7)]={(0x44d+6588-0x1e09)};CHAR 
-store[(0xbfc+1055-0x1007)]={(0x3b9+8430-0x24a7)};CHAR defaultStore[
-(0xde4+963-0x1175)]={(0x17eb+1441-0x1d8c)};if(ptParaBuff==ZUFI_NULL){return 
-WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x44+3416-0xd9c)){strncpy(sca,
-ptParaBuff->sca,sizeof(sca)-(0x12c6+1063-0x16ec));at_print(LOG_DEBUG,
+MSG_SMS_READING);}if((0x1f1+1315-0x714)==strcmp(acStorePos,ZTE_WMS_DB_SIM_TABLE)
+&&ptModifyBuff->total_id>(0x983+641-0xc04)){zUfiSms_ModifyModemSms(ptModifyBuff)
+;}return result;}T_zUfiSms_CmdStatus zUfiSms_SetSmsPara(T_zUfiSms_ParaInfo*
+ptParaBuff){int atRes=(0x8a3+1430-0xe39);CHAR sca[ZTE_WMS_ADDRESS_DIGIT_MAX_V01+
+(0x41f+8611-0x25c1)]={(0x6b4+2788-0x1198)};CHAR store[(0x530+4331-0x1607)]={
+(0x17dd+112-0x184d)};CHAR defaultStore[(0x9ba+4506-0x1b22)]={(0x445+2988-0xff1)}
+;if(ptParaBuff==ZUFI_NULL){return WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=
+(0x59f+6378-0x1e89)){strncpy(sca,ptParaBuff->sca,sizeof(sca)-
+(0x1713+2801-0x2203));at_print(LOG_DEBUG,
 "\x73\x65\x6e\x64\x20\x5a\x41\x54\x5f\x43\x53\x43\x41\x5f\x53\x45\x54\x5f\x43\x4d\x44\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x63\x73\x63\x61\x20\x69\x73\x20\x25\x73\x2e" "\n"
 ,sca);atRes=zSms_SetCscaReq(ptParaBuff->sca);if(atRes!=ZSMS_RESULT_OK){return 
 WMS_CMD_FAILED;}}sc_cfg_get(NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));
-if((*(ptParaBuff->default_store)!='\0')&&((0xbb9+4931-0x1efc)!=strcmp(
+if((*(ptParaBuff->default_store)!='\0')&&((0xc30+2072-0x1448)!=strcmp(
 defaultStore,ptParaBuff->default_store))){{strncpy(store,ptParaBuff->
-default_store,sizeof(store)-(0x7a4+6822-0x2249));}atRes=zSms_SendCnmiReq(store);
-if(atRes!=ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x224+5505-0x17a4)==
+default_store,sizeof(store)-(0x5db+1883-0xd35));}atRes=zSms_SendCnmiReq(store);
+if(atRes!=ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x229+3010-0xdea)==
 zUfiSms_SetDbParameters(ptParaBuff)){at_print(LOG_ERR,
 "\x73\x65\x74\x20\x70\x61\x72\x61\x6d\x65\x74\x65\x72\x73\x20\x74\x6f\x20\x74\x61\x62\x6c\x65\x20\x66\x61\x69\x6c\x65\x64\x2e"
 );return WMS_CMD_FAILED;}return WMS_CMD_SUCCESS;}void zUfiSms_CmgrNvSet(void){
-char sms_rec_flag[(0x60f+1388-0xb76)]={(0x2cf+184-0x387)};char remind_flag[
-(0x10+936-0x3b3)];int sms_count=(0x1cac+2141-0x2509);int remind_count=
-(0x1860+1862-0x1fa6);memset(sms_rec_flag,(0x2041+1733-0x2706),sizeof(
-sms_rec_flag));sc_cfg_get(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag,sizeof(
-sms_rec_flag));sms_count=atoi(sms_rec_flag);if(sms_count<(0x16df+1217-0x1ba0)||
-sms_count>INT_MAX-(0xcd6+4240-0x1d65)){at_print(LOG_ERR,
+char sms_rec_flag[(0xe0b+6038-0x259c)]={(0x63b+3158-0x1291)};char remind_flag[
+(0x892+1382-0xdf3)];int sms_count=(0x875+7296-0x24f5);int remind_count=
+(0x863+7559-0x25ea);memset(sms_rec_flag,(0x945+5697-0x1f86),sizeof(sms_rec_flag)
+);sc_cfg_get(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag,sizeof(sms_rec_flag));
+sms_count=atoi(sms_rec_flag);if(sms_count<(0x1654+4230-0x26da)||sms_count>
+INT_MAX-(0xea+5610-0x16d3)){at_print(LOG_ERR,
 "\x5b\x53\x4d\x53\x5d\x73\x6d\x73\x5f\x63\x6f\x75\x6e\x74\x20\x65\x72\x72\x3a\x25\x64" "\n"
-,sms_count);return;}memset(sms_rec_flag,(0x198a+2175-0x2209),sizeof(sms_rec_flag
+,sms_count);return;}memset(sms_rec_flag,(0x12d2+2751-0x1d91),sizeof(sms_rec_flag
 ));snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+
-(0xa8f+5255-0x1f15));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
+(0x114+6905-0x1c0c));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
 sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED_LED,sms_rec_flag);memset(remind_flag,
-(0x396+543-0x5b5),sizeof(remind_flag));snprintf(remind_flag,sizeof(remind_flag),
-"\x25\x64",remind_count+(0x1b58+758-0x1e4d));sc_cfg_set(
+(0x93d+804-0xc61),sizeof(remind_flag));snprintf(remind_flag,sizeof(remind_flag),
+"\x25\x64",remind_count+(0x46+4975-0x13b4));sc_cfg_set(
 ZTE_WMS_NVCONFIG_RECEVIED_REMIND,remind_flag);sc_cfg_set(NV_SMS_RECV_RESULT,
 "\x6f\x6b");sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");}void zUfiSms_CdsRespProc(
 T_zSms_SmsInd*ptRespData){unsigned char acFormatPdu[ZSMS_PDU_SIZE]={
-(0x684+3365-0x13a9)};T_zUfiSms_DbStoreData tDbStoreData={(0x3ea+7818-0x2274)};
-int isPushSms=(0x10ca+991-0x14a9);if(strcmp(ptRespData->pdu,"")==
-(0xc09+3585-0x1a0a)){CHAR srState[(0xd51+5333-0x21f4)]={(0x3ca+6519-0x1d41)};
-sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x134+5494-0x16aa)!=strcmp(
+(0xa02+1985-0x11c3)};T_zUfiSms_DbStoreData tDbStoreData={(0x3da+8960-0x26da)};
+int isPushSms=(0x10c8+2879-0x1c07);if(strcmp(ptRespData->pdu,"")==
+(0x1e6f+871-0x21d6)){CHAR srState[(0x1585+1627-0x1bae)]={(0xacf+2084-0x12f3)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x169a+3551-0x2479)!=strcmp(
 srState,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
 NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
 ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
 return;}zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)
 String2Bytes(ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if(
-(0x17cf+2590-0x21e8)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
+(0x549+3899-0x147f)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
 sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");
 zUfiSms_Ack_new_msg(TRUE);return;}return;}int zUfiSms_CheckIfWholeSms(
 T_zUfiSms_DbStoreData*data,SMS_MSG_INFO*pmsg){if(data->concat_sms!=
-(0x10d8+3917-0x2024)){return(0xf8a+2235-0x1845);}zUfiSms_GetCurrentRecvTotalSeq(
+(0xed4+3109-0x1af8)){return(0xefa+1668-0x157e);}zUfiSms_GetCurrentRecvTotalSeq(
 data,pmsg);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x68\x65\x63\x6b\x49\x66\x57\x68\x6f\x6c\x65\x53\x6d\x73\x20\x69\x64\x20\x3d\x20\x25\x73\x2c\x20\x74\x6f\x74\x61\x6c\x53\x65\x71\x20\x3d\x20\x25\x64\x2c\x72\x65\x66\x20\x3d\x25\x64\x2c\x74\x6f\x74\x61\x6c\x20\x3d\x25\x64\x2c\x20\x73\x65\x71\x3d\x25\x64" "\n"
-,pmsg->id,atoi(pmsg->total_seq),data->concat_info[(0x204+8206-0x2212)],data->
-concat_info[(0x82c+5955-0x1f6e)],data->concat_info[(0x1cb9+2496-0x2677)]);if(
-data->concat_info[(0xcd+7734-0x1f02)]==atoi(pmsg->total_seq)){return
-(0x762+6274-0x1fe4);}return-(0xcb6+6520-0x262d);}void 
-zUfiSms_TrafficChangeSmsTag(T_zUfiSms_DbStoreData*data){CHAR smsNumber[
-(0x14f9+2760-0x1f8f)]={(0x1734+1745-0x1e05)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
-smsNumber,sizeof(smsNumber));if((0x13f1+1880-0x1b49)==strcmp(smsNumber,data->
-number)){data->tag=WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=
-(0xdc1+4429-0x1f0d);}}void zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data){
-int iSmsId=(0x157d+2194-0x1e0f);SMS_MSG_INFO msg={(0x1e38+2158-0x26a6)};CHAR 
-smsNumber[(0x1347+2464-0x1cb5)]={(0x2c7+7186-0x1ed9)};sc_cfg_get(
-NV_TRAFFIC_SMS_NUMBER,smsNumber,sizeof(smsNumber));at_print(LOG_DEBUG,
+,pmsg->id,atoi(pmsg->total_seq),data->concat_info[(0xc8+3214-0xd56)],data->
+concat_info[(0x60c+142-0x699)],data->concat_info[(0x6c4+5587-0x1c95)]);if(data->
+concat_info[(0xfb+8139-0x20c5)]==atoi(pmsg->total_seq)){return(0xd1+5618-0x16c3)
+;}return-(0xae6+233-0xbce);}void zUfiSms_TrafficChangeSmsTag(
+T_zUfiSms_DbStoreData*data){CHAR smsNumber[(0x1268+428-0x13e2)]={
+(0x19f7+18-0x1a09)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,smsNumber,sizeof(smsNumber)
+);if((0xe19+588-0x1065)==strcmp(smsNumber,data->number)){data->tag=
+WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=(0x400+404-0x593);}}void 
+zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data){int iSmsId=
+(0x3b0+5566-0x196e);SMS_MSG_INFO msg={(0x128+4280-0x11e0)};CHAR smsNumber[
+(0x1f44+1776-0x2602)]={(0x43f+6110-0x1c1d)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
+smsNumber,sizeof(smsNumber));at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x74\x44\x62\x53\x74\x6f\x72\x65\x44\x61\x74\x61\x2e\x6e\x75\x6d\x62\x65\x72\x20\x3d\x20\x25\x73\x2c\x20\x74\x72\x61\x66\x66\x69\x63\x5f\x73\x6d\x73\x5f\x6e\x75\x6d\x62\x65\x72\x20\x3d\x20\x25\x73" "\n"
-,data->number,smsNumber);if((0x11b9+2299-0x1ab4)==strcmp(smsNumber,data->number)
-){if((0x1844+1189-0x1ce9)!=zUfiSms_CheckIfWholeSms(data,&msg)){at_print(
-LOG_DEBUG,
+,data->number,smsNumber);if((0x2bf+2942-0xe3d)==strcmp(smsNumber,data->number)){
+if((0xe78+3306-0x1b62)!=zUfiSms_CheckIfWholeSms(data,&msg)){at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x2c\x20\x72\x65\x63\x76\x20\x73\x6d\x73\x2c\x20\x62\x75\x74\x20\x6e\x6f\x74\x20\x77\x68\x6f\x6c\x65\x20\x73\x6d\x73\x2c\x20\x77\x61\x69\x74\x20\x74\x6f\x20\x72\x65\x63\x76\x20\x6e\x65\x78\x74\x20\x73\x65\x67" "\n"
 );return;}sc_cfg_set(NV_TRAFFIC_RECV_SMS_ID,msg.id);sc_cfg_set(
 NV_TRAFFIC_SMS_NUMBER,"\x30");at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x5b\x74\x72\x61\x66\x66\x69\x63\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x48\x61\x6e\x64\x6c\x65\x54\x72\x61\x66\x66\x69\x63\x53\x6d\x73\x20\x20\x20\x74\x72\x61\x66\x66\x69\x63\x5f\x72\x65\x63\x76\x5f\x73\x6d\x73\x5f\x69\x64\x20\x3d\x20\x25\x73" "\n"
 ,msg.id);}}void zUfiSms_CmtRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType 
 iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={
-(0x1151+1196-0x15fd)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x55+8248-0x208d);SMS_PARAM one_sms={(0x11e3+1995-0x19ae)};int 
-unread_sms_before_recv_new_sms=(0x634+6230-0x1e8a);memset(&tDbStoreData,
-(0x6db+1946-0xe75),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x543+1630-0xba1)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x86f+2852-0x1393);SMS_PARAM one_sms={(0x128d+3142-0x1ed3)};int 
+unread_sms_before_recv_new_sms=(0x1e42+41-0x1e6b);memset(&tDbStoreData,
+(0x16e8+2194-0x1f7a),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n"
 ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu);if(
-strcmp(ptRespData->pdu,"")==(0x1b82+1538-0x2184)){CHAR srState[
-(0x1b30+1516-0x20ea)]={(0xa82+1897-0x11eb)};sc_cfg_get(NV_SR_STATE,srState,
-sizeof(srState));if((0x1b4+3928-0x110c)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0x406+1803-0xb11)){CHAR srState[(0x749+109-0x784)]=
+{(0x38b+8245-0x23c0)};sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if(
+(0x1f4+112-0x264)!=strcmp(srState,
 "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
 NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
 ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
 return;}isPushSms=DecodePushPdu(ptRespData->pdu,&one_sms);at_print(LOG_DEBUG,
 "\x5b\x73\x6d\x73\x5d\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x20\x25\x64" "\n"
 ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD,
-strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x59c+2284-0xe88));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x122+2008-0x8fa));}if(
 SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG,
 "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n"
 ,one_sms.index);at_print(LOG_DEBUG,
@@ -266,32 +265,32 @@
 ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);
 zUfiSms_Ack_new_msg(TRUE);return;}zUfiSms_GetReportStatus(ptRespData->pdu,&
 ptRespData->stat);(void)String2Bytes(ptRespData->pdu,acFormatPdu,(int)strlen(
-ptRespData->pdu));if((0x1cbf+2432-0x263a)==ptRespData->stat){(void)
+ptRespData->pdu));if((0x16d9+439-0x188b)==ptRespData->stat){(void)
 zUfiSms_HandleReport(acFormatPdu);sc_cfg_set(NV_SR_STATE,
 "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");zUfiSms_Ack_new_msg(TRUE);return
 ;}(void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,(
 T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length,
 acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos=
 WMS_STORAGE_TYPE_UIM_V01;}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){
-unread_sms_before_recv_new_sms=(0x50f+5915-0x1c29);}else{
-unread_sms_before_recv_new_sms=(0x16a4+3215-0x2333);}zUfiSms_TrafficChangeSmsTag
-(&tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,
-iStorePos,-(0x1c47+366-0x1db4))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
-(0xa5+7785-0x1f0d));return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){
+unread_sms_before_recv_new_sms=(0x5f+6135-0x1855);}else{
+unread_sms_before_recv_new_sms=(0x8f8+2067-0x110b);}zUfiSms_TrafficChangeSmsTag(
+&tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,
+iStorePos,-(0xe95+3560-0x1c7c))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
+(0x31+9389-0x24dd));return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){
 zUfiSms_Ack_new_msg(TRUE);}zUfiSms_CmgrNvSet();zUfiSms_CheckMemoryFull(
 ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(SMS_STATE_RECVED);
 zUfiSms_SendSmsStatusInfo(MSG_SMS_NEW);zUfiSms_HandleTrafficSms(&tDbStoreData);
 return;}void zUfiSms_ZmgrRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType 
 iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={
-(0xe0c+5082-0x21e6)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0xaa1+2194-0x1333);SMS_PARAM one_sms={(0xcf6+4400-0x1e26)};CHAR defaultStore[
-(0xe69+584-0x107f)]={(0x14f9+293-0x161e)};memset(&tDbStoreData,
-(0x4fc+8193-0x24fd),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x1161+2004-0x1935)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x16d2+199-0x1799);SMS_PARAM one_sms={(0x12d8+3665-0x2129)};CHAR defaultStore[
+(0xa42+3357-0x172d)]={(0xc86+6146-0x2488)};memset(&tDbStoreData,
+(0x1861+3361-0x2582),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n"
 ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu);if(
-strcmp(ptRespData->pdu,"")==(0x465+2103-0xc9c)){CHAR srState[(0x56a+4029-0x14f5)
-]={(0x94f+3895-0x1886)};sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if(
-(0x1713+155-0x17ae)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0xe9a+4691-0x20ed)){CHAR srState[
+(0x470+6792-0x1ec6)]={(0x2fc+6870-0x1dd2)};sc_cfg_get(NV_SR_STATE,srState,sizeof
+(srState));if((0x13+9004-0x233f)!=strcmp(srState,
 "\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
 NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
 ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
@@ -300,7 +299,7 @@
 ,isPushSms);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x25\x64\x20" "\n"
 ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD,
-strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x1fc1+1862-0x2707));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x1e68+1469-0x2425));}if(
 SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG,
 "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n"
 ,one_sms.index);at_print(LOG_DEBUG,
@@ -311,30 +310,30 @@
 "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n"
 ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;}
 zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)String2Bytes(
-ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if(
-(0x1e8d+1892-0x25ec)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
-sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;}
-sc_cfg_get(NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if(
-(0xe40+1300-0x1354)==strcmp(defaultStore,"\x73\x69\x6d")){iStorePos=
-WMS_STORAGE_TYPE_UIM_V01;}(void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->
-index,iStorePos,(T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,
-ptRespData->length,acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){
-iStorePos=WMS_STORAGE_TYPE_UIM_V01;}zUfiSms_TrafficChangeSmsTag(&tDbStoreData);
-if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
-(0x42c+981-0x800))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}
-zUfiSms_CmgrNvSet();zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);
-zUfiSms_ChangeMainState(SMS_STATE_RECVED);zUfiSms_HandleTrafficSms(&tDbStoreData
-);return;}void zUfiSms_CmgrRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType 
-iStorePos=WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={
-(0x1579+3559-0x2360)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x1417+1773-0x1b04);SMS_PARAM one_sms={(0x181d+221-0x18fa)};int 
-unread_sms_before_recv_new_sms=(0x51d+8552-0x2685);memset(&tDbStoreData,
-(0xe16+6098-0x25e8),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if((0x143+8006-0x2084)
+==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);sc_cfg_set(
+NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;}sc_cfg_get(
+NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if((0x1d48+1436-0x22e4)==
+strcmp(defaultStore,"\x73\x69\x6d")){iStorePos=WMS_STORAGE_TYPE_UIM_V01;}(void)
+zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,(T_SmsStatus)
+ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length,acFormatPdu);if
+(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos=WMS_STORAGE_TYPE_UIM_V01
+;}zUfiSms_TrafficChangeSmsTag(&tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==
+zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-(0xc5c+2462-0x15f9))){return;}if(
+tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}zUfiSms_CmgrNvSet();
+zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(
+SMS_STATE_RECVED);zUfiSms_HandleTrafficSms(&tDbStoreData);return;}void 
+zUfiSms_CmgrRespProc(T_zSms_SmsInd*ptRespData){zUfiSms_StoreType iStorePos=
+WMS_STORAGE_TYPE_NV_V01;unsigned char acFormatPdu[ZSMS_PDU_SIZE]={
+(0x8fc+4309-0x19d1)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x533+3311-0x1222);SMS_PARAM one_sms={(0x251d+405-0x26b2)};int 
+unread_sms_before_recv_new_sms=(0xc0f+5979-0x236a);memset(&tDbStoreData,
+(0x74d+25-0x766),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x45\x6e\x74\x65\x72\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2f\x70\x64\x75\x3a\x25\x73\x21" "\n"
 ,ptRespData->index,ptRespData->stat,ptRespData->length,ptRespData->pdu);
 zUfiSms_SendSmsStatusInfo(MSG_SMS_READING);if(strcmp(ptRespData->pdu,"")==
-(0xef2+2217-0x179b)){CHAR srState[(0x1d9a+1907-0x24db)]={(0x17f5+1764-0x1ed9)};
-sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x1607+4188-0x2663)!=strcmp(
+(0x254+1179-0x6ef)){CHAR srState[(0x796+2707-0x11f7)]={(0x17d1+393-0x195a)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x19c3+1925-0x2148)!=strcmp(
 srState,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
 NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
 ;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
@@ -343,7 +342,7 @@
 ,isPushSms);at_print(LOG_DEBUG,
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x43\x6d\x67\x72\x52\x65\x73\x70\x50\x72\x6f\x63\x20\x69\x73\x50\x75\x73\x68\x53\x6d\x73\x20\x3d\x25\x64\x20" "\n"
 ,isPushSms);if(SMS_NOTIFICATION==isPushSms){BakNotificationSms(one_sms.TP_UD,
-strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x20c+5689-0x1845));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x24d+1458-0x7ff));}if(
 SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG,
 "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n"
 ,one_sms.index);at_print(LOG_DEBUG,
@@ -354,82 +353,81 @@
 "\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n"
 ,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;}
 zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)String2Bytes(
-ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if(
-(0x170c+3061-0x22fc)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
-sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;}(
-void)zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,(
-T_SmsStatus)ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length,
-acFormatPdu);if(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos=
-WMS_STORAGE_TYPE_UIM_V01;}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){
-unread_sms_before_recv_new_sms=(0x874+5104-0x1c63);}else{
-unread_sms_before_recv_new_sms=(0x1f81+1756-0x265d);}if(ZTE_WMS_NV_MEMORY_FULL==
-zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-(0xb0+5122-0x14b1))){return;}if(
-tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}zUfiSms_CmgrNvSet();
-zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(
-SMS_STATE_RECVED);return;}void zUfiSms_CmgsRespProc(VOID){T_zUfiSms_StatusInfo 
-tStatusInfo={(0x171f+4013-0x26cc)};g_zUfiSms_DbStoreData->msg_displaymode=
-g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=(0x905+6406-0x220a)){if
-((0xd4b+6139-0x2546)==zUfiSms_WriteSmsToDb(&g_zUfiSms_DbStoreData[
-g_zUfiSms_CurConcatSegNo-(0xf8b+911-0x1319)],WMS_STORAGE_TYPE_NV_V01,-
-(0x528+2546-0xf19))){g_zUfiSms_MsgRefer++;(void)zUfiSms_SetMaxReference(
-g_zUfiSms_MsgRefer);}}printf(
+ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if((0x36b+6922-0x1e70)
+==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);sc_cfg_set(
+NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");return;}(void)
+zUfiSms_DecodeSmsData(&tDbStoreData,ptRespData->index,iStorePos,(T_SmsStatus)
+ptRespData->stat,WMS_MESSAGE_FORMAT_GW_PP_V01,ptRespData->length,acFormatPdu);if
+(tDbStoreData.sms_class==WMS_MESSAGE_CLASS_2){iStorePos=WMS_STORAGE_TYPE_UIM_V01
+;}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){unread_sms_before_recv_new_sms=
+(0x1d96+2153-0x25fe);}else{unread_sms_before_recv_new_sms=(0x1bcd+1089-0x200e);}
+if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
+(0x9ec+7417-0x26e4))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}
+zUfiSms_CmgrNvSet();zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);
+zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;}void zUfiSms_CmgsRespProc(VOID
+){T_zUfiSms_StatusInfo tStatusInfo={(0x932+1670-0xfb8)};g_zUfiSms_DbStoreData->
+msg_displaymode=g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=
+(0x108f+2544-0x1a7e)){if((0x265+7880-0x212d)==zUfiSms_WriteSmsToDb(&
+g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x1cea+766-0x1fe7)],
+WMS_STORAGE_TYPE_NV_V01,-(0x6b+4607-0x1269))){g_zUfiSms_MsgRefer++;(void)
+zUfiSms_SetMaxReference(g_zUfiSms_MsgRefer);}}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x67\x73\x52\x73\x70\x20\x73\x65\x67\x4e\x6f\x3a\x25\x64\x2f\x54\x6f\x74\x61\x6c\x4e\x75\x6d\x3a\x25\x64\x2f\x46\x61\x69\x6c\x4e\x75\x6d\x3a\x25\x64\x2e" "\n"
 ,g_zUfiSms_CurConcatSegNo,g_zUfiSms_ConcatTotalNum,g_zUfiSms_SendFailedCount);if
 (g_zUfiSms_CurConcatSegNo==g_zUfiSms_ConcatTotalNum){g_zUfiSms_CurConcatSegNo=
-(0x605+4720-0x1875);memset((void*)&tStatusInfo,(0x1fb6+103-0x201d),sizeof(
+(0xa9c+5179-0x1ed7);memset((void*)&tStatusInfo,(0x7e3+4947-0x1b36),sizeof(
 T_zUfiSms_StatusInfo));tStatusInfo.err_code=ZTE_SMS_CMS_NONE;tStatusInfo.
 send_failed_count=g_zUfiSms_SendFailedCount;tStatusInfo.delete_failed_count=
-(0x187c+1224-0x1d44);if(g_zUfiSms_SendFailedCount==(0x46b+4415-0x15aa)){
+(0x353+8425-0x243c);if(g_zUfiSms_SendFailedCount==(0xe31+3461-0x1bb6)){
 tStatusInfo.cmd_status=WMS_CMD_SUCCESS;sc_cfg_set(NV_SMS_SEND_RESULT,"\x6f\x6b")
 ;}else{tStatusInfo.cmd_status=WMS_CMD_FAILED;sc_cfg_set(NV_SMS_SEND_RESULT,
 "\x66\x61\x69\x6c");}tStatusInfo.cmd=WMS_SMS_CMD_MSG_SEND;(void)
 zUfiSms_SetCmdStatus(&tStatusInfo);sc_cfg_set(NV_SMS_DB_CHANGE,"\x31");
 zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);if(g_zUfiSms_MemFullFlag[
 WMS_STORAGE_TYPE_NV_V01]){zUfiSms_SendSmsStatusInfo(MSG_SMS_DEFAULT);}}else{}}
-int zte_fota_notifyPushMsg(int cmd){FOTA_MSG_BUF msg={(0x19b4+1709-0x2061)};int 
-errs=(0x8f4+4335-0x19e3);key_t req_id=ftok(
+int zte_fota_notifyPushMsg(int cmd){FOTA_MSG_BUF msg={(0x1371+1237-0x1846)};int 
+errs=(0x1d2+7482-0x1f0c);key_t req_id=ftok(
 "\x2f\x6d\x65\x64\x69\x61\x2f\x7a\x74\x65\x2f\x7a\x74\x65\x5f\x73\x6f\x63\x6b\x65\x74\x2f\x66\x6f\x74\x61\x5f\x64\x6d\x61\x70\x70\x5f\x6d\x73\x67"
-,(0xe93+4762-0x212c));int msgid=msgget(req_id,(0xcf6+2402-0x1658));if(msgid!=-
-(0x48a+3397-0x11ce)){msg.mtype=(0x47f+6492-0x1dda);msg.mtext[
-(0x15b3+3950-0x2521)]=WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-
-sizeof(long),(0x1180+4215-0x21f7));}return(errs<(0xb19+5812-0x21cd)?
-(0x364+3284-0x1038):(0x1360+1370-0x18b9));}
-#if (0x7c9+4986-0x1b43)  
+,(0x208b+842-0x23d4));int msgid=msgget(req_id,(0x9f2+1830-0x1118));if(msgid!=-
+(0x864+4247-0x18fa)){msg.mtype=(0xd5+3271-0xd9b);msg.mtext[(0x1747+2903-0x229e)]
+=WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long),
+(0x6b1+5575-0x1c78));}return(errs<(0x4e7+4576-0x16c7)?(0x1023+4721-0x2294):
+(0x539+2581-0xf4d));}
+#if (0xa31+5450-0x1f7b)  
 int atSms_SendCmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){return 
 zSvr_SendAtSyn(ZAT_CMGL_CMD,"\x41\x54\x2b\x43\x4d\x47\x4c\x3d\x30" "\r\n",cid,
 pAtRst,atRstSize);}VOID atSms_RecvCmglRsp(T_zAt_AtRes*pResLine){return;}
 #endif 

-#if (0x172d+2153-0x1f96) 
+#if (0x107+6147-0x190a) 
 int atSms_SendZmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){int res
-=(0xe31+4886-0x2147);pthread_mutex_lock(&smsdb_mutex);res=zSvr_SendAtSyn(
+=(0x1f2b+1555-0x253e);pthread_mutex_lock(&smsdb_mutex);res=zSvr_SendAtSyn(
 ZAT_ZMGL_CMD,"\x41\x54\x2b\x5a\x4d\x47\x4c\x3d\x34" "\r\n",cid,pAtRst,atRstSize)
 ;pthread_mutex_unlock(&smsdb_mutex);return res;}VOID atSms_initAtOk(VOID){
-T_zUfiSms_StatusInfo tStatus={(0x737+6806-0x21cd)};sc_cfg_set(NV_SMS_LOAD_RESULT
-,"\x6f\x6b");tStatus.cmd_status=WMS_CMD_SUCCESS;tStatus.cmd=WMS_SMS_CMD_INIT;(
+T_zUfiSms_StatusInfo tStatus={(0x699+360-0x801)};sc_cfg_set(NV_SMS_LOAD_RESULT,
+"\x6f\x6b");tStatus.cmd_status=WMS_CMD_SUCCESS;tStatus.cmd=WMS_SMS_CMD_INIT;(
 void)zUfiSms_SetCmdStatus(&tStatus);zUfiSms_ChangeMainState(SMS_STATE_LOADED);}
 int atSms_initAtErr(UINT8*pErrCode){T_zUfiSms_StatusInfo tStatus={
-(0x74a+1200-0xbfa)};sc_cfg_set(NV_SMS_LOAD_RESULT,"\x66\x61\x69\x6c");
+(0x1ddd+1388-0x2349)};sc_cfg_set(NV_SMS_LOAD_RESULT,"\x66\x61\x69\x6c");
 zUfiSms_ChangeMainState(SMS_STATE_LOADED);tStatus.cmd_status=WMS_CMD_FAILED;
 tStatus.cmd=WMS_SMS_CMD_INIT;(void)zUfiSms_SetCmdStatus(&tStatus);return FALSE;}
 VOID atSms_RecvZmglRsp(T_zAt_AtRes*pResLine){static T_zUfiSms_SmsItem tSmsPara={
-(0xab9+4149-0x1aee)};printf(
+(0x555+7346-0x2207)};printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x6c\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n"
 ,pResLine->pduFlag,pResLine->result);if(pResLine->pduFlag==ZAT_ATRES_PDU_FLAG){
 zUfiSms_CmglRespProc(pResLine,&tSmsPara);}else{memset(&tSmsPara,
-(0x17c6+1448-0x1d6e),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
-->resParas,sizeof(pResLine->resParas),&tSmsPara,(0x78b+3876-0x16ae));printf(
+(0xa2d+2893-0x157a),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
+->resParas,sizeof(pResLine->resParas),&tSmsPara,(0x9c7+5228-0x1e32));printf(
 "\x5b\x53\x4d\x53\x5d\x20\x5a\x6d\x67\x6c\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n"
 ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);}}int atSms_SendCmgrReq(PSTR 
-pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x2437+549-0x2648)
-]={(0x997+1806-0x10a5)};iSmsIndex=atoi(pAtCmdPara);printf(
+pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x52a+2649-0xf6f)]
+={(0x300+7295-0x1f7f)};iSmsIndex=atoi(pAtCmdPara);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x72\x52\x65\x71\x20\x47\x65\x74\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2e" "\n"
 ,iSmsIndex);snprintf(pAtcmdStr,sizeof(pAtcmdStr),
 "\x41\x54\x2b\x43\x4d\x47\x52\x3d\x25\x73" "\r\n",pAtCmdPara);return 
 zSvr_SendAtSyn(ZAT_CMGR_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID 
 atSms_RecvCmgrRsp(T_zAt_AtRes*pResLine){
-#if (0x1d5b+2228-0x260f)

-static T_zUfiSms_SmsItem tSmsPara={(0x1e6d+602-0x20c7)};T_zUfiSms_CmgrSetRsp 
-tCmgrRsp={(0xda0+4878-0x20ae)};printf(
+#if (0xd0b+6020-0x248f)

+static T_zUfiSms_SmsItem tSmsPara={(0x408+4310-0x14de)};T_zUfiSms_CmgrSetRsp 
+tCmgrRsp={(0x1a2a+1728-0x20ea)};printf(
 "\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x67\x72\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n"
 ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag==
 ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->result){printf(
@@ -438,14 +436,14 @@
 .stat=tSmsPara.stat;sscanf(pResLine->resParas,"\x25\x35\x30\x30\x73",tCmgrRsp.
 pdu);zUfiSms_CmgrRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();sc_cfg_set(
 "\x73\x6d\x73\x5f\x72\x65\x63\x76\x5f\x72\x65\x73\x75\x6c\x74","\x6f\x6b");}else
-{memset(&tSmsPara,(0x8f+8448-0x218f),sizeof(T_zUfiSms_SmsItem));(void)
-zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0xc7+980-0x499));tSmsPara.index=
-iSmsIndex;printf(
+{memset(&tSmsPara,(0x1d5c+733-0x2039),sizeof(T_zUfiSms_SmsItem));(void)
+zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0xa36+7312-0x26c4));tSmsPara.
+index=iSmsIndex;printf(
 "\x3d\x3d\x3d\x3d\x3d\x3d\x43\x6d\x67\x72\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n"
 ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);}
 #endif

 }int atSms_SendZmgrReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR 
-pAtcmdStr[(0xb6f+606-0xdb9)]={(0x1de8+1252-0x22cc)};iSmsIndex=atoi(pAtCmdPara);
+pAtcmdStr[(0x21aa+429-0x2343)]={(0x3dc+8130-0x239e)};iSmsIndex=atoi(pAtCmdPara);
 printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x5a\x6d\x67\x72\x52\x65\x71\x20\x47\x65\x74\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2e" "\n"
 ,iSmsIndex);snprintf(pAtcmdStr,sizeof(pAtcmdStr),
@@ -458,8 +456,8 @@
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x45\x72\x72\x20\x20\x53\x4d\x53\x20\x7a\x6d\x67\x72\x20\x69\x73\x20\x66\x61\x69\x6c" "\n"
 );{sc_cfg_set(NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(
 SMS_STATE_RECVED);}}VOID atSms_RecvZmgrRsp(T_zAt_AtRes*pResLine){static 
-T_zUfiSms_SmsItem tSmsPara={(0x1479+4694-0x26cf)};T_zUfiSms_CmgrSetRsp tCmgrRsp=
-{(0x381+8913-0x2652)};printf(
+T_zUfiSms_SmsItem tSmsPara={(0x1fff+1705-0x26a8)};T_zUfiSms_CmgrSetRsp tCmgrRsp=
+{(0x1793+3425-0x24f4)};printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x5a\x6d\x67\x72\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n"
 ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag==
 ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->result){printf(
@@ -467,56 +465,57 @@
 );return;}tCmgrRsp.index=tSmsPara.index;tCmgrRsp.length=tSmsPara.length;tCmgrRsp
 .stat=tSmsPara.stat;sscanf(pResLine->resParas,"\x25\x35\x30\x30\x73",tCmgrRsp.
 pdu);zUfiSms_ZmgrRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();sc_cfg_set(
-NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,(0xb92+368-0xd02),sizeof(
-T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(pResLine->
-resParas),&tSmsPara,(0xcd5+1897-0x143c));tSmsPara.index=iSmsIndex;printf(
+NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,(0x10e1+2905-0x1c3a),
+sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(
+pResLine->resParas),&tSmsPara,(0x624+4937-0x196b));tSmsPara.index=iSmsIndex;
+printf(
 "\x5b\x53\x4d\x53\x5d\x20\x5a\x6d\x67\x72\x20\x52\x65\x73\x70\x21\x20\x69\x6e\x64\x65\x78\x3a\x25\x64\x2f\x73\x74\x61\x74\x3a\x25\x64\x2f\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n"
 ,tSmsPara.index,tSmsPara.stat,tSmsPara.length);}}int atSms_SendCmgdReq(PSTR 
-pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0xd43+4516-0x1ed3)
-]={(0x92+4439-0x11e9)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
-"\x41\x54\x2b\x43\x4d\x47\x44\x3d\x25\x73" "\r\n",pAtCmdPara);return 
+pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[
+(0x15e1+4239-0x265c)]={(0x108d+4090-0x2087)};snprintf(pAtcmdStr,sizeof(pAtcmdStr
+),"\x41\x54\x2b\x43\x4d\x47\x44\x3d\x25\x73" "\r\n",pAtCmdPara);return 
 zSvr_SendAtSyn(ZAT_CMGD_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID 
-atSms_RecvCmgdOk(VOID){CHAR strUsed[(0x1430+3565-0x2213)]={(0x3e9+8391-0x24b0)};
-int used=(0x1320+3399-0x2067);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+atSms_RecvCmgdOk(VOID){CHAR strUsed[(0xca5+3525-0x1a60)]={(0x139b+4944-0x26eb)};
+int used=(0xff+9315-0x2562);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x4f\x4b\x2e\x20" "\n"
 );sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(
-strUsed)-(0x1680+1617-0x1cd0);if(used<(0xe1a+2300-0x1716)){used=
-(0xda7+4242-0x1e39);}memset(&strUsed,(0x752+7587-0x24f5),(0x38+1359-0x57d));
+strUsed)-(0x592+3017-0x115a);if(used<(0x1256+3154-0x1ea8)){used=
+(0x1a4a+126-0x1ac8);}memset(&strUsed,(0x1495+510-0x1693),(0xdca+3021-0x198d));
 snprintf(strUsed,sizeof(strUsed),"\x25\x64",used);sc_cfg_set(
 ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed);}VOID atSms_RecvCmgdErr(VOID){sc_cfg_set
 (NV_SMS_DEL_RESULT,"\x66\x61\x69\x6c");printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x74\x20\x73\x69\x6d\x5f\x64\x65\x6c\x5f\x72\x65\x73\x75\x6c\x74\x20\x74\x6f\x20\x66\x61\x69\x6c\x2e\x20" "\n"
-);}VOID atSms_RecvCmgdFinish(VOID){char StrValue[(0xebc+229-0xf97)]={
-(0x620+6555-0x1fbb)};CHAR strTotal[(0x892+6577-0x2239)]={(0x826+7166-0x2424)};
-CHAR strUsed[(0x11d4+1119-0x1629)]={(0x1535+4102-0x253b)};int total=
-(0xf82+775-0x1289);int used=(0xc48+5403-0x2163);int remain=(0x541+8486-0x2667);
+);}VOID atSms_RecvCmgdFinish(VOID){char StrValue[(0x1dcb+1121-0x2222)]={
+(0xb26+4470-0x1c9c)};CHAR strTotal[(0xc8b+2699-0x170c)]={(0x23b1+308-0x24e5)};
+CHAR strUsed[(0xb1f+6433-0x2436)]={(0x1950+3390-0x268e)};int total=
+(0x1cc0+762-0x1fba);int used=(0x6c6+3774-0x1584);int remain=(0xd89+4950-0x20df);
 sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(
 strUsed);sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,strTotal,sizeof(strTotal));
-total=atoi(strTotal);remain=total-used;if(remain<(0x21e4+163-0x2287)){remain=
-(0x268+2498-0xc2a);}memset(&StrValue,(0x1dd9+2095-0x2608),(0x1301+1477-0x18bc));
+total=atoi(strTotal);remain=total-used;if(remain<(0xbed+1500-0x11c9)){remain=
+(0x64d+3302-0x1333);}memset(&StrValue,(0xbbb+3993-0x1b54),(0x104b+2252-0x190d));
 snprintf(StrValue,sizeof(StrValue),"\x25\x64",remain);sc_cfg_set(
 ZTE_WMS_NVCONFIG_SIM_CARD_REMAIN,StrValue);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x53\x69\x6d\x53\x6d\x73\x20\x75\x73\x65\x64\x3d\x25\x64\x2c\x72\x65\x6d\x61\x69\x6e\x3d\x25\x64\x2c\x74\x6f\x74\x61\x6c\x3d\x25\x64" "\n"
 ,used,remain,total);zUfiSms_ChangeMainState(SMS_STATE_DELED);sc_cfg_set(
 NV_SMS_DB_CHANGE,"\x31");}int atSms_SendCmgsReq(PSTR pAtCmdPara,int cid,PSTR 
-pAtRst,int atRstSize){int atRes=(0xbd+9305-0x2516);CHAR pAtcmdStr[ZSMS_PDU_SIZE]
-={(0x1376+3643-0x21b1)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+pAtRst,int atRstSize){int atRes=(0xdd5+4041-0x1d9e);CHAR pAtcmdStr[ZSMS_PDU_SIZE
+]={(0x209+7761-0x205a)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
 "\x41\x54\x2b\x43\x4d\x47\x53\x3d\x25\x64" "\r\n",g_zUfiSms_FinalCmgsBuf.length)
 ;atRes=zSvr_SendAtSyn(ZAT_CMGS_CMD,pAtcmdStr,cid,pAtRst,atRstSize);if(atRes!=
-ZAT_RESULT_SMS){return atRes;}memset(pAtcmdStr,(0x6b3+1275-0xbae),ZSMS_PDU_SIZE)
-;if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x537+8073-0x24bf)){memcpy
-(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));}else{
-printf(
+ZAT_RESULT_SMS){return atRes;}memset(pAtcmdStr,(0x238b+683-0x2636),ZSMS_PDU_SIZE
+);if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x1565+1117-0x19c1)){
+memcpy(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));
+}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n"
 ,g_zUfiSms_FinalCmgsBuf.pdu);memcpy(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,
-ZSMS_PDU_SIZE-(0x71f+7358-0x23db));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.
-pdu))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0x1023+3576-0x1e1b),atRstSize);return 
+ZSMS_PDU_SIZE-(0xd17+5519-0x22a4));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.
+pdu))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0x445+4538-0x15ff),atRstSize);return 
 zSvr_SendAtSyn(ZAT_CMGS_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID 
 atSms_RecvCmgsOk(UINT8*pResLine,int cid){at_print(LOG_DEBUG,
 "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x2e\x20" "\n"
 );g_zUfiSms_CurConcatSegNo++;if(g_zUfiSms_CurConcatSegNo>
 ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_DbStoreData[
-g_zUfiSms_CurConcatSegNo-(0x53+2595-0xa75)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0xda6+2349-0x16d2)].tag=WMS_TAG_TYPE_MO_SENT_V01;
 zUfiSms_CmgsRespProc(cid);}VOID atSms_RecvCmgsErr(UINT8*pResLine,int cid){
 at_print(LOG_DEBUG,
 "\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x66\x61\x69\x6c\x2e\x20" "\n");
@@ -524,16 +523,16 @@
 ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_SendFailedCount++;at_print(
 LOG_DEBUG,
 "\x73\x65\x6e\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64\x2c\x73\x6f\x20\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x64\x72\x61\x66\x74\x62\x6f\x78\x2e" "\n"
-);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x17d+4666-0x13b6)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x1094+3219-0x1d26)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x6aa+1496-0xc81)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x695+1788-0xd90)){
 g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc(cid);}VOID 
 atSms_RecvCmgsRsp(T_zAt_AtRes*pResLine){return;}VOID atSms_RecvCmtRsp(
-T_zAt_AtRes*pResLine){CHAR needSMS[(0xfad+434-0x112d)]={(0x1914+108-0x1980)};
-sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xd93+675-0x1036)==
+T_zAt_AtRes*pResLine){CHAR needSMS[(0xd97+2448-0x16f5)]={(0x85f+223-0x93e)};
+sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1510+98-0x1572)==
 strcmp(needSMS,"\x6e\x6f")){printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}static T_zUfiSms_SmsItem tSmsPara={(0xeff+6019-0x2682)};
-T_zUfiSms_CmtSetRsp tCmtRsp={(0xb2b+5337-0x2004)};if(NULL==pResLine){return;}
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0x8da+290-0x9fc)};
+T_zUfiSms_CmtSetRsp tCmtRsp={(0x451+4190-0x14af)};if(NULL==pResLine){return;}
 printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n"
 ,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag==
@@ -543,40 +542,40 @@
 "\x25\x35\x30\x30\x73",tCmtRsp.pdu);pthread_mutex_lock(&smsdb_mutex);
 zUfiSms_CmtRespProc(&tCmtRsp);zUfiMmi_SendSmsStatus();pthread_mutex_unlock(&
 smsdb_mutex);sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,
-(0x155b+1885-0x1cb8),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0x26a9+66-0x26eb),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
 resParas,sizeof(pResLine->resParas));printf(
 "\x5b\x53\x4d\x53\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x21\x20\x70\x52\x65\x73\x4c\x69\x6e\x65\x2d\x3e\x72\x65\x73\x50\x61\x72\x61\x73\x3a\x25\x73\x2e" "\n"
 ,pResLine->resParas);sscanf(pResLine->resParas,"\x25\x73\x20\x25\x64",tSmsPara.
 alpha,&tSmsPara.length);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x63\x6d\x74\x20\x69\x6e\x64\x21\x20\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n"
 ,tSmsPara.length);}}VOID atSms_RecvCmtiRsp(T_zAt_AtRes*pResLine){CHAR needSMS[
-(0x1b19+2546-0x24d9)]={(0xd65+5887-0x2464)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
-needSMS,sizeof(needSMS));if((0x2a9+5626-0x18a3)==strcmp(needSMS,"\x6e\x6f")){
+(0xc70+2330-0x1558)]={(0xd3a+3548-0x1b16)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x24f4+490-0x26de)==strcmp(needSMS,"\x6e\x6f")){
 printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}char sms_Main_state[(0x484+1336-0x99e)]={(0x7cc+6598-0x2192)};char*
+);return;}char sms_Main_state[(0x2c5+4776-0x154f)]={(0xfe5+642-0x1267)};char*
 memory=NULL;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x20\x65\x6e\x74\x65\x72\x20\x25\x73\x2e" "\n"
 ,pResLine->resParas);if(NULL==pResLine){return;}if(ZAT_CMTI_CMD!=pResLine->
 atCmdId){return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state));
 if(strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")==
-(0x1c0+6712-0x1bf8)){printf(
+(0xee6+5027-0x2289)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n"
 );return;}memory=strstr(pResLine->resParas,"\"");if(NULL!=memory){memory++;}if(
-(0x9c1+4514-0x1b63)==strncmp("\x53\x4d",memory,(0x56b+5202-0x19bb))){
+(0x6ac+6549-0x2041)==strncmp("\x53\x4d",memory,(0xb24+5569-0x20e3))){
 zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0x2e4+3802-0x11ba);printf(
+SMS_STATE_RECVING);memory+=(0x2c8+8430-0x23b2);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x6e\x64\x20\x63\x6d\x67\x72\x3a\x20\x25\x73" "\n"
 ,memory);zSvr_InnerSendMsg(ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,
 MSG_CMD_AT_ZMGR,strlen(memory),memory);}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n"
 );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}VOID atSms_RecvCdsRsp(T_zAt_AtRes*pResLine
-){CHAR needSMS[(0x913+5390-0x1def)]={(0x1c58+822-0x1f8e)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x8dd+4368-0x19ed)==strcmp(
+){CHAR needSMS[(0x186a+658-0x1aca)]={(0x1d76+1837-0x24a3)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1228+2411-0x1b93)==strcmp(
 needSMS,"\x6e\x6f")){printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}static T_zUfiSms_SmsItem tSmsPara={(0xa57+6317-0x2304)};
-T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x36f+3173-0xfd4)};if(NULL==pResLine){return;}if
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0x1567+847-0x18b6)};
+T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x1ea+3151-0xe39)};if(NULL==pResLine){return;}if
 (pResLine->pduFlag==ZAT_ATRES_PDU_FLAG){if(ZAT_RESULT_AUTOREPORT!=pResLine->
 result){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x52\x73\x70\x20\x67\x65\x74\x20\x72\x65\x73\x75\x6c\x74\x20\x45\x72\x72\x6f\x72\x2e" "\n"
@@ -584,80 +583,79 @@
 "\x25\x35\x30\x30\x73",tCmgrRsp.pdu);pthread_mutex_lock(&smsdb_mutex);
 zUfiSms_CdsRespProc(&tCmgrRsp);zUfiMmi_SendSmsStatus();pthread_mutex_unlock(&
 smsdb_mutex);sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,
-(0x8d6+782-0xbe4),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0xf31+4848-0x2221),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
 resParas,sizeof(pResLine->resParas));printf(
 "\x5b\x53\x4d\x53\x5d\x20\x63\x64\x73\x20\x69\x6e\x64\x21\x20\x70\x52\x65\x73\x4c\x69\x6e\x65\x2d\x3e\x72\x65\x73\x50\x61\x72\x61\x73\x3a\x25\x73\x2e" "\n"
 ,pResLine->resParas);sscanf(pResLine->resParas,"\x25\x73\x20\x25\x64",tSmsPara.
 alpha,&tSmsPara.length);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x52\x73\x70\x20\x63\x64\x73\x20\x69\x6e\x64\x21\x20\x6c\x65\x6e\x67\x74\x68\x3a\x25\x64\x2e" "\n"
 ,tSmsPara.length);}}VOID atSms_RecvCdsiRsp(T_zAt_AtRes*pResLine){CHAR needSMS[
-(0xcfa+508-0xec4)]={(0xac5+3945-0x1a2e)};sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
-sizeof(needSMS));if((0x5+1680-0x695)==strcmp(needSMS,"\x6e\x6f")){printf(
+(0x1089+1978-0x1811)]={(0x152+4746-0x13dc)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x96f+1160-0xdf7)==strcmp(needSMS,"\x6e\x6f")){
+printf(
 "\x5b\x53\x4d\x53\x5d\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x6e\x65\x65\x64\x53\x4d\x53\x3d\x6e\x6f\x21"
-);return;}char sms_Main_state[(0x552+8139-0x24ff)]={(0x1946+1171-0x1dd9)};char*
+);return;}char sms_Main_state[(0x19b5+289-0x1ab8)]={(0x1ad3+2328-0x23eb)};char*
 memory=NULL;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x20\x65\x6e\x74\x65\x72\x20\x25\x73\x2e" "\n"
 ,pResLine->resParas);if(NULL==pResLine){return;}if(ZAT_CDSI_CMD!=pResLine->
 atCmdId){return;}sc_cfg_get(NV_SMS_STATE,sms_Main_state,sizeof(sms_Main_state));
 if(strcmp(sms_Main_state,"\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67")==
-(0x746+8014-0x2694)){printf(
+(0xd24+2463-0x16c3)){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x3a\x20\x73\x6d\x73\x5f\x64\x65\x6c\x69\x6e\x67" "\n"
 );return;}memory=strstr(pResLine->resParas,"\"");if(NULL!=memory){memory++;}
 printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x3a\x20\x6d\x65\x6d\x6f\x72\x79\x20\x3d\x20\x25\x73" "\n"
-,memory);if((0x16a3+3117-0x22d0)==strncmp("\x53\x4d",memory,(0x1d24+1381-0x2287)
-)){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0x11fc+2374-0x1b3e);printf(
+,memory);if((0x1933+1409-0x1eb4)==strncmp("\x53\x4d",memory,(0x23dc+475-0x25b5))
+){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
+SMS_STATE_RECVING);memory+=(0x10d2+4363-0x21d9);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x73\x65\x6e\x64\x20\x63\x6d\x67\x72\x3a\x20\x25\x73" "\n"
 ,memory);zSvr_InnerSendMsg(ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,
 MSG_CMD_AT_ZMGR,strlen(memory),memory);}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x64\x73\x69\x52\x73\x70\x20\x3a\x73\x74\x6f\x72\x65\x20\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x20\x6e\x6f\x74\x20\x53\x4d\x2e" "\n"
 );}sc_cfg_set(NV_SMS_RECV_RESULT,"");}int atSms_SendZmenaReq(PSTR pAtCmdPara,int
- cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0xa9a+6134-0x227c)]={
-(0xe7c+5113-0x2275)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+ cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x1c69+2079-0x2474)]={
+(0x494+1884-0xbf0)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
 "\x41\x54\x2b\x5a\x4d\x45\x4e\x41\x3d\x25\x73" "\r\n",pAtCmdPara);return 
 zSvr_SendAtSyn(ZAT_ZMENA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}VOID 
 atSms_RecvZmenaOk(VOID){g_Zmena_rsp=TRUE;return;}VOID atSms_RecvZmenaErr(VOID){
 g_Zmena_rsp=FALSE;return;}int atSms_SendCnmaReq(PSTR pAtCmdPara,int cid,PSTR 
-pAtRst,int atRstSize){int atRes=(0x1bb5+326-0x1cfb);CHAR pAtcmdStr[ZSMS_PDU_SIZE
-]={(0x793+6171-0x1fae)};CHAR ackPduStr[(0x1cfc+1369-0x2223)]={
-(0x473+5687-0x1aaa)};if(atoi(pAtCmdPara)==(0x1065+1154-0x14e6)){snprintf(
-pAtcmdStr,sizeof(pAtcmdStr),"\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73" "\r\n",
-pAtCmdPara);atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);
-printf(
+pAtRst,int atRstSize){int atRes=(0x1317+23-0x132e);CHAR pAtcmdStr[ZSMS_PDU_SIZE]
+={(0x255+2832-0xd65)};CHAR ackPduStr[(0x1757+2038-0x1f1b)]={(0x14d7+3642-0x2311)
+};if(atoi(pAtCmdPara)==(0x512+7681-0x2312)){snprintf(pAtcmdStr,sizeof(pAtcmdStr)
+,"\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73" "\r\n",pAtCmdPara);atRes=
+zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x20\x31\x31\x31\x31\x31\x31\x20\x61\x63\x6b\x20\x6f\x6b\x20\x3d\x20\x25\x73\x2e" "\n"
-,pAtcmdStr);return(0x780+1570-0xda2);}else{zUfiSms_EncodePdu_DeliverReport(
-ackPduStr,(0x2145+1055-0x2491));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+,pAtcmdStr);return(0xf84+2265-0x185d);}else{zUfiSms_EncodePdu_DeliverReport(
+ackPduStr,(0x4b2+1332-0x913));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
 "\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73\x2c\x25\x64" "\r\n",pAtCmdPara,strlen(
-ackPduStr)/(0x1c55+252-0x1d4f));atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,
+ackPduStr)/(0xc61+2607-0x168e));atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,
 pAtRst,atRstSize);if(atRes!=ZAT_RESULT_SMS){return atRes;}printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x20\x3d\x20\x25\x73\x2e" "\n"
-,pAtcmdStr);memset(pAtcmdStr,(0x938+2796-0x1424),ZSMS_PDU_SIZE);if(strlen(
-ackPduStr)<ZSMS_PDU_SIZE-(0x1f79+706-0x223a)){memcpy(pAtcmdStr,ackPduStr,strlen(
+,pAtcmdStr);memset(pAtcmdStr,(0x315+1372-0x871),ZSMS_PDU_SIZE);if(strlen(
+ackPduStr)<ZSMS_PDU_SIZE-(0xa3d+2919-0x15a3)){memcpy(pAtcmdStr,ackPduStr,strlen(
 ackPduStr));}else{printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6d\x67\x73\x52\x65\x71\x20\x70\x64\x75\x20\x74\x6f\x6f\x20\x6c\x6f\x6e\x67\x3a\x25\x73" "\n"
-,ackPduStr);memcpy(pAtcmdStr,ackPduStr,ZSMS_PDU_SIZE-(0xbe7+3447-0x195c));}*(
+,ackPduStr);memcpy(pAtcmdStr,ackPduStr,ZSMS_PDU_SIZE-(0x387+2394-0xcdf));}*(
 pAtcmdStr+strlen(ackPduStr))=ZSMS_CTRL_Z_CHAR;printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x53\x65\x6e\x64\x43\x6e\x6d\x61\x52\x65\x71\x2e\x20\x70\x64\x75\x3d\x20\x25\x73" "\n"
-,pAtcmdStr);memset(pAtRst,(0x184+1129-0x5ed),atRstSize);return zSvr_SendAtSyn(
+,pAtcmdStr);memset(pAtRst,(0xd7c+3125-0x19b1),atRstSize);return zSvr_SendAtSyn(
 ZAT_CNMA_CMD,pAtcmdStr,cid,pAtRst,atRstSize);}}VOID atSms_RecvCnmaRsp(
 T_zAt_AtRes*pResLine){return;}VOID atUnsoli_Delete_Sim_Sms(UINT8*pDatabuf,int 
-cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x20c6+1152-0x2546)};int atRes=
-(0x4e4+1258-0x9ce);if(pDatabuf==NULL){return;}atRes=atSms_SendCmgdReq(pDatabuf,
-cid,errCode,ZSVR_AT_RES_CODE_LEN);if(atRes==ZSMS_RESULT_OK){atSms_RecvCmgdOk();}
+cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x17b4+3827-0x26a7)};int atRes=
+(0xb58+79-0xba7);if(pDatabuf==NULL){return;}atRes=atSms_SendCmgdReq(pDatabuf,cid
+,errCode,ZSVR_AT_RES_CODE_LEN);if(atRes==ZSMS_RESULT_OK){atSms_RecvCmgdOk();}
 else{atSms_RecvCmgdErr();}atSms_RecvCmgdFinish();}VOID atUnsoli_Report_Cnma(
-UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x1839+1420-0x1dc5)
-};if(pDatabuf==NULL){printf(
+UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x38+3644-0xe74)};
+if(pDatabuf==NULL){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x43\x6e\x6d\x61\x20\x6e\x75\x6c\x6c"
 );return;}atSms_SendCnmaReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);}VOID 
 atUnsoli_Report_Zmena(UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]
-={(0x16cb+3958-0x2641)};int atRes=(0x13ab+3147-0x1ff6);if(pDatabuf==NULL){printf
-(
+={(0x34b+2389-0xca0)};int atRes=(0x16dc+1466-0x1c96);if(pDatabuf==NULL){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x5a\x6d\x65\x6e\x61\x20\x6e\x75\x6c\x6c"
 );return;}atRes=atSms_SendZmenaReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);if
 (atRes==ZSMS_RESULT_OK){atSms_RecvZmenaOk();}else{atSms_RecvZmenaErr();}}VOID 
 atUnsoli_Report_Zmgr(UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]=
-{(0x19b0+1355-0x1efb)};if(pDatabuf==NULL){printf(
+{(0x84+4051-0x1057)};if(pDatabuf==NULL){printf(
 "\x5b\x53\x4d\x53\x5d\x20\x61\x74\x55\x6e\x73\x6f\x6c\x69\x5f\x52\x65\x70\x6f\x72\x74\x5f\x5a\x6d\x67\x72\x20\x6e\x75\x6c\x6c"
 );return;}atSms_SendZmgrReq(pDatabuf,cid,errCode,ZSVR_AT_RES_CODE_LEN);}
 #endif

diff --git a/ap/app/zte_log_agent/log_agent.h b/ap/app/zte_log_agent/log_agent.h
index 661e983..b9225c4 100755
--- a/ap/app/zte_log_agent/log_agent.h
+++ b/ap/app/zte_log_agent/log_agent.h
@@ -241,6 +241,7 @@
     ZCAT_IPC_ALLOC_CAP_SMLOGBUF,

 #endif

     ZCAT_IPC_READ_IRAM_ZCAT_MODE,

+    ZCAT_IPC_SET_VEHICLE_WAKE_SIGN,

 } E_ZCAT_IPC_HANDSHAKE;

 

 

diff --git a/ap/app/zte_log_agent/log_agent_main.c b/ap/app/zte_log_agent/log_agent_main.c
index 369767e..0a4d886 100755
--- a/ap/app/zte_log_agent/log_agent_main.c
+++ b/ap/app/zte_log_agent/log_agent_main.c
@@ -306,6 +306,7 @@
         }

 #ifdef USE_CAP_SUPPORT

         case ZCAT_MODE_CAP_FS:

+        case ZCAT_MODE_CAP_NET:	

         {

             init_cap_mode();

             break;