[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/app/Script/scripts/defwan_set.sh b/ap/app/Script/scripts/defwan_set.sh
old mode 100644
new mode 100755
index 40386c8..6e4e128
--- a/ap/app/Script/scripts/defwan_set.sh
+++ b/ap/app/Script/scripts/defwan_set.sh
@@ -42,9 +42,9 @@
defwan_gw=`nv get $wan_if"_gw"`
if [ "-$defwan_gw" != "-" -o "-$defwan_rel" != "-" ];then
- route add default gw $defwan_gw dev $defwan_rel 2>>$test_log
+ ip route add default via $defwan_gw dev $defwan_rel 2>>$test_log
if [ $? -ne 0 ];then
- echo "Error: route add default gw $defwan_gw dev $defwan_rel failed." >> $test_log
+ echo "Error: ip route add default via $defwan_gw dev $defwan_rel failed." >> $test_log
fi
fi
diff --git a/ap/app/Script/scripts/internet.sh b/ap/app/Script/scripts/internet.sh
index 95a56b4..0726956 100755
--- a/ap/app/Script/scripts/internet.sh
+++ b/ap/app/Script/scripts/internet.sh
@@ -9,13 +9,6 @@
echo "Info: internet.sh start" > $test_log
echo "Info: `date +%m-%d %H:%M:%S`" >> $test_log
-#CONFIG_BRIDGE_IGMP_SNOOPING¿ª¹Ø
-br_multi_off=`nv get br_multi_off`
-echo "Info: set br_multi_off: $br_multi_off" >> $test_log
-if [ "-$br_multi_off" == "-1" ]; then
- echo 1 > /proc/net/br_multi_off
-fi
-
genSysFiles()
{
login=`nv get Login`
diff --git a/ap/app/Script/scripts/psext_up.sh b/ap/app/Script/scripts/psext_up.sh
index d0f79aa..c67e4fe 100755
--- a/ap/app/Script/scripts/psext_up.sh
+++ b/ap/app/Script/scripts/psext_up.sh
@@ -93,7 +93,11 @@
brctl addbr $ext_br
brctl setfd $ext_br 0.1
brctl addif $ext_br $eth_if
+if [ "$eth_if" != "zvnet"$c_id ]; then
ifconfig $ext_br up
+else
+ifconfig $ext_br -arp up
+fi
get_ipaddr
dhcp_set
route_set
diff --git a/ap/app/Script/scripts/psext_up_ipv6.sh b/ap/app/Script/scripts/psext_up_ipv6.sh
index 3432452..71890e0 100755
--- a/ap/app/Script/scripts/psext_up_ipv6.sh
+++ b/ap/app/Script/scripts/psext_up_ipv6.sh
@@ -41,7 +41,11 @@
ip -6 addr add $local_ipv6_addr/64 dev $ps_if 2>>$test_log
brctl addbr $br_if
brctl setfd $br_if 0.1
+ if [ "$eth_if" != "zvnet"$c_id ]; then
ifconfig $br_if up 2>>$test_log
+ else
+ ifconfig $br_if -arp up 2>>$test_log
+ fi
if [ $? -ne 0 ];then
echo "Error: ifconfig $br_if up failed." >> $test_log
fi
diff --git a/ap/app/ab_bootinfo/Makefile b/ap/app/ab_bootinfo/Makefile
index e3cf039..1df9e84 100755
--- a/ap/app/ab_bootinfo/Makefile
+++ b/ap/app/ab_bootinfo/Makefile
@@ -8,14 +8,10 @@
OBJS = ab_bootinfo.o
CFLAGS += -I$(APP_DIR)/include
-CFLAGS += -I$(LIB_DIR)/libupi_ab/inc
CFLAGS += -g -Werror=implicit-function-declaration
-
LDLIBS = -lnvram_sc -L$(LIB_DIR)/libnvram
-LDLIBS += -lupi_ab -L$(LIB_DIR)/libupi_ab
-LDLIBS += -lcrypto -L$(LIB_DIR)/libssl/install/lib
-
+LDLIBS += -lflags -L$(zte_lib_path)/libflags
##############USER COMIZE END##################
#*******************************************************************************
diff --git a/ap/app/ab_bootinfo/ab_bootinfo.c b/ap/app/ab_bootinfo/ab_bootinfo.c
old mode 100644
new mode 100755
index 3f1e0cf..0e23e36
--- a/ap/app/ab_bootinfo/ab_bootinfo.c
+++ b/ap/app/ab_bootinfo/ab_bootinfo.c
@@ -1,18 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include "zxic_fota_ab_upgrade.h"
+#include "pub_flags.h"
+#include "flags_api.h"
int main(int argc, char *argv[])
{
- int ret = zxic_dual_get_current_system();
+ int ret = flags_get_current_system();
switch (ret)
{
- case Z_DUAL_SYSTEM:
+ case DUAL_SYSTEM:
printf("ab_bootinfo:ab_a\n");
ret = 1;
break;
- case Z_DUAL_SYSTEM2:
+ case DUAL_SYSTEM2:
printf("ab_bootinfo:ab_b\n");
ret = 2;
break;
@@ -22,4 +23,4 @@
break;
}
return ret;
-}
\ No newline at end of file
+}
diff --git a/ap/app/flags_tool/Makefile b/ap/app/flags_tool/Makefile
new file mode 100755
index 0000000..dffd1dd
--- /dev/null
+++ b/ap/app/flags_tool/Makefile
@@ -0,0 +1,45 @@
+.EXPORT_ALL_VARIABLES:
+include $(COMMON_MK)
+
+
+EXEC = flags_tool
+
+SRCS=$(wildcard ./src/*.c)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+
+CFLAGS += -Wall -g
+
+CFLAGS += -Werror=implicit-int \
+ -Werror=implicit-function-declaration \
+ -Werror=float-equal \
+ -Werror=return-type \
+ -Werror=enum-compare \
+ -Werror=init-self
+
+CFLAGS += -O2
+
+CFLAGS += -I./inc \
+
+CFLAGS += -I../include
+
+LDLIBS += -lpthread
+
+LDLIBS += -lflags -L$(zte_lib_path)/libflags
+
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ $(CC) $(LD_BEGIN) -static $(LDFLAGS) -o $@_static $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group $(LD_END)
+ cp $(EXEC) $(EXEC).elf
+ cp $(EXEC)_static $(EXEC)_static.elf
+
+romfs root_fs:
+ $(ROMFSINST) /bin/$(EXEC)_static
+
+clean:
+ -rm -f $(EXEC) $(EXEC)_static *.elf *.gdb *.o ./src/*.o
diff --git a/ap/app/flags_tool/src/main.c b/ap/app/flags_tool/src/main.c
new file mode 100755
index 0000000..403349e
--- /dev/null
+++ b/ap/app/flags_tool/src/main.c
@@ -0,0 +1,310 @@
+/**
+* @file main.c
+* @brief flags·ÖÇø¹¤¾ß
+*
+* Copyright (C) 2023 Sanechips Technology Co., Ltd.
+* @author
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation. £¨±ØÑ¡£ºGPLv2 Licence£©
+*
+*/
+
+
+/*******************************************************************************
+ * Include header files *
+ ******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <dirent.h>
+#include <getopt.h>
+#include <unistd.h>
+
+#include "pub_flags.h"
+#include "flags_api.h"
+
+
+/*******************************************************************************
+ * Macro definitions *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ * Type definitions *
+ ******************************************************************************/
+typedef struct
+{
+ int option_value;
+ int (*func)(char *);
+} option_handle_t;
+
+
+
+/*******************************************************************************
+ * Static function declarations *
+ ******************************************************************************/
+static int excute_command_help(char *option_para);
+static int excute_command_init(char *option_para);
+static int excute_command_get(char *option_para);
+static int excute_command_set(char *option_para);
+static int excute_command_get_ubifs_status(char *option_para);
+static int excute_command_set_ubifs_status(char *option_para);
+
+
+/*******************************************************************************
+ * Global variable declarations *
+ ******************************************************************************/
+static char * g_short_string = "higsub";
+
+static struct option g_long_options[] =
+{
+ {"help", no_argument, NULL, 'h'},
+ {"init", no_argument, NULL, 'i'},
+ {"get", no_argument, NULL, 'g'},
+ {"set", no_argument, NULL, 's'},
+ {"get-ubifs-status", no_argument, NULL, 'u'},
+ {"set-ubifs-status", no_argument, NULL, 'b'},
+ {0, 0, 0, 0}
+};
+
+static option_handle_t g_option_handle[] =
+{
+ {'h', excute_command_help},
+ {'i', excute_command_init},
+ {'g', excute_command_get},
+ {'s', excute_command_set},
+ {'u', excute_command_get_ubifs_status},
+ {'b', excute_command_set_ubifs_status}
+};
+
+
+/*******************************************************************************
+ * Static function define *
+ ******************************************************************************/
+static void usage(void)
+{
+ printf("flags_tool [-higsub] \n "
+ " -h, --help show usage \n"
+ " -i, --init init flags \n"
+ " -g, --get get flags data \n"
+ " -s, --set set flags data \n"
+ " -u, --get-ubifs-status get ubifs status \n"
+ " -b, --set-ubifs-status set ubifs status \n");
+
+ return;
+}
+
+
+static int excute_command_help(char *option_para)
+{
+ usage();
+
+ return 0;
+}
+
+
+static int excute_command_init(char *option_para)
+{
+ if (flags_init() != 0)
+ {
+ printf("Err: flags init fail \n");
+
+ return -1;
+ }
+ else
+ {
+ printf("Log: flags init success \n");
+
+ return 0;
+ }
+}
+
+
+static int excute_command_get(char *option_para)
+{
+ T_FLAGS_INFO flags_info = {0};
+
+ if (flags_get(&flags_info) != 0)
+ {
+ printf("Err: flags get fail \n");
+
+ return -1;
+ }
+ else
+ {
+ printf("magic_start = 0x%x \n", flags_info.magic_start);
+
+ printf("boot_fota_flag.boot_to = 0x%x \n", flags_info.boot_fota_flag.boot_to);
+ printf("boot_fota_flag.fota_status = %u \n", flags_info.boot_fota_flag.fota_status);
+ printf("boot_fota_flag.system.status = 0x%x \n", flags_info.boot_fota_flag.system.status);
+ printf("boot_fota_flag.system.try_cnt = %d \n", flags_info.boot_fota_flag.system.try_cnt);
+ printf("boot_fota_flag.system2.status = 0x%x \n", flags_info.boot_fota_flag.system2.status);
+ printf("boot_fota_flag.system2.try_cnt = %d \n", flags_info.boot_fota_flag.system2.try_cnt);
+
+ printf("boot_env.dualsys_type = 0x%x \n", flags_info.boot_env.dualsys_type);
+ printf("boot_env.system_boot_env = %s \n", flags_info.boot_env.system_boot_env);
+ printf("boot_env.system2_boot_env = %s \n", flags_info.boot_env.system2_boot_env);
+
+ printf("ubifs_status.fs_status = %d \n", flags_info.ubifs_status.fs_status);
+ printf("ubifs_status.fs_mtd_name = %s \n", flags_info.ubifs_status.fs_mtd_name);
+ printf("ubifs_status.fs_ubi_vol_name = %s \n", flags_info.ubifs_status.fs_ubi_vol_name);
+
+ printf("magic_end = 0x%x \n", flags_info.magic_end);
+
+ return 0;
+ }
+}
+
+
+static int excute_command_set(char *option_para)
+{
+ T_FLAGS_INFO flags_info = {0};
+
+ char system_boot_env[128] = "bootEnv1";
+ char system2_boot_env[128] = "2bootEnv";
+
+ char fs_mtd_name[16] = "nameMTD";
+ char fs_ubi_vol_name[16] = "nameVOL";
+
+ flags_info.magic_start = FLAGS_MAGIC;
+
+ flags_info.boot_fota_flag.boot_to = DUAL_SYSTEM;
+ flags_info.boot_fota_flag.fota_status = 0;
+ flags_info.boot_fota_flag.system.status = DUALSYSTEM_STATUS_BOOTABLE;
+ flags_info.boot_fota_flag.system.try_cnt = 5;
+ flags_info.boot_fota_flag.system2.status = DUALSYSTEM_STATUS_BOOTABLE;
+ flags_info.boot_fota_flag.system2.try_cnt = 13;
+
+ flags_info.boot_env.dualsys_type = DUALSYSTEM_AB;
+ strncpy(flags_info.boot_env.system_boot_env, system_boot_env, sizeof(flags_info.boot_env.system_boot_env));
+ strncpy(flags_info.boot_env.system2_boot_env, system2_boot_env, sizeof(flags_info.boot_env.system2_boot_env));
+
+ flags_info.ubifs_status.fs_status = 0;
+ strncpy(flags_info.ubifs_status.fs_mtd_name, fs_mtd_name, sizeof(flags_info.ubifs_status.fs_mtd_name));
+ strncpy(flags_info.ubifs_status.fs_ubi_vol_name, fs_ubi_vol_name, sizeof(flags_info.ubifs_status.fs_ubi_vol_name));
+
+ flags_info.magic_end = FLAGS_MAGIC;
+
+ if (flags_set(&flags_info) != 0)
+ {
+ printf("Err: set flags fail \n");
+
+ return -1;
+ }
+ else
+ {
+ printf("Log: set flags success \n");
+
+ return 0;
+ }
+}
+
+
+static int excute_command_get_ubifs_status(char *option_para)
+{
+ T_UBIFS_STATUS ubifs_status = {0};
+
+ if (flags_get_ubifs_status(&ubifs_status) != 0)
+ {
+ printf("Err: get ubifs status fail \n");
+
+ return -1;
+ }
+ else
+ {
+ printf("ubifs_status.fs_status = %d \n", ubifs_status.fs_status);
+ printf("ubifs_status.fs_mtd_name = %s \n", ubifs_status.fs_mtd_name);
+ printf("ubifs_status.fs_ubi_vol_name = %s \n", ubifs_status.fs_ubi_vol_name);
+
+ return 0;
+ }
+}
+
+
+static int excute_command_set_ubifs_status(char *option_para)
+{
+ T_UBIFS_STATUS ubifs_status = {0};
+
+ char fs_mtd_name[16] = "mtdName";
+ char fs_ubi_vol_name[16] = "volName";
+
+ ubifs_status.fs_status = 2;
+ strncpy(ubifs_status.fs_mtd_name, fs_mtd_name, sizeof(ubifs_status.fs_mtd_name));
+ strncpy(ubifs_status.fs_ubi_vol_name, fs_ubi_vol_name, sizeof(ubifs_status.fs_ubi_vol_name));
+
+ if (flags_set_ubifs_status(&ubifs_status) != 0)
+ {
+ printf("Err: set ubifs status fail \n");
+
+ return -1;
+ }
+ else
+ {
+ printf("Log: set ubifs status success \n");
+
+ return 0;
+ }
+}
+
+
+/*******************************************************************************
+ * Global function declarations *
+ ******************************************************************************/
+int main(int argc, char *argv[])
+{
+ int i = 0;
+ int option_index = 0;
+ int cmd_num = 0;
+
+ int ret = -1;
+ int ch = -1;
+
+ printf("Log: build date: %s %s \n", __DATE__, __TIME__);
+
+ while ((ch = getopt_long(argc, argv, g_short_string, g_long_options, &option_index)) != -1)
+ {
+ for (i = 0; i < sizeof(g_option_handle) / sizeof(option_handle_t); i++)
+ {
+ if (ch != g_option_handle[i].option_value)
+ {
+ continue;
+ }
+
+ cmd_num++;
+
+ if (NULL == g_option_handle[i].func)
+ {
+ printf("Err: command short string is: %c, but option handle func is NULL \n", ch);
+ break;
+ }
+
+ ret = g_option_handle[i].func(optarg);
+ if (ret < 0)
+ {
+ ret = -1;
+ goto end;
+ }
+ }
+ }
+
+ if (0 == cmd_num)
+ {
+ printf("Err: can not find valid command \n");
+ usage();
+ ret = -1;
+ goto end;
+ }
+
+ ret = 0;
+
+end:
+ return ret ;
+}
+
diff --git a/ap/app/fota_upi_ab/src/main.c b/ap/app/fota_upi_ab/src/main.c
index c34b788..e70606f 100755
--- a/ap/app/fota_upi_ab/src/main.c
+++ b/ap/app/fota_upi_ab/src/main.c
@@ -48,9 +48,10 @@
* Type definitions *
******************************************************************************/
-typedef struct {
- int option_value;
- int (*func)(char *);
+typedef struct
+{
+ int option_value;
+ int (*func)(char *);
} option_handle_t;
@@ -72,12 +73,12 @@
static int excute_command_set_fota_status(char * option_para);
static int excute_command_help(char * option_para);
static int execute_command_version(char * option_para);
-static int excute_command_init_fota_flag(char * option_para);
static int execute_command_sync(char *option_para);
static int execute_command_get_upgrade_type(char *option_para);
static int execute_command_get_sync_status(char * option_para);
static int execute_command_set_sync_status(char * option_para);
-
+static int execute_command_config_package_path(char * option_para);
+static int execute_command_config_log_path(char * option_para);
/*******************************************************************************
@@ -86,47 +87,51 @@
/*----------Command parser begin---------------------------------------------------------*/
-static char * g_short_string = "u:cgb:sio:t:fqr:hvypne:";
+static char * g_short_string = "u:cgb:sio:t:qr:hvypne:a:l:";
-static struct option g_long_options[] = {
- {"upgrade", required_argument, NULL, 'u'},
- {"get-current", no_argument, NULL, 'c'},
- {"get-boot", no_argument, NULL, 'g'},
- {"set-boot", required_argument, NULL, 'b'},
- {"get-upgrade_status", no_argument, NULL, 's'},
- {"get-system-info", no_argument, NULL, 'i'},
- {"set-system1-status", required_argument, NULL, 'o'},
- {"set-system2-status", required_argument, NULL, 't'},
- {"get-fota-status", no_argument, NULL, 'q'},
- {"set-fota-status", required_argument, NULL, 'r'},
- {"init-fota-flag", no_argument, NULL, 'f'},
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'v'},
- {"sync", no_argument, NULL, 'y'},
- {"get-upgrade-type", no_argument, NULL, 'p'},
- {"get-sync-status", no_argument, NULL, 'n'},
- {"set-sync-status", required_argument, NULL, 'e'},
- {0, 0, 0, 0}
+static struct option g_long_options[] =
+{
+ {"upgrade", required_argument, NULL, 'u'},
+ {"get-current", no_argument, NULL, 'c'},
+ {"get-boot", no_argument, NULL, 'g'},
+ {"set-boot", required_argument, NULL, 'b'},
+ {"get-upgrade_status", no_argument, NULL, 's'},
+ {"get-system-info", no_argument, NULL, 'i'},
+ {"set-system1-status", required_argument, NULL, 'o'},
+ {"set-system2-status", required_argument, NULL, 't'},
+ {"get-fota-status", no_argument, NULL, 'q'},
+ {"set-fota-status", required_argument, NULL, 'r'},
+ {"help", no_argument, NULL, 'h'},
+ {"version", no_argument, NULL, 'v'},
+ {"sync", no_argument, NULL, 'y'},
+ {"get-upgrade-type", no_argument, NULL, 'p'},
+ {"get-sync-status", no_argument, NULL, 'n'},
+ {"set-sync-status", required_argument, NULL, 'e'},
+ {"config-package-path", required_argument, NULL, 'a'},
+ {"config-log-path", required_argument, NULL, 'l'},
+ {0, 0, 0, 0}
};
-static option_handle_t g_option_handle[] = {
- {'u', excute_command_upgrade},
- {'c', excute_command_get_current_system},
- {'g', excute_command_get_boot_to_system},
- {'b', excute_command_set_boot_to_system},
- {'s', excute_command_get_status},
- {'i', excute_command_get_system_info},
- {'o', excute_command_set_system1_status},
- {'t', excute_command_set_system2_status},
- {'q', excute_command_get_fota_status},
- {'r', excute_command_set_fota_status},
- {'f', excute_command_init_fota_flag},
- {'h', excute_command_help},
- {'v', execute_command_version},
- {'y', execute_command_sync},
- {'p', execute_command_get_upgrade_type},
- {'n', execute_command_get_sync_status},
- {'e', execute_command_set_sync_status}
+static option_handle_t g_option_handle[] =
+{
+ {'u', excute_command_upgrade},
+ {'c', excute_command_get_current_system},
+ {'g', excute_command_get_boot_to_system},
+ {'b', excute_command_set_boot_to_system},
+ {'s', excute_command_get_status},
+ {'i', excute_command_get_system_info},
+ {'o', excute_command_set_system1_status},
+ {'t', excute_command_set_system2_status},
+ {'q', excute_command_get_fota_status},
+ {'r', excute_command_set_fota_status},
+ {'h', excute_command_help},
+ {'v', execute_command_version},
+ {'y', execute_command_sync},
+ {'p', execute_command_get_upgrade_type},
+ {'n', execute_command_get_sync_status},
+ {'e', execute_command_set_sync_status},
+ {'a', execute_command_config_package_path},
+ {'l', execute_command_config_log_path}
};
@@ -143,232 +148,235 @@
static void usage(void)
{
- printf("fota_upi [-cgsiqhvypn] [-u <target>][-b <boot to system>][-otr <system info>][-e <sync status>]\n "
- " -u, --upgrade verify or update \n"
- " -c , --get-current get current system \n"
- " -g , --get-boot get boot to system \n"
- " -b, --set-boot set boot to system \n"
- " -s, --get-status get system status \n"
- " -i, --get-system-info get system info \n"
- " -o, --set-system1-status set system1 status info \n"
- " -t, --set-system2-status set system2 status info \n"
- " -q, --get-fota-status get fota status to show if need sync NV when next reboot, 0:no 1:yes \n"
- " -r, --set-fota-status set fota status to show if need sync NV when next reboot, 0:no 1:yes \n"
- " -f, --init-fota-flag init fota flag partition \n"
- " -h , --help show this usage text\n"
- " -v, --version show current version \n"
- " -y, --sync sync \n"
- " -p, --get-upgrade-type get upgrade type \n"
- " -n, --get-sync-status get sync status \n"
- " -e, --set-sync-status set sync status \n");
+ printf("fota_upi [-cgsiqhvypn] [-u <target>][-b <boot to system>][-otr <system info>][-e <sync status>]\n "
+ " -u, --upgrade verify or update \n"
+ " -c , --get-current get current system \n"
+ " -g , --get-boot get boot to system \n"
+ " -b, --set-boot set boot to system \n"
+ " -s, --get-status get system status \n"
+ " -i, --get-system-info get system info \n"
+ " -o, --set-system1-status set system1 status info \n"
+ " -t, --set-system2-status set system2 status info \n"
+ " -q, --get-fota-status get fota status to show if need sync NV when next reboot, 0:no 1:yes \n"
+ " -r, --set-fota-status set fota status to show if need sync NV when next reboot, 0:no 1:yes \n"
+ " -h , --help show this usage text\n"
+ " -v, --version show current version \n"
+ " -y, --sync sync \n"
+ " -p, --get-upgrade-type get upgrade type \n"
+ " -n, --get-sync-status get sync status \n"
+ " -e, --set-sync-status set sync status \n"
+ " -a, --config-package-path config package path \n"
+ " -l, --config-log-path config log path \n");
}
z_upgrade_status_info_t g_upgrade_status;
void g_flush_upgrade_status(z_upgrade_status_info_t *p_status)
{
-// LOG_FUNC_BEGIN
- printf("Current status:%d \n", p_status->upgrade_status);
+ // LOG_FUNC_BEGIN
+ printf("Current status:%d \n", p_status->upgrade_status);
- printf("Total size:%d \n", p_status->total_size);
+ printf("Total size:%d \n", p_status->total_size);
- printf("Updated size:%d \n", p_status->upgraded_size);
-// LOG_FUNC_END
+ printf("Updated size:%d \n", p_status->upgraded_size);
+ // LOG_FUNC_END
}
/*----------Command parser function begin------------------------------------------------*/
static int excute_command_upgrade(char * option_para)
{
- int ret = -1;
-
- if (NULL == option_para) {
- usage();
- printf("Command input invalid! null input upgrade para, please choose verify or recovery or system! \n");
- return -1;
- }
+ int ret = -1;
-
- if (0 == strcmp(FOTA_UPI_VERIFY, option_para)) {
- printf("Begin to verify upgrade package \n");
- ret = zxic_dual_verify();
- } else if (0 == strcmp(FOTA_UPI_UPDATE, option_para)) {
-// ret = upi_update();
- z_upgrade_flush_status_t flush_status;
- z_upgrade_status_info_t status ;
- memset(&status, 0, sizeof(z_upgrade_status_info_t));
- flush_status.status = &status;
- flush_status.status_cb = &g_flush_upgrade_status;
- ret = zxic_dual_upgrade(&flush_status);
- } else {
- printf("Unknow input upgrade para, verify or update! \n");
- return -1;
- }
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid! null input upgrade para, please choose verify or recovery or system! \n");
+ return -1;
+ }
- return ret;
+ if (0 == strcmp(FOTA_UPI_VERIFY, option_para))
+ {
+ printf("Begin to verify upgrade package \n");
+ ret = zxic_dual_verify();
+ }
+ else if (0 == strcmp(FOTA_UPI_UPDATE, option_para))
+ {
+ // ret = upi_update();
+ z_upgrade_flush_status_t flush_status;
+ z_upgrade_status_info_t status ;
+ memset(&status, 0, sizeof(z_upgrade_status_info_t));
+ flush_status.status = &status;
+ flush_status.status_cb = &g_flush_upgrade_status;
+ ret = zxic_dual_upgrade(&flush_status);
+ }
+ else
+ {
+ printf("Unknow input upgrade para, verify or update! \n");
+ return -1;
+ }
+
+
+ return ret;
}
static int excute_command_get_current_system(char * option_para)
{
- int current = zxic_dual_get_current_system();
+ int current = zxic_dual_get_current_system();
- printf("Current system:0x%08X[%d] \n", current, current);
+ printf("Current system:0x%08X[%d] \n", current, current);
- return current;
+ return current;
}
static int excute_command_get_boot_to_system(char * option_para)
{
- int boot_to = zxic_dual_get_boot_to_system();
+ int boot_to = zxic_dual_get_boot_to_system();
- printf("Boot to system:0x%08X[%d]\n", boot_to, boot_to);
+ printf("Boot to system:0x%08X[%d]\n", boot_to, boot_to);
- return 0;
+ return 0;
}
static int excute_command_set_boot_to_system(char * option_para)
{
- int ret = 0;
+ int ret = 0;
- if (NULL == option_para) {
- usage();
- printf("Command input invalid value! null option parameters! \n");
- return -1;
- }
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid value! null option parameters! \n");
+ return -1;
+ }
- ret = zxic_dual_set_boot_to_system(atoi(option_para), 0);
- if(ret < 0){
- printf("Set boot to [%s] error \n", option_para);
- }
+ ret = zxic_dual_set_boot_to_system(atoi(option_para), 0);
+ if (ret < 0)
+ {
+ printf("Set boot to [%s] error \n", option_para);
+ }
- return ret;
+ return ret;
}
static int excute_command_get_status(char *option_para)
{
- z_upgrade_status_info_t status;
- if(zxic_dual_get_upgrade_status(&status) < 0){
- printf("Get upgrade status fail! \n");
- return -1;
- }
-
- printf("Current upgrade info: \n");
- printf("Current upgrade status:%d \n", status.upgrade_status);
- printf("Current upgrade total size:%d \n", status.total_size);
- printf("Current upgrade updated size:%d \n", status.upgraded_size);
-
+ z_upgrade_status_info_t status;
+ if (zxic_dual_get_upgrade_status(&status) < 0)
+ {
+ printf("Get upgrade status fail! \n");
+ return -1;
+ }
+
+ printf("Current upgrade info: \n");
+ printf("Current upgrade status:%d \n", status.upgrade_status);
+ printf("Current upgrade total size:%d \n", status.total_size);
+ printf("Current upgrade updated size:%d \n", status.upgraded_size);
+
return 0;
}
static int excute_command_get_system_info(char * option_para)
{
- z_upgrade_system_info_t system_info;
- if(zxic_dual_get_system_status(&system_info) < 0){
- printf("Get upgrade status fail! \n");
- return -1;
- }else{
- printf("System info: \n");
- printf("Boot to:0x%08X[%d] \n", system_info.boot_to, system_info.boot_to);
- printf("Fota status:%d \n", system_info.fota_status);
- printf("System1 system:0x%08X [%d] \n", system_info.system_1.system, system_info.system_1.system);
- printf("System1 status:%d \n", system_info.system_1.status);
- printf("System1 try_cnt:%d \n", system_info.system_1.try_cnt);
- printf("System2 system:0x%08X [%d] \n", system_info.system_2.system, system_info.system_2.system);
- printf("System2 status:%d \n", system_info.system_2.status);
- printf("System2 try_cnt:%d \n", system_info.system_2.try_cnt);
- }
+ z_upgrade_system_info_t system_info;
+ if (zxic_dual_get_system_status(&system_info) < 0)
+ {
+ printf("Get upgrade status fail! \n");
+ return -1;
+ }
+ else
+ {
+ printf("System info: \n");
+ printf("Boot to:0x%08X[%d] \n", system_info.boot_to, system_info.boot_to);
+ printf("Fota status:%d \n", system_info.fota_status);
+ printf("System1 system:0x%08X [%d] \n", system_info.system_1.system, system_info.system_1.system);
+ printf("System1 status:%d \n", system_info.system_1.status);
+ printf("System1 try_cnt:%d \n", system_info.system_1.try_cnt);
+ printf("System2 system:0x%08X [%d] \n", system_info.system_2.system, system_info.system_2.system);
+ printf("System2 status:%d \n", system_info.system_2.status);
+ printf("System2 try_cnt:%d \n", system_info.system_2.try_cnt);
+ }
- return 0;
+ return 0;
}
static int excute_command_set_system1_status(char * option_para)
{
- int ret = -1;
- if (NULL == option_para) {
- usage();
- printf("Command input invalid value! null option parameters! \n");
- return -1;
- }
-
- ret = zxic_dual_set_system_status(34650, atoi(option_para));
- if(ret < 0){
- printf("Set system 1 status to [%s] error \n", option_para);
- }
+ int ret = -1;
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid value! null option parameters! \n");
+ return -1;
+ }
- return ret;
+ ret = zxic_dual_set_system_status(34650, atoi(option_para));
+ if (ret < 0)
+ {
+ printf("Set system 1 status to [%s] error \n", option_para);
+ }
+
+ return ret;
}
static int excute_command_set_system2_status(char * option_para)
{
- int ret = -1;
- if (NULL == option_para) {
- usage();
- printf("Command input invalid value! null option parameters! \n");
- return -1;
- }
-
- ret = zxic_dual_set_system_status(39019, atoi(option_para));
- if(ret < 0){
- printf("Set system 2 status to [%s] error \n", option_para);
- }
+ int ret = -1;
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid value! null option parameters! \n");
+ return -1;
+ }
- return ret;
+ ret = zxic_dual_set_system_status(39019, atoi(option_para));
+ if (ret < 0)
+ {
+ printf("Set system 2 status to [%s] error \n", option_para);
+ }
+
+ return ret;
}
static int excute_command_get_fota_status(char * option_para)
{
- int status = zxic_dual_get_fota_status_for_nv();
+ int status = zxic_dual_get_fota_status_for_nv();
- printf("Fota status:%d \n", status);
+ printf("Fota status:%d \n", status);
- return 0;
+ return 0;
}
static int excute_command_set_fota_status(char * option_para)
{
- int ret = 0;
+ int ret = 0;
- if (NULL == option_para) {
- usage();
- printf("Command input invalid value! null option parameters! \n");
- return -1;
- }
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid value! null option parameters! \n");
+ return -1;
+ }
- ret = zxic_dual_set_fota_status_for_nv(atoi(option_para));
- if(ret < 0){
- printf("Set fota_status to [%s] error \n", option_para);
- }
+ ret = zxic_dual_set_fota_status_for_nv(atoi(option_para));
+ if (ret < 0)
+ {
+ printf("Set fota_status to [%s] error \n", option_para);
+ }
- return ret;
+ return ret;
}
-static int excute_command_init_fota_flag(char * option_para)
-{
- int ret = 0;
-
- if(zxic_init_flag_partition() < 0){
- printf("Init fotaflag partition fail! \n");
- return -1;
- }
-
-
- return 0;
-}
-
-
-
-
static int excute_command_help(char * option_para)
{
- usage();
- return 0;
+ usage();
+ return 0;
}
@@ -377,10 +385,10 @@
static int execute_command_version(char *option_para)
{
- int version = 0;
+ int version = 0;
- return version;
+ return version;
}
@@ -389,11 +397,11 @@
static int execute_command_sync(char *option_para)
{
- int ret = -1;
+ int ret = -1;
- ret = zxic_dual_sync_system();
+ ret = zxic_dual_sync_system();
- return ret;
+ return ret;
}
@@ -402,48 +410,93 @@
static int execute_command_get_upgrade_type(char *option_para)
{
- int upgrade_type = -1;
-
- upgrade_type = zxic_dual_get_upgrade_type();
- printf("upgrade type is %d\n", upgrade_type);
+ int upgrade_type = -1;
- return 0;
+ upgrade_type = zxic_dual_get_upgrade_type();
+ printf("upgrade type is %d\n", upgrade_type);
+
+ return 0;
}
static int execute_command_get_sync_status(char * option_para)
{
- int sync_status = -2;
-
- zxic_dual_get_sync_status(&sync_status);
- printf("Current sync status is %d\n", sync_status);
+ int sync_status = -2;
- return 0;
+ zxic_dual_get_sync_status(&sync_status);
+ printf("Current sync status is %d\n", sync_status);
+
+ return 0;
}
static int execute_command_set_sync_status(char * option_para)
{
- int ret = -1;
-
- if (NULL == option_para) {
- usage();
- printf("Command input invalid value! null option parameters! \n");
-
- return ret;
- }
-
- ret = zxic_dual_set_sync_status(atoi(option_para));
- if (0 != ret)
- {
- printf("set sync status fail\n");
-
- return ret;
- }
-
- ret = 0;
-
- return ret;
+ int ret = -1;
+
+ if (NULL == option_para)
+ {
+ usage();
+ printf("Command input invalid value! null option parameters! \n");
+
+ return ret;
+ }
+
+ ret = zxic_dual_set_sync_status(atoi(option_para));
+ if (0 != ret)
+ {
+ printf("set sync status fail\n");
+
+ return ret;
+ }
+
+ ret = 0;
+
+ return ret;
+}
+
+
+static int execute_command_config_package_path(char * option_para)
+{
+ if (NULL == option_para)
+ {
+ printf("Invalid command input: NULL option parameters \n");
+ usage();
+
+ return -1;
+ }
+
+ if (-1 == zxic_dual_config_package_path(option_para, strlen(option_para)))
+ {
+ printf("Configure upgrade package path fail \n");
+ return -1;
+ }
+
+ printf("Configure upgrade package path success \n");
+
+ return 0;
+}
+
+
+static int execute_command_config_log_path(char * option_para)
+{
+ if (NULL == option_para)
+ {
+ printf("Invalid command input: NULL option parameters \n");
+ usage();
+
+ return -1;
+ }
+
+ if (-1 == zxic_dual_config_log_path(option_para, strlen(option_para)))
+ {
+ printf("Configure log path fail \n");
+ return -1;
+ }
+
+ printf("Configure log path success \n");
+
+ return 0;
}
@@ -460,21 +513,23 @@
*/
static void write_lockfile(char *filepath, char *setbuf)
{
- int f, len = 0;
+ int f, len = 0;
- f = open(filepath, O_RDWR | O_SYNC);
- if (f == -1) {
- perror("open lock failed\n");
- return;
- }
+ f = open(filepath, O_RDWR | O_SYNC);
+ if (f == -1)
+ {
+ perror("open lock failed\n");
+ return;
+ }
- len = strlen(setbuf);
+ len = strlen(setbuf);
- if (write(f, setbuf, len) != len) {
- perror("write lock failed\n");
- }
+ if (write(f, setbuf, len) != len)
+ {
+ perror("write lock failed\n");
+ }
- close(f);
+ close(f);
}
/*******************************************************************************
@@ -483,54 +538,61 @@
int main(int argc, char *argv[])
{
- int i = 0;
- int option_index = 0;
- int cmd_num = 0;
+ int i = 0;
+ int option_index = 0;
+ int cmd_num = 0;
- int ret = -1;
- int ch = -1;
+ int ret = -1;
+ int ch = -1;
printf("build date: %s %s\n", __DATE__, __TIME__);
-
- write_lockfile(POWER_WAKE_LOCK_FILE, FOTA_UPGRADE_LOCK);
- while ((ch = getopt_long(argc, argv, g_short_string, g_long_options, &option_index)) != -1) {
- for (i = 0; i < sizeof(g_option_handle) / sizeof(option_handle_t); i++) {
- if (ch != g_option_handle[i].option_value)
- continue;
+ write_lockfile(POWER_WAKE_LOCK_FILE, FOTA_UPGRADE_LOCK);
+
+ while ((ch = getopt_long(argc, argv, g_short_string, g_long_options, &option_index)) != -1)
+ {
+ for (i = 0; i < sizeof(g_option_handle) / sizeof(option_handle_t); i++)
+ {
+ if (ch != g_option_handle[i].option_value)
+ {
+ continue;
+ }
- cmd_num++;
+ cmd_num++;
- if (NULL == g_option_handle[i].func) {
- printf("Command short string is:%c, but option handle func is NULL", ch);
- break;
- }
+ if (NULL == g_option_handle[i].func)
+ {
+ printf("Command short string is:%c, but option handle func is NULL", ch);
+ break;
+ }
- ret = g_option_handle[i].func(optarg);
+ ret = g_option_handle[i].func(optarg);
- if (ret < 0) {
- ret = -1;
- goto end;
- }
- }
- }
+ if (ret < 0)
+ {
+ ret = -1;
+ goto end;
+ }
+ }
+ }
- if (0 == cmd_num) {
- printf("Can not find valid command!");
- usage();
- ret = -1;
- goto end;
- }
+ if (0 == cmd_num)
+ {
+ printf("Can not find valid command!");
+ usage();
+ ret = -1;
+ goto end;
+ }
- ret = 0;
+ ret = 0;
end:
- write_lockfile(POWER_WAKE_UNLOCK_FILE, FOTA_UPGRADE_LOCK);
+ write_lockfile(POWER_WAKE_UNLOCK_FILE, FOTA_UPGRADE_LOCK);
- return ret ;
+ return ret ;
}
diff --git a/ap/app/hostapd-2.10/hostapd/.config b/ap/app/hostapd-2.10/hostapd/.config
index 84c15e1..19115d3 100755
--- a/ap/app/hostapd-2.10/hostapd/.config
+++ b/ap/app/hostapd-2.10/hostapd/.config
@@ -272,7 +272,11 @@
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
# none = Empty template
#CONFIG_TLS=openssl
+ifeq ($(USE_VEHICLE_DC),yes)
+CONFIG_TLS=openssl
+else
CONFIG_TLS=wolfssl
+endif
CONFIG_SAE=y
CONFIG_TLS_ADD_DL=y
diff --git a/ap/app/hostapd-2.10/hostapd/libwpa_client.a b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
new file mode 100755
index 0000000..f155c5d
--- /dev/null
+++ b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
Binary files differ
diff --git a/ap/app/include/at_msg.h b/ap/app/include/at_msg.h
index 5984e4a..943e126 100755
--- a/ap/app/include/at_msg.h
+++ b/ap/app/include/at_msg.h
@@ -245,8 +245,13 @@
MSG_CMD_AT_FILTER_REQ, //AP֪ͨCPÐèÒª¹ýÂËÖ÷¶¯Éϱ¨µÄATÃüÁî
MSG_CMD_SYNC_ATCMD_STREAM, //AP²à·¢ÆðNVͬ²½£¬ÒòATÃüÁîÁ÷½Ï³¤ÇÒÃüÁ˫ÒýºÅ£¬µ¥¶Àͬ²½
MSG_CMD_ADD_MNET_WHITELIST, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥ÃüÁîÐÂÔö
+ MSG_CMD_ADD_MNET_WHITELIST_RSP, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥ÐÂÔöÃüÁîÏìÓ¦
MSG_CMD_DEL_MNET_WHITELIST, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥ÃüÁîɾ³ý
- MSG_CMD_CLEAR_MNET_WHITELIST, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥¹Ø±Õ
+ MSG_CMD_DEL_MNET_WHITELIST_RSP, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥É¾³ýÃüÁîÏìÓ¦
+ MSG_CMD_GET_MNET_WHITELIST, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥ÃüÁî»ñÈ¡
+ MSG_CMD_GET_MNET_WHITELIST_RSP, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥»ñÈ¡ÃüÁîÏìÓ¦
+ MSG_CMD_CLEAR_MNET_WHITELIST, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥Çå³ý
+ MSG_CMD_CLEAR_MNET_WHITELIST_RSP, //CP²à·¢ÆðÊ¡µç°×Ãûµ¥Çå³ýÃüÁîÏìÓ¦
/**------------------------ÒÔÏÂÊÇOPENCPUµÄÏûÏ¢ID-----------------------------**/
MSG_CMD_PDP_ACT_REQ, //pdp¼¤»îÒµÎñÇëÇ󣬶ÔÓ¦½á¹¹ÌåAT_PDP_ACT_INFO
diff --git a/ap/app/include/flags_api.h b/ap/app/include/flags_api.h
new file mode 100755
index 0000000..68ccdad
--- /dev/null
+++ b/ap/app/include/flags_api.h
@@ -0,0 +1,98 @@
+/**
+ * @file flags_api.h
+ * @brief flags·ÖÇø½Ó¿Ú
+ *
+ * Copyright (C) 2023 Sanechips Technology Co., Ltd.
+ * @author
+ * @ingroup
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation. £¨±ØÑ¡£ºGPLv2 Licence£©
+ *
+ */
+
+
+#ifndef FLAGS_API_H
+#define FLAGS_API_H
+
+
+/*******************************************************************************
+ * Include header files *
+ ******************************************************************************/
+#include "pub_flags.h"
+
+
+/*******************************************************************************
+ * Macro definitions *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ * Type definitions *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ * Global variable declarations *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ * Global function declarations *
+ ******************************************************************************/
+/**
+ * @brief ³õʼ»¯flags·ÖÇø
+ * @param[out] p_flags_info flags³õʼ»¯Êý¾Ý
+ * @return 0 ³õʼ»¯³É¹¦, -1 ³õʼ»¯Ê§°Ü
+ * @note
+ */
+int flags_init();
+
+
+/**
+ * @brief »ñÈ¡flags·ÖÇøÄÚÈÝ
+ * @param[out] p_flags_info flags·ÖÇøÄÚÈÝ
+ * @return 0 »ñÈ¡³É¹¦, -1 »ñȡʧ°Ü
+ * @note
+ */
+int flags_get(T_FLAGS_INFO *p_flags_info);
+
+
+/**
+ * @brief ÉèÖÃflags·ÖÇøÄÚÈÝ
+ * @param[out] p_flags_info flags·ÖÇøÄÚÈÝ
+ * @return 0 ÉèÖóɹ¦, -1 ÉèÖÃʧ°Ü
+ * @note
+ */
+int flags_set(T_FLAGS_INFO *p_flags_info);
+
+
+/**
+ * @brief »ñÈ¡flags·ÖÇøÖÐubifs״̬
+ * @param[out] status ubifs״̬
+ * @return 0 »ñÈ¡³É¹¦, -1 »ñȡʧ°Ü
+ * @note
+ */
+int flags_get_ubifs_status(T_UBIFS_STATUS *p_ubifs_status);
+
+
+/**
+ * @brief ÉèÖÃflags·ÖÇøÖÐubifs״̬
+ * @param[in] status ubifs״̬
+ * @return 0 ÉèÖóɹ¦, -1 ÉèÖÃʧ°Ü
+ * @note
+ */
+int flags_set_ubifs_status(T_UBIFS_STATUS *p_ubifs_status);
+
+
+/**
+ * @brief »ñÈ¡µ±Ç°ÏµÍ³
+ * @return µ±Ç°ÔËÐÐϵͳ
+ * @note
+ */
+int flags_get_current_system();
+
+
+#endif // FLAGS_API_H
+
diff --git a/ap/app/include/message.h b/ap/app/include/message.h
index def1e19..375f9a9 100755
--- a/ap/app/include/message.h
+++ b/ap/app/include/message.h
@@ -88,6 +88,7 @@
MODULE_ID_IP_PROXY, /*ip proxyÄ£¿éID*/
MODULE_ID_BIP, /* BIPÓ¦ÓÃ */
+ MODULE_ID_MNET_WHITELIST, //whitelistÄ£¿é
/* ----- ƽ̨ÄÚ²¿¾²Ì¬Ä£¿éIDµÄ½áβ£¬Æ½Ì¨ÄÚ²¿ÐÂÔöIDÐèÌí¼ÓÔÚÉÏ·½ ------ */
@@ -147,6 +148,8 @@
//voice
MODULE_ID_VOICE_SERVER,
MODULE_ID_VOICE_CLIENT,
+ MODULE_ID_WLAN_PROXY, //cap²àwifi´úÀí
+ MODULE_ID_MNET_WHITELIST_PROXY, //cap²àwhitelist´úÀí
} T_AP_Module_ID;
/* ------------- CPºË´æÔÚµÄÄ£¿éID£¬Æ½Ì¨ÄÚ²¿Ê¹Ó㬲»¿ª·Å¸ø¿Í»§ ------------- */
@@ -262,6 +265,10 @@
MSG_CMD_DRV_BASE = 0x6901,
MSG_CMD_DRV_END = 0x7000,
+ /*wifi cap inter*/
+ MSG_CMD_WIFI_CAP_BASE = 0x7201,
+ MSG_CMD_WIFI_CAP_END = 0x7400,
+
//kwatchtest
MSG_CMD_KWATCH_BASE = 0x8001,
MSG_CMD_KWATCH_END = 0x9000,
@@ -281,6 +288,10 @@
//absvr
MSG_CMD_ABSVR_BASE = 0x9201,
MSG_CMD_ABSVR_END = 0x9300,
+
+ //mnet_whitelist
+ MSG_CMD_MNET_WHITELIST_BASE = 0x9301,
+ MSG_CMD_MNET_WHITELIST_END = 0x9400,
};
#endif
diff --git a/ap/app/include/wifi_msg.h b/ap/app/include/wifi_msg.h
index 3cba081..83ae376 100755
--- a/ap/app/include/wifi_msg.h
+++ b/ap/app/include/wifi_msg.h
@@ -110,6 +110,12 @@
MSG_CMD_WIFI_STATION_DEBUG_DUMP,
MSG_CMD_WIFI_STATION_WPA_CMD,
MSG_CMD_WIFI_STATION_CONNECTED_ENABLE_AP_CMD, //apstaÁ¬½ÓÈȵã³É¹¦Æô¶¯ap
+
+ //cap->ap
+ MSG_CMD_CAP_STA_SET_PARAM, //sta ssid auth pw
+ MSG_CMD_CAP_STA_ENABLE, //ap on off
+ MSG_CMD_CAP_STA_SCAN, //scan
+
MSG_CMD_WIFI_STATION_END, //apstationµÄÏûÏ¢·¶Î§end
//timing of sleep wake up
@@ -130,6 +136,29 @@
MSG_CMD_AP_STA_CONNECTED,
MSG_CMD_AP_STA_DISCONNECTED,
+ //cap recv
+ MSG_CMD_CAP_WIFI_STATUS,
+ MSG_CMD_CAP_AP_STATUS,
+ MSG_CMD_CAP_AP_STA_CHANGE,
+ MSG_CMD_CAP_STA_STATUS,
+ MSG_CMD_CAP_STA_SCAN_RES,
+
+ //cap send
+ MSG_CMD_CAP_WIFI_ENABLE, //wifiÇý¶¯³õʼ»¯, wlan up
+ MSG_CMD_CAP_WIFI_DISABLE, //wifiÇý¶¯È¥³õʼ»¯, wlan down
+ MSG_CMD_CAP_WIFI_WORK_MODE, //wifi¹¤×÷ģʽÉèÖÃ
+ MSG_CMD_CAP_WIFI_SET_SSID, //
+ MSG_CMD_CAP_WIFI_SET_HIDESSID, //0 not hide, 1 hide
+ MSG_CMD_CAP_WIFI_SET_MODE, //80211 mode bgn...
+ MSG_CMD_CAP_WIFI_SET_BANDWIDTH, //0 20M, 1 20/40M
+ //MSG_CMD_CAP_WIFI_SET_CHANNEL, //0 - 13
+ MSG_CMD_CAP_WIFI_SET_MAXSTANUM, //0 - 32
+ MSG_CMD_CAP_WIFI_SET_CC_CH, //country code, channel
+ MSG_CMD_CAP_WIFI_SET_ACL,
+ MSG_CMD_CAP_WIFI_SET_AUTH, //wpa
+ MSG_CMD_CAP_WIFI_AP_ENABLE, //ap on off
+
+
};
@@ -478,4 +507,200 @@
} zte_wlan_set_e_flags;
+
+//cap:api->wlan_proxy->ap:wlan_server
+typedef enum
+{
+ IN_WIFI_STATUS_DEV_INIT_FAIL = 0,
+ IN_WIFI_STATUS_INVALID_MAC
+} inner_wifi_status_e;
+
+//nei bu zhuan huan yong
+//same as sc_wifi_ap_index_e
+typedef enum
+{
+ IN_WIFI_AP_INDEX_MIN = -1,
+ IN_WIFI_AP_INDEX_AP0 = 0,
+ //IN_WIFI_AP_INDEX_AP1,
+ IN_WIFI_AP_INDEX_MAX
+} inner_wifi_ap_id_e;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char ssid[WIFI_SSID_LEN]; //ssid should be less than 32 bytes
+} wlan_ap_ssid_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int ssid_hide; //0 not hide, 1 hide
+} wlan_ap_ssid_hide_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int wl_mode; //6 bgnax, 4 bgn
+} wlan_ap_wl_mode_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int htMode; //1 20/40M, 0 20M
+ //int force_40m;
+} wlan_ap_bandwidth_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int max_sta_num; //1-32
+} wlan_ap_max_sta_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char countrycode[3]; //default CN
+ int channel; //0-13
+} wlan_ap_cc_ch_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int acl_rule; //0 none, 1 white, 2 black
+ char acl_list[360]; //max 10 mac1;mac2...
+} wlan_ap_acl_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char authmode[WLAN_SECURITY_LEN];
+ char encrypt[WLAN_ENCRYPT_LEN]; //realtek use
+ char pwd[WLAN_PSK_LEN]; //max 64
+} wlan_ap_auth_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int enable; //1 ap on , 0 ap off
+} wlan_ap_enable_t;
+
+//station
+typedef struct {
+ int enable; //1 ap on , 0 ap off
+} wlan_sta_enable_t;
+
+
+//ap->cap:ind
+//½á¹¹Ìå,ºÃÀ©Õ¹
+typedef struct {
+ int wifi_status;
+} wlan_status_t;
+
+//same as sc_wifi_work_mode_e to do: hu huan
+typedef enum
+{
+ IN_WIFI_WORK_MODE_MIN = -1,
+ IN_WIFI_WORK_MODE_AP0 = 0,
+ IN_WIFI_WORK_MODE_AP0_STA,
+ IN_WIFI_WORK_MODE_MAX
+} inner_wifi_work_mode_e;
+
+//same as sc_wifi_ap_status_e
+typedef enum
+{
+ IN_WIFI_AP_STATUS_NONE = 0,
+ IN_WIFI_AP_STATUS_IDLE, //or disable
+ IN_WIFI_AP_STATUS_ENABLING,
+ IN_WIFI_AP_STATUS_ENABLED,
+ IN_WIFI_AP_STATUS_DISABLING,
+ IN_WIFI_AP_STATUS_ERROR
+} inner_wifi_ap_status_e;
+
+typedef struct {
+ int idx;
+ int pre_status; //½öcap×ÔÐи³Öµ
+ int status;
+ char ifname[32];
+ //char bssid[18];
+} wlan_ap_status_t;
+
+//sc_wifi_sta_connect_status_t
+typedef struct {
+ int idx;
+ int is_connected;
+ char macaddr[18];
+} wlan_sta_connect_status_t;
+
+//cap station
+typedef struct {
+ char ssid[WIFI_SSID_LEN]; //ssid should be less than 32 bytes
+ char authmode[WLAN_SECURITY_LEN];
+ char encrypt[WLAN_ENCRYPT_LEN]; //realtek use
+ char pwd[WLAN_PSK_LEN]; //max 64
+} wlan_sta_param_t;
+
+//same as sc_wifi_sta_status_e
+typedef enum
+{
+ IN_WIFI_STA_STATUS_NONE, //close
+ IN_WIFI_STA_STATUS_IDLE,
+ IN_WIFI_STA_STATUS_CONNECTING, //Trying to associate with
+ IN_WIFI_STA_STATUS_ASSOCIATED, //dhcping
+ IN_WIFI_STA_STATUS_CONNECTED,
+ IN_WIFI_STA_STATUS_DISCONNECTED,
+ IN_WIFI_STA_STATUS_ERROR
+} in_wifi_sta_status_e;
+
+//same as sc_wifi_reason_code_e
+typedef enum
+{
+ IN_WIFI_REASON_CODE_NONE,
+ IN_WIFI_REASON_CODE_WRONG_KEY,
+ IN_WIFI_REASON_CODE_AUTH_FAILED,
+ IN_WIFI_REASON_CODE_CONN_FAILED,
+ IN_WIFI_REASON_CODE_SET_FAILED,
+ IN_WIFI_REASON_CODE_DHCP_FAILED
+} in_wifi_reason_code_e;
+
+//same as sc_wifi_sta_status_t
+typedef struct {
+ int pre_status; //proxy record
+
+ int status; //in_wifi_sta_status_e
+ char ifname[32];
+ char ap_bssid[18]; //cur ap mac
+ //int rssi;
+ unsigned char signal_level;
+ unsigned char has_addr;
+ char str_addr[16]; //255.255.255.255 16
+ unsigned char has_addr6;
+ char str_addr6[48]; //0001:0002:0003:0004:0001:0002:0003:0004 40 (+8:, 48)
+ int reason_code; //in_wifi_reason_code_e
+} wlan_sta_status_t;
+
+typedef struct {
+ int result;
+ wlan_sta_status_t status;
+} scwifi_sta_stat_res_t;
+
+
+#define CAP_WIFI_MAX_SCAN_CNT 30
+
+#define CAP_WIFI_AUTH_UNSUP -1 //"not support");
+#define CAP_WIFI_AUTH_OPEN 0 //"OPEN");
+#define CAP_WIFI_AUTH_WPA2 1 //"WPA2PSK");
+#define CAP_WIFI_AUTH_WPA3 2 //"WPA3Personal");
+#define CAP_WIFI_AUTH_WPA12 3 //"WPAPSKWPA2PSK");
+#define CAP_WIFI_AUTH_WPA23 4 //"WPA2WPA3");
+
+//sc_wifi_sta_scan_info_t
+typedef struct
+{
+ char bssid[18];//mac
+ char essid[33];
+ //int signal;
+ unsigned char signal_level; //0-5, max 5
+ //int frequency;
+ unsigned char channel; //1-13
+ unsigned char auth;
+} wlan_sta_scan_info_t;
+
+//sc_wifi_sta_scan_list_t
+typedef struct
+{
+ int cnt;
+ wlan_sta_scan_info_t info[CAP_WIFI_MAX_SCAN_CNT];
+} wlan_sta_scan_list_t;
+
#endif
diff --git a/ap/app/qrencode/Makefile b/ap/app/qrencode/Makefile
old mode 100644
new mode 100755
index a78c42a..77c685d
--- a/ap/app/qrencode/Makefile
+++ b/ap/app/qrencode/Makefile
@@ -11,11 +11,11 @@
OBJS2 = common.o png2bmp.o
-LDLIBS += -lpng -L$(zte_lib_path)/libpng
-LDLIBS += -L$(zte_lib_path)/zlib/build -lz -lm
+LDLIBS += -lpng -L$(zte_lib_path)/libpng/install/lib
+LDLIBS += -L$(zte_lib_path)/zlib/install/lib -lz -lm
CFLAGS += -I./
-CFLAGS += -I$(zte_lib_path)/libpng
-CFLAGS += -I$(zte_lib_path)/zlib/zlib-1.2.11
+CFLAGS += -I$(zte_lib_path)/libpng/install/include
+CFLAGS += -I$(zte_lib_path)/zlib/install/include
diff --git a/ap/app/service/Makefile b/ap/app/service/Makefile
new file mode 100755
index 0000000..9c78cb6
--- /dev/null
+++ b/ap/app/service/Makefile
@@ -0,0 +1,53 @@
+#*******************************************************************************
+# include ZTE application makefile
+#*******************************************************************************
+include $(COMMON_MK)
+
+#*******************************************************************************
+# execute
+#*******************************************************************************
+EXEC = service
+
+#*******************************************************************************
+# objects
+#*******************************************************************************
+OBJS = service.o
+
+#*******************************************************************************
+# include path
+#*******************************************************************************
+CFLAGS = -I.
+CFLAGS += -I$(zte_lib_path)/binder/include
+CFLAGS += -I$(zte_lib_path)/binder/include/utils
+CFLAGS += -I$(zte_lib_path)/binder/include/cutils
+CFLAGS += -I$(zte_lib_path)/binder/include/log
+
+CFLAGS += -g -O0 -Werror=implicit-function-declaration
+
+LOCAL_CPPFLAGS += $(CFLAGS) -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+
+LDLIBS += -lpthread -lstdc++
+LDLIBS += -lbinder -L$(zte_lib_path)/binder
+LDLIBS += -lutils -L$(zte_lib_path)/binder/libutils
+LDLIBS += -lcutils -L$(zte_lib_path)/binder/libcutils
+LDLIBS += -llog -L$(zte_lib_path)/binder/liblog
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+all: $(EXEC)
+
+#$(EXEC): $(OBJS)
+# $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
+# @cp $@ $@.elf
+
+romfs:
+ $(ROMFSINST) $(EXEC) /bin/$(EXEC)
+
+#clean:
+# -rm -f $(EXEC) *.elf *.gdb *.o
+
+#%.o:%.cpp
+# @echo Compile $<
+# $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@
+
diff --git a/ap/app/service/service b/ap/app/service/service
new file mode 100755
index 0000000..a689bf4
--- /dev/null
+++ b/ap/app/service/service
Binary files differ
diff --git a/ap/app/service/service.elf b/ap/app/service/service.elf
new file mode 100755
index 0000000..a689bf4
--- /dev/null
+++ b/ap/app/service/service.elf
Binary files differ
diff --git a/ap/app/service_test/Makefile b/ap/app/service_test/Makefile
new file mode 100755
index 0000000..2e33c68
--- /dev/null
+++ b/ap/app/service_test/Makefile
@@ -0,0 +1,49 @@
+#*******************************************************************************
+# include application makefile
+#*******************************************************************************
+include $(COMMON_MK)
+
+#*******************************************************************************
+# execute
+#*******************************************************************************
+EXEC_server = test_binder_server
+EXEC_client = test_binder_client
+EXEC_server_async = test_binder_server_async
+
+#*******************************************************************************
+# objects
+#*******************************************************************************
+#SUB_MDL = ipc client service demo
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+#.PHONY: $(SUB_MDL)
+
+#all: $(SUB_MDL)
+# @echo $(SUB_MDL)
+# @echo "Compiling has completed!"
+all: $(EXEC_server) $(EXEC_client) $(EXEC_server_async)
+
+romfs:
+ $(ROMFSINST) $(EXEC_server) /bin/$(EXEC_server)
+ $(ROMFSINST) $(EXEC_client) /bin/$(EXEC_client)
+ $(ROMFSINST) $(EXEC_server_async) /bin/$(EXEC_server_async)
+ #@cp $(EXEC_server) $(EXEC_server).elf
+ #@cp $(EXEC_client) $(EXEC_client).elf
+
+#clean:
+# for lib in ${SUB_MDL} ; do \
+# ${MAKE} -j1 -C $$lib clean ; \
+# done;
+# -rm -f $(EXEC_server) $(EXEC_client) *.elf *.gdb *.o
+
+
+#%.o:%.cpp
+# @echo Compile $<
+# $(CXX) $(LOCAL_CPPFLAGS) $(LOCAL_C_INCLUDES) -c $< -o $@
+
+
+#$(SUB_MDL):
+# [ ! -d $@ ] || ${MAKE} -C $@ all
+
diff --git a/ap/app/service_test/test_binder_client b/ap/app/service_test/test_binder_client
new file mode 100755
index 0000000..a68ee11
--- /dev/null
+++ b/ap/app/service_test/test_binder_client
Binary files differ
diff --git a/ap/app/service_test/test_binder_server b/ap/app/service_test/test_binder_server
new file mode 100755
index 0000000..e3241f1
--- /dev/null
+++ b/ap/app/service_test/test_binder_server
Binary files differ
diff --git a/ap/app/service_test/test_binder_server_async b/ap/app/service_test/test_binder_server_async
new file mode 100755
index 0000000..ec5d595
--- /dev/null
+++ b/ap/app/service_test/test_binder_server_async
Binary files differ
diff --git a/ap/app/servicemanager/Makefile b/ap/app/servicemanager/Makefile
new file mode 100755
index 0000000..6d25be6
--- /dev/null
+++ b/ap/app/servicemanager/Makefile
@@ -0,0 +1,47 @@
+#*******************************************************************************
+# include ZTE application makefile
+#*******************************************************************************
+include $(COMMON_MK)
+
+#*******************************************************************************
+# execute
+#*******************************************************************************
+EXEC = servicemanager
+
+#*******************************************************************************
+# objects
+#*******************************************************************************
+OBJS = binder.o service_manager.o
+
+#*******************************************************************************
+# include path
+#*******************************************************************************
+CFLAGS += -I.
+CFLAGS += -I$(zte_lib_path)/binder/include
+CFLAGS += -I$(zte_lib_path)/binder/include/utils
+CFLAGS += -I$(zte_lib_path)/binder/include/cutils
+CFLAGS += -I$(zte_lib_path)/binder/include/log
+
+CFLAGS += -g -O0 -Werror=implicit-function-declaration -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+
+LDLIBS += -lpthread -lstdc++
+LDLIBS += -lbinder -L$(zte_lib_path)/binder
+LDLIBS += -lutils -L$(zte_lib_path)/binder/libutils
+LDLIBS += -lcutils -L$(zte_lib_path)/binder/libcutils
+LDLIBS += -llog -L$(zte_lib_path)/binder/liblog
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+all: $(EXEC)
+
+#$(EXEC): $(OBJS)
+# $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
+# @cp $@ $@.elf
+
+romfs:
+ $(ROMFSINST) $(EXEC) /bin/$(EXEC)
+
+#clean:
+# -rm -f $(EXEC) *.elf *.gdb *.o
+
diff --git a/ap/app/servicemanager/servicemanager b/ap/app/servicemanager/servicemanager
new file mode 100755
index 0000000..107c0aa
--- /dev/null
+++ b/ap/app/servicemanager/servicemanager
Binary files differ
diff --git a/ap/app/servicemanager/servicemanager.elf b/ap/app/servicemanager/servicemanager.elf
new file mode 100755
index 0000000..107c0aa
--- /dev/null
+++ b/ap/app/servicemanager/servicemanager.elf
Binary files differ
diff --git a/ap/app/shm_test/Makefile b/ap/app/shm_test/Makefile
index 0e1093f..90a203f 100755
--- a/ap/app/shm_test/Makefile
+++ b/ap/app/shm_test/Makefile
@@ -3,8 +3,21 @@
include $(COMMON_MK)
##############USER COMIZE BEGIN################
-EXEC = shm_test
-OBJS = shm_test.o
+EXEC1 = shm_read
+OBJS1 = shm_read.o
+
+EXEC2 = shm_write
+OBJS2 = shm_write.o
+EXEC3 = shm_test
+OBJS3 = shm_test.o
+EXEC4 = shm_posix_test
+OBJS4 = shm_posix_test.o
+
+EXEC5 = shm_posix_read
+OBJS5 = shm_posix_read.o
+
+EXEC6 = shm_posix_write
+OBJS6 = shm_posix_write.o
CFLAGS += -I.
CFLAGS += -I$(APP_DIR)/include
@@ -12,23 +25,45 @@
CFLAGS += -g -Werror=implicit-function-declaration
-LDLIBS += -lpthread
+LDLIBS += -lpthread -lrt
##############USER COMIZE END##################
#*******************************************************************************
# targets
#*******************************************************************************
-all: $(EXEC)
+all: $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6)
-$(EXEC): $(OBJS)
+$(EXEC1): $(OBJS1)
$(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
@cp $@ $@.elf
+$(EXEC2): $(OBJS2)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ @cp $@ $@.elf
+$(EXEC3): $(OBJS3)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ @cp $@ $@.elf
+
+$(EXEC4): $(OBJS4)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ @cp $@ $@.elf
+
+$(EXEC5): $(OBJS5)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ @cp $@ $@.elf
+
+$(EXEC6): $(OBJS6)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ @cp $@ $@.elf
romfs:
- $(ROMFSINST) $(EXEC) /bin/$(EXEC)
-
+ $(ROMFSINST) $(EXEC1) /bin/$(EXEC1)
+ $(ROMFSINST) $(EXEC2) /bin/$(EXEC2)
+ $(ROMFSINST) $(EXEC3) /bin/$(EXEC3)
+ $(ROMFSINST) $(EXEC4) /bin/$(EXEC4)
+ $(ROMFSINST) $(EXEC5) /bin/$(EXEC5)
+ $(ROMFSINST) $(EXEC6) /bin/$(EXEC6)
+
clean:
- -@rm -f $(EXEC) *.elf *.gdb *.o
-
+ -@rm -f $(EXEC1) $(EXEC2) $(EXEC3) $(EXEC4) $(EXEC5) $(EXEC6) *.elf *.gdb *.o
\ No newline at end of file
diff --git a/ap/app/shm_test/shm_posix_read.c b/ap/app/shm_test/shm_posix_read.c
new file mode 100755
index 0000000..15576f3
--- /dev/null
+++ b/ap/app/shm_test/shm_posix_read.c
@@ -0,0 +1,170 @@
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/**
+ * ºê¶¨Òå
+ */
+#define SHM_NAME_SIZE (128)
+#define SHM_TEXT_SIZE (8192)
+#define SHM_PAGE_SIZE (4096)
+#define SHM_ALLOC_ONE_PAGE_SIZE (1024)
+#define SHM_ALLOC_TWO_PAGE_SIZE (8100)
+#define SHM_ALLOC_FOUR_PAGE_SIZE (16000)
+#define SHM_NAME_CROSS_PREFIX ("remote-")
+
+/**
+ * Êý¾ÝÀàÐͶ¨Òå
+ */
+typedef int bool;
+enum
+{
+ FALSE,
+ TRUE
+};
+
+typedef struct
+{
+ unsigned int shm_size;
+ char name[SHM_NAME_SIZE];
+}shm_node_t;
+
+typedef struct
+{
+ int write;
+ char data[SHM_TEXT_SIZE];
+}shm_use_remote;
+
+shm_node_t shm_node;
+
+bool shm_is_remote(const char *shm_name)
+{
+ if (!shm_name)
+ return FALSE;
+ if (strncmp(shm_name, SHM_NAME_CROSS_PREFIX, strlen(SHM_NAME_CROSS_PREFIX)) == 0)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+int main (int argc, char *argv[])
+{
+ int opt;
+ int shmfd = 0;
+ int ret = 0;
+ unsigned int shm_size = 0;
+ char *name = NULL;
+ char *pshm = NULL;
+ char *read_data = NULL;
+ extern char *optarg;
+
+ shm_use_remote *shared;
+
+ while ((opt = getopt(argc,argv,"n:d:s::")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'n':
+ name = optarg;
+ break;
+ case 'd':
+ read_data = optarg;
+ break;
+ case 's':
+ shm_size = atoi(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!name || !read_data)
+ {
+ printf("param error: you can input \"shm_posix_read -n \"remote-shm_test\" -d \"123456\" -s1024 \n");
+ printf("or \"shm_posix_read -n \"remote-shm_test\" -d \"123456\" \n");
+ printf("-n \"remote-shm_test\": create a shm using name remote-shm_test\n");
+ printf("-d \"123456\": if we write 123456 to shm, then can read 123456 form shm, the test case is pass! \n");
+ printf("-s1024: set the size of shm, then the default size is 1024 \n");
+ return -1;
+ }
+
+ if (shm_size == 0)
+ shm_size = SHM_ALLOC_ONE_PAGE_SIZE;
+
+ printf("AP read test: name is %s, shm_size is %d\n", name, shm_size);
+
+ shmfd = shm_open(name, O_CREAT | O_RDWR, 0666);
+ if(shmfd < 0)
+ {
+ perror("shm_open fail\n");
+ exit(1);
+ }
+ printf("shm_open return ok\n");
+
+ if(ftruncate(shmfd, shm_size) == -1)
+ {
+ perror("ftruncate fail\n");
+ exit(1);
+ }
+
+ pshm = (char *)mmap(NULL, shm_size, PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
+ if (pshm == MAP_FAILED)
+ {
+ perror("mmap fail\n");
+ exit(1);
+ }
+ printf("mmap return ok\n");
+ shm_node.shm_size = shm_size;
+ strncpy(shm_node.name, name, SHM_NAME_SIZE-1);
+
+ shared = (shm_use_remote *)pshm;
+ shared->write = 1;
+ printf("read_data %s ok\n", read_data);
+
+ while(1)
+ {
+ if(strncmp(shared->data, read_data, sizeof(read_data)) == 0)
+ {
+ printf("Success, AP read %s from shm\n", read_data);
+ break;
+ }
+ else
+ sleep(2);
+ }
+
+ ret = munmap(pshm, shm_size);
+ if(ret < 0)
+ {
+ printf("munmap return errno %d: %s\n", errno, strerror(errno));
+ exit(1);
+ }
+
+ if(shm_is_remote(name))
+ {
+ ret = shm_unlink(name);
+ if(ret < 0)
+ {
+ printf("shm_unlink errno %d: %s\n", errno, strerror(errno));
+ exit(1);
+ }
+ }
+ close(shmfd);
+
+ printf("shm posix read end\n");
+ return 0;
+}
+
diff --git a/ap/app/shm_test/shm_posix_test.c b/ap/app/shm_test/shm_posix_test.c
new file mode 100755
index 0000000..eec9f8e
--- /dev/null
+++ b/ap/app/shm_test/shm_posix_test.c
@@ -0,0 +1,288 @@
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/**
+ * ºê¶¨Òå
+ */
+#define SHM_TEST_ALLOC_THREAD (0)
+#define SHM_TEST_MEMGET_THREAD (1)
+#define SHM_TEST_UNLINK_THREAD (2)
+#define SHM_TEST_TRANS_THREAD (3)
+#define SHM_TEST_THREAD_NUM (4)
+#define SHM_TEST_STR_NUM (20)
+#define SHM_TEST_CAP_INIT_VALUE (0x16)
+
+#define SHM_TEST_MARK_0X1 (0x1)
+#define SHM_TEST_MARK_0X3 (0x3)
+#define SHM_TEST_MARK_0X5 (0x5)
+#define SHM_TEST_MARK_0X7 (0x7)
+#define SHM_TEST_MARK_NUM (0xA)
+
+#define SHM_PAGE_SIZE (4096)
+#define SHM_ALLOC_ONE_PAGE_SIZE (1024)
+#define SHM_ALLOC_TWO_PAGE_SIZE (8100)
+#define SHM_ALLOC_FOUR_PAGE_SIZE (16000)
+
+#define SHM_TEST_READ_FROM_SHM_PAGE0 (0x0A)
+#define SHM_TEST_WRITE_TO_SHM_PAGE1 (0x1B)
+#define SHM_TEST_READ_FROM_SHM_PAGE2 (0x2A)
+#define SHM_TEST_WRITE_TO_SHM_PAGE3 (0x3B)
+
+#define SHM_IPC_FILE_NAME "remote-posix_test"
+#define SHM_TRANS_FILE_NAME "remote-posix_transfer"
+
+/**
+ * È«¾Ö±äÁ¿¶¨Òå
+ */
+pthread_t shm_pcross_thread;
+pthread_t shm_unlink_thread;
+
+int g_shmfd[SHM_TEST_THREAD_NUM] = {0};
+char *g_pshm[SHM_TEST_THREAD_NUM] = {NULL};
+int g_mark_path[SHM_TEST_MARK_NUM] = {0xFFFF};
+
+void *ap_shm_fourpage_cross(void* args)
+{
+ int i = 0;
+ int ret = 0;
+ int shmfd = 0;
+ char test_num = 0;
+ char *pshm = NULL;
+ struct stat buf;
+
+ prctl(PR_SET_NAME, "shm_posix_trans_task");
+
+ shmfd = shm_open(SHM_TRANS_FILE_NAME, O_CREAT | O_RDWR, 0666);
+ if(shmfd < 0)
+ {
+ printf("shm_open return error\n");
+ assert(0);
+ }
+
+ if(ftruncate(shmfd, SHM_ALLOC_FOUR_PAGE_SIZE) == -1)
+ {
+ perror("ftruncate failed\n");
+ exit(1);
+ }
+
+ if (fstat(shmfd, &buf) == -1)
+ {
+ printf("fstat error\n");
+ }
+ printf("size = %d, mode = %o\n",buf.st_size, buf.st_mode & 0777);
+
+ pshm = (char *)mmap(NULL, SHM_ALLOC_FOUR_PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
+ if (pshm == NULL)
+ {
+ perror("mmap failed\n");
+ exit(1);
+ }
+ g_shmfd[SHM_TEST_TRANS_THREAD] = shmfd;
+ g_pshm[SHM_TEST_TRANS_THREAD] = pshm;
+
+ for(;;)
+ {
+ while(1)
+ {
+ test_num = *(char *)pshm;
+ if(test_num == SHM_TEST_READ_FROM_SHM_PAGE0)
+ {
+ *(char *)(pshm + SHM_PAGE_SIZE) = SHM_TEST_WRITE_TO_SHM_PAGE1;
+ g_mark_path[2] = SHM_TEST_READ_FROM_SHM_PAGE0;
+ printf("shmat test_num, AP write %x to shm\n",SHM_TEST_WRITE_TO_SHM_PAGE1);
+ break;
+ }
+ sleep(2);
+ }
+ while(1)
+ {
+ test_num = *(char *)(pshm + 2 * SHM_PAGE_SIZE);
+ if(test_num == SHM_TEST_READ_FROM_SHM_PAGE2)
+ {
+ *(char *)(pshm + 3 * SHM_PAGE_SIZE) = SHM_TEST_WRITE_TO_SHM_PAGE3;
+ g_mark_path[4] = SHM_TEST_READ_FROM_SHM_PAGE2;
+ printf("shmat test_num, AP write %x to shm\n", SHM_TEST_WRITE_TO_SHM_PAGE3);
+ break;
+ }
+ sleep(2);
+ }
+ if (i++ >= 10)
+ break;
+ }
+ ret = munmap(pshm, SHM_ALLOC_FOUR_PAGE_SIZE);
+ if(ret < 0)
+ {
+ printf("munmap errno %d: %s\n", errno, strerror(errno));
+ exit(1);
+ }
+ printf("munmap return ok\n");
+
+ ret = shm_unlink(SHM_TRANS_FILE_NAME);
+ if(ret < 0)
+ {
+ printf("shm_unlink errno %d: %s\n", errno, strerror(errno));
+ return -1;
+ }
+
+ printf("shm_unlink return ok\n");
+ close(shmfd);
+ while(1)
+ {
+ sleep(5);
+ }
+}
+
+void *ap_write_and_unlink(void* args)
+{
+ int shmfd = 0;
+ int ret = 0;
+ char *pshm = NULL;
+ struct stat buf;
+ int test_num = 0;
+
+ prctl(PR_SET_NAME, "shm_posix_task");
+
+ shmfd = shm_open(SHM_IPC_FILE_NAME, O_CREAT | O_RDWR, 0666);
+ if(shmfd < 0)
+ {
+ printf("shm_open return error\n");
+ assert(0);
+ }
+
+ if(ftruncate(shmfd, SHM_ALLOC_TWO_PAGE_SIZE) == -1)
+ {
+ perror("ftruncate failed\n");
+ exit(1);
+ }
+
+ if (fstat(shmfd, &buf) == -1)
+ {
+ printf("fstat error\n");
+ }
+ printf("size = %d, mode = %o\n",buf.st_size, buf.st_mode & 0777);
+
+ pshm = (char *)mmap(NULL, SHM_ALLOC_TWO_PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
+ if (pshm == MAP_FAILED)
+ {
+ perror("mmap failed\n");
+ exit(1);
+ }
+
+ g_shmfd[SHM_TEST_ALLOC_THREAD] = shmfd;
+ g_pshm[SHM_TEST_ALLOC_THREAD] = pshm;
+
+ while(1)
+ {
+ test_num = *(int *)pshm;
+ if(test_num == SHM_TEST_CAP_INIT_VALUE)
+ {
+ *(int *)pshm = SHM_TEST_MARK_0X1 + 1;
+ g_mark_path[1] = SHM_TEST_MARK_0X1;
+ printf("shmat test_num 0x16, g_mark_path[1] = %x\n", g_mark_path[1]);
+ break;
+ }
+ sleep(1);
+ }
+
+ while(1)
+ {
+ test_num = *(int *)pshm;
+ if(test_num == SHM_TEST_MARK_0X3)
+ {
+ *(int *)pshm = SHM_TEST_MARK_0X3 + 1;
+ g_mark_path[3] = SHM_TEST_MARK_0X3;
+ printf("shmat test_num 3, g_mark_path[3] before= %x\n", g_mark_path[3]);
+ break;
+ }
+ sleep(1);
+ }
+
+ while(1)
+ {
+ test_num = *(int *)pshm;
+ if(test_num == SHM_TEST_MARK_0X5)
+ {
+ *(int *)pshm = SHM_TEST_MARK_0X5 + 1;
+ g_mark_path[5] = SHM_TEST_MARK_0X5;
+ printf("shmat test_num 5, g_mark_path5 before= %x\n", g_mark_path[5]);
+ break;
+ }
+ sleep(1);
+ }
+
+ while(1)
+ {
+ test_num = *(int *)pshm;
+ if(test_num == SHM_TEST_MARK_0X7)
+ {
+ *(int *)pshm = SHM_TEST_MARK_0X7 + 1;
+ g_mark_path[7] = SHM_TEST_MARK_0X7;
+ printf("shmat test_num 7, g_mark_path7 before= %x\n", g_mark_path[7]);
+ break;
+ }
+ sleep(1);
+ }
+ memcpy(pshm + 32, "123456", SHM_TEST_STR_NUM);
+
+ ret = munmap(pshm, SHM_ALLOC_TWO_PAGE_SIZE);
+ if(ret < 0)
+ {
+ printf("munmap errno %d: %s\n", errno, strerror(errno));
+ exit(1);
+ }
+ ret = shm_unlink(SHM_IPC_FILE_NAME);
+ if(ret < 0)
+ {
+ printf("shm_unlink errno %d: %s\n", errno, strerror(errno));
+ assert(0);
+ }
+ close(shmfd);
+
+ while(1)
+ {
+ sleep(5);
+ }
+ return 0;
+}
+
+
+int main (int argc, char *argv[])
+{
+ int ret = 0;
+
+ ret = pthread_create(&shm_pcross_thread, NULL, ap_shm_fourpage_cross, NULL);
+ if(ret != 0)
+ {
+ printf("pthread_create shm_pcross_thread error\n");
+ }
+
+ ret = pthread_create(&shm_unlink_thread, NULL, ap_write_and_unlink, NULL);
+ if(ret != 0)
+ {
+ printf("pthread_create shm_unlink_thread error\n");
+ }
+
+ if(shm_pcross_thread > 0)
+ pthread_join(shm_pcross_thread, NULL);
+
+ if(shm_unlink_thread > 0)
+ pthread_join(shm_unlink_thread, NULL);
+
+ return 0;
+}
+
diff --git a/ap/app/shm_test/shm_posix_write.c b/ap/app/shm_test/shm_posix_write.c
new file mode 100755
index 0000000..4752fc1
--- /dev/null
+++ b/ap/app/shm_test/shm_posix_write.c
@@ -0,0 +1,150 @@
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/**
+ * ºê¶¨Òå
+ */
+#define SHM_NAME_SIZE (128)
+#define SHM_TEXT_SIZE (8192)
+#define SHM_PAGE_SIZE (4096)
+#define SHM_ALLOC_ONE_PAGE_SIZE (1024)
+#define SHM_ALLOC_TWO_PAGE_SIZE (8100)
+#define SHM_ALLOC_FOUR_PAGE_SIZE (16000)
+#define SHM_MIN(x,y) ((x)<(y)?(x):(y))
+
+typedef struct
+{
+ unsigned int shm_size;
+ char name[SHM_NAME_SIZE];
+}shm_node_t;
+
+typedef struct
+{
+ int write;
+ char data[SHM_TEXT_SIZE];
+}shm_use_remote;
+
+shm_node_t shm_node;
+
+int main (int argc, char *argv[])
+{
+ int opt;
+ int ret = 0;
+ int copy_size = 0;
+ unsigned int shm_size = 0;
+ int shmfd = 0;
+ char *name = NULL;
+ char *pshm = NULL;
+ char *write_data = NULL;
+ extern char *optarg;
+ shm_use_remote *shared;
+
+ while ((opt = getopt(argc,argv,"n:d:s::")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'n':
+ name = optarg;
+ break;
+ case 'd':
+ write_data = optarg;
+ break;
+ case 's':
+ shm_size = atoi(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!name || !write_data)
+ {
+ printf("param error: you can input \"shm_posix_write -n \"remote-shm_test\" -d \"123456\" -s1024 \n");
+ printf("or \"shm_posix_write -n \"remote-shm_test\" -d \"123456\" \n");
+ printf("-k -200: create a shm using name remote-shm_test\n");
+ printf("-d \"123456\": the data write to shm: for example, if we write 123456 to shm, then can read 123456 form shm, the test case is pass! \n");
+ printf("-s1024: set the size of shm, then the default size is 1024 \n");
+ return -1;
+ }
+ if (shm_size == 0)
+ shm_size = SHM_ALLOC_ONE_PAGE_SIZE;
+
+ printf("AP write test: name is %s, shm_size is %d\n", name, shm_size);
+
+ shmfd = shm_open(name, O_CREAT | O_RDWR, 0666);
+ if(shmfd < 0)
+ {
+ printf("shm_open return error\n");
+ assert(0);
+ }
+ printf("AP write test: shm_open shmfd %d\n",shmfd);
+
+ if(ftruncate(shmfd, shm_size) == -1)
+ {
+ perror("ftruncate failed\n");
+ exit(1);
+ }
+
+ pshm = (char *)mmap(NULL, shm_size, PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
+ if (pshm == MAP_FAILED)
+ {
+ perror("mmap failed\n");
+ exit(1);
+ }
+ shm_node.shm_size = shm_size;
+ strncpy(shm_node.name, name, SHM_NAME_SIZE-1);
+
+ printf("AP write test : mmap return ok\n");
+ shared = (shm_use_remote *)pshm;
+ copy_size = SHM_MIN(strlen(write_data), (SHM_TEXT_SIZE - 1));
+
+ printf("AP write test : shared->write %d\n",shared->write);
+
+ while(1)
+ {
+ if(shared->write == 1)
+ {
+ strncpy(shared->data, write_data, copy_size);
+ printf("AP write %s to shm\n", write_data);
+ shared->write = 0;
+ break;
+ }
+ else{
+ sleep(2);
+ }
+ }
+ ret = munmap(pshm, shm_size);
+ if(ret < 0)
+ {
+ printf("munmap errno %d: %s\n", errno, strerror(errno));
+ exit(1);
+ }
+
+ ret = shm_unlink(name);
+ if(ret < 0)
+ {
+ printf("shm_unlink errno %d: %s\n", errno, strerror(errno));
+ }
+ close(shmfd);
+
+ printf("shm posix write end\n");
+
+ return 0;
+}
+
+
diff --git a/ap/app/shm_test/shm_read.c b/ap/app/shm_test/shm_read.c
new file mode 100755
index 0000000..ccf6a83
--- /dev/null
+++ b/ap/app/shm_test/shm_read.c
@@ -0,0 +1,134 @@
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/**
+ * ºê¶¨Òå
+ */
+#define SHM_TEXT_SIZE (8192)
+#define SHM_PAGE_SIZE (4096)
+#define SHM_ALLOC_ONE_PAGE_SIZE (1024)
+#define SHM_ALLOC_TWO_PAGE_SIZE (8100)
+#define SHM_ALLOC_FOUR_PAGE_SIZE (16000)
+
+typedef struct
+{
+ key_t key;
+ int shmid;
+ unsigned int shm_size;
+}shm_node_t;
+
+typedef struct
+{
+ int write;
+ char data[SHM_TEXT_SIZE];
+}shm_use_remote;
+
+shm_node_t shm_node;
+
+int main (int argc, char *argv[])
+{
+ int opt;
+ int ret = 0;
+ int shmid = 0;
+ unsigned int shm_size = 0;
+ key_t key = 0;
+ char *pshm = NULL;
+ char *read_data = NULL;
+ extern char *optarg;
+
+ shm_use_remote *shared;
+
+ while ((opt = getopt(argc,argv,"k:d:s::")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'k':
+ key = atoi(optarg);
+ break;
+ case 'd':
+ read_data = optarg;
+ break;
+ case 's':
+ shm_size = atoi(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (key == 0 || !read_data)
+ {
+ printf("param error: you can input \"shm_read -k -200 -d \"123456\" -s1024 \n");
+ printf("or \"shm_read -k -200 -d \"123456\" \n");
+ printf("-k -200: create a shm using key -200\n");
+ printf("-d \"123456\": if we write 123456 to shm, then can read 123456 form shm, the test case is pass! \n");
+ printf("-s1024: set the size of shm, then the default size is 1024 \n");
+ return -1;
+ }
+
+ if (shm_size == 0)
+ shm_size = SHM_ALLOC_ONE_PAGE_SIZE;
+
+ printf("AP read test: key is %d, shm_size is %d\n", key, shm_size);
+
+ shmid = shmget(key, shm_size, 0666|IPC_CREAT);
+ if(shmid < 0)
+ {
+ printf("shmid return error\n");
+ return -1;
+ }
+
+ pshm = (char *)shmat(shmid, 0, 0);
+ if (pshm == NULL)
+ {
+ printf("shmat return error\n");
+ return -1;
+ }
+ shm_node.key = key;
+ shm_node.shm_size = shm_size;
+
+ shared = (shm_use_remote *)pshm;
+ shared->write = 1;
+
+ while(1)
+ {
+ if(strncmp(shared->data, read_data, sizeof(read_data)) == 0)
+ {
+ printf("Success, AP read %s from shm\n", read_data);
+ break;
+ }
+ else
+ sleep(2);
+ }
+
+ if(shmdt(pshm) < 0)
+ {
+ printf("shmdt errno %d: %s\n", errno, strerror(errno));
+ return -1;
+ }
+
+ if(shmctl(shmid, IPC_RMID, NULL) == -1)
+ {
+ printf("shmctl errno %d: %s\n", errno, strerror(errno));
+ return -1;
+ }
+
+ printf("shm read end\n");
+ return 0;
+}
+
diff --git a/ap/app/shm_test/shm_test.c b/ap/app/shm_test/shm_test.c
index 2bc1dea..2fdf0e5 100755
--- a/ap/app/shm_test/shm_test.c
+++ b/ap/app/shm_test/shm_test.c
@@ -55,24 +55,33 @@
{
int shmid = 0;
char *pshm = NULL;
- key_t key = 0xFFFFF001;
+ key_t key = 0xFFFFF801;
prctl(PR_SET_NAME, "shm_alloc_task");
/*alloc two pages*/
shmid = shmget(key, SHM_ALLOC_TWO_PAGE_SIZE, 0666|IPC_CREAT);
if(shmid < 0)
+ {
printf("shmid return error\n");
+ return -1;
+ }
pshm = (char *)shmat(shmid, 0, 0);
if (pshm == NULL)
+ {
printf("shmat return error\n");
+ return -1;
+ }
g_shmid[SHM_TEST_ALLOC_THREAD] = shmid;
g_pshm[SHM_TEST_ALLOC_THREAD] = pshm;
shmdt(pshm);
if(shmctl(shmid, IPC_RMID,0) == -1)
+ {
printf("shmctl error\n");
+ return -1;
+ }
while(1)
{
@@ -84,7 +93,7 @@
{
int shmid = 0;
char *pshm = NULL;
- key_t key = 0xFFFFF002;
+ key_t key = 0xFFFFF802;
prctl(PR_SET_NAME, "shm_mem_task");
@@ -114,7 +123,7 @@
int shmid = 0;
int test_num = 0;
int *pshm = NULL;
- key_t key = 0xFFFFF003;
+ key_t key = 0xFFFFF803;
prctl(PR_SET_NAME, "shm_task");
@@ -197,7 +206,7 @@
int shmid = 0;
char test_num = 0;
char *pshm = NULL;
- key_t key = 0xFFFFF004;
+ key_t key = 0xFFFFF804;
prctl(PR_SET_NAME, "shm_cross_task");
diff --git a/ap/app/shm_test/shm_write.c b/ap/app/shm_test/shm_write.c
new file mode 100755
index 0000000..a609e49
--- /dev/null
+++ b/ap/app/shm_test/shm_write.c
@@ -0,0 +1,143 @@
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/**
+ * ºê¶¨Òå
+ */
+#define SHM_TEXT_SIZE (8192)
+#define SHM_PAGE_SIZE (4096)
+#define SHM_ALLOC_ONE_PAGE_SIZE (1024)
+#define SHM_ALLOC_TWO_PAGE_SIZE (8100)
+#define SHM_ALLOC_FOUR_PAGE_SIZE (16000)
+#define SHM_MIN(x,y) ((x)<(y)?(x):(y))
+
+typedef struct
+{
+ key_t key;
+ int shmid;
+ unsigned int shm_size;
+}shm_node_t;
+
+typedef struct
+{
+ int write;
+ char data[SHM_TEXT_SIZE];
+}shm_use_remote;
+
+shm_node_t shm_node;
+
+int main (int argc, char *argv[])
+{
+ int opt;
+ int ret = 0;
+ int shmid = 0;
+ int copy_size = 0;
+ unsigned int shm_size = 0;
+ key_t key = 0;
+ char *pshm = NULL;
+ char *write_data = NULL;
+ extern char *optarg;
+ shm_use_remote *shared;
+
+ while ((opt = getopt(argc,argv,"k:d:s::")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'k':
+ key = atoi(optarg);
+ break;
+ case 'd':
+ write_data = optarg;
+ break;
+ case 's':
+ shm_size = atoi(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (key == 0 || !write_data)
+ {
+ printf("param error: you can input \"shm_write -k -200 -d \"123456\" -s1024 \n");
+ printf("or \"shm_read -k -200 -d \"123456\" \n");
+ printf("-k -200: create a shm using key -200\n");
+ printf("-d \"123456\": the data write to shm: for example, if we write 123456 to shm, then can read 123456 form shm, the test case is pass! \n");
+ printf("-s1024: set the size of shm, then the default size is 1024 \n");
+ return -1;
+ }
+ if (shm_size == 0)
+ shm_size = SHM_ALLOC_ONE_PAGE_SIZE;
+
+ printf("AP write test: key is %d, shm_size is %d\n", key, shm_size);
+
+ shmid = shmget(key, shm_size, 0666|IPC_CREAT);
+ if(shmid < 0)
+ {
+ printf("shmid return error\n");
+ return -1;
+ }
+ printf("shmid %d \n",shmid);
+
+ pshm = (char *)shmat(shmid, 0, 0);
+ if (pshm == NULL)
+ {
+ printf("shmat return error\n");
+ return -1;
+ }
+
+ printf("pshm 0x%x \n",pshm);
+ shared = (shm_use_remote *)pshm;
+
+ shm_node.key = key;
+ shm_node.shm_size = shm_size;
+
+ copy_size = SHM_MIN(strlen(write_data), (SHM_TEXT_SIZE - 1));
+
+ while(1)
+ {
+ if(shared->write == 1)
+ {
+ strncpy(shared->data, write_data, copy_size);
+ printf("AP write %s to shm\n", write_data);
+ shared->write = 0;
+ break;
+ }
+ else{
+ sleep(2);
+ }
+ }
+
+ if(shmdt(pshm) < 0)
+ {
+ printf("shmdt errno %d: %s\n", errno, strerror(errno));
+ return -1;
+ }
+
+ if(shmctl(shmid, IPC_RMID, NULL) == -1)
+ {
+ printf("shmctl errno %d: %s\n", errno, strerror(errno));
+ return -1;
+ }
+
+ printf("shm write end\n");
+
+ return 0;
+}
+
+
diff --git a/ap/app/socket_demo/Makefile b/ap/app/socket_demo/Makefile
new file mode 100755
index 0000000..6814737
--- /dev/null
+++ b/ap/app/socket_demo/Makefile
@@ -0,0 +1,35 @@
+#*******************************************************************************
+# include ZTE application makefile
+#*******************************************************************************
+include $(zte_app_mak)
+
+##############USER COMIZE BEGIN################
+
+EXEC = socket_demo
+OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
+
+CFLAGS += -I.
+CFLAGS += -I$(zte_app_path)/include
+
+
+CFLAGS += -g
+CFLAGS += -g -Werror=implicit-function-declaration
+
+LDLIBS += -lpthread
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) -Wl,--end-group
+ @cp $@ $@.elf
+
+romfs:
+ $(ROMFSINST) $(EXEC) /sbin/$(EXEC)
+
+clean:
+ -rm -f $(EXEC) *.elf *.gdb *.o
+
+
diff --git a/ap/app/socket_demo/linklist.c b/ap/app/socket_demo/linklist.c
new file mode 100755
index 0000000..ff055a7
--- /dev/null
+++ b/ap/app/socket_demo/linklist.c
@@ -0,0 +1,354 @@
+#include "linklist.h"
+
+
+linklist create_linklist(void)
+{
+ linklist L;
+ if((L=(linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc no memmory!\n");
+ return NULL;
+ }
+ L->data.fd = 0;
+ bzero(L->data.ipv4_addr,sizeof(L->data.ipv4_addr));
+ L->data.port = 0;
+
+ L->next = NULL;
+ return L;
+}
+linklist create_n_linklist(void)
+{
+ linklist L,H,r;
+ datatype x;
+ if((L=(linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc no memmory!\n");
+ return NULL;
+ }
+ L->data.fd = 0;
+ bzero(L->data.ipv4_addr,sizeof(L->data.ipv4_addr));
+ L->data.port = 0;
+ L->next = NULL;
+ r = L;
+ while(1)
+ {
+ printf("Please input a NUM_NL80211_WOWLAN_TRIGber(-1 exit :");
+ while(scanf("%d",&x.fd) != 1)
+ {
+ printf("Please INPUT_PROP_CNTut a number(-1 exit :");
+ getchar();
+ }
+
+ if(x.fd == -1)break;
+
+ if((H=(linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc nexto memmory!\n");
+ return L;
+ }
+ H->data = x;
+ H->next = NULL;
+ r->next = H;
+ r=H;
+ }
+ return L;
+
+}
+int delete_pos_linklist(linklist L,int pos)
+{
+ linklist r,p;
+ int i=-1;
+ if(pos < 0 ||pos >=get_length_linklist(L))
+ {
+ printf("input pos is invalid!\n");
+ return -1;
+ }
+ r = L;
+ while(i < pos-1)
+ {
+ i++;
+ r = r->next;
+ }
+ if(r == NULL || r->next==NULL)
+ {
+ printf("argc is iavalid!\n");
+ return -1;
+ }
+ else
+ {
+ p = r->next;
+ r->next = p->next;
+ p->next = NULL;
+ free(p);
+ return 0;
+ }
+}
+int delete_locate_linklist(linklist L,datatype x)
+{
+ linklist r,p;
+ if(L->next == NULL)
+ {
+ printf("list is NULL!\n");
+ return -1;
+ }
+ r = L;
+ while(r->next->data.fd != x.fd)
+ {
+ if(r->next == NULL)
+ {
+ printf("value is not in list!\n");
+ return -1;
+ }
+ r = r->next;
+ }
+ p = r->next;
+ r->next = p->next;
+ p->next = NULL;
+ free(p);
+
+ return 0;
+}
+
+void clear_linklist(linklist L)
+{
+ while(get_length_linklist(L))
+ {
+ delete_pos_linklist(L,get_length_linklist(L)-1);
+ }
+ free(L);
+ L->next = NULL;
+ L = NULL;
+}
+int get_length_linklist(linklist L)
+{
+ int i=0;
+ linklist r;
+ r = L;
+ while(r->next)
+ {
+ r = r->next;
+ i++;
+ }
+ return i++;
+}
+linklist get_list_pos_linklist(linklist L,int pos)
+{
+ int i=0;
+ linklist r;
+ if(L->next == NULL)
+ {
+ printf("list is NULL!\n");
+ return NULL;
+ }
+ if(pos<0 || pos>=get_length_linklist(L))
+ {
+ printf("input is invalid!\n");
+ return NULL;
+ }
+ r = L->next;
+ while(i<pos)
+ {
+ r = r->next;
+ i++;
+ }
+ return r;
+}
+linklist get_list_locate_linklist(linklist L,datatype x)
+{
+ linklist r;
+ if(L->next == NULL)
+ {
+ printf("list is NULL!\n");
+ return NULL;
+ }
+ r = L->next;
+ while(r->data.fd != x.fd)
+ {
+ if(r->next == NULL)
+ {
+ printf("value is not in list!\n");
+ return NULL;
+ }
+ r = r->next;
+ }
+ return r;
+}
+
+int insert_head_linklist(linklist L,datatype x)
+{
+ linklist H;
+ if((H=(linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc no memmory\n");
+ return -1;
+ }
+ H->data = x;
+ H->next = L->next;
+ L->next = H;
+ return 0;
+}
+int insert_n_head_linklist(linklist L)
+{
+ datatype x;
+
+ while(1)
+ {
+ printf("Please input a number(-1 exit:");
+ while(scanf("%d",&x.fd) != 1)
+ {
+ printf("Please input a number:(-1 exit");
+ getchar();
+ }
+ if(x.fd == -1)break;
+ insert_head_linklist(L,x);
+ }
+ return 0;
+}
+int insert_end_linklist(linklist L,datatype x)
+{
+ linklist r,H;
+ if((H = (linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc no memmory!");
+ return -1;
+ }
+ r = L;
+ while(r->next)
+ {
+ r = r->next;
+ }
+ H->next = NULL;
+ H->data = x;
+ r->next = H;
+ return 0;
+}
+int insert_n_end_linklist(linklist L)
+{
+ datatype x;
+
+ while(1)
+ {
+ printf("Please input a number(-1 exit:");
+ while(scanf("%d",&x.fd) != 1)
+ {
+ printf("Please input a number:(-1 exit");
+ getchar();
+ }
+ if(x.fd == -1)break;
+ insert_end_linklist(L,x);
+ }
+ return 0;
+
+}
+int insert_pos_linklist(linklist L,datatype x,int pos)
+{
+ linklist K,r;
+ if(pos == 0)
+ {
+ r = L;
+ }
+ else
+ {
+ r = get_list_pos_linklist(L,pos-1);
+ }
+ if(r == NULL)
+ {
+ printf("argc is invalidateid!\n");
+ return -1;
+ }
+ else
+ {
+ if((K = (linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc no memmory!");
+ return -1;
+ }
+ K->data = x;
+ K->next = r->next;
+ r->next = K;
+ }
+ return 0;
+}
+int insert_order_linklist(linklist L,datatype x)
+{
+ linklist r,H;
+ if((H = (linklist)malloc(sizeof(listnode))) == NULL)
+ {
+ printf("malloc nexto memmory!\n");
+ return -1;
+ }
+ H->data = x;
+
+ r = L;
+ while(r->next && r->next->data.fd < x.fd)
+ {
+ r = r->next;
+ }
+ H->next = r->next;
+ r->next = H;
+ return 0;
+}
+void reverse_linklist(linklist L)
+{
+ linklist r,p;
+
+ if(L->next == NULL)
+ {
+ printf("list is NULL!\n");
+ return ;
+ }
+
+ r = L->next;
+ L->next = NULL;
+ while(r)
+ {
+ p = r;
+ r = r->next;
+
+ p->next = L->next;
+ L->next = p;
+ }
+ return ;
+}
+void sort_linklist(linklist L)
+{
+ linklist r,p,q;
+ if(L == NULL)
+ {
+ printf("list is NULL!\n");
+ return ;
+ }
+ r = L->next;
+ L->next = NULL;
+ while(r)
+ {
+ p = r;
+ r = r->next;
+
+ q = L;
+ while(q->next && q->next->data.fd < p->data.fd)
+ {
+ q = q->next;
+ }
+ p->next = q->next;
+ q->next = p;
+ }
+}
+
+void show_linklist(linklist L)
+{
+ printf("list is:\n");
+ if(L->next == NULL)
+ {
+ printf("\tlist is NULL!list\n");
+ return ;
+ }
+ while(L->next)
+ {
+ printf("\t%d %s %d\t",L->next->data.fd,L->next->data.ipv4_addr,L->next->data.port);
+ L = L->next;
+ puts("");
+ }
+ //puts("");
+ return ;
+}
diff --git a/ap/app/socket_demo/linklist.h b/ap/app/socket_demo/linklist.h
new file mode 100755
index 0000000..9bfb505
--- /dev/null
+++ b/ap/app/socket_demo/linklist.h
@@ -0,0 +1,42 @@
+#ifndef __SINGLE_LINKLIST_H__
+#define __SINGLE_LINKLIST_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+
+typedef struct{
+ int fd;
+ char ipv4_addr[16];
+ int port;
+}datatype;
+
+typedef struct node{
+ datatype data;
+ struct node *next;
+}listnode,*linklist;
+
+linklist create_linklist(void);
+linklist create_n_linklist(void);
+int delete_pos_linklist(linklist L,int pos);
+int delete_locate_linklist(linklist L,datatype x);
+void clear_linklist(linklist L);
+
+int get_length_linklist(linklist L);
+linklist get_list_pos_linklist(linklist L,int pos);
+linklist get_list_locate_linklist(linklist L,datatype x);
+
+int insert_head_linklist(linklist L,datatype x);
+int insert_n_head_linklist(linklist L);
+int insert_end_linklist(linklist L,datatype x);
+int insert_n_end_linklist(linklist L);
+int insert_pos_linklist(linklist L,datatype x,int pos);
+int insert_order_linklist(linklist L,datatype x);
+
+void reverse_linklist(linklist);
+void sort_linklist(linklist L);
+
+void show_linklist(linklist L);
+
+#endif
diff --git a/ap/app/socket_demo/socket_main.c b/ap/app/socket_demo/socket_main.c
new file mode 100755
index 0000000..93225ea
--- /dev/null
+++ b/ap/app/socket_demo/socket_main.c
@@ -0,0 +1,1246 @@
+#include <ctype.h>
+#include <errno.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <limits.h>
+#include <netdb.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <syslog.h>
+#include <pthread.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include "linklist.h"
+#include "socket_tok.h"
+
+/*command max len 64*/
+#define SOCKET_CMD_MAX_LEN 1024
+#define BUF_SIZE 1024
+
+#define EXIT_CMD_STOP "stop\n"
+#define EXIT_CMD_Q "q\n"
+#define EXIT_CMD_EXIT "exit\n"
+
+#define SOCKET_CREATE "sock_create"
+#define SOCKET_CREATECLIENT "sock_createclient"
+#define SOCKET_CREATESERVER "sock_createserver"
+#define SOCKET_BIND "sock_bind"
+#define SOCKET_LISTEN "sock_listen"
+#define SOCKET_ACCEPT "sock_accept"
+#define SOCKET_CONN "sock_conn"
+#define SOCKET_SEND "sock_send"
+#define SOCKET_SENDTO "sock_sendto"
+#define SOCKET_WRITE "sock_write"
+#define SOCKET_RECV "sock_recv"
+#define SOCKET_RECVFROM "sock_recvfrom"
+#define SOCKET_READ "sock_read"
+#define SOCKET_CLOSE "sock_close"
+#define SOCKET_LOCALTEST "sock_localtest"
+
+#define sock_param_len 4096
+
+typedef unsigned short UINT16;
+typedef unsigned long int UINT32;
+
+static int g_sockfd = -1;
+
+static char* sms_convert_cardinfo_state(int type, int value);
+
+static void printUsage(const char *Opt)
+{
+ printf("Usage: %s\n", Opt);
+ printf("sock_create:type create a new socket(eg. sock_create:1)\n");
+ printf("sock_createclient:type,addr create a new client socket(eg. sock_createclient:1,/var/sockclient)\n");
+ printf("sock_createserver:type,addr,backlog create a new server socket(eg. sock_createserver:1,/var/sockserver,30)\n");
+ printf("sock_bind:fd,addr socket bind(eg. sock_bind:fd,/var/sockclient)\n");
+ printf("sock_listen:fd,backlog socket listen(eg. sock_listen:fd,30)\n");
+ printf("sock_accept:fd socket accept(eg. sock_accept:fd)\n");
+ printf("sock_conn:fd,srvaddr conn server socket(eg. sock_conn:fd, /var/sockserver)\n");
+ printf("sock_send:fd,message send socket message(eg. sock_send:fd,ipc test)\n");
+ printf("sock_sendto:fd,srvaddr,message sendto socket message(eg. sock_sendto:fd,/var/sockserver,ipc test)\n");
+ printf("sock_write:fd,message write socket message(eg. sock_write:fd,ipc test)\n");
+ printf("sock_recv:fd recv socket message(eg. sock_recv: fd)\n");
+ printf("sock_recvfrom:fd recvfrom socket message(eg. sock_recvfrom: fd)\n");
+ printf("sock_read:fd read socket message(eg. sock_read: fd)\n");
+ printf("sock_close:fd close socket message(eg. sock_close: fd)\n");
+ printf("sock_localtest: test local socket operation\n");
+ printf("\n");
+}
+
+static int parseOpts(int argc, char *argv[])
+{
+ int rc = 0;
+ int c;
+ while ((c = getopt(argc, argv, "?n:a:")) != -1) {
+ switch (c) {
+ case 'a':
+ break;
+ case 'n':
+ break;
+ case '?':
+ default:
+ printUsage(argv[0]);
+ return -1;
+ }
+ }
+
+ return rc;
+}
+
+/**
+enum sock_type {
+ SOCK_STREAM = 1,
+ SOCK_DGRAM = 2,
+ SOCK_RAW = 3,
+ SOCK_RDM = 4,
+ SOCK_SEQPACKET = 5,
+ SOCK_DCCP = 6,
+ SOCK_PACKET = 10,
+};
+**/
+static int socket_create(char *data, int data_len)
+{
+ int sockfd = -1;
+ int type = 0;
+ printf("socket_create test \n");
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_create:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &type) < 0) {
+ printf("socket_create:at_tok_nextstr error\n");
+ }
+ printf("socket_create:type=%d\n", type);
+
+ sockfd = socket(AF_UNIX, type, 0);
+ if(sockfd < 0){
+ printf("socket_create error: %s(errno: %d) \n", strerror(errno), errno);
+ }else{
+ printf("socket_create sucess:sockfd=%d\n", sockfd);
+ }
+ g_sockfd = sockfd;
+ return 0;
+}
+
+static int socket_test_local()
+{
+ int clientfd = -1;
+ int serverfd = -1;
+ int numRecv;
+ char data[BUF_SIZE] = {0};
+ struct sockaddr_un my_addr = {0};
+
+ if((clientfd = socket(AF_UNIX, 2, 0))<0){
+ printf("socket_test_local: create client socket error \n");
+ return -1;
+ }
+
+ if((serverfd = socket(AF_UNIX, 2, 0))<0){
+ printf("socket_test_local: create server socket error \n");
+ return -1;
+ }
+
+ memset(&my_addr, 0, sizeof(struct sockaddr_un));
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, "/var/socktest", sizeof(my_addr.sun_path)-1);
+
+ //·þÎñ¶Ë°ó¶¨µØÖ·
+ if(bind(serverfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){
+ printf("server socket °ó¶¨³É¹¦ \n");
+ }
+ else{
+ printf("server socket °ó¶¨Ê§°Ü \n");
+ }
+
+ //δÁ¬½Ó£¬¿Í»§¶ËÖ±½Ó¸ø·þÎñ¶Ë·¢ËÍÊý¾Ý
+ if(sendto(clientfd, "send data to server test one", 28, 0, &my_addr, sizeof(my_addr)) < 0){
+ printf("send data to server test one failed \n");
+ }
+
+ //¶ÁÈ¡Êý¾Ý
+ if(read(serverfd, data, BUF_SIZE-1) < 0){
+ printf("recv data test one failed \n");
+ }else{
+ printf("recv data test one sucess \n");
+ }
+
+ //Á¬½Ó·þÎñ¶Ë
+ if(connect(clientfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) < 0){
+ printf("connect error: %s(errno: %d) \n", strerror(errno), errno);
+ return -1;
+ }
+
+ if(send(clientfd, "send data to server test two", 28, 0) < 0){
+ printf("send data to server test two failed: %s(errno: %d) \n", strerror(errno), errno);
+
+ }else{
+ printf("send data to server test two sucess \n");
+ }
+
+ memset(data, 0, sizeof(data));
+ if(numRecv = recv(serverfd, data, sizeof(data)-1, 0) == -1){
+ printf("recv data test two failed \n");
+ }else{
+ printf("recv data test two sucess \n");
+ }
+
+ //²âÊÔ·þÎñ¶Ë¸ø¿Í»§¶Ë·¢ÏûÏ¢ÊÇ·ñÄÜͨ
+ if(send(serverfd, "send data to server test three", 30, 0) < 0){
+ printf("send data to server test three failed: %s(errno: %d) \n", strerror(errno), errno);
+ }else{
+ printf("send data to server test three sucess \n");
+ }
+ fcntl(clientfd, F_SETFL, O_NONBLOCK);
+ memset(data, 0, sizeof(data));
+ if(numRecv = recv(clientfd, data, sizeof(data)-1, 0) == -1){
+ printf("recv data test three failed \n");
+ }else{
+ printf("recv data test three sucess \n");
+ }
+
+ //¸ø¿Í»§¶Ë°ó¶¨µØÖ·
+ memset(&my_addr, 0, sizeof(struct sockaddr_un));
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, "/var/sockclient", sizeof(my_addr.sun_path)-1);
+
+ //¿Í»§¶Ë°ó¶¨µØÖ·
+ if(bind(clientfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){
+ printf("client socket °ó¶¨³É¹¦ \n");
+ }
+ else{
+ printf("client socket °ó¶¨Ê§°Ü \n");
+ }
+
+ //δÁ¬½Ó£¬·þÎñ¶ËÖ±½Ó¸ø¿Í»§¶Ë·¢ËÍÊý¾Ý
+ if(sendto(serverfd, "send data to server test four", 29, 0, &my_addr, sizeof(my_addr)) < 0){
+ printf("send data to server test four failed \n");
+ }else{
+ printf("send data to server test four sucess \n");
+ }
+
+ //¶ÁÈ¡Êý¾Ý
+ if(read(clientfd, data, BUF_SIZE-1) < 0){
+ printf("recv data test four failed \n");
+ }else{
+ printf("recv data test four sucess \n");
+ }
+
+ close(clientfd);
+ close(serverfd);
+}
+
+void socket_test_dgram_data(int fd, char* paddr, char* pdata){
+ struct sockaddr_un other_addr = {0};
+ ssize_t numRead;
+ ssize_t numRecv;
+ char buf[2048] = {0};
+ int sockfd = -1;
+ sockfd = fd;
+ int ret;
+ memset(&other_addr, 0, sizeof(struct sockaddr_un));
+ other_addr.sun_family = AF_UNIX;
+ strncpy(other_addr.sun_path, paddr, sizeof(other_addr.sun_path)-1);
+
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(other_addr.sun_path[0] == 'z' || other_addr.sun_path[0]=='Z'){
+ printf("socket_test_dgram_data: anonymous socket\n");
+ other_addr.sun_path[0] = '\0';
+ }
+ //δÁ¬½Ó£¬¿Í»§¶ËÖ±½Ó¸ø·þÎñ¶Ë·¢ËÍÊý¾Ý
+ if(sendto(sockfd, "send dgram data to server test one", 34, 0, &other_addr, sizeof(other_addr)) < 0){
+ printf("sendto dgram data to server test one failed \n");
+ }else{
+ printf("sendto dgram data to server test one sucess \n");
+ }
+#if 0
+ memset(buf, 0, sizeof(buf));
+ if(recvfrom(sockfd, buf, sizeof(buf)-1, 0, (struct sockaddr*)&other_addr, sizeof(other_addr)) <= 0){
+ printf("recvfrom: dgram data to server test one failed \n");
+ }else{
+ printf("recvfrom: dgram data to server test one sucess \n");
+ }
+#endif
+ //Á¬½Ó·þÎñ¶Ë
+ if(ret = connect(sockfd, (struct sockaddr*)&other_addr, sizeof(other_addr)) < 0){
+ printf("socket_create_client: connect error:ret=%d, %s(errno: %d) \n", ret, strerror(errno), errno);
+
+ return -1;
+ }else{
+ printf("³É¹¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó: sockfd=%d\n", sockfd);
+ }
+
+
+ printf("send msg to server: \n");
+ memset(buf, 0, sizeof(buf));
+
+ if(sendto(sockfd, "send dgram data to server test two", 34, 0, &other_addr, sizeof(other_addr)) < 0){
+ printf("sendto dgram data to server test two failed \n");
+ }else{
+ printf("sendto dgram data to server test two sucess \n");
+ }
+
+#if 0
+ if(recvfrom(sockfd, buf, sizeof(buf)-1, 0, (struct sockaddr*)&other_addr, sizeof(other_addr)) <= 0){
+ printf("recvfrom: dgram data to server two failed \n");
+ }else{
+ printf("recvfrom: dgram data to server two sucess \n");
+ }
+#endif
+
+ memset(buf, 0, sizeof(buf));
+ // send¡¢recv²âÊÔ
+ if(send(sockfd, "send dgram data to server test three", 36, 0) < 0){
+ printf("send dgram data to server test three failed \n");
+ }else{
+ printf("send dgram data to server test three sucess \n");
+ }
+
+#if 0
+ if(recv(sockfd, buf, sizeof(buf)-1, 0) <= 0){
+ printf("recvfrom: dgram data to server three failed \n");
+ }else{
+ printf("recvfrom: dgram data to server three sucess \n");
+ }
+#endif
+ memset(buf, 0, sizeof(buf));
+ // write¡¢read²âÊÔ
+ if(write(sockfd, "send dgram data to server test four", 35) < 0){
+ printf("write dgram data to server test four failed \n");
+ }else{
+ printf("write dgram data to server test four sucess \n");
+ }
+
+#if 0
+ if(read(sockfd, buf, sizeof(buf)-1) <= 0){
+ printf("recvfrom: dgram data to server four failed \n");
+ }else{
+ printf("recvfrom: dgram data to server four sucess \n");
+ }
+#endif
+
+ if(pdata != NULL){
+ if(send(sockfd, pdata, strlen(pdata), 0) < 0){
+ printf("socket_create_client: send dgram msg error: %s(errno: %d) \n", strerror(errno), errno);
+ return -1;
+ }
+ printf("send sucess: %s \n", pdata);
+ }else{
+ if(send(sockfd, "send dgram msg to server test", 29, 0) < 0){
+ printf("socket_create_client: send dgram msg error: %s(errno: %d) \n", strerror(errno), errno);
+ return -1;
+ }
+ printf("send msg to server test \n");
+ }
+
+#if 0
+ if(numRecv = recv(sockfd, buf, sizeof(buf), 0) == -1){
+ printf("socket_create_client: recv error \n");
+ return -1;
+ }
+ printf("socket_create_client Receieved: %s \n", buf);
+#endif
+ if(close(sockfd) == 0){
+ printf("clsoe sockfd:%d sucess \n", sockfd);
+ }else{
+ printf("clsoe sockfd:%d failed \n", sockfd);
+ }
+}
+
+void socket_test_stream_data(int fd, char* paddr, char* pdata){
+ struct sockaddr_un other_addr = {0};
+ ssize_t numRead;
+ ssize_t numRecv;
+ char buf[2048] = {0};
+ int sockfd = -1;
+ sockfd = fd;
+ memset(&other_addr, 0, sizeof(struct sockaddr_un));
+ other_addr.sun_family = AF_UNIX;
+ strncpy(other_addr.sun_path, paddr, sizeof(other_addr.sun_path)-1);
+
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(other_addr.sun_path[0] == 'z' || other_addr.sun_path[0]=='Z'){
+ printf("socket_test_stream_data: anonymous socket\n");
+ other_addr.sun_path[0] = '\0';
+ }
+ //Á¬½Ó·þÎñ¶Ë
+ if(connect(sockfd, (struct sockaddr*)&other_addr, sizeof(other_addr)) < 0){
+ printf("socket_create_client: connect error: %s(errno: %d) \n", strerror(errno), errno);
+ close(fd);
+ return -1;
+ }else{
+ printf("³É¹¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó: sockfd=%d\n", sockfd);
+ }
+
+ printf("send msg to server: \n");
+
+ memset(buf, 0, sizeof(buf));
+ // send¡¢recv²âÊÔ
+ if(send(sockfd, "send stream data to server test one", 35, 0) < 0){
+ printf("send stream data to server test one failed \n");
+ }else{
+ printf("send stream data to server test one sucess \n");
+ }
+
+ if(recv(sockfd, buf, sizeof(buf)-1, 0) <= 0){
+ printf("recv: stream data to server one failed \n");
+ }else{
+ printf("recv: stream data to server one sucess \n");
+ }
+
+ memset(buf, 0, sizeof(buf));
+ // write¡¢read²âÊÔ
+ if(write(sockfd, "send stream data to server test two", 35) < 0){
+ printf("write stream data to server test two failed \n");
+ }else{
+ printf("write stream data to server test two sucess \n");
+ }
+
+ if(read(sockfd, buf, sizeof(buf)-1) <= 0){
+ printf("read: stream data to server two failed \n");
+ }else{
+ printf("read: stream data to server two sucess \n");
+ }
+
+ memset(buf, 0, sizeof(buf));
+ if(pdata != NULL){
+ if(send(sockfd, pdata, strlen(pdata), 0) < 0){
+ printf("socket_create_client: send stream msg error: %s(errno: %d) \n", strerror(errno), errno);
+ close(fd);
+ return -1;
+ }
+ printf("send sucess: %s \n", pdata);
+ }else{
+ if(send(sockfd, "send stream msg to server test", 30, 0) < 0){
+ printf("socket_create_client: send stream msg error: %s(errno: %d) \n", strerror(errno), errno);
+ close(fd);
+ return -1;
+ }
+ printf("send stream msg to server test \n");
+ }
+
+ if(numRecv = recv(sockfd, buf, sizeof(buf), 0) == -1){
+ printf("socket_create_client: recv error \n");
+ close(fd);
+ return -1;
+ }
+ printf("recv sucess: %s \n", buf);
+ if(close(sockfd) == 0){
+ printf("clsoe sockfd:%d sucess \n", sockfd);
+ }else{
+ printf("clsoe sockfd:%d failed \n", sockfd);
+ }
+}
+static int socket_create_client(char *data, int data_len)
+{
+ int sockfd = -1;
+ int type = 0;
+ char* paddr = NULL;
+ char* pdata = NULL;
+ struct sockaddr_un other_addr = {0};
+ int backlog = 0;
+ ssize_t numRead;
+ ssize_t numRecv;
+ char buf[2048] = {0};
+ int i=0;
+ printf("socket_create_client test \n");
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_create_client:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &type) < 0) {
+ printf("socket_create_client:at_tok_nextstr error\n");
+ }
+ printf("socket_create_client:type=%d\n", type);
+
+ if(at_tok_nextstr(&data, &paddr) < 0) {
+ printf("socket_create_client:at_tok_nextstr error\n");
+ }
+
+ printf("socket_create_client: addr=%s \n", paddr);
+
+ if(at_tok_nextstr(&data, &pdata) < 0) {
+ printf("socket_create_client: no test data\n");
+ }
+
+ if(strlen(paddr) > sizeof(other_addr.sun_path)-1)
+ {
+ printf("socket_create_client:server socket path too logn: %s\n", paddr);
+ return -1;
+ }
+
+ if(type == 1){
+ while(true){
+ if((sockfd = socket(AF_UNIX, type, 0))<0){
+ printf("socket_create_client: create socket error \n");
+ return -1;
+ }
+ printf("socket_create_client: socket_create:sockfd=%d(%d´Î)\n", sockfd, i);
+ socket_test_stream_data(sockfd, paddr, pdata);
+ sleep(1);
+ i++;
+ }
+ }else if(type ==2){
+ while(true){
+ if((sockfd = socket(AF_UNIX, type, 0))<0){
+ printf("socket_create_client: create socket error \n");
+ return -1;
+ }
+
+ printf("socket_create_client: socket_create:sockfd=%d(%d´Î)\n", sockfd, i);
+ socket_test_dgram_data(sockfd, paddr, pdata);
+ sleep(1);
+ i++;
+ }
+ }
+
+ return 0;
+}
+
+static void do_recv(int fd)
+{
+ int ret = -1;
+ char buf[BUF_SIZE];
+ char resp_buf[BUF_SIZE+10];
+ printf("do_recv loop enter, fd=%d \n", fd);
+ while(1)
+ {
+ memset(buf, 0, BUF_SIZE);
+ do
+ {
+ ret = read(fd,buf,BUF_SIZE-1);
+ }while(ret < 0 && errno == EINTR);//×èÈû¶Áд
+
+ if(ret < 0)
+ {
+ printf("fd %d read error, ret=%d!\n", fd, ret);
+ continue;
+ }
+ if(ret == 0)//¶Ô·½ÒѹرÕ
+ {
+ printf("client is close!\n");
+ //close(fd);
+ continue;
+ }
+
+ if(ret > 0)
+ {
+ printf("read sucess, fd:%d, recv data=%s \n", fd, buf);
+
+ //ret = write(fd, buf, ret);
+
+ //printf("write back data=%s, len=%d \n",buf, ret);
+ }
+ }
+}
+
+static void do_select(int fd)
+{
+ linklist fdlist,sun_list;
+ fdlist = create_linklist();
+ datatype sun_data = {0};
+ sun_data.fd = fd;
+ int maxfd = fd;
+ //struct timeval tout = {5,0};
+
+ insert_end_linklist(fdlist,sun_data);//½«lsten()´¦ÀíºóµÄfd¼ÓÈëÁбí
+ //show_linklist(fdlist);
+
+ fd_set fdset;
+ int newfd = -1;
+ int ret = -1;
+ char buf[BUF_SIZE];
+ char resp_buf[BUF_SIZE+10];
+ struct sockaddr_un addr_un;
+ socklen_t cun_addr_len = sizeof(addr_un);
+ /* ÓÃselect()º¯ÊýʵÏÖI/O¶à·¸´ÓÃ*/
+ while(1)
+ {
+ int i;
+ FD_ZERO(&fdset);
+ if(get_length_linklist(fdlist) >= 1)//½«ÁбíÖеÄfd¼ÓÈë¶Á¼¯ºÏ½øÐд¦Àí
+ {
+ for(i=0;i<get_length_linklist(fdlist);i++)
+ {
+ sun_list = get_list_pos_linklist(fdlist,i);
+ sun_data = sun_list->data;
+ FD_SET(sun_data.fd,&fdset);
+ maxfd = sun_data.fd > maxfd ? sun_data.fd : maxfd;
+ printf("µÚ %d ¸ö£¨fd:%d£©£¨ip:%s£©£¨port:%d£©\n",i,sun_data.fd,sun_data.ipv4_addr,sun_data.port);
+ }
+ //show_linklist(fdlist);
+ }
+ else
+ {
+ continue ;
+ }
+ //switch(select(maxfd+1,&fdset,NULL,NULL,&tout))
+ switch(ret=select(maxfd+1,&fdset,NULL,NULL,NULL))
+ {
+ case 0:
+ {
+ printf("time out!\n");
+ goto _error1;
+ }
+ case -1:
+ {
+ printf("select error\n");
+ goto _error1;
+ }
+ default:
+ {
+ printf("select ret=%d \n", ret);
+ if(FD_ISSET(fd,&fdset))//Óпͻ§¶Ë·¢ËÍÁËÁ¬½ÓÇëÇó
+ {
+ bzero(&addr_un, sizeof(addr_un));
+ //if((newfd = accept(fd,NULL,0)) < 0)
+ if((newfd = accept(fd,(struct sockaddr *)&addr_un,&cun_addr_len)) < 0)
+ {
+ printf("connect failed: newfd=%d\n", newfd);
+
+ goto _error1;
+ }
+ /* ½«·ÖÅä³É¹¦µÄÌ×½Ó×ÖnewfdÉèÖóɷÇ×èÈûģʽ*/
+ int b_on = 1;
+ ioctl(newfd, FIONBIO, &b_on);//½«·ÖÅä³É¹¦µÄÌ×½Ó×ÖnewfdÉèÖÃΪ·Ç×èÈû·½Ê½
+ sun_data.fd = newfd;
+ printf("get a new client->(ip:%s)(port:%d)(fd:%d)\n",sun_data.ipv4_addr,sun_data.port,sun_data.fd);
+
+ insert_end_linklist(fdlist,sun_data);//½«½¨Á¢¿Í»§¶ËÁ¬½ÓµÄfd¼ÓÈëÁбí
+ //show_linklist(fdlist);
+ }
+ else//ÓÐÁ¬½ÓºÃµÄ¿Í»§¶Ë·¢ËÍÁËÊý¾Ý
+ {
+ for(i=0;i<get_length_linklist(fdlist);i++)//½«Á´±íÖеÄfd¶¼´¦ÀíÒ»±é
+ {
+
+ sun_list = get_list_pos_linklist(fdlist,i);
+ sun_data = sun_list->data;
+
+ //printf("readung fd is ->(µÚ %d ¸ö)(fd:%d)(ip:%s)(port:%d)\n",i,sun_data.fd,sun_data.ipv4_addr,sun_data.port);
+ if(sun_data.fd == fd)//²»Êǽ¨Á¢Á¬½Óºó·ÖÅäµÄnewfd
+ continue ;
+
+ bzero(buf,BUF_SIZE);
+ do
+ {
+ ret = read(sun_data.fd,buf,BUF_SIZE-1);
+ }while(ret < 0 && errno == EINTR);//×èÈû¶Áд
+
+ if(ret < 0)
+ {
+ printf("fd %d read error, ret=%d, errno=%d!\n", sun_data.fd, ret, errno);
+ continue;
+ }
+ if(ret == 0)//¶Ô·½ÒѹرÕ
+ {
+ printf("client is close, errno=%d!\n", errno);
+ close(sun_data.fd);
+ delete_locate_linklist(fdlist,sun_data);
+ continue;
+ }
+
+ printf("read sucess, fd(:%d) receive data: %s \n",sun_data.fd,buf);
+ ret = write(sun_data.fd, buf, ret);
+ printf("write back data=%s, len=%d \n",buf, ret);
+ }
+ }
+ }
+ }
+ }
+
+ close(newfd);
+_error1:
+ printf("exit cause by _error1!\n");
+ close(fd);
+ clear_linklist(fdlist);
+}
+
+//"/tmp/us_xfr" "zmysocket"
+static int socket_create_server(char *data, int data_len)
+{
+ int sockfd = -1;
+ int cfd = -1;
+ int type = 0;
+ char* paddr = NULL;
+ struct sockaddr_un my_addr = {0};
+ int backlog = 0;
+ ssize_t numRead;
+ char buf[2048] = {0};
+ printf("socket_create_server test \n");
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_create_server:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &type) < 0) {
+ printf("socket_create_server:at_tok_nextstr error\n");
+ }
+ printf("socket_create_server:type=%d\n", type);
+
+ if(at_tok_nextstr(&data, &paddr) < 0) {
+ printf("socket_create_server:at_tok_nextstr error\n");
+ }
+
+ printf("socket_create_server: addr=%s \n", paddr);
+
+ if(at_tok_nextint(&data, &backlog) < 0) {
+ printf("socket_create_server:at_tok_nextstr error\n");
+ }
+
+ if((sockfd = socket(AF_UNIX, type, 0)) < 0)
+ {
+ printf("socket_create_server failed, type=%d \n", type);
+ return -1;
+ }
+ g_sockfd = sockfd;
+ printf("socket_create_server:type=%d, sockfd=%d\n", type, sockfd);
+
+ /*ÔÊÐí°ó¶¨µØÖ·¿ìËÙÖØÓà */
+ int b_reuse = 1;
+ setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&b_reuse,sizeof(int));
+
+ if(strlen(paddr) > sizeof(my_addr.sun_path)-1)
+ {
+ printf("socket_bind:server socket path too long: %s\n", paddr);
+ goto error;
+ }
+
+ if(access(paddr,F_OK))
+ {
+ unlink(paddr);//ɾ³ý¸ÃÎļþ
+ }
+
+ memset(&my_addr, 0, sizeof(struct sockaddr_un));
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, paddr, sizeof(my_addr.sun_path)-1);
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(my_addr.sun_path[0] == 'z' || my_addr.sun_path[0]=='Z'){
+ printf("socket_create_server: anonymous socket\n");
+ my_addr.sun_path[0] = '\0';
+ }
+ if(bind(sockfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){
+ printf("socket°ó¶¨³É¹¦ \n");
+ }
+ else{
+ printf("socket°ó¶¨Ê§°Ü errno=%d, strerror=%s\n", errno, strerror(errno));
+ goto error;
+ }
+
+ if(type == 1){
+ if(listen(sockfd, backlog) == 0){
+ printf("socket¼àÌý³É¹¦ \n");
+ }else{
+ printf("socket¼àÌýʧ°Ü \n");
+ goto error;
+ }
+ do_select(sockfd);
+ }else{
+ do_recv(sockfd);
+ }
+
+
+
+#if 0
+
+ for(;;){
+ cfd = accept(sockfd, NULL, NULL);
+ if(cfd == -1){
+ printf("socket_create_server: accept failed");
+ continue;
+ }
+
+ printf("socket_create_server cfd=%d \n", cfd);
+ while((numRead = recv(cfd, buf, sizeof(buf), 0)) > 0){
+ printf("socket_create_server:read data=%s \n", buf);
+ }
+
+ if(numRead == -1){
+ printf("socket_create_server: read data failed \n");
+
+ }
+
+ if(!fork()){
+ if(send(cfd, "you are connected! \n", 19, 0) == -1)
+ {
+ printf("socket_create_server: send error \n");
+ close(cfd);
+ exit(0);
+ }
+ }
+ if(close(cfd) == -1){
+ printf("socket_create_server: cfd close failed\n");
+ }
+
+ }
+#endif
+
+error:
+ close(sockfd);
+ return 0;
+
+}
+
+static int socket_bind(char *data, int data_len)
+{
+ int sockfd = -1;
+ char* paddr = NULL;
+ struct sockaddr_un my_addr = {0};
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_bind:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_bind:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &paddr) < 0) {
+ printf("socket_bind:at_tok_nextstr error\n");
+ }
+
+ printf("socket_bind: sockfd=%d, addr=%s \n", sockfd, paddr);
+
+ if(strlen(paddr) > sizeof(my_addr.sun_path)-1)
+ {
+ printf("socket_bind:server socket path too logn: %s\n", paddr);
+ return -1;
+ }
+
+ memset(&my_addr, 0, sizeof(struct sockaddr_un));
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, paddr, sizeof(my_addr.sun_path)-1);
+
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(my_addr.sun_path[0] == 'z' || my_addr.sun_path[0]=='Z'){
+ printf("socket_bind: anonymous socket\n");
+ my_addr.sun_path[0] = '\0';
+ }
+
+ if(bind(sockfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){
+ printf("socket°ó¶¨³É¹¦ \n");
+ }
+ else{
+ printf("socket°ó¶¨Ê§°Ü errno=%d, strerror=%s\n", errno, strerror(errno));
+ }
+ return 0;
+}
+
+static int socket_listen(char *data, int data_len)
+{
+ int sockfd = -1;
+ int backlog = 0;
+ struct sockaddr_un my_addr = {0};
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_listen:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_listen:at_tok_nextint error\n");
+ }
+
+ if(at_tok_nextint(&data, &backlog) < 0) {
+ printf("socket_listen:at_tok_nextint error\n");
+ }
+
+ printf("socket_bind: sockfd=%d, backlog=%d \n", sockfd, backlog);
+
+ if(listen(sockfd, backlog) == 0){
+ printf("socket¼àÌý³É¹¦ \n");
+ }else{
+ printf("socket¼àÌýʧ°Ü \n");
+ }
+ return 0;
+}
+
+static int socket_accept(char *data, int data_len)
+{
+ int sockfd = -1;
+ int newfd = -1;
+ int ret = -1;
+ struct sockaddr_un addr_un;
+ socklen_t cun_addr_len = sizeof(addr_un);
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_accept:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_accept:at_tok_nextint error\n");
+ }
+
+ printf("socket_accept sockfd=%d \n", sockfd);
+
+ if((newfd = accept(sockfd,(struct sockaddr *)&addr_un,&cun_addr_len)) < 0)
+ {
+ printf("socket_accept failed: newfd=%d\n", newfd);
+ }else{
+ printf("socket_accept sucess: newfd=%d\n", newfd);
+ }
+ return 0;
+}
+
+
+static int socket_connect(char *data, int data_len)
+{
+ int sockfd = -1;
+ char* paddr = NULL;
+ struct sockaddr_un my_addr = {0};
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_connect:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_connect:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &paddr) < 0) {
+ printf("socket_connect:at_tok_nextstr error\n");
+ }
+
+ printf("socket_connect: sockfd=%d, addr=%s \n", sockfd, paddr);
+
+ if(strlen(paddr) > sizeof(my_addr.sun_path)-1)
+ {
+ printf("socket_connect:server socket path too logn: %s\n", paddr);
+ return -1;
+ }
+
+ memset(&my_addr, 0, sizeof(struct sockaddr_un));
+ my_addr.sun_family = AF_UNIX;
+ strncpy(my_addr.sun_path, paddr, sizeof(my_addr.sun_path)-1);
+ printf("socket_connect: my_addr.sun_path=%s \n", my_addr.sun_path);
+
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(my_addr.sun_path[0] == 'z' || my_addr.sun_path[0]=='Z'){
+ printf("socket_connect: anonymous socket\n");
+ my_addr.sun_path[0] = '\0';
+ }
+
+ if(connect(sockfd, (struct sockaddr*)&my_addr, sizeof(my_addr)) == 0){
+ printf("³É¹¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó \n");
+ }
+ else{
+ printf("Á¬½Óʧ°Ü\n");
+ }
+
+ return 0;
+}
+
+static int socket_send(char *data, int data_len)
+{
+ int sockfd = -1;
+ char* pdata = NULL;
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_send:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_send:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &pdata) < 0) {
+ printf("socket_send:at_tok_nextstr error\n");
+ }
+
+ printf("socket_send: sockfd=%d, pdata=%s \n", sockfd, pdata);
+
+ len = send(sockfd, pdata, strlen(pdata), 0);
+
+ if(len >= 0){
+ printf("socket_send sucess, len=%d \n", len);
+ }else{
+ printf("socket_send failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+
+ return 0;
+}
+
+static int socket_sendto(char *data, int data_len)
+{
+ int sockfd = -1;
+ char* pdata = NULL;
+ char* paddr = NULL;
+ struct sockaddr_un other_addr = {0};
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_sendto:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_sendto:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &paddr) < 0) {
+ printf("socket_sendto:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &pdata) < 0) {
+ printf("socket_sendto:at_tok_nextstr error\n");
+ }
+
+ printf("socket_sendto: sockfd=%d, addr=%s \n", sockfd, paddr);
+
+ if(strlen(paddr) > sizeof(other_addr.sun_path)-1)
+ {
+ printf("socket_sendto:server socket path too logn: %s\n", paddr);
+ return -1;
+ }
+
+ memset(&other_addr, 0, sizeof(struct sockaddr_un));
+ other_addr.sun_family = AF_UNIX;
+ strncpy(other_addr.sun_path, paddr, sizeof(other_addr.sun_path)-1);
+ printf("socket_sendto: other_addr.sun_path=%s \n", other_addr.sun_path);
+
+ //Èç¹ûµÚÒ»¸ö×Ö·ûÊÇz»òZ£¬Ôò´´½¨ÄäÃûsocket
+ if(other_addr.sun_path[0] == 'z' || other_addr.sun_path[0]=='Z'){
+ printf("socket_sendto: anonymous socket\n");
+ other_addr.sun_path[0] = '\0';
+ }
+
+ len = sendto(sockfd, pdata, strlen(pdata), 0, &other_addr, sizeof(other_addr));
+
+ if(len >= 0){
+ printf("socket_sendto sucess, len=%d \n", len);
+ }else{
+ printf("socket_sendto failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+ return 0;
+}
+
+static int socket_write(char *data, int data_len)
+{
+ int sockfd = -1;
+ char* pdata = NULL;
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_write:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_write:at_tok_nextstr error\n");
+ }
+
+ if(at_tok_nextstr(&data, &pdata) < 0) {
+ printf("socket_write:at_tok_nextstr error\n");
+ }
+
+ printf("socket_write: sockfd=%d, pdata=%s \n", sockfd, pdata);
+
+ len = write(sockfd, pdata, strlen(pdata));
+ if(len >= 0){
+ printf("socket_write sucess, len=%d \n", len);
+ }else{
+ printf("socket_write failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+
+ return 0;
+}
+
+static int socket_recv(char *data, int data_len)
+{
+ int sockfd = -1;
+ char pdata[2048] = {0};
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_recv:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_recv:at_tok_nextstr error\n");
+ }
+
+ printf("socket_recv: sockfd=%d \n", sockfd);
+
+ len = recv(sockfd, pdata, sizeof(pdata), 0);
+ if(len >= 0){
+ printf("recv sucess, len=%d \n", len);
+ }else{
+ printf("recv failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+ return 0;
+}
+
+static int socket_recvfrom(char *data, int data_len)
+{
+ int sockfd = -1;
+ char pdata[2048] = {0};
+ struct sockaddr_un other_addr = {0};
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_recvfrom:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_recvfrom:at_tok_nextstr error\n");
+ }
+
+ printf("socket_recvfrom: sockfd=%d \n", sockfd);
+
+ len = recvfrom(sockfd, pdata, sizeof(pdata)-1, 0, (struct sockaddr*)&other_addr, sizeof(other_addr));
+ if(len >= 0){
+ printf("recvfrom sucess: other_addr.sun_path=%s\n", other_addr.sun_path);
+ }else{
+ printf("recvfrom failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+ return 0;
+}
+
+static int socket_read(char *data, int data_len)
+{
+ int sockfd = -1;
+ char pdata[2048] = {0};
+ int len = 0;
+ if (at_tok_start(&data) < 0) {
+ printf("socket_read:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_read:at_tok_nextstr error\n");
+ }
+
+ printf("socket_read: sockfd=%d \n", sockfd);
+
+ len = read(sockfd, pdata, sizeof(pdata));
+ if(len >= 0){
+ printf("read sucess, len=%d \n", len);
+ }else{
+ printf("read failed, error: %s(errno: %d) \n", strerror(errno), errno);
+ }
+ return 0;
+}
+
+static int socket_close(char *data, int data_len)
+{
+ int sockfd = -1;
+
+ if (at_tok_start(&data) < 0) {
+ printf("socket_close:at_tok_start error\n");
+ }
+
+ if(at_tok_nextint(&data, &sockfd) < 0) {
+ printf("socket_close:at_tok_nextint error\n");
+ }
+
+ printf("socket_close: sockfd=%d \n", sockfd);
+
+ if(close(sockfd) == 0){
+ printf("¹Ø±Õsocket³É¹¦ \n");
+ }else{
+ printf("¹Ø±Õsocketʧ°Ü \n");
+ }
+ return 0;
+}
+
+
+static void socket_cmd_proc(char *cmdstr)
+{
+ char *data = cmdstr;
+ int data_len = strlen(data) - 1;/* -strlen("\r")*/
+ char request = data[0];
+
+ cmdstr[data_len] = '\0';
+ printf("socket_cmd_proc data=%s \n", data);
+ if(0 == strncmp(data, SOCKET_CREATECLIENT, strlen(SOCKET_CREATECLIENT))) {
+ printf("Request create client socket.\n");
+ socket_create_client(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_CREATESERVER, strlen(SOCKET_CREATESERVER))) {
+ printf("Request create server socket.\n");
+ socket_create_server(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_CREATE, strlen(SOCKET_CREATE))) {
+ printf("Request create socket.\n");
+ socket_create(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_BIND, strlen(SOCKET_BIND))) {
+ printf("Request bind socket.\n");
+ socket_bind(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_LISTEN, strlen(SOCKET_LISTEN))) {
+ printf("Request listen socket.\n");
+ socket_listen(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_ACCEPT, strlen(SOCKET_ACCEPT))) {
+ printf("Request accept socket.\n");
+ socket_accept(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_CONN, strlen(SOCKET_CONN))) {
+ printf("Request connect socket.\n");
+ socket_connect(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_SENDTO, strlen(SOCKET_SENDTO))) {
+ printf("Request sendto message.\n");
+ socket_sendto(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_SEND, strlen(SOCKET_SEND))) {
+ printf("Request send message.\n");
+ socket_send(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_WRITE, strlen(SOCKET_WRITE))) {
+ printf("Request write message.\n");
+ socket_write(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_RECVFROM, strlen(SOCKET_RECVFROM))) {
+ printf("Request recvfrom message.\n");
+ socket_recvfrom(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_RECV, strlen(SOCKET_RECV))) {
+ printf("Request recv message.\n");
+ socket_recv(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_READ, strlen(SOCKET_READ))) {
+ printf("Request read message.\n");
+ socket_read(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_CLOSE, strlen(SOCKET_CLOSE))) {
+ printf("Request close socket.\n");
+ socket_close(data, data_len);
+ }else if(0 == strncmp(data, SOCKET_LOCALTEST, strlen(SOCKET_LOCALTEST))){
+ printf("Request local test.\n");
+ socket_test_local();
+ }else {
+ printf("Request unknow.\n");
+ printUsage(cmdstr);
+ }
+}
+int main(int argc, char *argv[])
+{
+ char cmdstr[SOCKET_CMD_MAX_LEN] = {0};
+
+ printf("socket_ipc:Demo go.\n");
+ if(parseOpts(argc,argv) == -1) {
+ printf("socket_ipc:Arg error.\n");
+ return -1;
+ }
+
+ while(1) {
+ memset(cmdstr,0,SOCKET_CMD_MAX_LEN);
+
+ printf("Please input an socket command:\n");
+
+ if(NULL != fgets(cmdstr,SOCKET_CMD_MAX_LEN - 1,stdin)) {
+ if(0 == strcmp(EXIT_CMD_STOP,cmdstr) ||
+ 0 == strcmp(EXIT_CMD_Q,cmdstr) ||
+ 0 == strcmp(EXIT_CMD_EXIT,cmdstr)) {
+ if(g_sockfd != -1){
+ if(close(g_sockfd) == 0){
+ printf("close g_sockfd=%d sucess \n", g_sockfd);
+ }else{
+ printf("close g_sockfd=%d failed \n", g_sockfd);
+ }
+ }
+ break;
+ }
+
+ printf("cmdstr:%d %s\n",strlen(cmdstr),cmdstr);
+ if(1 >= strlen(cmdstr)) {
+ continue;
+ }
+
+ socket_cmd_proc(cmdstr);
+ }
+ }
+
+ printf("socket_ipc:Demo end.\n");
+ return 0;
+}
+
diff --git a/ap/app/socket_demo/socket_tok.c b/ap/app/socket_demo/socket_tok.c
new file mode 100755
index 0000000..3ac2a4a
--- /dev/null
+++ b/ap/app/socket_demo/socket_tok.c
@@ -0,0 +1,190 @@
+/*
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#include "socket_tok.h"
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+/**
+ * Starts tokenizing an AT response string
+ * returns -1 if this is not a valid response string, 0 on success.
+ * updates *p_cur with current position
+ */
+int at_tok_start(char **p_cur)
+{
+ if (*p_cur == NULL) {
+ return -1;
+ }
+
+ // skip prefix
+ // consume "^[^:]:"
+
+ *p_cur = strchr(*p_cur, ':');
+
+ if (*p_cur == NULL) {
+ return -1;
+ }
+
+ (*p_cur)++;
+
+ return 0;
+}
+
+static void skipWhiteSpace(char **p_cur)
+{
+ if (*p_cur == NULL) return;
+
+ while (**p_cur != '\0' && isspace(**p_cur)) {
+ (*p_cur)++;
+ }
+}
+
+static void skipNextComma(char **p_cur)
+{
+ if (*p_cur == NULL) return;
+
+ while (**p_cur != '\0' && **p_cur != ',') {
+ (*p_cur)++;
+ }
+
+ if (**p_cur == ',') {
+ (*p_cur)++;
+ }
+}
+
+static char * nextTok(char **p_cur)
+{
+ char *ret = NULL;
+
+ skipWhiteSpace(p_cur);
+
+ if (*p_cur == NULL) {
+ ret = NULL;
+ } else if (**p_cur == '"') {
+ (*p_cur)++;
+ ret = strsep(p_cur, "\"");
+ skipNextComma(p_cur);
+ } else {
+ ret = strsep(p_cur, ",");
+ }
+
+ return ret;
+}
+
+
+/**
+ * Parses the next integer in the AT response line and places it in *p_out
+ * returns 0 on success and -1 on fail
+ * updates *p_cur
+ * "base" is the same as the base param in strtol
+ */
+
+static int at_tok_nextint_base(char **p_cur, int *p_out, int base, int uns)
+{
+ char *ret;
+
+ if (*p_cur == NULL) {
+ return -1;
+ }
+
+ ret = nextTok(p_cur);
+
+ if (ret == NULL) {
+ return -1;
+ } else {
+ long l;
+ char *end;
+
+ if (uns)
+ l = strtoul(ret, &end, base);
+ else
+ l = strtol(ret, &end, base);
+
+ *p_out = (int)l;
+
+ if (end == ret) {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * Parses the next base 10 integer in the AT response line
+ * and places it in *p_out
+ * returns 0 on success and -1 on fail
+ * updates *p_cur
+ */
+int at_tok_nextint(char **p_cur, int *p_out)
+{
+ return at_tok_nextint_base(p_cur, p_out, 10, 0);
+}
+
+/**
+ * Parses the next base 16 integer in the AT response line
+ * and places it in *p_out
+ * returns 0 on success and -1 on fail
+ * updates *p_cur
+ */
+int at_tok_nexthexint(char **p_cur, int *p_out)
+{
+ return at_tok_nextint_base(p_cur, p_out, 16, 1);
+}
+
+int at_tok_nextbool(char **p_cur, char *p_out)
+{
+ int ret;
+ int result;
+
+ ret = at_tok_nextint(p_cur, &result);
+
+ if (ret < 0) {
+ return -1;
+ }
+
+ // booleans should be 0 or 1
+ if (!(result == 0 || result == 1)) {
+ return -1;
+ }
+
+ if (p_out != NULL) {
+ *p_out = (char)result;
+ }
+
+ return ret;
+}
+
+int at_tok_nextstr(char **p_cur, char **p_out)
+{
+ if (*p_cur == NULL) {
+ return -1;
+ }
+
+ *p_out = nextTok(p_cur);
+
+ return 0;
+}
+
+/** returns 1 on "has more tokens" and 0 if no */
+int at_tok_hasmore(char **p_cur)
+{
+ return ! (*p_cur == NULL || **p_cur == '\0');
+}
+
+
diff --git a/ap/app/socket_demo/socket_tok.h b/ap/app/socket_demo/socket_tok.h
new file mode 100755
index 0000000..6aa6e72
--- /dev/null
+++ b/ap/app/socket_demo/socket_tok.h
@@ -0,0 +1,30 @@
+/*
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef SC_SMS_TOK_H
+#define SC_SMS_TOK_H
+
+int at_tok_start(char **p_cur);
+int at_tok_nextint(char **p_cur, int *p_out);
+int at_tok_nexthexint(char **p_cur, int *p_out);
+
+int at_tok_nextbool(char **p_cur, char *p_out);
+int at_tok_nextstr(char **p_cur, char **out);
+
+int at_tok_hasmore(char **p_cur);
+
+#endif /*SC_CC_TOK_H */
diff --git a/ap/app/tzdata/Makefile b/ap/app/tzdata/Makefile
index 6665c92..bd01205 100755
--- a/ap/app/tzdata/Makefile
+++ b/ap/app/tzdata/Makefile
@@ -21,6 +21,7 @@
ifneq ($(CONFIG_TZDATA_MODULE),)
#$(CP) -rf ./zoneinfo/$(CONFIG_TZDATA_MODULE)/* $(ROMFS_DIR)/usr/share/zoneinfo
$(CP) -rf ./zoneinfo/$(CONFIG_TZDATA_MODULE) $(ROMFS_DIR)/usr/share/zoneinfo/
+ $(CP) -rf ./zoneinfo/Etc $(ROMFS_DIR)/usr/share/zoneinfo/
else
$(CP) -rf ./zoneinfo/* $(ROMFS_DIR)/usr/share/zoneinfo
endif
diff --git a/ap/app/wpa_supplicant-2.10/wpa_supplicant/.config b/ap/app/wpa_supplicant-2.10/wpa_supplicant/.config
index 734a955..86f7132 100755
--- a/ap/app/wpa_supplicant-2.10/wpa_supplicant/.config
+++ b/ap/app/wpa_supplicant-2.10/wpa_supplicant/.config
@@ -302,7 +302,11 @@
# none = Empty template
#CONFIG_TLS=openssl
#CONFIG_TLS_ADD_DL=y
+ifeq ($(USE_VEHICLE_DC),yes)
+CONFIG_TLS=openssl
+else
CONFIG_TLS=wolfssl
+endif
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
# can be enabled to get a stronger construction of messages when block ciphers
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
new file mode 100755
index 0000000..399c29d
--- /dev/null
+++ 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/mnet_whitelist.h b/ap/app/zte_comm/at_ctl/inc/mnet_whitelist.h
index 7264720..b0d8656 100755
--- a/ap/app/zte_comm/at_ctl/inc/mnet_whitelist.h
+++ b/ap/app/zte_comm/at_ctl/inc/mnet_whitelist.h
@@ -25,21 +25,27 @@
/*******************************************************************************
* Global function declarations *
******************************************************************************/
-/**
- * @brief CPÏòAP²àÐÂÔöÖ÷¶¯Éϱ¨ATÃüÁî
- * @param
- * @return
- * @note
- * @warning
- */
-void mnet_whitelist_add(char* at_str);
-/**
- * @brief CPÏòAP²àɾ³ýÖ÷¶¯Éϱ¨ATÃüÁî
- * @param
- * @return
- * @note
- * @warning
- */
-void mnet_whitelist_del(char* at_str);
+
+typedef enum
+{
+ MNET_WHITELIST_OPER_SUCC,
+ MNET_WHITELIST_DEL_CMD_EMPTY,
+ MNET_WHITELIST_DEL_TARGET_EMPTY,
+ MNET_WHITELIST_OPER_ALREADY_IN,
+ MNET_WHITELIST_OPER_NOMORESPACE,
+ MNET_WHITELIST_OPER_CMD_TOO_LONG,
+}mnet_whitelist_err_code_e;
+
+typedef struct
+{
+ int result;
+}mnet_whitelist_oper_result;
+
+int cmdtolower(char* str);
+int mnet_whitelist_add(char* at_str);
+int mnet_whitelist_del(char* at_str);
+void mnet_whitelist_insert(char* at_str);
+void mnet_whitelist_delete(char* at_str);
+void mnet_whitelist_fetch();
#endif
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 e5f6d8d..f131a9b 100755
--- a/ap/app/zte_comm/at_ctl/inc/ps_normal.h
+++ b/ap/app/zte_comm/at_ctl/inc/ps_normal.h
@@ -879,4 +879,6 @@
int zcardswitch_auto_act(char *at_paras ,int is_query_report);
int zsciscan_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);
+
#endif
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 a935448..9687244 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
@@ -349,7 +349,7 @@
register_inform_func("ZICCID", ziccid_auto_act);
register_inform_func("CIMI", cimi_auto_act);
register_inform_func("ZVERSION",zversion_auto_act);
-
+ register_serv_func2("ZDEFAPN=",0,0,0,defapn_query_func,0);
}
void wifi_regist_init()
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c b/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
index 5a7e9d0..dab2218 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
@@ -41,35 +41,69 @@
******************************************************************************/
extern char PsmIndAtCmdPrefix[AT_CMD_MAX];
+#define DEFAULT_VALUE ('a'-'A')
/*******************************************************************************
* Local function implementations *
******************************************************************************/
-void mnet_whitelist_add(char* at_str)
+typedef struct{
+ int result;
+}mnet_whitelist_common_res_t;
+
+int cmdtolower(char* str)
{
- if(at_strstr(PsmIndAtCmdPrefix, at_str)){
- return;
- }else{
- if( (strlen(PsmIndAtCmdPrefix) + strlen(at_str)) > sizeof(PsmIndAtCmdPrefix)){
- return;
+ if(NULL == str || 0 == strlen(str))
+ return 1;
+ int i=0, ch1=0, len = strlen(str);
+ char* p = str;
+ while(i<len){
+ if((ch1 = *(unsigned char *)p) >= 'A' && (ch1 <= 'Z'))
+ {
+ str[i] += DEFAULT_VALUE;
}
- sprintf(PsmIndAtCmdPrefix, "%s%s", PsmIndAtCmdPrefix, at_str);
+ p++;
+ i++;
}
-
+ return 0;
}
-void mnet_whitelist_del(char* at_str)
+int mnet_whitelist_add(char* at_str)
+{
+ if(0 == strlen(PsmIndAtCmdPrefix)){
+ if(strlen(at_str) > sizeof(PsmIndAtCmdPrefix)){
+ at_print(AT_ERR,"mnet_whitelist_add cmd too long\n");
+ return MNET_WHITELIST_OPER_CMD_TOO_LONG;
+ }
+ sprintf(PsmIndAtCmdPrefix, "%s", at_str);
+ return MNET_WHITELIST_OPER_SUCC;
+ }else if(NULL != at_strstr(PsmIndAtCmdPrefix, at_str)){
+ at_print(AT_ERR,"mnet_whitelist_add cmd already in\n");
+ return MNET_WHITELIST_OPER_ALREADY_IN;
+ }else{
+ if((strlen(PsmIndAtCmdPrefix) + strlen(at_str)) < sizeof(PsmIndAtCmdPrefix)){
+ at_str++;
+ sprintf(PsmIndAtCmdPrefix, "%s%s", PsmIndAtCmdPrefix, at_str);
+ return MNET_WHITELIST_OPER_SUCC;
+ }else{
+ at_print(AT_ERR,"no space left\n");
+ return MNET_WHITELIST_OPER_NOMORESPACE;
+ }
+ }
+}
+
+int mnet_whitelist_del(char* at_str)
{
int i=0, j=0, len = strlen(PsmIndAtCmdPrefix);
- if(0 == strlen(at_str) || 0 == strlen(PsmIndAtCmdPrefix)){
- return;
+ if(0 == strlen(PsmIndAtCmdPrefix)){
+ return MNET_WHITELIST_DEL_TARGET_EMPTY;
}else{
char* pos = NULL;
char str[AT_CMD_MAX] = {0};
- if(NULL != (pos = (at_strstr(PsmIndAtCmdPrefix, at_str)))){
+ pos = (at_strstr(PsmIndAtCmdPrefix, at_str));
+ if(NULL != pos){
while(i<strlen(at_str)){
- pos[i++] = '\0';
+ pos[i++]='\0';
}
i=0;
strcpy(str, "");
@@ -83,6 +117,82 @@
strcpy(PsmIndAtCmdPrefix, str);
}
}
+ if(strlen(PsmIndAtCmdPrefix) <2){
+ strcpy(PsmIndAtCmdPrefix, "");
+ }
+ return MNET_WHITELIST_OPER_SUCC;
+}
+
+
+void mnet_whitelist_insert(char* at_str)
+{
+ int i=1, len = strlen(at_str);
+ if(cmdtolower(at_str) == 1){
+ at_print(AT_ERR,"cmd tolower failed\n");
+ return;
+ }
+ char * tmp;
+ int j=0, pos=0;
+
+ while(i<len){
+ if(at_str[i] == '+'){
+ tmp = malloc(i-pos+1);
+ assert(tmp);
+ while(pos < i){
+ tmp[j] = at_str[pos];
+ j++;pos++;
+ }
+ tmp[j] = '\+';
+ tmp[j+1] = '\0';
+ mnet_whitelist_add(tmp);
+ j=0;
+ }
+ i++;;
+ }
+ sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);
+ sc_cfg_save();
+ return;
+}
+
+void mnet_whitelist_delete(char* at_str)
+{
+ int i=1, ret=0, len = strlen(at_str);
+ mnet_whitelist_oper_result res = {0};
+ if(cmdtolower(at_str) == 1){
+ at_print(AT_ERR,"cmd tolower failed\n");
+ return;
+ }
+ at_print(AT_DEBUG,"mnet_whitelist_delete lower at_str : %s\n", at_str);
+ at_str;
+ char * tmp;
+ int j=0, pos=0;
+
+ while(i<len){
+ if(at_str[i] == '+'){
+ tmp = malloc(i-pos+1);
+ assert(tmp);
+ while(pos < i){
+ tmp[j] = at_str[pos];
+ j++;pos++;
+ }
+ tmp[j] = '\0';
+ mnet_whitelist_del(tmp);
+ j=0;
+ }
+ i++;;
+ }
+ sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);
+ sc_cfg_save();
+ return;
+}
+
+
+void mnet_whitelist_fetch()
+{
+ int ret = send_soc_msg(FAR_PS, MODULE_ID_MNET_WHITELIST, MSG_CMD_GET_MNET_WHITELIST_RSP, strlen(PsmIndAtCmdPrefix), (void*)PsmIndAtCmdPrefix);
+ if (ret != 0) {
+ at_print(AT_ERR, "send_soc_msg fail, ret:%d\n", ret);
+ }
}
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 498d51e..2d4c6b1 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
@@ -3493,6 +3493,7 @@
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)
{
@@ -4435,7 +4436,7 @@
{
start_pdp_auto_dial();//Æô¶¯¶¨Ê±Æ÷½øÐÐpdp¼¤»î
}
- ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_CREG_IND, 0, NULL, 0);
+ ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_CREG_IND, 0, NULL, IPC_NOWAIT);
}
else
{
@@ -5837,7 +5838,7 @@
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, 0);
+ ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_VSIM, MSG_CMD_ZCARDSWITCHIND_IND, sizeof(result), result, IPC_NOWAIT);
}
return AT_END;
}
@@ -5911,4 +5912,45 @@
return AT_END;
}
+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;
+}
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_socmsg.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_socmsg.c
old mode 100644
new mode 100755
index 1e7de82..cb5f512
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_socmsg.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_socmsg.c
@@ -182,13 +182,18 @@
return 1;
#endif
case MSG_CMD_ADD_MNET_WHITELIST:
- mnet_whitelist_add(dstMsg);
+ mnet_whitelist_insert(dstMsg);
return 1;
case MSG_CMD_DEL_MNET_WHITELIST:
- mnet_whitelist_del(dstMsg);
+ mnet_whitelist_delete(dstMsg);
return 1;
case MSG_CMD_CLEAR_MNET_WHITELIST:
- strcpy(PsmIndAtCmdPrefix, "");
+ strcpy(PsmIndAtCmdPrefix, "");
+ sc_cfg_set("customIndCmdList", PsmIndAtCmdPrefix);
+ sc_cfg_save();
+ return 1;
+ case MSG_CMD_GET_MNET_WHITELIST:
+ mnet_whitelist_fetch();
return 1;
}
diff --git a/ap/app/zte_comm/nvserver/nvserver.c b/ap/app/zte_comm/nvserver/nvserver.c
index bafb391..7644730 100755
--- a/ap/app/zte_comm/nvserver/nvserver.c
+++ b/ap/app/zte_comm/nvserver/nvserver.c
@@ -14,7 +14,8 @@
#include "nv_typedef.h"
#include <message.h>
#ifdef FOTA_AB
-#include "zxic_fota_ab_upgrade.h"
+#include "pub_flags.h"
+#include "flags_api.h"
#endif
#ifdef __cplusplus
extern"C"{
@@ -30,145 +31,148 @@
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=
-(0xbcf+3132-0x180b);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",
-(0x1288+5023-0x2627),(0x1526+2305-0x1e27),(0x10af+1375-0x160e));memset(&rcvBuf,
-(0x1342+863-0x16a1),sizeof(rcvBuf));memset(&sndBuf,(0x1ea7+622-0x2115),sizeof(
-sndBuf));memset(&msgInfo,(0xe22+5489-0x2393),sizeof(msgInfo));msgId=msgget(
-MODULE_ID_NV,IPC_CREAT|(0x1837+1448-0x1c5f));if(-(0x86c+1477-0xe30)==msgId){
-printf(
+(0xa45+6326-0x22fb);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",(0x1bbd+671-0x1e5c)
+,(0xaed+2394-0x1447),(0x142c+2161-0x1c9d));memset(&rcvBuf,(0x1858+1369-0x1db1),
+sizeof(rcvBuf));memset(&sndBuf,(0x1dc4+1865-0x250d),sizeof(sndBuf));memset(&
+msgInfo,(0x1b27+400-0x1cb7),sizeof(msgInfo));msgId=msgget(MODULE_ID_NV,IPC_CREAT
+|(0x360+1470-0x79e));if(-(0x1c73+2047-0x2471)==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-(0x4bc+8531-0x260e);}if(-(0xb3+7137-0x1c93)!=msgctl(msgId,
-IPC_STAT,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0x30a+4585-0x14f2)==msgctl(
-msgId,IPC_SET,&msgInfo))printf(
+,errno);return-(0xfe6+5484-0x2551);}if(-(0xb+711-0x2d1)!=msgctl(msgId,IPC_STAT,&
+msgInfo)){msgInfo.msg_qbytes=262144;if(-(0x585+5019-0x191f)==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()!=(0x193+7308-0x1e1f)){printf(
+,errno);}if(nvDirInit()!=(0xab2+109-0xb1f)){printf(
"\x6e\x76\x44\x69\x72\x49\x6e\x69\x74\x20\x66\x61\x69\x6c\x65\x21" "\n");return-
-(0x9bc+1602-0xffd);}nvConfig();nvInit();while((0x1e51+613-0x20b5)){if(-
-(0x312+7393-0x1ff2)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
-MSG_TYPE_NV,(0x1197+4387-0x22ba))){printf(
+(0x6a0+1792-0xd9f);}nvConfig();nvInit();while((0x1015+968-0x13dc)){if(-
+(0x195f+2189-0x21eb)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
+MSG_TYPE_NV,(0x180b+3551-0x25ea))){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(-(0x8e0+3234-0x1581)==msgsnd(
-msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x1643+201-0x170c))){printf(
+,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0xc0b+6174-0x2428)==msgsnd(
+msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x70+2788-0xb54))){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((0x1b99+1384-0x2101));}static void configdir(char*dir)
-{DIR*dp;int ret;struct dirent*entry;struct stat statbuf;if((dp=opendir(dir))==
+,errno);continue;}}return((0x4dc+2279-0xdc3));}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<(0x1294+4731-0x250f)){fprintf(stderr,
+d_name,&statbuf);if(ret<(0xfd6+3411-0x1d29)){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)==(0x22ec+961-0x26ad)||strcmp("\x2e\x2e",entry->
-d_name)==(0x97f+5608-0x1f67))continue;if(!isNvConfiged(entry->d_name)){if(
+strcmp("\x2e",entry->d_name)==(0x6fb+3061-0x12f0)||strcmp("\x2e\x2e",entry->
+d_name)==(0x22b+4542-0x13e9))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]={(0x4e2+6383-0x1dd1)};fp=fopen
-(NV_CONFIG_FILE,"\x72\x6f");if(!fp){printf(
+val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x10f1+3423-0x1e50)};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[
-(0xbe8+1358-0x1136)]=='\n'||buf[(0x962+1248-0xe42)]==((char)(0x982+5121-0x1d60))
-)continue;val=strchr(buf,((char)(0xb7+5106-0x146c)));if(!val){printf(
+(0xdd+4634-0x12f7)]=='\n'||buf[(0x140a+4479-0x2589)]==
+((char)(0xf20+5352-0x23e5)))continue;val=strchr(buf,((char)(0x51+5420-0x1540)));
+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)-(0x17b6+1612-0x1e01)]='\0';*val++
-='\0';if(!isCfgConfiged(buf)){if(addConfigFile(val,buf)!=RESULT_SUCCESS)printf(
+,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0xc70+5408-0x218f)]='\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)!=(0x96+2717-0xb33)){if(mkdir(NV_FS_PATH,(0x541+7294-0x1fd2))!=
-(0xdb3+1109-0x1208)){printf(
+NV_FS_PATH,F_OK)!=(0x8af+2781-0x138c)){if(mkdir(NV_FS_PATH,(0xa6c+485-0xa64))!=
+(0x1131+1304-0x1649)){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-(0x202a+1643-0x2694);}if(mkdir(NV_FS_MAIN_PATH,
-(0x7eb+5252-0x1a82))!=(0x5af+4090-0x15a9)){printf(
+,NV_FS_PATH,errno);return-(0x571+961-0x931);}if(mkdir(NV_FS_MAIN_PATH,
+(0x4e6+1099-0x744))!=(0xc7+7296-0x1d47)){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-(0x1bda+2498-0x259b);}if(mkdir(NV_FS_BACKUP_PATH,
-(0x1d3a+2893-0x269a))!=(0x48+4657-0x1279)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0x66c+2334-0xf89);}if(mkdir(NV_FS_BACKUP_PATH,
+(0x357+6778-0x1be4))!=(0xdec+249-0xee5)){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-(0x1366+4000-0x2305);}}else{if(access(
-NV_FS_MAIN_PATH,F_OK)!=(0x140d+2932-0x1f81)){if(mkdir(NV_FS_MAIN_PATH,
-(0xbd3+3999-0x1985))!=(0x173b+3553-0x251c)){printf(
+,NV_FS_BACKUP_PATH,errno);return-(0x644+1897-0xdac);}}else{if(access(
+NV_FS_MAIN_PATH,F_OK)!=(0xa0c+5186-0x1e4e)){if(mkdir(NV_FS_MAIN_PATH,
+(0x6b4+6122-0x1cb1))!=(0x407+558-0x635)){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-(0x38d+7953-0x229d);}}if(access(NV_FS_BACKUP_PATH
-,F_OK)!=(0x952+6362-0x222c)){if(mkdir(NV_FS_BACKUP_PATH,(0x2089+616-0x2104))!=
-(0x28a+8367-0x2339)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0x1ef7+377-0x206f);}}if(access(NV_FS_BACKUP_PATH
+,F_OK)!=(0x168f+3216-0x231f)){if(mkdir(NV_FS_BACKUP_PATH,(0x1f25+1379-0x229b))!=
+(0x13fc+2308-0x1d00)){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-(0x18e5+1427-0x1e77);}}}return
-(0x465+7647-0x2244);}static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[
-NV_PATH_LEN]={(0x11d3+1068-0x15ff)};char nvBackupFile[NV_PATH_LEN]={
-(0x595+3941-0x14fa)};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,NV_PATH_LEN,"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,list->nvFile);
-if(checkNvFs(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()==
-(0xe7a+3991-0x1e0f)){reloadFactroyParam(list);delete_not_needed(list);nvcommit(
-list->nvFile);
+,NV_FS_BACKUP_PATH,errno);return-(0x4a+8057-0x1fc2);}}}return(0xb8+863-0x417);}
+static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
+(0x101f+5190-0x2465)};char nvBackupFile[NV_PATH_LEN]={(0xa23+5220-0x1e87)};
#ifdef FOTA_AB
-dual_AB_set_fota_status_for_nv((0x427+7830-0x22bd));
+T_FLAGS_INFO flags_info={(0xb63+2651-0x15be)};int ret=(0x7df+2822-0x12e5);
#endif
-}}}uint hash(const char*s){uint hash=(0xf22+439-0x10d9);while(*s){hash=
+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,
+NV_PATH_LEN,"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,list->nvFile);if(checkNvFs(
+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()==(0x1c8f+1353-0x21d6)){
+reloadFactroyParam(list);delete_not_needed(list);nvcommit(list->nvFile);
+#ifdef FOTA_AB
+ret=flags_get(&flags_info);flags_info.boot_fota_flag.fota_status=
+(0xd66+5151-0x2185);ret=flags_set(&flags_info);
+#endif
+}}}uint hash(const char*s){uint hash=(0x637+6165-0x1e4c);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]={
-(0x13af+560-0x15df)};for(config=list->fileList;config;config=config->next){fp=
+(0xda4+5954-0x24e6)};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[(0xd07+2175-0x1586)]=='\n'||buf[(0x10dd+2946-0x1c5f)
-]==((char)(0xe0f+5201-0x223d)))continue;val=strchr(buf,
-((char)(0x99c+3118-0x158d)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0xe37+5509-0x23bc)]=='\n'||buf[(0x89b+5941-0x1fd0)]
+==((char)(0x18c5+2145-0x2103)))continue;val=strchr(buf,
+((char)(0x320+3965-0x1260)));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)-(0x1679+1250-0x1b5a)]==
-'\n')buf[strlen(buf)-(0x1267+321-0x13a7)]='\0';*val++='\0';nvset(list->nvFile,
-buf,val,(0x7d8+1773-0xec4));}printf(
+,config->configFile,buf);continue;}if(buf[strlen(buf)-(0x19ad+2520-0x2384)]==
+'\n')buf[strlen(buf)-(0x1fc+875-0x566)]='\0';*val++='\0';nvset(list->nvFile,buf,
+val,(0x13f5+24-0x140c));}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=(0x942+1170-0xdd4);int cnt=(0x17aa+1648-0x1e1a);FILE*fp=NULL;
-char*buf=NULL;struct stat statbuff={(0x20a+8437-0x22ff)};if(stat(file,&statbuff)
-<(0x74d+6896-0x223d))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
+char*file){int len=(0x59c+1074-0x9ce);int cnt=(0xd16+168-0xdbe);FILE*fp=NULL;
+char*buf=NULL;struct stat statbuff={(0x14ea+4058-0x24c4)};if(stat(file,&statbuff
+)<(0x46a+8107-0x2415))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=(0x1ae6+606-0x1d44);while(cnt<len){cnt=
-cnt+fread(buf+cnt,(0xd4a+4244-0x1ddd),len-cnt,fp);if(ferror(fp)){clearerr(fp);
+);if(!buf){fclose(fp);return false;}cnt=(0xa89+5585-0x205a);while(cnt<len){cnt=
+cnt+fread(buf+cnt,(0x1a84+1515-0x206e),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[(0x12d1+2121-0xb1a)];ssize_t nread;int ret=-(0x15cb+2856-0x20f2);
-fd_from=open(from,O_RDONLY);if(fd_from<(0xf0c+4428-0x2058))return-
-(0x5b9+4654-0x17e5);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
-(0xe35+4298-0x1d5f));if(fd_to<(0x1609+4181-0x265e)){ret=-(0xbaa+4678-0x1ded);
-goto out_error;}while((0xab5+436-0xc68)){char*out_ptr;ssize_t nwritten;nread=
-read(fd_from,buf,sizeof(buf));if(nread==(0x32c+2809-0xe25)){break;}else{if(nread
-<(0x17+6967-0x1b4e)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
-(0x88c+4026-0x1842);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
-out_ptr,nread);if(nwritten>(0x452+6890-0x1f3c)){nread-=nwritten;out_ptr+=
-nwritten;}else{if(nwritten<(0x1f6f+130-0x1ff1)){if(errno==EINTR||errno==EAGAIN){
-continue;}else{ret=-(0x1033+160-0x10ce);goto out_error;}}}}while(nread>
-(0xaad+5676-0x20d9));}ret=fsync(fd_to);if(ret<(0x9e3+6117-0x21c8)){printf(
+char buf[(0x191f+4976-0x1c8f)];ssize_t nread;int ret=-(0x186f+457-0x1a37);
+fd_from=open(from,O_RDONLY);if(fd_from<(0xe1c+1109-0x1271))return-
+(0xec8+5950-0x2604);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
+(0x422+8380-0x233e));if(fd_to<(0x18f+7237-0x1dd4)){ret=-(0x1fcd+1080-0x2402);
+goto out_error;}while((0x100+1817-0x818)){char*out_ptr;ssize_t nwritten;nread=
+read(fd_from,buf,sizeof(buf));if(nread==(0x137c+4147-0x23af)){break;}else{if(
+nread<(0xa05+1313-0xf26)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
+(0x18ad+1614-0x1ef7);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
+out_ptr,nread);if(nwritten>(0x23a+5946-0x1974)){nread-=nwritten;out_ptr+=
+nwritten;}else{if(nwritten<(0x50a+6862-0x1fd8)){if(errno==EINTR||errno==EAGAIN){
+continue;}else{ret=-(0x2c+261-0x12c);goto out_error;}}}}while(nread>
+(0x11a4+215-0x127b));}ret=fsync(fd_to);if(ret<(0x497+4869-0x179c)){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)<(0xcd5+2193-0x1566)){fd_to=
--(0x4dc+5175-0x1912);ret=-(0x156a+2827-0x206f);goto out_error;}close(fd_from);
-return(0x1025+16-0x1035);out_error:printf(
+,strerror(errno),to);goto out_error;}if(close(fd_to)<(0x1651+894-0x19cf)){fd_to=
+-(0x6bb+7641-0x2493);ret=-(0xafd+3211-0x1782);goto out_error;}close(fd_from);
+return(0xb0a+2985-0x16b3);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>=(0x2d0+5093-0x16b5))close(fd_to);return
+,from,to,ret);close(fd_from);if(fd_to>=(0xfbc+5369-0x24b5))close(fd_to);return
ret;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,
-dstFile)!=(0x2008+226-0x20ea))return RESULT_FAIL;return RESULT_SUCCESS;}static
-int loadNvFs(char*file){int len=(0x4ba+7636-0x228e);int cnt=(0x57f+3363-0x12a2);
-FILE*fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct
-stat statbuff={(0x92b+4766-0x1bc9)};char nvFile[NV_PATH_LEN]={(0x5af+1084-0x9eb)
-};sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);if(stat(nvFile,&
-statbuff)<(0x1225+2211-0x1ac8))return RESULT_FAIL;len=statbuff.st_size;if(
+dstFile)!=(0xf37+3371-0x1c62))return RESULT_FAIL;return RESULT_SUCCESS;}static
+int loadNvFs(char*file){int len=(0xb2+893-0x42f);int cnt=(0x11c+569-0x355);FILE*
+fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct stat
+statbuff={(0x8e8+552-0xb10)};char nvFile[NV_PATH_LEN]={(0x1a7a+493-0x1c67)};
+sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);if(stat(nvFile,&
+statbuff)<(0x2b9+8744-0x24e1))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+
-(0xe6d+2069-0x1681));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
-(0x60a+7514-0x2364),len+(0x35c+1903-0xaca));cnt=(0x18c1+723-0x1b94);while(cnt<
-len){cnt=cnt+fread(buf+cnt,(0xb44+5102-0x1f31),len-cnt,fp);if(ferror(fp)){
+(0x4ec+2144-0xd4b));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
+(0xff1+5628-0x25ed),len+(0x3a8+3822-0x1295));cnt=(0x846+4747-0x1ad1);while(cnt<
+len){cnt=cnt+fread(buf+cnt,(0x1d25+1586-0x2356),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)(0x18c1+550-0x1aaa))))){break;}*eq='\0';value=
-eq+(0x1bf0+2740-0x26a3);nvset(file,name,value,(0x95a+4190-0x19b7));*eq=
-((char)(0x1458+1395-0x198e));name=value+strlen(value)+(0x1a27+2930-0x2598);}free
-(buf);fclose(fp);return RESULT_SUCCESS;}static void analyMsg(T_NV_MSG_INFO*
+*name){if(!(eq=strchr(name,((char)(0xb15+5901-0x21e5))))){break;}*eq='\0';value=
+eq+(0x726+7250-0x2377);nvset(file,name,value,(0x2359+401-0x24e9));*eq=
+((char)(0x10dd+3642-0x1eda));name=value+strlen(value)+(0xc4a+3029-0x181e);}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);
@@ -183,100 +187,100 @@
"\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-(0xc4b+1299-0x115d));newConfig->configFile[
-NV_PATH_LEN-(0xe3d+3313-0x1b2d)]='\0';newConfig->next=NULL;}for(list=nv_list;
-list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x674+3934-0x15d2))break;
+configFile,configFile,NV_PATH_LEN-(0x289+6736-0x1cd8));newConfig->configFile[
+NV_PATH_LEN-(0x3c8+4008-0x136f)]='\0';newConfig->next=NULL;}for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x15e2+729-0x18bb))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-(0x764+6527-0x20e2));newList->nvFile[
-NV_PATH_LEN-(0x6f5+6917-0x21f9)]='\0';memset(newList->nvTable,
-(0xf21+5584-0x24f1),NV_HASH_LEN*(0x19b0+758-0x1ca2));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=(0x122c+4412-0x2368);char*data=(char*)s;while(len-- >
-(0xe55+5822-0x2513)){sum+=(*data++);}return sum;}static int saveNvFs(char*nvName
-,char*nvFile){int i=(0x1014+15-0x1023);int sum=(0x1a66+267-0x1b71);int bufSize=
-(0x120+8267-0x216b);int itemSize=(0x1cf9+2208-0x2599);int ret=
-(0x33b+4287-0x13fa);int fp=(0x235+749-0x522);char*buf=NULL;T_NV_NODE*list=NULL;
-T_NV_ITEM*item=NULL;for(list=nv_list;list;list=list->next){if(strcmp(list->
+newList->nvFile,nvFile,NV_PATH_LEN-(0x1aad+2851-0x25cf));newList->nvFile[
+NV_PATH_LEN-(0xbf8+185-0xcb0)]='\0';memset(newList->nvTable,(0x884+7104-0x2444),
+NV_HASH_LEN*(0x1507+3329-0x2204));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=(0xfeb+5059-0x23ae);char*data=(char*)s;while(len-- >
+(0x114+3514-0xece)){sum+=(*data++);}return sum;}static int saveNvFs(char*nvName,
+char*nvFile){int i=(0xeb9+5391-0x23c8);int sum=(0x22a2+109-0x230f);int bufSize=
+(0x19e1+2874-0x251b);int itemSize=(0x1365+3673-0x21be);int ret=
+(0x66c+4700-0x18c8);int fp=(0x1180+3346-0x1e92);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,
-(0x4fb+5219-0x17be));if(fp==-(0x1c63+1855-0x23a1)){printf(
+(0xf23+6534-0x2709));if(fp==-(0x313+27-0x32d)){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=(0xc97+6691-0x26ba);i<
+(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0xfdd+5797-0x2682);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)+(0x6da+3834-0x15d2);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp,
-buf,bufSize)<(0xdc+3162-0xd36)){printf(
+item->value)+(0x1158+4058-0x2130);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp
+,buf,bufSize)<(0x95b+3110-0x1581)){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=(0x22c5+97-0x2326);}sprintf(buf+bufSize,
++=getSum(buf,bufSize);bufSize=(0x1140+3589-0x1f45);}sprintf(buf+bufSize,
"\x25\x73\x3d\x25\x73",item->key,item->value);bufSize+=itemSize;}}if(bufSize!=
-(0xc03+4782-0x1eb1)){if(write(fp,buf,bufSize)<(0x1759+1299-0x1c6c)){printf(
+(0xb44+4885-0x1e59)){if(write(fp,buf,bufSize)<(0xf73+3468-0x1cff)){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)<(0x359+8546-0x24bb))
+bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0x23a7+455-0x256e))
{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<(0x445+564-0x679)){printf(
+buf);close(fp);if(ret<(0x0+222-0xde)){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=
-(0xcbf+5419-0x21ea);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
+(0xbfd+3722-0x1a87);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-(0x12bc+4341-0x23b0))
-;value[NV_MAX_VAL_LEN-(0x701+6117-0x1ee5)]='\0';return RESULT_SUCCESS;}}return
+key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0xb6d+2794-0x1656));
+value[NV_MAX_VAL_LEN-(0x20f6+1419-0x2680)]='\0';return RESULT_SUCCESS;}}return
RESULT_NO_ITEM;}static int nvset(char*file,const char*key,const char*value,int
-saveFlag){int index=(0x3f7+3888-0x1327);int ret=(0xe76+295-0xf9d);int
-key_buf_len=(0x1667+1744-0x1d37);int value_buf_len=(0x5ba+5145-0x19d3);T_NV_NODE
+saveFlag){int index=(0xf88+5574-0x254e);int ret=(0xc0a+2175-0x1489);int
+key_buf_len=(0xd53+5424-0x2283);int value_buf_len=(0x13b6+3552-0x2196);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)+(0xec4+4523-0x206e);value_buf_len=
-strlen(value)+(0x34b+8639-0x2509);for(list=nv_list;list;list=list->next){if(
+return RESULT_FAIL;key_buf_len=strlen(key)+(0x32b+3822-0x1218);value_buf_len=
+strlen(value)+(0x4fd+6295-0x1d93);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-
-(0xaa3+6760-0x250a));item->value[value_buf_len-(0x239+7917-0x2125)]='\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(
+(0x26a+6525-0x1be6));item->value[value_buf_len-(0x1cef+1258-0x21d8)]='\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-(0x11f+793-0x437));
-newItem->key[key_buf_len-(0x1fa4+112-0x2013)]='\0';strncpy(newItem->value,value,
-value_buf_len-(0x4cb+2289-0xdbb));newItem->value[value_buf_len-
-(0x132b+3439-0x2099)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem
-->update_flag=(0xcd7+5313-0x2198);if(!list->nvTable[index])list->nvTable[index]=
+RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,key_buf_len-(0x855+1834-0xf7e));
+newItem->key[key_buf_len-(0x898+5067-0x1c62)]='\0';strncpy(newItem->value,value,
+value_buf_len-(0xa06+2682-0x147f));newItem->value[value_buf_len-
+(0x20bf+1010-0x24b0)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem
+->update_flag=(0xe50+2792-0x1938);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=(0x180+8747-0x23ab);T_NV_NODE*list=NULL;
+ nvunset(char*file,char*key){int index=(0x33c+8579-0x24bf);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=(0x24ec+29-0x2509);
+RESULT_NO_ITEM;}static int nvreset(char*file){int ret=(0x12d3+4286-0x2391);
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=(0x1bc0+1858-0x2302)
+}return RESULT_NO_FILE;}static int nvclear(char*file){int i=(0x162f+3322-0x2329)
;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=
-(0x8ad+5240-0x1d25);i<NV_HASH_LEN;i++){for(item=list->nvTable[i];item;){cur=item
+(0x2ca+4750-0x1558);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=(0x61f+7281-0x2290);char nvMainFile[NV_PATH_LEN]={
-(0x1b4a+2406-0x24b0)};char nvBackupFile[NV_PATH_LEN]={(0x1459+2394-0x1db3)};
+file){int ret=(0x1c8c+543-0x1eab);char nvMainFile[NV_PATH_LEN]={
+(0x60f+3217-0x12a0)};char nvBackupFile[NV_PATH_LEN]={(0x482+7617-0x2243)};
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,
diff --git a/ap/app/zte_comm/nvserver/nvserver_rpc.c b/ap/app/zte_comm/nvserver/nvserver_rpc.c
index c5e6c5e..7e4d012 100755
--- a/ap/app/zte_comm/nvserver/nvserver_rpc.c
+++ b/ap/app/zte_comm/nvserver/nvserver_rpc.c
@@ -32,10 +32,6 @@
#include <message.h>
#include "sc_rpc.h"
-#ifdef FOTA_AB
-#include "zxic_fota_ab_upgrade.h"
-#endif
-
#ifdef __cplusplus
extern "C"
{
diff --git a/ap/app/zte_comm/nvserver/nvupdate.c b/ap/app/zte_comm/nvserver/nvupdate.c
index 7f9fb65..7b59cd8 100755
--- a/ap/app/zte_comm/nvserver/nvupdate.c
+++ b/ap/app/zte_comm/nvserver/nvupdate.c
@@ -15,88 +15,91 @@
#include <message.h>
#include <fota_common.h>
#ifdef FOTA_AB
-#include "zxic_fota_ab_upgrade.h"
+#include "pub_flags.h"
+#include "flags_api.h"
#endif
#ifdef __cplusplus
extern"C"{
#endif
extern T_NV_NODE*nv_list;
#ifdef FOTA_AB
-int get_update_status(void){int ret=dual_AB_get_fota_status_for_nv();if(ret==
-(0x999+318-0xad6))return(0x173+1220-0x635);else return(0x130a+602-0x1564);}
+int get_update_status(void){T_FLAGS_INFO flags_info={(0x102f+2359-0x1966)};
+unsigned int status=(0xbc2+2223-0x1471);int ret=(0x7d8+6796-0x2264);ret=
+flags_get(&flags_info);status=flags_info.boot_fota_flag.fota_status;if(status==
+(0x12b8+515-0x14ba))return(0xd94+2553-0x178b);else return(0x4e2+7536-0x2252);}
#else
-int get_update_status(void){int update_status;FILE*fd=(0xa38+3938-0x199a);int
+int get_update_status(void){int update_status;FILE*fd=(0x6bf+3121-0x12f0);int
ret;char*filename=NULL;if(access(FOTA_UPDATE_STATUS_FILE_OLD,R_OK)==
-(0x870+3973-0x17f5)){filename=FOTA_UPDATE_STATUS_FILE_OLD;}else{filename=
+(0xf6b+1319-0x1492)){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<(0x2a2+201-0x36b)){printf(
+(ret<(0x857+52-0x88b)){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-(0x7ad+7742-0x25ea)
+update_status);fclose(fd);return update_status;error0:return-(0x77b+5798-0x1e20)
;}
#endif
int nvupdate(char*nv_file,char*config_file,const char*key,const char*value,int
-saveFlag){int index=(0x431+1502-0xa0f);int key_buf_len=(0xc71+64-0xcb1);int
-value_buf_len=(0x553+6951-0x207a);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;
+saveFlag){int index=(0xe06+2388-0x175a);int key_buf_len=(0x41+2998-0xbf7);int
+value_buf_len=(0x2316+827-0x2651);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)+(0xda+4091-0x10d4);value_buf_len=
-strlen(value)+(0x8b+8660-0x225e);for(list=nv_list;list;list=list->next){if(
+,nv_file,key,value);key_buf_len=strlen(key)+(0x9b6+4534-0x1b6b);value_buf_len=
+strlen(value)+(0x1ac9+2440-0x2450);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=(0x5a4+6662-0x1fa9);printf(
+update_flag=(0x375+119-0x3eb);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((0xd8c+1756-0x1467)==item->update_flag){
+config_file,"\x75\x73\x65\x72")){if((0x125c+47-0x128a)==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=
-(0x16fc+89-0x1754);printf(
+(0x1499+2326-0x1dae);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-(0x15e9+2371-0x1f2b));item->value[value_buf_len-
-(0x30+6450-0x1961)]='\0';item->update_flag=(0x1047+2801-0x1b37);return
+value,value_buf_len-(0x1ecb+1238-0x23a0));item->value[value_buf_len-
+(0x1df9+326-0x1f3e)]='\0';item->update_flag=(0x4ec+8581-0x2670);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)+
-(0x1bf+8770-0x2400));if(!newItem->key){free(newItem);printf(
+(0x894+5890-0x1f95));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-
-(0x1737+3997-0x26d3));newItem->key[key_buf_len-(0x573+2465-0xf13)]='\0';strncpy(
-newItem->value,value,value_buf_len-(0x24c3+480-0x26a2));newItem->value[
-value_buf_len-(0xa5d+1659-0x10d7)]='\0';newItem->next=NULL;newItem->saveFlag=
-saveFlag;newItem->update_flag=(0x511+7176-0x2118);printf(
+(0xc99+2485-0x164d));newItem->key[key_buf_len-(0x114+7411-0x1e06)]='\0';strncpy(
+newItem->value,value,value_buf_len-(0x1698+3150-0x22e5));newItem->value[
+value_buf_len-(0x1090+1126-0x14f5)]='\0';newItem->next=NULL;newItem->saveFlag=
+saveFlag;newItem->update_flag=(0x19a7+979-0x1d79);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]={(0x9e8+3243-0x1693)};printf(
+NV_MAX_ITEM_LEN]={(0x332+6202-0x1b6c)};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[(0x579+4079-0x1568)]=='\n'||buf[(0x2b8+3136-0xef8)]
-==((char)(0xf70+3343-0x1c5c)))continue;val=strchr(buf,((char)(0x8a+4197-0x10b2))
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x4d+1358-0x59b)]=='\n'||buf[(0x2e0+7741-0x211d)]==
+((char)(0x1c57+1033-0x203d)))continue;val=strchr(buf,((char)(0xc42+3951-0x1b74))
);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)-(0x2299+1021-0x2695)]='\0';*
-val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0x3fb+3242-0x10a4))
+,config->configFile,buf);continue;}buf[strlen(buf)-(0x2324+127-0x23a2)]='\0';*
+val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0xce3+3333-0x19e7))
;}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
@@ -105,12 +108,12 @@
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=(0x286+7147-0x1e71);T_NV_ITEM*item=NULL;T_NV_ITEM head={
-(0x92b+3549-0x1708)};T_NV_ITEM*prev=&head;printf(
+list){int index=(0x1d27+2512-0x26f7);T_NV_ITEM*item=NULL;T_NV_ITEM head={
+(0xa87+5859-0x216a)};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=(0x1394+248-0x148c);index<NV_HASH_LEN;index++){head.next=list->
-nvTable[index];prev=&head;for(item=prev->next;item;){if((0xe0+7470-0x1e0d)==item
-->update_flag){prev=item;item=item->next;}else{printf(
+);for(index=(0x1185+2652-0x1be1);index<NV_HASH_LEN;index++){head.next=list->
+nvTable[index];prev=&head;for(item=prev->next;item;){if((0x11ac+1175-0x1642)==
+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);
free(item);item=prev->next;}}list->nvTable[index]=head.next;}printf(
diff --git a/ap/app/zte_comm/phonebook/src/pb_db.c b/ap/app/zte_comm/phonebook/src/pb_db.c
index b04efc1..7d7af64 100755
--- a/ap/app/zte_comm/phonebook/src/pb_db.c
+++ b/ap/app/zte_comm/phonebook/src/pb_db.c
@@ -1,7 +1,7 @@
#include "pb_com.h"
T_zPb_DbResult atPb_CreatDb(){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0xc0+3851-0xfcb)};UINT32 count=(0x3df+7563-0x216a);result=
+ZPB_MAX_BYTES_DB]={(0x48c+1382-0x9f2)};UINT32 count=(0x161b+4003-0x25be);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"
@@ -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,(0x761+1994-0xf2b),sizeof(sql));snprintf(sql,
-sizeof(sql)-(0xee8+2631-0x192e),
+,result);return result;}memset(sql,(0xe0b+5019-0x21a6),sizeof(sql));snprintf(sql
+,sizeof(sql)-(0x1d2+6043-0x196c),
"\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((0x1a15+1568-0x2035)<count){memset(sql,(0x9f2+4064-0x19d2),sizeof(sql)
-);snprintf(sql,sizeof(sql)-(0xe26+1455-0x13d4),
+count);if((0xfd0+2574-0x19de)<count){memset(sql,(0x12f+3513-0xee8),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0x19fa+312-0x1b31),
"\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]={(0x1299+2757-0x1d5e)};result=
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x14ad+396-0x1639)};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 (0x4b9+6498-0x1e1b)
+#if (0x1c8+6917-0x1ccd)
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)==(0x1+9725-0x25fe)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZPB_TMP_PATH,F_OK)==(0xbe1+3816-0x1ac9)){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)!=(0x29a+6954-0x1dc4)){slog(PB_PRINT,SLOG_ERR,
+remove(ZPB_TMP_PATH)!=(0x2c1+788-0x5d5)){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)!=(0x143c+2035-0x1c2f)){slog(PB_PRINT,
+);}}if(rename(ZPB_SEC_PATH,ZPB_TMP_PATH)!=(0x9b8+5284-0x1e5c)){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[(0x10f7+3433-0x1e48)]={(0x629+2266-0xf03)};char cmd[
-(0x4d9+492-0x645)]={(0x11c5+3402-0x1f0f)};sc_cfg_get(
+);}{char rnum_buf[(0x1108+1512-0x16d8)]={(0xbbd+6216-0x2405)};char cmd[
+(0x432+1853-0xaef)]={(0x3eb+3191-0x1062)};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
-)==(0x11dc+3704-0x2054)){if(remove(ZPB_TMP_PATH)!=(0x130f+4250-0x23a9)){slog(
+)==(0x945+1790-0x1043)){if(remove(ZPB_TMP_PATH)!=(0x46a+6685-0x1e87)){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(0x16d9+1261-0x1bc6);}return
-(0x18f4+1477-0x1eb8);}return(0x1ca+3801-0x10a3);}T_zPb_DbResult atPb_ExecDbSql(
+(pSql,"\x3b")||strstr(pSql,"\x2d\x2d")){return(0x466+7605-0x221b);}return
+(0x1c19+441-0x1dd1);}return(0xa5b+2933-0x15d0);}T_zPb_DbResult atPb_ExecDbSql(
const char*pSql,sqlite3_callback callback,VOID*pFvarg){sqlite3*pDb=NULL;CHAR
-dbErrMsg[(0x1cfa+1772-0x2366)]={(0x24f+2999-0xe06)};if(NULL==pSql){return
+dbErrMsg[(0x3eb+6904-0x1e63)]={(0x1331+1129-0x179a)};if(NULL==pSql){return
ZPB_DB_ERROR_INVALIDPTR;}
#ifdef WEBS_SECURITY
-if(check_sql_cmd(pSql)==(0x19e0+4-0x19e4)){slog(PB_PRINT,SLOG_ERR,
+if(check_sql_cmd(pSql)==(0x3e7+246-0x4dd)){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,33 +102,34 @@
);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)-(0x1d45+3-0x1d47));slog(PB_PRINT,SLOG_ERR,
+sqlite3_errmsg(pDb),sizeof(dbErrMsg)-(0xd84+3120-0x19b3));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=(0x346+8915-0x2619);if((0x35c+2174-0xbd9)>line){slog(
+char**lname){SINT32 index=(0x247+802-0x569);if((0x355+7051-0x1edf)>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-(0x12b0+2301-0x1bac);}index=atoi(zresult[(0x174d+2615-0x2184)]);if(
-index>ZPB_AP_MAX_RECORD){slog(PB_PRINT,SLOG_ERR,
+);return-(0x1dc+7536-0x1f4b);}index=atoi(zresult[(0x147a+3081-0x2083)]);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-(0x4aa+7533-0x2216);}slog(PB_PRINT,SLOG_DEBUG,
+);return-(0x228c+1097-0x26d4);}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(0x717+8001-0x2658);}
+,index);g_zPb_ApIndex[index]=PBM_SUCCESS;return(0x6a6+4541-0x1863);}
T_zPb_DbResult atPb_InitApIndex(){CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x338+7132-0x1f14)};SINT32 i=(0x318+4776-0x15bf);g_zPb_ApIndex[
-(0x4c8+3964-0x1444)]=ZPB_AP_MAX_RECORD;for(i=(0x73d+4017-0x16ed);i<=
-g_zPb_ApIndex[(0xa22+1032-0xe2a)];i++){g_zPb_ApIndex[i]=PBM_ERROR_NOT_FOUND;}
+(0x12fc+219-0x13d7)};SINT32 i=(0x14c4+831-0x1802);g_zPb_ApIndex[
+(0x9b8+7481-0x26f1)]=ZPB_AP_MAX_RECORD;for(i=(0xfc8+2141-0x1824);i<=
+g_zPb_ApIndex[(0x9f4+6376-0x22dc)];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(-(0x1e87+878-0x21f4)==
-access(path,(0x882+4579-0x1a65))){slog(PB_PRINT,SLOG_DEBUG,
+ZUFI_NULL);}INT zte_pbm_check_and_creat_dir(char*path){if(-(0x8d7+243-0x9c9)==
+access(path,(0x4d1+4816-0x17a1))){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(-(0xf71+4767-0x220f)==mkdir(path,(0x6ad+3559-0x1295))){slog(
+,ZPB_DB_DIR);if(-(0x12ff+4548-0x24c2)==mkdir(path,(0x1db1+2220-0x245e))){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-(0x5d4+988-0x9af);}}return(0xd67+1178-0x1201);}UINT8
+);return-(0x769+3533-0x1535);}}return(0x3d5+1168-0x865);}UINT8
zte_pbm_check_web_pbm_dir(VOID){
#ifdef _MBB_OS_UCLINUX
(VOID)zte_pbm_check_and_creat_dir(
@@ -142,21 +143,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]={(0x6c8+879-0xa37)};
-snprintf(sql,sizeof(sql),
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xd94+5575-0x235b)}
+;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]={(0x1727+1005-0x1b14)};if(NULL==
+result=ZPB_DB_ERROR;CHAR sql[ZPB_MAX_BYTES_DB]={(0x28c+3964-0x1208)};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[(0x14e4+4276-0x2566)]={(0x388+5681-0x19b9)};sc_cfg_get(ZPB_NV_USIMINDEXMAX
-,pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x2bc+2282-0xba5))&&(pbPara->pbIndex
+pbMax[(0x3bc+7725-0x21b7)]={(0xc9f+1680-0x132f)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,
+pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x852+2219-0x10fc))&&(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,
@@ -173,17 +174,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={(0x57d+4373-0x1692)};if((0x99a+6960-0x24c9)>line){slog(PB_PRINT,SLOG_ERR,
+para={(0x2e1+7429-0x1fe6)};if((0x20d1+1193-0x2579)>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[(0xd04+908-0x1090)]);para.
-pbLocation=atoi(zresult[(0x1a5+5616-0x1794)]);slog(PB_PRINT,SLOG_DEBUG,
+);return ZPB_DB_ERROR;}para.pbIndex=atoi(zresult[(0x6db+6184-0x1f03)]);para.
+pbLocation=atoi(zresult[(0x156+4796-0x1411)]);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,¶,sizeof(para));return ZPB_DB_OK
;}T_zPb_DbResult atPb_GetIndexLocationById(T_zPb_Header*pbPara){CHAR sql[
-ZPB_MAX_BYTES_DB]={(0x478+59-0x4b3)};snprintf(sql,sizeof(sql)-
-(0x1dc7+1444-0x236a),
+ZPB_MAX_BYTES_DB]={(0x509+7352-0x21c1)};snprintf(sql,sizeof(sql)-
+(0x1e80+517-0x2084),
"\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,(0x302+1793-0xa03),sizeof(
+,ZPB_DB_PBM_TABLE,pbPara->pbId);memset(pbPara,(0x48+2661-0xaad),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)\
@@ -195,8 +196,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]={(0x20dd+814-0x240b)}
-;if(NULL==pPbRecord){slog(PB_PRINT,SLOG_ERR,
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1171+1918-0x18ef)
+};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"
@@ -206,75 +207,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((0x107d+1349-0x15c1)>line){
+(VOID*fvarg,int line,char**zresult,char**lname){if((0x3a3+8494-0x24d0)>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-(0x1413+823-0x1749);}*(int*)fvarg=atoi(zresult[(0xdb6+32-0xdd6)]);
-return(0x18df+447-0x1a9e);}T_zPb_DbResult atPb_SetSimCapacityTable(
+);return-(0x1af9+1248-0x1fd8);}*(int*)fvarg=atoi(zresult[(0x808+673-0xaa9)]);
+return(0xad5+3801-0x19ae);}T_zPb_DbResult atPb_SetSimCapacityTable(
T_zPb_UsimCapacity pbPara){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0xfda+4338-0x20cc)};UINT32 count=(0x23b+6495-0x1b9a);
-snprintf(sql,sizeof(sql)-(0x1b4f+1943-0x22e5),
+ZPB_MAX_BYTES_DB]={(0xc99+4625-0x1eaa)};UINT32 count=(0x99b+5595-0x1f76);
+snprintf(sql,sizeof(sql)-(0x84c+2147-0x10ae),
"\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((0xecb+1123-0x132e)<count){memset(sql,(0x1b8d+2670-0x25fb),sizeof(sql)
-);snprintf(sql,sizeof(sql)-(0x1d4+6900-0x1cc7),
+count);if((0xa4f+117-0xac4)<count){memset(sql,(0x49b+5114-0x1895),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0x893+4487-0x1a19),
"\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,(0x13a0+127-0x141f),sizeof(sql));snprintf(sql,
-sizeof(sql)-(0xa15+1403-0xf8f),"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,(0x611+7408-0x2301),sizeof(sql));snprintf(sql,
+sizeof(sql)-(0x268+4897-0x1588),"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]={
-(0x132d+1750-0x1a03)};SINT32 count=(0xf96+1827-0x16b9);T_zPb_ApCapacity pbPara={
-(0x1fb0+1738-0x267a)};snprintf(sql,sizeof(sql)-(0x5db+6528-0x1f5a),
+{T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xc52+6019-0x23d5)
+};SINT32 count=(0x4df+355-0x642);T_zPb_ApCapacity pbPara={(0x1f84+1418-0x250e)};
+snprintf(sql,sizeof(sql)-(0xbec+5804-0x2297),
"\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((0x552+7774-0x23b0)<count){memset(sql,
-(0x876+6136-0x206e),sizeof(sql));snprintf(sql,sizeof(sql)-(0x1d71+1184-0x2210),
+atPb_DbCountTableLineCb,&count);if((0x658+4494-0x17e6)<count){memset(sql,
+(0x5a2+6564-0x1f46),sizeof(sql));snprintf(sql,sizeof(sql)-(0xe1c+2373-0x1760),
"\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,(0x652+836-0x996),sizeof(sql));snprintf(sql,sizeof(
-sql)-(0xc1f+3364-0x1942),
+);return result;}}memset(sql,(0xc+7471-0x1d3b),sizeof(sql));snprintf(sql,sizeof(
+sql)-(0x3e4+1424-0x973),
"\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,(0x103+3055-0xcf2),sizeof(
-sql));snprintf(sql,sizeof(sql)-(0xe5f+1625-0x14b7),
+,pbPara.maxRecordNum,pbPara.usedRecordNum);memset(sql,(0x1ca+2728-0xc72),sizeof(
+sql));snprintf(sql,sizeof(sql)-(0xd12+177-0xdc2),
"\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=
-(0x78c+1686-0xe22);if((0x21c8+1235-0x269a)>line){return ZPB_DB_ERROR;}pbIndex=(
+(0x2272+530-0x2484);if((0xedf+4444-0x203a)>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+(0x4a7+5526-0x1a3c)]=atoi(zresult[(0x1dd2+2088-0x25fa)]);
+,i);pbIndex->apIndex[i+(0x1329+3556-0x210c)]=atoi(zresult[(0x372+6709-0x1da7)]);
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+(0x98b+5885-0x2087)]);pbIndex->count=i+(0x680+1861-0xdc4);
+,pbIndex->apIndex[i+(0xcd6+2403-0x1638)]);pbIndex->count=i+(0xf27+2709-0x19bb);
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]
-={(0x109d+1088-0x14dd)};SINT32 countByGroup=(0xe6c+3400-0x1bb4);CHAR pbGroup[
-ZPB_PARAM_SIZE20]={(0x1c7c+16-0x1c8c)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
-pbGroup));snprintf(sql,sizeof(sql)-(0xeca+5652-0x24dd),
+={(0x788+6132-0x1f7c)};SINT32 countByGroup=(0xa70+2197-0x1305);CHAR pbGroup[
+ZPB_PARAM_SIZE20]={(0x1b33+2698-0x25bd)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
+pbGroup));snprintf(sql,sizeof(sql)-(0x5fa+6617-0x1fd2),
"\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,(0x2441+610-0x26a3),sizeof(sql
-));snprintf(sql,sizeof(sql)-(0xae5+6172-0x2300),
+atPb_DbCountTableLineCb,&countByGroup);memset(sql,(0x546+4152-0x157e),sizeof(sql
+));snprintf(sql,sizeof(sql)-(0x2d+2890-0xb76),
"\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,
-(0x1a91+946-0x1e43),sizeof(sql));snprintf(sql,sizeof(sql)-(0x81c+3752-0x16c3),
+(0x960+370-0xad2),sizeof(sql));snprintf(sql,sizeof(sql)-(0xada+11-0xae4),
"\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,
@@ -282,7 +283,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={(0x1f99+1385-0x2502)};if(NULL==
+recData,SINT32 delTime){T_zPb_Header pbHeader={(0x1a41+354-0x1ba3)};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!=
@@ -293,30 +294,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]={(0x1c8a+759-0x1f81)};if(NULL==
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xb90+6980-0x26d4)};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)-(0xd9d+4815-0x206b),
+,delTime,pbPara->delId[delTime]);snprintf(sql,sizeof(sql)-(0x9c1+421-0xb65),
"\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=(0xa10+4351-0x1b0e);for(i=(0x810+1294-0xd1d);(i<=g_zPb_SimIndex[
-(0x1222+3900-0x215e)])&&(i<(ZPB_SIM_MAX_RECORD+(0x11bb+2631-0x1c01)));i++){
+SINT32 i=(0x27b+2536-0xc62);for(i=(0x323+4172-0x136e);(i<=g_zPb_SimIndex[
+(0xbf6+4329-0x1cdf)])&&(i<(ZPB_SIM_MAX_RECORD+(0xc36+2966-0x17cb)));i++){
g_zPb_SimIndex[i]=PBM_ERROR_NOT_FOUND;}}VOID atPb_ClearApPbmIndexArray(VOID){
-SINT32 i=(0x1a9+6771-0x1c1b);for(i=(0x157f+520-0x1786);(i<=g_zPb_ApIndex[
-(0x9b6+3669-0x180b)])&&(i<(ZPB_AP_MAX_RECORD+(0x784+7702-0x2599)));i++){
+SINT32 i=(0xdc7+872-0x112e);for(i=(0x1b09+1128-0x1f70);(i<=g_zPb_ApIndex[
+(0x4da+88-0x532)])&&(i<(ZPB_AP_MAX_RECORD+(0x9df+4424-0x1b26)));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]={(0x934+4047-0x1903)};if(NULL==pbPara){slog
-(PB_PRINT,SLOG_ERR,
+ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1382+3917-0x22cf)};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)-(0x1e97+2024-0x267e),
+);return ZPB_DB_ERROR_INVALIDPTR;}snprintf(sql,sizeof(sql)-(0x626+6342-0x1eeb),
"\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 02d6581..b6aa9aa 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={(0x75c+2204-0xff8)};sem_t g_Pb_sem_id={
-(0x8ea+7100-0x24a6)};int g_zPb_MsqId=-(0x57d+1148-0x9f8);int g_zPb_LocalMsqId=-
-(0x9d5+179-0xa87);VOID atWeb_AddOneContact(UINT8*pDatabuf){T_zPb_WebContact*
+pDatabuf);T_zPb_optRsp g_PbOptRsp={(0x128b+672-0x152b)};sem_t g_Pb_sem_id={
+(0x119a+104-0x1202)};int g_zPb_MsqId=-(0x998+3730-0x1829);int g_zPb_LocalMsqId=-
+(0xd93+429-0xf3f);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,23 +35,21 @@
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(((0x36a+6064-0x1b19)==ptPara->result)&&(
-(0x10bb+3612-0x1ed6)==ptPara->opertype)){CHAR needPb[(0x137b+4647-0x2570)]={
-(0x15ed+1466-0x1ba7)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
-(0x179f+1279-0x1c9e)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
-MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0x1150+4297-0x2219),NULL,
-(0x123f+3080-0x1e47));}}}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(((0x17d4+1295-0x1ce2)==ptPara->result)&&(
+(0x124+1081-0x55c)==ptPara->opertype)){CHAR needPb[(0x538+2481-0xeb7)]={
+(0xa55+3218-0x16e7)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
+(0x13b5+776-0x16bd)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
+MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0x2c9+4290-0x138b),NULL,(0x418+5474-0x197a)
+);}}}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==(0xcd3+6398-0x25d1)){
-CHAR needPb[(0xdc8+3823-0x1c85)]={(0x586+6207-0x1dc5)};sc_cfg_get(
-NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if((0x150f+4438-0x2665)!=strcmp(needPb
-,"\x6e\x6f")){atPb_CfgPbNvInit();atPb_DelAllRecsSimDb();}}}VOID
-zPb_RecvPbInitRst(UINT8*pDatabuf){int pbReadRet=-(0x92f+1981-0x10eb);memcpy(&
-g_PbOptRsp,pDatabuf,sizeof(T_zPb_optRsp));if(g_PbOptRsp.result==-
-(0xb83+2161-0x13f3)){atPb_IintPbErr(NULL);return;}pbReadRet=
-atPb_SendScpbrSet_repeat(g_Pb_sem_id);printf(
+,ptPara->slot,ptPara->slot_state);if(ptPara->slot_state==(0xa54+6406-0x235a)){
+CHAR needPb[(0xe9a+61-0xea5)]={(0x13a1+4593-0x2592)};sc_cfg_get(
+NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if((0xae9+3916-0x1a35)!=strcmp(needPb,
+"\x6e\x6f")){atPb_CfgPbNvInit();atPb_DelAllRecsSimDb();}}}VOID zPb_RecvPbInitRst
+(UINT8*pDatabuf){int pbReadRet=-(0x1563+1879-0x1cb9);memcpy(&g_PbOptRsp,pDatabuf
+,sizeof(T_zPb_optRsp));if(g_PbOptRsp.result==-(0x5dc+1465-0xb94)){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(
@@ -66,18 +64,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,(0x12ed+3515-0x20a8));break;
+usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,(0x18eb+2334-0x2209));break;
default:break;}}UINT8 zPbMsgCreat(VOID){g_zPb_MsqId=msgget(MODULE_ID_PB,
-IPC_CREAT|(0x215a+833-0x231b));if(g_zPb_MsqId==-(0x4bb+2335-0xdd9)){return
+IPC_CREAT|(0xb57+2966-0x156d));if(g_zPb_MsqId==-(0x5f7+7223-0x222d)){return
ZUFI_FAIL;}g_zPb_LocalMsqId=msgget(MODULE_ID_PB_LOCAL,IPC_CREAT|
-(0x1c07+1719-0x213e));if(g_zPb_LocalMsqId==-(0x17b9+3126-0x23ee)){return
-ZUFI_FAIL;}sem_init(&g_Pb_sem_id,(0xa14+5420-0x1f40),(0xd81+3148-0x19cd));return
- ZUFI_SUCC;}void detect_modem_state(void){CHAR state[(0xf74+4970-0x22ac)]={
-(0x6ac+5953-0x1ded)};sc_cfg_get(
+(0x1e0+8185-0x2059));if(g_zPb_LocalMsqId==-(0x144+1568-0x763)){return ZUFI_FAIL;
+}sem_init(&g_Pb_sem_id,(0xee2+4088-0x1eda),(0xc85+4614-0x1e8b));return ZUFI_SUCC
+;}void detect_modem_state(void){CHAR state[(0xab4+265-0xb8b)]={
+(0x1df8+547-0x201b)};sc_cfg_get(
"\x6d\x6f\x64\x65\x6d\x5f\x6d\x61\x69\x6e\x5f\x73\x74\x61\x74\x65",state,sizeof(
-state));if((0x1117+1632-0x1777)==strcmp(state,
+state));if((0x1990+1293-0x1e9d)==strcmp(state,
"\x6d\x6f\x64\x65\x6d\x5f\x73\x69\x6d\x5f\x75\x6e\x64\x65\x74\x65\x63\x74\x65\x64"
-)||(0x295+2980-0xe39)==strcmp(state,
+)||(0x88+2043-0x883)==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(
@@ -96,28 +94,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,
-(0x28+7431-0x1d2f));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR
-clearPb[(0x1bfb+1631-0x2228)]={(0x18e7+3316-0x25db)};sc_cfg_get(
+(0xa3+3730-0xf35));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR
+clearPb[(0x521+1428-0xa83)]={(0x1794+3426-0x24f6)};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")==(0xdfa+312-0xf32)){atPb_DropDb();}
+,clearPb);if(strcmp(clearPb,"\x79\x65\x73")==(0x1cf8+13-0x1d05)){atPb_DropDb();}
ipc_send_message(MODULE_ID_PB,MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,
-(0x6d2+7351-0x2389),NULL,(0xa24+4661-0x1c59));}void zPbHandleMainCtrlMsg(MSG_BUF
-*ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
+(0x4a2+5777-0x1b33),NULL,(0x5c4+1072-0x9f4));}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=(0x8f8+2650-0x1352);MSG_BUF stMsg={
-(0x2062+153-0x20fb)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
+pb_msg_thread_proc(void*arg){int iRet=(0x1d5d+434-0x1f0f);MSG_BUF stMsg={
+(0x101b+1491-0x15ee)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
int*)arg);prctl(PR_SET_NAME,"\x70\x62\x5f\x6c\x6f\x63\x61\x6c",
-(0x729+3892-0x165d),(0x1653+1294-0x1b61),(0xc20+5332-0x20f4));while(
-(0x5a+2205-0x8f6)){iRet=(0xc4+1153-0x545);memset(&stMsg,(0x1d66+1490-0x2338),
-sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x946+3527-0x170d),
-(0xeed+395-0x1078));printf(
+(0xdd2+2162-0x1644),(0x1fac+1280-0x24ac),(0xe9a+1987-0x165d));while(
+(0x359+5132-0x1764)){iRet=(0x1675+287-0x1794);memset(&stMsg,(0x5d4+4560-0x17a4),
+sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x1039+3232-0x1cd9),
+(0x1534+1641-0x1b9d));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>=(0x1487+3850-0x2391)){
+,stMsg.src_id,stMsg.usMsgCmd,MODULE_ID_AT_CTL);if(iRet>=(0xf29+5854-0x2607)){
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
@@ -125,29 +123,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=(0x667+1-0x668);MSG_BUF msgBuf={(0x178+4862-0x1476)};CHAR needPb
-[(0x3d7+8170-0x238f)]={(0x2d6+3605-0x10eb)};prctl(PR_SET_NAME,
-"\x70\x62\x5f\x6d\x61\x69\x6e",(0xf08+4252-0x1fa4),(0x1247+1247-0x1726),
-(0x2bd+8586-0x2447));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof
-(needPb));if((0x165d+3752-0x2505)!=strcmp(needPb,"\x6e\x6f")){
+recv_thread_tid=(0x14e4+2848-0x2004);MSG_BUF msgBuf={(0xddf+4184-0x1e37)};CHAR
+needPb[(0x8a3+606-0xacf)]={(0x206a+1511-0x2651)};prctl(PR_SET_NAME,
+"\x70\x62\x5f\x6d\x61\x69\x6e",(0xe58+5756-0x24d4),(0x1794+1944-0x1f2c),
+(0x682+5735-0x1ce9));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof
+(needPb));if((0x1dc0+1209-0x2279)!=strcmp(needPb,"\x6e\x6f")){
#ifdef WEBS_SECURITY
-if(access(ZPB_DB_PATH,F_OK)!=(0x116+7591-0x1ebd)){if(access(ZPB_TMP_PATH,F_OK)==
-(0x10bb+3699-0x1f2e)){if(remove(ZPB_SEC_PATH)!=(0x1368+1564-0x1984)){slog(
+if(access(ZPB_DB_PATH,F_OK)!=(0x4b8+4462-0x1626)){if(access(ZPB_TMP_PATH,F_OK)==
+(0x1712+3294-0x23f0)){if(remove(ZPB_SEC_PATH)!=(0x10ac+3701-0x1f21)){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)!=(0xef+8962-0x23f1)){slog(PB_PRINT,
+);}if(rename(ZPB_TMP_PATH,ZPB_SEC_PATH)!=(0x87a+4216-0x18f2)){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)==(0xed5+258-0xfd7)){char rnum_buf[
-(0x1bbb+2448-0x2533)]={(0xe9d+2857-0x19c6)};char cmd[(0xdb+1914-0x7d5)]={
-(0xbba+420-0xd5e)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZPB_SEC_PATH,F_OK)==(0x20e7+604-0x2343)){char rnum_buf[
+(0xb03+4391-0x1c12)]={(0x22d+2517-0xc02)};char cmd[(0x211b+536-0x22b3)]={
+(0x18f+869-0x4f4)};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-(0x15bd+3301-0x22a1);}printf(
+zPbMsgCreat();atPb_Init();}else{return-(0x37c+8681-0x2564);}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))==-(0x39c+8783-0x25ea)){assert((0x16ea+3880-0x2612));}
-detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x1a65+166-0x1b0b);
+(&g_zPb_LocalMsqId))==-(0x1c88+2539-0x2672)){assert((0x1c5f+675-0x1f02));}
+detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x8ec+2112-0x112c);
}
diff --git a/ap/app/zte_comm/phonebook/src/pb_proc.c b/ap/app/zte_comm/phonebook/src/pb_proc.c
index 3745426..9327529 100755
--- a/ap/app/zte_comm/phonebook/src/pb_proc.c
+++ b/ap/app/zte_comm/phonebook/src/pb_proc.c
@@ -3,185 +3,185 @@
#include <semaphore.h>
#include <limits.h>
#include "pb_com.h"
-#define ZPB_UCS2 (0x141b+2829-0x1f27)
-#define ZPB_UCS2_PREFIX (0x1b80+1648-0x2170)
-#define ZPB_UCS2_PREFIX_LEN (0x41b+3211-0x10a4)
-#define ZPB_NON_GSM (0xb67+5938-0x2279)
-#define ZPB_GSM_CHARACTER_SET_SIZE (0xe51+5993-0x253a)
-#define ZPB_INIT_LOAD_RECORD_NUM (0x7d9+5456-0x1cf7)
+#define ZPB_UCS2 (0x1530+4347-0x262a)
+#define ZPB_UCS2_PREFIX (0x4e4+6811-0x1eff)
+#define ZPB_UCS2_PREFIX_LEN (0x1a85+273-0x1b94)
+#define ZPB_NON_GSM (0x16c4+4141-0x26d1)
+#define ZPB_GSM_CHARACTER_SET_SIZE (0x5d6+2084-0xd7a)
+#define ZPB_INIT_LOAD_RECORD_NUM (0x1809+3369-0x2500)
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=
-(0x1d35+296-0x1e5d);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+(0xaf6+6254-0x2363)
-]={(0x1594+2064-0x1da4)};SINT32 g_zPb_ApIndex[ZPB_AP_MAX_RECORD+
-(0x90c+5944-0x2043)]={(0x1030+1403-0x15ab)};T_zPb_DelStatusMultiOrAll
-g_zPb_DelStatusUsim={(0x1fc+2743-0xcb3)};const unsigned char G_ZPB_NEWUCS2TOGSM[
-ZPB_GSM_CHARACTER_SET_SIZE*(0xd2f+2441-0x16b6)]={ZPB_NON_GSM,ZPB_NON_GSM,
+(0x1b2d+739-0x1e10);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+
+(0x1328+2711-0x1dbe)]={(0x429+3945-0x1392)};SINT32 g_zPb_ApIndex[
+ZPB_AP_MAX_RECORD+(0x896+6779-0x2310)]={(0xcab+2534-0x1691)};
+T_zPb_DelStatusMultiOrAll g_zPb_DelStatusUsim={(0x108+593-0x359)};const unsigned
+ char G_ZPB_NEWUCS2TOGSM[ZPB_GSM_CHARACTER_SET_SIZE*(0x113+1049-0x52a)]={
ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
-ZPB_NON_GSM,ZPB_NON_GSM,(0xe4b+5789-0x24de),ZPB_NON_GSM,ZPB_NON_GSM,
-(0x1110+2532-0x1ae7),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,(0x486+1725-0xb39),ZPB_NON_GSM,
+ZPB_NON_GSM,(0xa2d+1377-0xf81),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,(0x5c8+1202-0xa5a),(0x455+2133-0xc89),(0x372+2997-0xf05),
-(0xb33+1967-0x12bf),(0x15d7+4182-0x262b),(0x7af+1638-0xdf0),(0x6c0+5573-0x1c5f),
-(0x2160+1144-0x25b1),(0x9c7+6074-0x2159),(0x6a+8354-0x20e3),(0x3c6+5786-0x1a36),
-(0xea5+150-0xf10),(0x6d1+939-0xa50),(0x9a0+5198-0x1dc1),(0x1712+188-0x17a0),
-(0x1d8+8700-0x23a5),(0xf48+5151-0x2337),(0x284+2057-0xa5c),(0x1193+1661-0x17de),
-(0x70d+7789-0x2547),(0x299+8732-0x2481),(0x562+1896-0xc95),(0x1def+1266-0x22ab),
-(0xba2+1660-0x11e7),(0x13e7+180-0x1463),(0x193+2563-0xb5d),(0x1a88+278-0x1b64),
-(0xd51+4010-0x1cc0),(0xa30+170-0xa9e),(0x1fad+1027-0x2373),(0x1941+1434-0x1e9d),
-(0x1bec+43-0x1bd8),(0x43c+3067-0x1037),(0xb99+1119-0xfb7),(0x4bb+6564-0x1e1d),
-(0xff3+4672-0x21f0),(0x1509+4454-0x262b),(0x1973+1321-0x1e57),
-(0xd4d+6469-0x264c),(0x1754+3197-0x238a),(0x23ed+26-0x23bf),(0x2585+245-0x2631),
-(0x9f7+3354-0x16c7),(0xd8c+5175-0x2178),(0x115b+813-0x143c),(0x17e7+2723-0x223d)
-,(0xa82+5513-0x1fbd),79,(0x511+5253-0x1946),(0x16a5+787-0x1967),
-(0xd3b+5134-0x20f7),(0x15ef+1941-0x1d31),(0x467+909-0x7a0),(0x7f6+7509-0x24f6),
-(0x50c+7300-0x213a),(0x130b+2325-0x1bc9),(0xc4+8809-0x22d5),(0x97f+7231-0x2565),
-(0x1d55+1413-0x2280),(0x13cc+1618-0x19c3),ZPB_NON_GSM,(0x7f3+4320-0x1876),
-ZPB_NON_GSM,(0x3e6+2400-0xd35),ZPB_NON_GSM,(0x16a+7230-0x1d47),(0x74b+754-0x9db)
-,(0x99b+3293-0x1615),(0xc11+5576-0x2175),(0x1d9c+166-0x1ddd),
-(0x1f54+1979-0x26a9),(0x1843+1783-0x1ed3),(0xcaa+5252-0x20c6),
-(0x14d9+1505-0x1a51),(0x18d7+973-0x1c3a),(0x684+3041-0x11fa),(0xb05+2747-0x1554)
-,(0xcbb+4405-0x1d83),(0x11e8+1505-0x175b),(0x8f4+6724-0x22c9),
-(0x1b1c+1398-0x2022),(0xf88+4817-0x21e8),(0x408+6870-0x1e6c),(0x2dd+4986-0x15e4)
-,(0x1152+3077-0x1ce3),(0x513+8803-0x2701),(0x13f5+2819-0x1e82),
-(0xb79+2768-0x15d2),(0x4df+2241-0xd28),(0x15a2+1164-0x19b5),(0xa9f+3343-0x1734),
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,(0x89f+5623-0x1e76),(0xb36+2404-0x1479),
+(0xc11+5239-0x2066),(0x7e5+1382-0xd28),(0x130a+1008-0x16f8),(0x1532+322-0x164f),
+(0xd30+4879-0x2019),(0x11b4+3193-0x1e06),(0xedb+4031-0x1e72),(0xd0a+6284-0x256d)
+,(0xa3a+2620-0x144c),(0x14d5+4427-0x25f5),(0x1d0c+505-0x1ed9),
+(0x5f0+2943-0x1142),(0x57f+5920-0x1c71),(0x1153+4986-0x249e),(0xa72+3788-0x190e)
+,(0xac1+2891-0x15db),(0x64b+485-0x7fe),(0x1c82+205-0x1d1c),(0x554+83-0x573),
+(0x1794+712-0x1a27),(0x13eb+4056-0x238d),(0x1546+842-0x1859),(0x5d7+1777-0xc90),
+(0x3b5+124-0x3f8),(0xe61+4509-0x1fc4),(0x595+3182-0x11c8),(0x1bc9+2328-0x24a5),
+(0x1c47+921-0x1fa3),(0x1ee1+1913-0x261c),(0xe25+2987-0x1991),(0x1a58+99-0x1abb),
+(0x1d5+8290-0x21f6),(0xbe4+3817-0x1a8b),(0x102+3751-0xf66),(0xfd8+3619-0x1db7),
+(0x10b9+636-0x12f0),(0x103b+3780-0x1eb9),(0x590+7580-0x22e5),
+(0x193b+1958-0x2099),(0x4ca+4246-0x1517),(0x9c1+7122-0x2549),(0x7ca+6785-0x2200)
+,(0x191+704-0x405),(0x2271+383-0x23a3),(0xf44+2857-0x1a1f),(0x128+937-0x482),
+(0x187+1010-0x529),(0x12e7+4396-0x23c2),(0xc64+2409-0x157b),(0x152+105-0x168),
+(0x1247+4076-0x21df),(0xb05+3137-0x16f1),(0x2684+86-0x2684),(0x1f60+1048-0x2321)
+,(0x5c6+6480-0x1ebe),(0x9c+3965-0xfc0),(0x1b85+2567-0x2532),(0x1093+5571-0x25fb)
+,ZPB_NON_GSM,(0xb8b+2473-0x14d7),ZPB_NON_GSM,(0x5aa+6136-0x1d91),ZPB_NON_GSM,
+(0x60c+5903-0x1cba),(0x414+4294-0x1478),(0xcea+6310-0x252d),(0xae7+5492-0x1ff7),
+(0x223+4714-0x1428),(0xbb+7470-0x1d83),(0x1303+4476-0x2418),(0x114d+3537-0x1eb6)
+,(0x137+4598-0x12c4),(0x233+9131-0x2574),(0x8e1+1964-0x1022),
+(0x1638+1039-0x19db),(0x40c+2581-0xdb4),(0x1994+1453-0x1ed3),(0x510+4034-0x1463)
+,(0x39b+4030-0x12e9),(0x1910+745-0x1b88),(0xc3a+3155-0x181b),(0xc10+1197-0x104a)
+,(0xd81+843-0x1058),(0x566+7959-0x2408),(0xc91+2099-0x144e),(0x888+3113-0x143a),
+(0x244+7522-0x1f2e),(0x17ed+193-0x1835),(0x122f+4628-0x23c9),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,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,(0xfb5+3086-0x1b83),ZPB_NON_GSM,(0x22aa+278-0x23bf),
-(0x2a1+386-0x3ff),(0x622+1264-0xb0f),ZPB_NON_GSM,(0x2353+244-0x23e8),ZPB_NON_GSM
-,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,(0x791+6186-0x1f7b),ZPB_NON_GSM,(0xc43+6084-0x2406),
+(0x1647+45-0x1650),(0x836+4450-0x1995),ZPB_NON_GSM,(0x18f1+2384-0x21e2),
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,(0xae5+6214-0x22cb),
-(0x1d28+201-0x1db0),(0xed+7348-0x1d60),(0x619+6817-0x2079),(0x9ea+1161-0xe32),
-(0x5fc+6351-0x1e70),(0x5bd+4927-0x18ee),(0x959+2462-0x12db),(0x18aa+1267-0x1d94)
-,(0x12c7+94-0x12e0),(0x54c+7659-0x2318),(0x453+448-0x5ce),(0x29a+1378-0x7b7),
-(0x12cf+1413-0x180b),(0x670+6164-0x1e3b),(0x1bda+196-0x1c55),(0xc1d+6340-0x2498)
-,ZPB_NON_GSM,(0x76a+943-0xabc),(0x441+5211-0x184d),(0x18c8+2544-0x2269),
-(0x12b2+714-0x152d),(0x8d5+642-0xb08),(0x1d6+151-0x211),ZPB_NON_GSM,
-(0x1133+767-0x1427),(0x1535+1071-0x190f),(0x7fc+5957-0x1eec),(0x718+3572-0x14b7)
-,(0x1214+2406-0x1b1c),(0x1d8+4820-0x1453),ZPB_NON_GSM,(0x451+2804-0xf27),
-(0x2dc+99-0x2c0),(0x696+2058-0xe3f),(0x10ac+4938-0x2395),(0xe3b+4642-0x1ffc),
-(0x91d+251-0x99d),(0x360+7262-0x1faf),(0x9e8+465-0xb9c),(0xd0a+1275-0x11fc),
-(0xfa9+4659-0x21d8),(0x4a+37-0x6a),(0x19b6+1866-0x209b),(0x1216+1555-0x17c4),
-(0x4f+5670-0x166e),(0x153c+1143-0x194a),(0x1a55+1816-0x2104),(0x1090+719-0x12f6)
-,ZPB_NON_GSM,(0x105d+3943-0x1f47),(0x465+6811-0x1ef8),(0x3ca+113-0x3cc),
-(0xd86+5902-0x2425),(0x7b9+5984-0x1eaa),(0x1104+5106-0x247a),ZPB_NON_GSM,
-(0xdb4+1790-0x14a6),(0x507+5130-0x190b),(0x5c9+2251-0xe1f),(0x931+441-0xa75),
-(0xcf9+1874-0x13cd),(0xf2f+5595-0x2491),ZPB_NON_GSM,(0x87b+4058-0x17dc)};VOID
-atPb_Init(VOID){UINT32 pbCount=(0xd3d+1061-0x1162);g_zPb_SimIndex[
-(0x3b8+8042-0x2322)]=(0x48f+3613-0x12ac);sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);(
-VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(pbCount=
-(0x1701+2011-0x1edb);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,
+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,(0xa19+4775-0x1c60),
+(0x16f8+2901-0x220c),(0x26b+70-0x270),(0x1181+2166-0x19b6),(0x11e6+2061-0x19b2),
+(0xb30+3437-0x1842),(0x64b+3266-0x12ff),(0xf5b+1186-0x13e1),(0xdd4+4711-0x2032),
+(0x1757+2532-0x20f6),(0xc4f+4277-0x1ce5),(0x16a5+120-0x16d8),
+(0x1857+1792-0x1f12),(0xc2+1106-0x4cb),(0x115b+1675-0x179d),(0x12ca+4222-0x22ff)
+,(0x5c5+4000-0x151c),ZPB_NON_GSM,(0x1972+803-0x1c38),(0x1930+1114-0x1d3b),
+(0xd24+1530-0x12cf),(0x1207+1283-0x16bb),(0xaed+1321-0xfc7),(0xd88+656-0xfbc),
+ZPB_NON_GSM,(0x1095+704-0x134a),(0x482+2981-0xfd2),(0x344+4967-0x1656),
+(0x8a9+1753-0xf2d),(0xa0d+7343-0x265e),(0x610+4723-0x182a),ZPB_NON_GSM,
+(0x1219+5231-0x266a),(0x1e8b+820-0x2140),(0x703+7271-0x2309),
+(0x11c9+4324-0x224c),(0x15fd+2334-0x1eba),(0x20e9+1353-0x25b7),
+(0x1142+4061-0x2110),(0x3c8+4510-0x1549),(0x4d2+1894-0xc2f),(0x5f6+7469-0x231f),
+(0x9+8130-0x1fc6),(0x1712+27-0x16c8),(0x153d+419-0x167b),(0x1b10+793-0x1e22),
+(0x11db+1791-0x1871),(0x1e6+7223-0x1db4),(0x341+3596-0x10e4),ZPB_NON_GSM,
+(0xdcb+1118-0x11ac),(0x44+944-0x3ec),(0x15aa+3805-0x2418),(0x1cb+1267-0x64f),
+(0x73+7095-0x1bbb),(0x754+5930-0x1e02),ZPB_NON_GSM,(0x23a6+650-0x2624),
+(0x2ac+6389-0x1b9b),(0x6b3+8000-0x257e),(0x950+4581-0x1ac0),(0x14d8+4234-0x24e4)
+,(0x5c9+3600-0x1360),ZPB_NON_GSM,(0x1c74+2433-0x257c)};VOID atPb_Init(VOID){
+UINT32 pbCount=(0x807+2209-0x10a8);g_zPb_SimIndex[(0x9f+6479-0x19ee)]=
+(0x2b5+1967-0xa64);sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);(VOID)sc_cfg_set(
+ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(pbCount=(0x196d+1202-0x1e1e);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,
"\x70\x62\x3a\x61\x74\x50\x62\x5f\x49\x6e\x69\x74\x3a\x69\x6e\x69\x74\x20\x61\x70\x49\x6e\x64\x65\x78\x20\x66\x61\x69\x6c\x65\x64" "\n"
);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=
-(0x1b69+332-0x1cb5);int min=32767;int max=(0x17c2+211-0x1895);int temp=
-(0x67d+8007-0x25c4);int outOff=(0x47a+2591-0xe99);printf(
+atpb_CvtUcs2ToAlphaField(char*src,int srcLen,char*dest){int i=(0xb65+1124-0xfc9)
+;int min=32767;int max=(0x135+8781-0x2382);int temp=(0xe47+5158-0x226d);int
+outOff=(0x1535+4459-0x26a0);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<=(0x276+2258-0xb48)||src==NULL||dest==NULL){return-
-(0x9c+9276-0x24d7);}if(srcLen<=(0x1ce9+399-0x1e76)){dest[(0x1315+2499-0x1cd8)]=
-(0x3a0+7912-0x2208);memcpy(dest+(0x2d2+4506-0x146b),src,srcLen);printf(
+,srcLen);if(srcLen<=(0x2e0+5450-0x182a)||src==NULL||dest==NULL){return-
+(0x61f+5252-0x1aa2);}if(srcLen<=(0x1d8+2595-0xbf9)){dest[(0x78+1838-0x7a6)]=
+(0x118d+95-0x116c);memcpy(dest+(0x9b5+3738-0x184e),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+(0xfc6+932-0x1369));return srcLen+(0x4c7+76-0x512);}for(i=
-(0x42+2002-0x814);i<srcLen;i+=(0xe93+7-0xe98)){if(src[i]!=(0x48f+6260-0x1d03)){
-temp=(int)(((src[i]<<(0x680+1950-0xe16))&65280)|(src[i+(0x18b7+911-0x1c45)]&
-(0x1c49+1848-0x2282)));
-#if (0x750+5742-0x1dbe)
-if(temp<(0x1865+1112-0x1cbd)){max=min+(0x300+3756-0x112a);break;}
+,srcLen+(0x825+652-0xab0));return srcLen+(0x50d+74-0x556);}for(i=
+(0x217+5774-0x18a5);i<srcLen;i+=(0x14ca+4669-0x2705)){if(src[i]!=
+(0x668+7640-0x2440)){temp=(int)(((src[i]<<(0x198+9458-0x2682))&65280)|(src[i+
+(0xfe5+1704-0x168c)]&(0x1190+1805-0x179e)));
+#if (0x19a6+2528-0x2386)
+if(temp<(0x1d24+828-0x2060)){max=min+(0xe39+1440-0x1357);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)<(0x109a+4797-0x22d6)){if((unsigned char)(min&
-(0x10e6+832-0x13a6))==(unsigned char)(max&(0x664+52-0x618))){dest[
-(0x1084+5233-0x24f4)]=(unsigned char)(srcLen/(0xe74+1887-0x15d1));dest[
-(0x114d+5137-0x255e)]=(unsigned char)(0x3a2+3526-0x10e7);min=(int)(min&32640);
-dest[(0xa3d+2268-0x1317)]=(unsigned char)((min>>(0x1348+2770-0x1e13))&
-(0x1cda+660-0x1e6f));outOff=(0x22f+8799-0x248b);printf(
+,min,max);if((max-min)<(0x1490+4383-0x252e)){if((unsigned char)(min&
+(0x18db+2164-0x20cf))==(unsigned char)(max&(0x4c8+3051-0x1033))){dest[
+(0x189f+3106-0x24c0)]=(unsigned char)(srcLen/(0x256+4366-0x1362));dest[
+(0x88b+2790-0x1371)]=(unsigned char)(0xdfd+5028-0x2120);min=(int)(min&32640);
+dest[(0x939+6275-0x21ba)]=(unsigned char)((min>>(0x628+4027-0x15dc))&
+(0xb8b+1429-0x1021));outOff=(0x32a+4008-0x12cf);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[(0x468+8166-0x244d)]=(unsigned char)(srcLen/(0x1580+2041-0x1d77));
-dest[(0x10f5+4076-0x20e1)]=(unsigned char)(0x711+4536-0x1847);dest[
-(0x1b63+2123-0x23ac)]=(unsigned char)((min>>(0x1352+4059-0x2325))&
-(0x269+2673-0xbdb));dest[(0x15ba+285-0x16d4)]=(unsigned char)(min&
-(0xb2d+5141-0x1e43));outOff=(0x4a9+2351-0xdd4);printf(
+);}else{dest[(0xb91+5839-0x225f)]=(unsigned char)(srcLen/(0xef9+947-0x12aa));
+dest[(0x63+5831-0x172a)]=(unsigned char)(0x677+8366-0x26a3);dest[
+(0x16+6119-0x17fb)]=(unsigned char)((min>>(0x245+360-0x3a5))&
+(0x19b8+3317-0x25ae));dest[(0xd84+5551-0x2330)]=(unsigned char)(min&
+(0x2ad+6279-0x1a35));outOff=(0x1c95+786-0x1fa3);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=(0x457+2079-0xc76);i<srcLen;i+=(0x18dd+781-0x1be8)){if(src[i]==
-(0x82c+4963-0x1b8f)){dest[outOff]=(unsigned char)(src[i+(0x1d46+2491-0x2700)]&
-(0x850+6131-0x1fc4));}else{temp=(int)((((src[i]<<(0x9cc+7437-0x26d1))&65280)|(
-src[i+(0xa07+3264-0x16c6)]&(0x7c4+44-0x6f1)))-min);dest[outOff]=(unsigned char)(
-temp|(0x62d+7056-0x213d));}outOff++;}printf(
+);}for(i=(0x1d30+1697-0x23d1);i<srcLen;i+=(0xab8+3833-0x19af)){if(src[i]==
+(0x17cc+558-0x19fa)){dest[outOff]=(unsigned char)(src[i+(0x116+6348-0x19e1)]&
+(0x2bc+3100-0xe59));}else{temp=(int)((((src[i]<<(0x25c+1280-0x754))&65280)|(src[
+i+(0xcf0+1653-0x1364)]&(0x19eb+586-0x1b36)))-min);dest[outOff]=(unsigned char)(
+temp|(0xc1b+5071-0x1f6a));}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[(0xbd0+958-0xf8e)]=
-(0x258+5640-0x17e0);memcpy(dest+(0x1afc+2003-0x22ce),src,srcLen);printf(
+,outOff,outOff,dest[outOff]);return outOff;}dest[(0x13b3+4110-0x23c1)]=
+(0xaed+2195-0x1300);memcpy(dest+(0xc7+2793-0xbaf),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+(0x1983+221-0x1a5f));return srcLen+(0x1a93+1382-0x1ff8);}int
+,srcLen+(0x6f6+1321-0xc1e));return srcLen+(0x4e7+7256-0x213e);}int
atPb_GetU80Code(const UINT8*srcCode,UINT32 srcCodeLen,UINT8*destCode,UINT32
destCodeLen){assert(destCode!=NULL&&srcCode!=NULL);if(srcCodeLen==
-(0x46f+2280-0xd57)||destCodeLen==(0x182a+1463-0x1de1)||destCodeLen<srcCodeLen){
-return-(0x118f+1843-0x18c1);}memset(destCode,(0x1197+606-0x13f5),destCodeLen);
-destCode[(0x1101+1710-0x17af)]=(0xec+828-0x3a8);printf(
+(0x316+2608-0xd46)||destCodeLen==(0x1acf+1374-0x202d)||destCodeLen<srcCodeLen){
+return-(0x1002+1986-0x17c3);}memset(destCode,(0x15f7+726-0x18cd),destCodeLen);
+destCode[(0xb76+722-0xe48)]=(0xdb5+552-0xf5d);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[(0xe16+4988-0x2192)]);switch(srcCode[(0x866+6410-0x2170)]){case
-(0x16d7+2198-0x1eed):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}
-case(0x16a+6088-0x18b1):{atPb_CvtU81ToU80(srcCode+(0x3cf+3657-0x1217),srcCodeLen
--(0x12bb+4186-0x2314),destCode+(0x18c3+410-0x1a5c),destCodeLen-
-(0xa4f+1648-0x10be));return srcCode[(0x2e6+2570-0xcef)]*(0x19a0+3232-0x263e)+
-(0x16a8+423-0x184e);}case(0x1c02+1603-0x21c3):{atPb_CvtU82ToU80(srcCode+
-(0xecb+2344-0x17f2),srcCodeLen-(0x13e2+2464-0x1d81),destCode+(0xd3a+6325-0x25ee)
-,destCodeLen-(0xb46+3719-0x19cc));return srcCode[(0x13b9+446-0x1576)]*
-(0x10aa+1858-0x17ea)+(0x15a4+1684-0x1c37);}default:{return-(0x263c+82-0x268d);}}
-}BOOL atPb_CvtU82ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*destData,UINT32
-destLen){UINT8 chNum=(0xfd1+5604-0x25b5);UINT16 basePointer=(0xaac+1135-0xf1b);
-UINT8 iCurChar=(0xfd9+1503-0x15b8);UINT32 iCurSrc=(0x712+6451-0x2045);chNum=(
-UINT32)srcData[(0xcd2+3697-0x1b43)];basePointer=(UINT16)srcData[
-(0x66b+2308-0xf6e)];basePointer=basePointer<<(0x1b36+7-0x1b35);basePointer=
-basePointer+srcData[(0x13d5+4014-0x2381)];if(chNum*(0x11c2+230-0x12a6)>destLen){
-return FALSE;}for(iCurSrc=(0x1544+3271-0x2208);iCurSrc<srcLen&&iCurChar<chNum;
-iCurSrc++,iCurChar++){UINT8*curDest=destData+(0x2100+1293-0x260b)*iCurChar;
-atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,curDest+(0x1f7+8748-0x2422))
-;}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*
-destData,UINT32 destLen){UINT8 chNum=(0x1f73+522-0x217d);UINT16 basePointer=
-(0x743+2184-0xfcb);UINT8 iCurChar=(0xaef+7013-0x2654);UINT32 iCurSrc=
-(0x1c10+1174-0x20a6);chNum=srcData[(0x4c+1257-0x535)];basePointer=((UINT16)
-srcData[(0xbf2+4985-0x1f6a)])<<(0x16ea+3207-0x236a);if(chNum*
-(0x1111+3674-0x1f69)>destLen){return FALSE;}for(iCurSrc=(0x2ff+395-0x488);
-iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+
-(0xd18+3294-0x19f4)*iCurChar;atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest
-,curDest+(0x189a+2885-0x23de));}return TRUE;}VOID atPb_CvtChCode(UINT16
-basePointer,UINT8 srcData,UINT8*chMsb,UINT8*chLsb){UINT16 curChar=
-(0xb42+5949-0x227f);assert(chMsb!=NULL&&chLsb!=NULL);if((srcData&
-(0x1a19+2369-0x22da))==(0x829+2333-0x1146)){curChar=srcData;}else{curChar=
-basePointer+(srcData&(0x699+3227-0x12b5));}*chMsb=(UINT8)(curChar>>
-(0x4c7+6715-0x1efa));*chLsb=(UINT8)((curChar<<(0x158b+2715-0x201e))>>
-(0x192+9495-0x26a1));return;}int atPb_String2Bytes(const char*pSrc,unsigned char
-*pDst,int nSrcLength){int i=(0x1b03+252-0x1bff);if(pSrc==NULL||pDst==NULL||
-nSrcLength<(0xb83+1178-0x101d)){return-(0x709+2483-0x10bb);}for(i=
-(0x333+6446-0x1c61);i<nSrcLength;i+=(0xfe0+5512-0x2566)){if(*pSrc>=
-((char)(0xbdc+6651-0x25a7))&&*pSrc<=((char)(0x103a+2362-0x193b))){*pDst=(*pSrc-
-((char)(0x735+1803-0xe10)))<<(0x739+274-0x847);}else{*pDst=((toupper(*pSrc)-
-((char)(0x49+6951-0x1b2f)))+(0x13a+1567-0x74f))<<(0x128d+5180-0x26c5);}pSrc++;if
-(*pSrc>=((char)(0x9d1+2731-0x144c))&&*pSrc<=((char)(0x431+7300-0x207c))){*pDst|=
-*pSrc-((char)(0xdb8+2622-0x17c6));}else{*pDst|=(toupper(*pSrc)-
-((char)(0x1afd+2825-0x25c5)))+(0x10ad+3915-0x1fee);}pSrc++;pDst++;}return
-nSrcLength/(0x1bb7+465-0x1d86);}int atPb_Bytes2String(const unsigned char*pSrc,
+,srcCode[(0x33b+5810-0x19ed)]);switch(srcCode[(0xd09+1171-0x119c)]){case
+(0x1080+1145-0x1479):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}
+case(0x344+5296-0x1773):{atPb_CvtU81ToU80(srcCode+(0x1622+2200-0x1eb9),
+srcCodeLen-(0x13ff+4691-0x2651),destCode+(0xd80+6054-0x2525),destCodeLen-
+(0x220+3814-0x1105));return srcCode[(0x97a+1296-0xe89)]*(0x560+5176-0x1996)+
+(0x937+6025-0x20bf);}case(0x18ed+1551-0x1e7a):{atPb_CvtU82ToU80(srcCode+
+(0xa5b+295-0xb81),srcCodeLen-(0x1d60+1161-0x21e8),destCode+(0x6a8+1880-0xdff),
+destCodeLen-(0x1b5+2731-0xc5f));return srcCode[(0x13b7+2622-0x1df4)]*
+(0xc6b+1328-0x1199)+(0x11f5+4568-0x23cc);}default:{return-(0x5af+1483-0xb79);}}}
+BOOL atPb_CvtU82ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*destData,UINT32
+destLen){UINT8 chNum=(0x1ca8+1951-0x2447);UINT16 basePointer=(0x425+8466-0x2537)
+;UINT8 iCurChar=(0xbfa+117-0xc6f);UINT32 iCurSrc=(0x5bb+3773-0x1478);chNum=(
+UINT32)srcData[(0x604+946-0x9b6)];basePointer=(UINT16)srcData[
+(0x2369+338-0x24ba)];basePointer=basePointer<<(0x86a+4038-0x1828);basePointer=
+basePointer+srcData[(0x76d+3884-0x1697)];if(chNum*(0x1135+1957-0x18d8)>destLen){
+return FALSE;}for(iCurSrc=(0x730+3293-0x140a);iCurSrc<srcLen&&iCurChar<chNum;
+iCurSrc++,iCurChar++){UINT8*curDest=destData+(0x6b7+3196-0x1331)*iCurChar;
+atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,curDest+(0x1714+3822-0x2601)
+);}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*srcData,UINT32 srcLen,UINT8*
+destData,UINT32 destLen){UINT8 chNum=(0x1552+1130-0x19bc);UINT16 basePointer=
+(0x20ef+139-0x217a);UINT8 iCurChar=(0xb99+4227-0x1c1c);UINT32 iCurSrc=
+(0x7a9+1110-0xbff);chNum=srcData[(0x2045+1680-0x26d5)];basePointer=((UINT16)
+srcData[(0xc56+996-0x1039)])<<(0xa0+409-0x232);if(chNum*(0x647+6770-0x20b7)>
+destLen){return FALSE;}for(iCurSrc=(0x43f+6757-0x1ea2);iCurSrc<srcLen&&iCurChar<
+chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+(0x726+6951-0x224b)*iCurChar;
+atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,curDest+(0x156c+658-0x17fd))
+;}return TRUE;}VOID atPb_CvtChCode(UINT16 basePointer,UINT8 srcData,UINT8*chMsb,
+UINT8*chLsb){UINT16 curChar=(0x5d2+883-0x945);assert(chMsb!=NULL&&chLsb!=NULL);
+if((srcData&(0x225+5290-0x164f))==(0x9d1+1605-0x1016)){curChar=srcData;}else{
+curChar=basePointer+(srcData&(0x696+426-0x7c1));}*chMsb=(UINT8)(curChar>>
+(0x156+1493-0x723));*chLsb=(UINT8)((curChar<<(0xd05+6039-0x2494))>>
+(0x1030+3222-0x1cbe));return;}int atPb_String2Bytes(const char*pSrc,unsigned
+char*pDst,int nSrcLength){int i=(0x664+7240-0x22ac);if(pSrc==NULL||pDst==NULL||
+nSrcLength<(0x61b+7578-0x23b5)){return-(0x146+4589-0x1332);}for(i=
+(0x1008+3770-0x1ec2);i<nSrcLength;i+=(0x7a2+7744-0x25e0)){if(*pSrc>=
+((char)(0x6d8+5104-0x1a98))&&*pSrc<=((char)(0x2a2+3247-0xf18))){*pDst=(*pSrc-
+((char)(0x2bd+2551-0xc84)))<<(0x11cd+551-0x13f0);}else{*pDst=((toupper(*pSrc)-
+((char)(0x34b+5758-0x1988)))+(0x25a+5193-0x1699))<<(0x1a8+7470-0x1ed2);}pSrc++;
+if(*pSrc>=((char)(0xde0+1565-0x13cd))&&*pSrc<=((char)(0x1b1c+2436-0x2467))){*
+pDst|=*pSrc-((char)(0x917+1109-0xd3c));}else{*pDst|=(toupper(*pSrc)-
+((char)(0xae3+5841-0x2173)))+(0x221a+127-0x228f);}pSrc++;pDst++;}return
+nSrcLength/(0x82a+6893-0x2315);}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=
-(0xcdd+6198-0x2513);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x7b0+7737-0x25e9)){
-return-(0xc84+6383-0x2572);}for(i=(0x1174+2259-0x1a47);i<nSrcLength;i++){*pDst++
-=tab[*pSrc>>(0x13d2+4164-0x2412)];*pDst++=tab[*pSrc&(0x1aef+2940-0x265c)];pSrc++
-;}*pDst='\0';return nSrcLength*(0x1071+4330-0x2159);}static VOID
+(0xbab+5312-0x206b);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x9c9+6369-0x22aa)){
+return-(0x1c1f+2301-0x251b);}for(i=(0x17b4+425-0x195d);i<nSrcLength;i++){*pDst++
+=tab[*pSrc>>(0x17ea+3389-0x2523)];*pDst++=tab[*pSrc&(0xab4+1392-0x1015)];pSrc++;
+}*pDst='\0';return nSrcLength*(0x129c+3053-0x1e87);}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,
@@ -201,20 +201,21 @@
){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[
-(0x1378+2807-0x1e5b)]={(0x1ced+2360-0x2625)};if(strncmp(cpbsInd->locType,
-"\x53\x4d",(0x14fc+2183-0x1d81))==(0x80+9432-0x2558)){(VOID)snprintf(resInfo,
-(0xb24+6066-0x22c2),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
-NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x4b5+2861-0xfe2),(0xe72+4005-0x1e03)
-);(VOID)snprintf(resInfo,(0x289+5683-0x18a8),"\x25\x64",cpbsInd->totalEntries);(
-VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);g_zPb_SimIndex[(0x1137+2838-0x1c4d)]
-=(UINT32)(cpbsInd->totalEntries);}else{printf(
+(0x1633+1028-0x1a23)]={(0xc06+3839-0x1b05)};if(strncmp(cpbsInd->locType,
+"\x53\x4d",(0xcb5+4763-0x1f4e))==(0x10d1+5406-0x25ef)){(VOID)snprintf(resInfo,
+(0x1f0+8178-0x21ce),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
+NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x4a0+3801-0x1379),
+(0x9dd+4586-0x1bb3));(VOID)snprintf(resInfo,(0x109+7703-0x1f0c),"\x25\x64",
+cpbsInd->totalEntries);(VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);
+g_zPb_SimIndex[(0x13b3+2394-0x1d0d)]=(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[(0x370+5121-0x1767)]={(0xe0c+2034-0x15fe)};assert(
-pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0xba7+2703-0x162c),"\x25\x64",
-len);(VOID)sc_cfg_set(pbNvKeyWord,converted);}VOID atPb_ScpbrTestRsp(
-T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0xf46+3422-0x1ca4)};
-CHAR pbUsed[(0xe39+4646-0x202d)]={(0x11ef+93-0x124c)};sc_cfg_get(
+UINT32 len){char converted[(0x330+1566-0x944)]={(0x1b12+1473-0x20d3)};assert(
+pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0x1baa+1389-0x210d),"\x25\x64"
+,len);(VOID)sc_cfg_set(pbNvKeyWord,converted);}VOID atPb_ScpbrTestRsp(
+T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0x1c8+9496-0x26e0)};
+CHAR pbUsed[(0x5df+4351-0x16ac)]={(0x9a9+1686-0x103f)};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.
@@ -223,22 +224,22 @@
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=(0x187+5060-0x154b);int max=(0x1c6+1904-0x936);int res=(0x2096+112-0x2106);
-int index=(0xd4c+1170-0x11de);CHAR pbMin[(0x24f+6402-0x1b1f)]={
-(0x407+2840-0xf1f)};CHAR pbMax[(0xb16+5006-0x1e72)]={(0x11e1+2744-0x1c99)};int
-indexmin=(0x831+6037-0x1fc6);int indexmax=(0x82+2589-0xa9f);T_zPb_ScpbrReadRes
-scpbrReadInfo={(0x59a+8122-0x2554)};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")==(0x2186+580-0x23ca)||strcmp(
-pbMax,"\x30")==(0xbe4+4976-0x1f54)){sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);
-printf(
+ min=(0x184b+2648-0x22a3);int max=(0xb51+1203-0x1004);int res=
+(0x12c2+3594-0x20cc);int index=(0x3ed+1568-0xa0d);CHAR pbMin[(0xb11+636-0xd5b)]=
+{(0x144+6723-0x1b87)};CHAR pbMax[(0x106+3610-0xeee)]={(0x61+1404-0x5dd)};int
+indexmin=(0xda9+3057-0x199a);int indexmax=(0x1dd7+731-0x20b2);T_zPb_ScpbrReadRes
+ scpbrReadInfo={(0x1349+1067-0x1774)};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")==(0xfe9+5804-0x2695)
+||strcmp(pbMax,"\x30")==(0x706+1244-0xbe2)){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-(0xe4d+1602-0x148e);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
-"\x25\x64",&max);if((min<(0x5c5+2787-0x10a8)||min>INT_MAX-(0x990+4769-0x1c30))||
-(max<(0x1105+90-0x115f)||max>INT_MAX-(0x7f5+7433-0x24fd))){printf(
+);return-(0x10d1+3744-0x1f70);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
+"\x25\x64",&max);if((min<(0x10b+8537-0x2264)||min>INT_MAX-(0xc33+4646-0x1e58))||
+(max<(0xc61+3187-0x18d4)||max>INT_MAX-(0x208+7420-0x1f03))){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-(0x1b65+2888-0x26ac);}while((0xd4a+5198-0x2197)){if(indexmin<
-min){indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0xfb9+5051-0x2373);if(
+,min,max);return-(0x1254+4625-0x2464);}while((0xe97+1537-0x1497)){if(indexmin<
+min){indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0x865+49-0x895);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(
@@ -250,17 +251,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,
-(0x9bb+2894-0x1509));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
-(0x190b+257-0x1a0b)){break;}}return g_PbOptRsp.result;}
-#if (0xf04+3680-0x1d64)
+(0xe89+5923-0x25ac));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
+(0x522+8281-0x257a)){break;}}return g_PbOptRsp.result;}
+#if (0x10f4+2850-0x1c16)
int atPb_SendScpbrSet(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){UINT32
-indexmin=(0x258+7181-0x1e65);UINT32 indexmax=(0x934+5904-0x2044);CHAR atcmdMsg[
-(0x6bc+1768-0xd5e)]={(0x282+575-0x4c1)};int res=(0x10db+3301-0x1dc0);CHAR pbMin[
-(0x7c6+5486-0x1d02)]={(0x20ff+519-0x2306)};CHAR pbMax[(0xc03+6637-0x25be)]={
-(0x3f3+5144-0x180b)};sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+indexmin=(0x194+529-0x3a5);UINT32 indexmax=(0x1a4f+2148-0x22b3);CHAR atcmdMsg[
+(0x6e2+4635-0x18b7)]={(0x3aa+2524-0xd86)};int res=(0xfdd+3107-0x1c00);CHAR pbMin
+[(0x1546+491-0x16ff)]={(0x15ad+1988-0x1d71)};CHAR pbMax[(0xb9d+2796-0x1657)]={
+(0x1500+2822-0x2006)};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")==(0x190+8345-0x2229)||strcmp(pbMax,"\x30")
-==(0x17d+6525-0x1afa)){printf(
+,ZPB_LOADING);if(strcmp(pbMin,"\x30")==(0x142f+1008-0x181f)||strcmp(pbMax,"\x30"
+)==(0x11cb+2272-0x1aab)){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),
@@ -269,45 +270,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=
-(0x988+4762-0x1c22);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0x1307+2705-0x1d98)};
-if(pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0x1656+2046-0x1e50)+
-ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0x4d3+745-0x7bc)],sizeof
-(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0x1294+2559-0x1c93);(i<
-strlen(pbTextSrc))&&(i*(0xa40+1524-0x1030)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
-snprintf(strTarget+i*(0x1732+3077-0x2333)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-
-i*(0x8af+5565-0x1e68)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i
-]);}strncpy(pbDst,strTarget,dstLen-(0x11c4+2447-0x1b52));return ZUFI_SUCC;}}
+(0x2d6+5090-0x16b8);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0x527+6189-0x1d54)};if
+(pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0x1525+1509-0x1b06)+
+ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0x72c+419-0x8cf)],sizeof
+(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0xa62+6685-0x247f);(i<
+strlen(pbTextSrc))&&(i*(0x1349+3734-0x21db)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
+snprintf(strTarget+i*(0x8a4+4941-0x1bed)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-i
+*(0x151+7684-0x1f51)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i]
+);}strncpy(pbDst,strTarget,dstLen-(0x1228+4924-0x2563));return ZUFI_SUCC;}}
return ZUFI_FAIL;}VOID atPb_ScpbrSetRsp(T_zPb_ScpbrSetRes*atRes){
-T_zPb_WebContact pbRecord={(0x2c7+2091-0xaf2)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]={
-(0x1290+4989-0x260d)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0x16c+466-0x33e)};int
-text_len=(0xb39+2237-0x13f6);int tmp_len=(0x17cb+3172-0x242f);CHAR tmp[
-ZPB_TEXT_SIZE_BYTES]={(0x11e5+1181-0x1682)};if(atRes->coding!=ZPB_UCS2){if(
+T_zPb_WebContact pbRecord={(0xe42+2101-0x1677)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]=
+{(0xf3+8999-0x241a)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0x105+1206-0x5bb)};int
+text_len=(0x4cd+6646-0x1ec3);int tmp_len=(0x22a5+568-0x24dd);CHAR tmp[
+ZPB_TEXT_SIZE_BYTES]={(0x211+171-0x2bc)};if(atRes->coding!=ZPB_UCS2){if(
atPb_EncodeText(pbDst,atRes->text,ZPB_TEXT_SIZE_BYTES)==ZUFI_SUCC){strncpy(atRes
-->text,pbDst+(0x107+4175-0x1154),sizeof(atRes->text)-(0x19f+4151-0x11d5));}else{
+->text,pbDst+(0x52d+567-0x762),sizeof(atRes->text)-(0x1548+667-0x17e2));}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<
-(0x105+5773-0x1792))return;memset(&text,(0x1675+4084-0x2669),ZPB_TEXT_SIZE_BYTES
-);text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0x2350+684-0x25fa)
-){memset(&atRes->text,(0x461+7416-0x2159),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->
-text,text+(0x1ed1+1319-0x23f6),strlen(text)-(0x10ff+4365-0x220a));}}pbRecord.
-pbId=-(0xae9+3172-0x174c);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord
-.name,atRes->text,sizeof(pbRecord.name)-(0xd31+6602-0x26fa));strncpy(pbRecord.
-mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0xf36+4076-0x1f21));
+(0x1c7d+2319-0x258c))return;memset(&text,(0xe96+4106-0x1ea0),ZPB_TEXT_SIZE_BYTES
+);text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0xd17+1721-0x13ce)
+){memset(&atRes->text,(0xdc1+3263-0x1a80),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->
+text,text+(0x197+2071-0x9ac),strlen(text)-(0x199b+663-0x1c30));}}pbRecord.pbId=-
+(0x162c+4304-0x26fb);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord.name
+,atRes->text,sizeof(pbRecord.name)-(0x186+3942-0x10eb));strncpy(pbRecord.
+mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0x953+934-0xcf8));
strncpy(pbRecord.officeNumber,atRes->number2,sizeof(pbRecord.officeNumber)-
-(0xb88+7042-0x2709));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord.
-homeNumber)-(0x6c2+7034-0x223b));strncpy(pbRecord.email,atRes->email,sizeof(
-pbRecord.email)-(0x709+3122-0x133a));pbRecord.pbLocation=ZPB_LOCATION_USIM;(VOID
+(0xddf+975-0x11ad));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord.
+homeNumber)-(0x18eb+3273-0x25b3));strncpy(pbRecord.email,atRes->email,sizeof(
+pbRecord.email)-(0x265+6570-0x1c0e));pbRecord.pbLocation=ZPB_LOCATION_USIM;(VOID
)atPb_LoadARecToPbmTable(&pbRecord);}VOID atPb_SetDelStatusMultOrAll(){if(
-g_zPb_DelStatusUsim.dealFailNum>(0xe1+6907-0x1bdc)){if(g_zPb_DelStatusUsim.
-dealSuccNum>(0x14a0+1131-0x190b)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
+g_zPb_DelStatusUsim.dealFailNum>(0x1d3+3475-0xf66)){if(g_zPb_DelStatusUsim.
+dealSuccNum>(0x1648+313-0x1781)){(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 (0x358+1140-0x7cc)
+#if (0x1e4d+145-0x1ede)
VOID atPb_RecvScpbwAddErr(UINT8*pErrCode){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
-ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0xe9+7006-0x1c45))
-==(0x2e7+537-0x500))){(VOID)sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x79\x65\x73");
+ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0x945+2996-0x14f7))
+==(0x1247+650-0x14d1))){(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(
@@ -318,83 +319,84 @@
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=(0x16bb+90-0x1715);UINT8 iTemp=(0x1421+1206-0x18d7);SINT32 i
-=(0xec1+2586-0x18db);if((NULL==pcHex)||(NULL==pcASC)||((0x93+8936-0x237b)==
-iDstLen)||(iDstLen<(iSrcLen/(0x32f+6535-0x1cb4)+(0xc10+169-0xcb8)))){return;}for
-(i=(0x1997+2502-0x235d);i<iSrcLen;i++){if(iOddOrEven%(0x102a+142-0x10b6)==
-(0x10cd+4536-0x2285)){iTemp=*(pcASC+i);if((iTemp>=((char)(0xca1+1428-0x1205)))&&
-(iTemp<=((char)(0x12f0+3323-0x1fb2)))){*(pcHex+i/(0x2471+361-0x25d8))|=(UINT8)(
-iTemp-(0x883+5126-0x1c59))<<(0x1264+2804-0x1d54);}else{*(pcHex+i/
-(0xbad+2168-0x1423))|=(UINT8)(iTemp-(0x1a03+1887-0x212b))<<(0x15e6+1160-0x1a6a);
-}}else{iTemp=*(pcASC+i);if((iTemp>=((char)(0xbc2+6437-0x24b7)))&&(iTemp<=
-((char)(0x75f+116-0x79a)))){*(pcHex+i/(0x11d3+4338-0x22c3))|=iTemp-
-(0x14c1+4627-0x26a4);}else{*(pcHex+i/(0x822+3844-0x1724))|=iTemp-
-(0x741+3915-0x1655);}}iOddOrEven++;}}SINT32 atPb_IfUcs2IsSMS7(UINT16*psUcs2,
-SINT32 iLength){int iRetVal=(0x4f3+2321-0xe03);char cTemp;int i=
-(0x121d+2685-0x1c9a);if(NULL==psUcs2){return-(0xfec+3168-0x1c4b);}for(i=
-(0x32c+820-0x660);i<iLength;i++){if((0x2d7+5511-0x175e)>psUcs2[i]){switch(psUcs2
-[i]){case(0x1c2+3501-0xf63):case(0x3d8+2477-0xd2a):case(0xc16+3448-0x1932):case
-(0x1474+4175-0x2466):case(0x191+9624-0x26cb):case(0xec9+1491-0x1421):case
-(0xdef+1026-0x1175):case(0x1f60+1129-0x234c):case(0x937+1771-0xfa4):case
-(0xc4a+3193-0x181f):case(0x114f+555-0x135a):{break;}default:{cTemp=(char)
-G_ZPB_NEWUCS2TOGSM[psUcs2[i]];if(ZPB_NON_GSM==cTemp){iRetVal=(0x39d+2950-0xf23);
-}break;}}}else{switch(psUcs2[i]){case(0x15d3+229-0x1324):case(0x588+1672-0x86a):
-case(0x105f+5765-0x2351):case(0x1f62+1072-0x1ff7):case(0x3d5+7914-0x1f16):case
-(0x598+512-0x3f8):case(0x7c5+564-0x631):case(0xbd0+439-0x9e4):case
-(0x1595+1726-0x189b):case(0x17d2+1445-0x19d9):{break;}default:{iRetVal=
-(0x3b7+3084-0xfc3);break;}}}if((0x7b1+7737-0x25ea)==iRetVal){break;}}return
-iRetVal;}static UINT8 atPb_EncodeNameToUcs2(char*pbDst,UINT32 iDstLen,char const
-*pbSrc){UINT16 acHex[(0x17d6+1091-0x1b19)]={(0x1be9+1363-0x213c)};SINT32 srclen=
-(0x442+2284-0xd2e);SINT32 rest=(0xc27+3538-0x19f9);assert(pbDst!=NULL&&pbSrc!=
-NULL);srclen=(SINT32)strlen(pbSrc);slog(PB_PRINT,SLOG_DEBUG,
+){UINT32 iOddOrEven=(0x784+7925-0x2679);UINT8 iTemp=(0xad7+4940-0x1e23);SINT32 i
+=(0x132a+3782-0x21f0);if((NULL==pcHex)||(NULL==pcASC)||((0x359+3644-0x1195)==
+iDstLen)||(iDstLen<(iSrcLen/(0x798+1894-0xefc)+(0x1a9f+1677-0x212b)))){return;}
+for(i=(0x13f1+4550-0x25b7);i<iSrcLen;i++){if(iOddOrEven%(0x72a+3307-0x1413)==
+(0x748+4381-0x1865)){iTemp=*(pcASC+i);if((iTemp>=((char)(0x6d9+7343-0x2358)))&&(
+iTemp<=((char)(0x17dc+218-0x187d)))){*(pcHex+i/(0x6e9+1270-0xbdd))|=(UINT8)(
+iTemp-(0xff3+3575-0x1dba))<<(0x1805+3693-0x266e);}else{*(pcHex+i/
+(0x909+7052-0x2493))|=(UINT8)(iTemp-(0x1de4+1284-0x22b1))<<(0x1a2b+1672-0x20af);
+}}else{iTemp=*(pcASC+i);if((iTemp>=((char)(0x435+2345-0xd2e)))&&(iTemp<=
+((char)(0xd5+5875-0x178f)))){*(pcHex+i/(0xe36+275-0xf47))|=iTemp-
+(0x204c+1524-0x2610);}else{*(pcHex+i/(0xa1b+5915-0x2134))|=iTemp-
+(0x1bc+2556-0xb81);}}iOddOrEven++;}}SINT32 atPb_IfUcs2IsSMS7(UINT16*psUcs2,
+SINT32 iLength){int iRetVal=(0x8c8+6020-0x204b);char cTemp;int i=
+(0x571+5762-0x1bf3);if(NULL==psUcs2){return-(0xa21+6506-0x238a);}for(i=
+(0x22a+6000-0x199a);i<iLength;i++){if((0x4e0+4534-0x1596)>psUcs2[i]){switch(
+psUcs2[i]){case(0x1083+2074-0x1891):case(0x1e90+1174-0x22cb):case
+(0x11b1+4727-0x23cc):case(0x727+4056-0x16a2):case(0x421+2624-0xe03):case
+(0x497+500-0x610):case(0x16f5+335-0x17c8):case(0x14c8+2370-0x1d8d):case
+(0x253+8065-0x2156):case(0xe13+5951-0x24ae):case(0xa66+7166-0x2644):{break;}
+default:{cTemp=(char)G_ZPB_NEWUCS2TOGSM[psUcs2[i]];if(ZPB_NON_GSM==cTemp){
+iRetVal=(0x1c50+2331-0x256b);}break;}}}else{switch(psUcs2[i]){case
+(0x5cd+1046-0x64f):case(0x222a+2116-0x26c8):case(0x1e84+691-0x1da4):case
+(0x9b4+5995-0x1d84):case(0x1f2b+1044-0x1f96):case(0x750+4334-0x149e):case
+(0x208c+1017-0x20bd):case(0x1008+5741-0x22d2):case(0x6d5+5235-0x1790):case
+(0x106d+2901-0x1824):{break;}default:{iRetVal=(0x1eec+1650-0x255e);break;}}}if(
+(0x101+271-0x210)==iRetVal){break;}}return iRetVal;}static UINT8
+atPb_EncodeNameToUcs2(char*pbDst,UINT32 iDstLen,char const*pbSrc){UINT16 acHex[
+(0x628+5476-0x1a8c)]={(0x3ab+2640-0xdfb)};SINT32 srclen=(0x517+936-0x8bf);SINT32
+ rest=(0x18d8+1323-0x1e03);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,(0x1deb+13-0x1cf8),(UINT8*)pbSrc,srclen);rest=
-atPb_IfUcs2IsSMS7(acHex,srclen/(0x25c+2587-0xc73));if(rest==(0x8b3+366-0xa20)){
-return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest==(0xf43+3446-0x1cb9)){
-if(strlen(pbSrc)+(0x17a+6710-0x1bae)<iDstLen){memcpy(pbDst,"\x38\x30",
-(0x998+6271-0x2215));memcpy(pbDst+(0x12f1+1833-0x1a18),pbSrc,srclen);return
-ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(T_zPb_WebContact const*
-pbRecv,BOOL pbNewFlag){SINT32 count=(0x314+2923-0xe7e);SINT32 total=
-(0xb1f+1665-0x11a0);SINT32*IndexType=NULL;if((NULL==pbRecv)){slog(PB_PRINT,
+,pbSrc,srclen);pb_AsctoHex(acHex,(0x949+2463-0x11e8),(UINT8*)pbSrc,srclen);rest=
+atPb_IfUcs2IsSMS7(acHex,srclen/(0xd50+6487-0x26a3));if(rest==(0x876+4500-0x1a09)
+){return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest==
+(0x20e8+1336-0x2620)){if(strlen(pbSrc)+(0x5c+5884-0x1756)<iDstLen){memcpy(pbDst,
+"\x38\x30",(0x175+3551-0xf52));memcpy(pbDst+(0x9a4+406-0xb38),pbSrc,srclen);
+return ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(T_zPb_WebContact
+const*pbRecv,BOOL pbNewFlag){SINT32 count=(0x431+3316-0x1124);SINT32 total=
+(0x59a+4657-0x17cb);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-(0x1151+4120-0x2168);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv
-->pbLocation){total=g_zPb_SimIndex[(0x9a9+2084-0x11cd)];IndexType=g_zPb_SimIndex
-;}else if(ZPB_LOCATION_AP==pbRecv->pbLocation){total=g_zPb_ApIndex[
-(0x1b33+658-0x1dc5)];IndexType=g_zPb_ApIndex;}for(;count<=total;count++){if((
+);return-(0x1013+802-0x1334);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv->
+pbLocation){total=g_zPb_SimIndex[(0xe02+1500-0x13de)];IndexType=g_zPb_SimIndex;}
+else if(ZPB_LOCATION_AP==pbRecv->pbLocation){total=g_zPb_ApIndex[
+(0x1f9c+980-0x2370)];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-(0x14a0+1098-0x18e9);}slog(PB_PRINT,SLOG_DEBUG,
+,count);return-(0xcc0+177-0xd70);}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=(0x1055+4695-0x22ac);SINT32 i=
-(0x90f+4474-0x1a89);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0xbdc+6761-0x2645)};CHAR str
-[(0x18b2+2075-0x20ca)]={(0x7c8+4574-0x19a6)};SINT32 length=(0xce7+1658-0x1361);
-length=atPb_String2Bytes(pSrc,buf,len);for(i=(0x2340+921-0x26d9);i<length;i+=
-(0x39f+7963-0x22b8)){if(buf[i]!=(0x171c+1265-0x1c0d)||buf[i+(0x17b3+1398-0x1d28)
-]>(0x11a5+1829-0x184b)){return FALSE;}pDst[j++]=buf[i+(0xb57+3286-0x182c)];}
-return TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL
-pbNewFlag,sem_t semId){int atRes=(0xd97+4671-0x1fd6);CHAR pbName[
-ZPB_TEXT_SIZE_BYTES+(0x38a+2804-0xe7b)]={(0x1012+3178-0x1c7c)};CHAR buf_src[
-ZPB_TEXT_SIZE_BYTES+(0x1426+692-0x16d7)]={(0x14+191-0xd3)};CHAR buf_dest[
-ZPB_TEXT_SIZE_BYTES+(0xd81+144-0xe0e)]={(0x1d0b+1217-0x21cc)};T_zPb_ScpbwParam
-scpbwParam={(0x1255+4913-0x2586)};int len=(0x154a+1364-0x1a9e);
-atPb_WebRecodeShow(pWebPbContact);if(atPb_GetASCII(pWebPbContact->name,pbName,
-strlen(pWebPbContact->name))){scpbwParam.coding=(0x1239+583-0x1480);}else{len=
-atPb_String2Bytes(pWebPbContact->name,buf_src,strlen(pWebPbContact->name));len=
+CHAR*pSrc,CHAR*pDst,SINT32 len){SINT32 j=(0x64c+3722-0x14d6);SINT32 i=
+(0x930+7218-0x2562);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0x1619+3146-0x2263)};CHAR
+str[(0x470+4660-0x16a1)]={(0x1c44+1537-0x2245)};SINT32 length=(0x614+669-0x8b1);
+length=atPb_String2Bytes(pSrc,buf,len);for(i=(0x5b6+5989-0x1d1b);i<length;i+=
+(0x22+3015-0xbe7)){if(buf[i]!=(0x1023+5785-0x26bc)||buf[i+(0x1773+3343-0x2481)]>
+(0x2301+972-0x264e)){return FALSE;}pDst[j++]=buf[i+(0x1121+5303-0x25d7)];}return
+ TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL
+pbNewFlag,sem_t semId){int atRes=(0xc7f+6101-0x2454);CHAR pbName[
+ZPB_TEXT_SIZE_BYTES+(0xbbd+1944-0x1352)]={(0xf1d+4445-0x207a)};CHAR buf_src[
+ZPB_TEXT_SIZE_BYTES+(0x1ecd+839-0x2211)]={(0x848+6274-0x20ca)};CHAR buf_dest[
+ZPB_TEXT_SIZE_BYTES+(0x1a25+858-0x1d7c)]={(0xada+6572-0x2486)};T_zPb_ScpbwParam
+scpbwParam={(0x1bf+7009-0x1d20)};int len=(0xc25+4506-0x1dbf);atPb_WebRecodeShow(
+pWebPbContact);if(atPb_GetASCII(pWebPbContact->name,pbName,strlen(pWebPbContact
+->name))){scpbwParam.coding=(0x105f+3828-0x1f53);}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=(0x12e4+1031-0x16ea);}scpbwParam.pbIndex=pWebPbContact->
+,len);scpbwParam.coding=(0x52b+1812-0xc3e);}scpbwParam.pbIndex=pWebPbContact->
pbIndex;strncpy(scpbwParam.name,pbName,sizeof(scpbwParam.name)-
-(0x8f9+4308-0x19cc));strncpy(scpbwParam.mobilNumber,pWebPbContact->mobilNumber,
-sizeof(scpbwParam.mobilNumber)-(0xba4+4741-0x1e28));strncpy(scpbwParam.
+(0x7c8+5990-0x1f2d));strncpy(scpbwParam.mobilNumber,pWebPbContact->mobilNumber,
+sizeof(scpbwParam.mobilNumber)-(0x1dfb+2305-0x26fb));strncpy(scpbwParam.
officeNumber,pWebPbContact->officeNumber,sizeof(scpbwParam.officeNumber)-
-(0x676+6615-0x204c));strncpy(scpbwParam.homeNumber,pWebPbContact->homeNumber,
-sizeof(scpbwParam.homeNumber)-(0xa81+3404-0x17cc));strncpy(scpbwParam.email,
-pWebPbContact->email,sizeof(scpbwParam.email)-(0x57+4780-0x1302));
+(0x1b79+1896-0x22e0));strncpy(scpbwParam.homeNumber,pWebPbContact->homeNumber,
+sizeof(scpbwParam.homeNumber)-(0x3c8+8968-0x26cf));strncpy(scpbwParam.email,
+pWebPbContact->email,sizeof(scpbwParam.email)-(0x10cd+1357-0x1619));
ipc_send_message(MODULE_ID_PB,MODULE_ID_AT_CTL,MSG_CMD_ADD_MODIFY_PB_REQ,sizeof(
-T_zPb_ScpbwParam),(unsigned char*)&scpbwParam,(0xcec+1129-0x1155));sem_wait(&
-g_Pb_sem_id);if(g_PbOptRsp.result!=(0x104+4064-0x10e3)){(VOID)sc_cfg_set(
+T_zPb_ScpbwParam),(unsigned char*)&scpbwParam,(0x171d+84-0x1771));sem_wait(&
+g_Pb_sem_id);if(g_PbOptRsp.result!=(0x2133+113-0x21a3)){(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(
@@ -407,16 +409,16 @@
);}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=(0x161c+3002-0x21d5);T_zPb_Header pbHeader={(0x1154+811-0x147f)};BOOL
-pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0x17c0+884-0x1b34)};CHAR ptFlag[
-(0x697+6243-0x1ee6)]={(0x43c+3352-0x1154)};printf(
+idleIndex=(0x1bc7+2316-0x24d2);T_zPb_Header pbHeader={(0x236+867-0x599)};BOOL
+pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0x6ed+8127-0x26ac)};CHAR ptFlag[
+(0x6d6+5380-0x1bc6)]={(0x1463+2484-0x1e17)};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(-(0x1410+3328-0x210f)==webPbContact->pbId){slog(PB_PRINT
+,webPbContact->pbId);if(-(0x1298+1433-0x1830)==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!=-(0xe94+4105-0x1e9c)){webPbContact->pbIndex=idleIndex;
+,idleIndex);if(idleIndex!=-(0x87f+6063-0x202d)){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(
@@ -435,27 +437,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(
-(0x1226+992-0x1606)==strcmp("\x30",ptFlag)&&-(0x65+7840-0x1f04)!=webPbContact->
-del_id){delRecord.delId[(0x1f2+5445-0x1737)]=webPbContact->del_id;atWeb_DelOnepb
-(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,sem_t semId){
-CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x18cc+589-0x1b19)};int atRes=
-(0x1540+2108-0x1d7c);SINT32 delTime=(0x1c63+1727-0x2322);
+(0xfec+4893-0x2309)==strcmp("\x30",ptFlag)&&-(0x1364+3721-0x21ec)!=webPbContact
+->del_id){delRecord.delId[(0xef9+2989-0x1aa6)]=webPbContact->del_id;
+atWeb_DelOnepb(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,
+sem_t semId){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x9a4+3284-0x1678)};int atRes=
+(0xe48+1446-0x13ee);SINT32 delTime=(0x187a+3321-0x2573);
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[(0xdad+3565-0x1b9a)],delRecord->delLocation);if(
+,delRecord->delIndex[(0x18b4+592-0x1b04)],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[(0x208+762-0x4d0)]={(0x1555+421-0x16fa)};
+delRecord->delLocation){CHAR pbMax[(0x16a3+1124-0x1ad5)]={(0x1486+4635-0x26a1)};
sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));if((delRecord->delIndex[
-(0x210a+84-0x215e)]>=(0xe69+598-0x10be))&&(delRecord->delIndex[
-(0x164f+452-0x1813)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
+(0x1eff+238-0x1fed)]>=(0x2157+1275-0x2651))&&(delRecord->delIndex[
+(0xeb9+5052-0x2275)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
MODULE_ID_AT_CTL,MSG_CMD_DELETE_PB_REQ,sizeof(int),(unsigned char*)&delRecord->
-delIndex[(0x122c+337-0x137d)],(0x7d2+577-0xa13));sem_wait(&g_Pb_sem_id);if(
-g_PbOptRsp.result!=(0x959+4182-0x19ae)){sc_cfg_set(ZPB_NV_WRITE_FLAG,
+delIndex[(0x1d87+876-0x20f3)],(0xab+759-0x3a2));sem_wait(&g_Pb_sem_id);if(
+g_PbOptRsp.result!=(0x138+5062-0x14fd)){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(
@@ -465,9 +467,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]={(0x18c1+2206-0x215f)};int atRes=(0x9a3+6206-0x21e1);
-SINT32 delCount=(0xe66+2215-0x170d);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
-g_zPb_DelStatusUsim,(0xa97+158-0xb35),sizeof(T_zPb_DelStatusMultiOrAll));
+ZSVR_AT_RES_CODE_LEN]={(0xf6+6916-0x1bfa)};int atRes=(0xf8+1422-0x686);SINT32
+delCount=(0x1957+1621-0x1fac);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
+g_zPb_DelStatusUsim,(0x4e0+2602-0xf0a),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"
@@ -478,14 +480,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[
-(0x9b+40-0x91)]={(0xa4f+1236-0xf23)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof
-(pbMax));if((delRecord->delIndex[delCount]>=(0x7ba+3880-0x16e1))&&(delRecord->
-delIndex[delCount]<=atoi(pbMax))){printf(
+(0xed3+2348-0x17cd)]={(0x4df+2261-0xdb4)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
+sizeof(pbMax));if((delRecord->delIndex[delCount]>=(0x364+2389-0xcb8))&&(
+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]
-,(0x1673+2102-0x1ea9));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0xe7d+5309-0x2339)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+,(0x14a+218-0x224));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0xd04+3729-0x1b94)){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,
@@ -493,14 +495,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={(0x8b6+2065-0x10c7)};SINT32
- i=(0x10dd+4441-0x2235);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=
-(0x688+438-0x83d);i<=ZPB_AP_MAX_RECORD;i++){if((0x383+1386-0x8ed)!=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]={(0x6dc+3882-0x1606)};
-snprintf(sql,sizeof(sql)-(0xb80+893-0xefc),
+T_zPb_DbResult result=ZPB_DB_OK;T_zPb_ApIndex index={(0xf2c+1242-0x1406)};SINT32
+ i=(0xf0f+941-0x12bb);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=(0x1a6f+69-0x1ab3);i<=
+ZPB_AP_MAX_RECORD;i++){if((0x2133+824-0x246b)!=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]={(0x8f8+5336-0x1dd0)};
+snprintf(sql,sizeof(sql)-(0x19fa+13-0x1a06),
"\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(
@@ -509,28 +511,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]={(0x83+4232-0x110b)};int atRes=
-(0x10a8+3639-0x1edf);UINT32 i=(0xa42+2140-0x129e);CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x69c+5043-0x1a4f)};UINT32 count=(0x5d5+6658-0x1fd7);if(pdelRecord!=NULL){
-memset(&g_zPb_DelStatusUsim,(0xe13+3028-0x19e7),sizeof(T_zPb_DelStatusMultiOrAll
-));g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_ALL_RECORD_USIM;snprintf(sql,sizeof(sql)
--(0xb4a+3522-0x190b),
+CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0xfad+3049-0x1b96)};int atRes=
+(0x532+4262-0x15d8);UINT32 i=(0xbf6+2727-0x169d);CHAR sql[ZPB_MAX_BYTES_DB]={
+(0x5fc+7098-0x21b6)};UINT32 count=(0xcf3+496-0xee3);if(pdelRecord!=NULL){memset(
+&g_zPb_DelStatusUsim,(0x1585+1101-0x19d2),sizeof(T_zPb_DelStatusMultiOrAll));
+g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_ALL_RECORD_USIM;snprintf(sql,sizeof(sql)-
+(0xef2+4274-0x1fa3),
"\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((0x9dd+149-0xa72)<count){CHAR pbMin[
-(0x1d1d+989-0x20c8)]={(0x5d5+7086-0x2183)};CHAR pbMax[(0x1fad+1552-0x258b)]={
-(0x485+1456-0xa35)};UINT32 i_pbMin=(0x1211+1079-0x1648);UINT32 i_pbMax=
-(0x72f+7219-0x2362);sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+atPb_DbCountTableLineCb,&count);if((0x1912+2112-0x2152)<count){CHAR pbMin[
+(0x181b+3323-0x24e4)]={(0x38b+5987-0x1aee)};CHAR pbMax[(0xb59+2579-0x153a)]={
+(0x114d+658-0x13df)};UINT32 i_pbMin=(0x931+3942-0x1897);UINT32 i_pbMax=
+(0x9d3+4215-0x1a4a);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,
-(0xef5+3027-0x1ac8));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0x140+1832-0x867)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+(0x14d+2154-0x9b7));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0x1a68+167-0x1b0e)){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)-
-(0x405+3063-0xffb),
+(0x1185+5504-0x2704),
"\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 f60984d..891af85 100755
--- a/ap/app/zte_comm/rtc-service/rtc-service.c
+++ b/ap/app/zte_comm/rtc-service/rtc-service.c
@@ -50,6 +50,7 @@
static int handle_alarm_del(MSG_BUF *pmsg_buf);
static int handle_alarm_timeout(MSG_BUF *pmsg_buf);
static int process_msg(MSG_BUF *pmsg_buf);
+static int process_msg_rtc_cap(MSG_BUF *pmsg_buf);
static void msg_looper(void);
static void update_timer_remain(int new_remian);
static void alarm_fix_value(struct list_head *rtc_list);
@@ -1015,6 +1016,108 @@
return 0;
}
+/********************************************
+ * process_msg_rtc_ap
+ * handle the specified MSG to cap, because rtc driver is at cap
+ *******************************************/
+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;
+}
+
static int rtc_service_sock_init()
{
int sockfd = 0;
@@ -1168,8 +1271,12 @@
}
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);
- process_msg(&msg_buf);
-
+ #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();
}
@@ -1271,11 +1378,13 @@
g_clean_flag = 0;
//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();
+#endif
/*
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
diff --git a/ap/app/zte_comm/sms/src/sms_code.c b/ap/app/zte_comm/sms/src/sms_code.c
index 107e103..1fb739f 100755
--- a/ap/app/zte_comm/sms/src/sms_code.c
+++ b/ap/app/zte_comm/sms/src/sms_code.c
@@ -6,659 +6,659 @@
#ifdef WIN32
#include <wchar.h>
#endif
-#define NON_GSM (0x1b99+2749-0x2636)
+#define NON_GSM (0x324+973-0x6d1)
#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[(0x63b+1490-0xbfd)]={
-((char)(0x818+2732-0x1294)),((char)(0x419+5431-0x191f)),
-((char)(0x677+2505-0x100e)),((char)(0x9df+2827-0x14b7)),
-((char)(0x750+1945-0xeb5)),((char)(0xdd0+3852-0x1ca7)),
-((char)(0xc94+5628-0x225a)),((char)(0xa6c+762-0xd2f)),((char)(0x7f3+1397-0xd30))
-,((char)(0x44f+5905-0x1b27)),((char)(0x1558+4179-0x256a)),
-((char)(0x7f8+5782-0x1e4c)),((char)(0xa47+3418-0x175e)),
-((char)(0xed5+4651-0x20bc)),((char)(0xf5a+3379-0x1c48)),
-((char)(0x132a+4134-0x230a))};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)(0x1317+3494-0x209d)),
-((char)(0x8b+6481-0x19bc)),((char)(0xf80+2635-0x19ab)),
-((char)(0x1340+3239-0x1fc7)),((char)(0x326+2305-0xc07)),
-((char)(0x513+8713-0x26fc)),((char)(0x2383+168-0x240b)),
-((char)(0x4f1+3427-0x1234)),((char)(0x7f2+5000-0x1b5a)),
-((char)(0x96c+7492-0x2690)),((char)(0x785+3625-0x158e)),
-((char)(0xf59+2774-0x1a0f)),((char)(0x1567+2156-0x1db3)),
-((char)(0x5fd+1619-0xc30)),((char)(0x1445+2767-0x1ef4)),
-((char)(0xd1b+488-0xee3)),((char)(0xb9b+2367-0x14ba)),
-((char)(0x7f6+2099-0x1009)),((char)(0x811+7497-0x253a)),
-((char)(0x210d+623-0x235c)),((char)(0xe0+4355-0x11c3)),
-((char)(0xffa+4137-0x2003)),((char)(0xd0a+4249-0x1d83)),
-((char)(0xe8a+6108-0x2646)),((char)(0x13c3+4764-0x263f)),
-((char)(0x69d+5811-0x1d30)),((char)(0xaa8+6998-0x25de)),
-((char)(0xc03+4891-0x1efe)),((char)(0xfb3+3665-0x1de4)),
-((char)(0x1adc+73-0x1b05)),((char)(0x6e5+1964-0xe71)),
-((char)(0x736+5143-0x1b2d)),((char)(0xec9+2201-0x1742)),
-((char)(0x1c92+1297-0x2182)),(0x727+6510-0x2073),((char)(0x114c+1893-0x188e)),
-(0x202+8300-0x226c),((char)(0x2618+136-0x267b)),((char)(0x1617+1750-0x1cc7)),
-(0xcf+3570-0xe9a),((char)(0x1a1c+629-0x1c69)),((char)(0x807+1228-0xcaa)),
-((char)(0xd9c+2708-0x1806)),((char)(0x1332+174-0x13b5)),
-((char)(0x841+3753-0x16be)),((char)(0xc04+4040-0x1b9f)),
-((char)(0x3b3+8416-0x2465)),((char)(0x1220+4085-0x21e6)),
-((char)(0x16cf+1528-0x1c97)),((char)(0x7b2+7606-0x2537)),
-((char)(0x4a3+7109-0x2036)),((char)(0x1178+1356-0x1691)),
-((char)(0x62f+1527-0xbf2)),((char)(0xa0f+4187-0x1a35)),
-((char)(0x1221+2721-0x1c8c)),((char)(0x42+140-0x97)),
-((char)(0x15d7+1798-0x1ca5)),((char)(0x27a+1059-0x664)),
-((char)(0x627+4556-0x17b9)),((char)(0x29c+3917-0x11ae)),
-((char)(0x13a3+4072-0x234f)),((char)(0xefa+4639-0x20dc)),
-((char)(0x867+5163-0x1c54)),((char)(0xb92+5108-0x1f47)),(0x5f1+6348-0x1ebd),
-((char)(0x638+3119-0x1226)),((char)(0xbd4+518-0xd98)),
-((char)(0x771+4182-0x1784)),((char)(0x99a+3042-0x1538)),
-((char)(0x1546+414-0x169f)),((char)(0x1889+877-0x1bb0)),
-((char)(0xcb8+5736-0x22d9)),((char)(0x8b3+6105-0x2044)),
-((char)(0x16af+2641-0x20b7)),((char)(0x23b9+372-0x24e3)),
-((char)(0xecc+1918-0x15ff)),((char)(0x3fd+6722-0x1df3)),((char)(0x79d+68-0x794))
-,((char)(0x525+2737-0xf88)),((char)(0x194c+2536-0x22e5)),
-((char)(0x394+2739-0xdf7)),((char)(0x12fa+4683-0x24f4)),
-((char)(0x6c2+4918-0x19a6)),((char)(0x140d+3459-0x213d)),
-((char)(0x1359+3991-0x229c)),((char)(0x108a+2826-0x1b3f)),
-((char)(0x920+932-0xc6e)),((char)(0x4a1+2547-0xe3d)),
-((char)(0x114b+4575-0x22d2)),((char)(0xd01+1823-0x13c7)),
-((char)(0x1540+1008-0x18d6)),6972,6959,(0x2634+509-0xcf3),(0x2335+4252-0x18bd),
-(0xd7b+291-0xe8d),((char)(0x1b76+1004-0x1f42)),((char)(0xdb1+5322-0x221a)),
-((char)(0x1405+3776-0x2263)),((char)(0x6a8+4981-0x19ba)),
-((char)(0x35a+3439-0x1065)),((char)(0x98d+118-0x99e)),
-((char)(0xa65+1539-0x1002)),((char)(0xd9f+5954-0x247a)),
-((char)(0x584+7608-0x22d4)),((char)(0x1d70+1569-0x2328)),
-((char)(0xa68+490-0xbe8)),((char)(0xf18+2841-0x19c6)),
-((char)(0x10ed+535-0x1298)),((char)(0x1301+83-0x12e7)),
-((char)(0x2a8+7085-0x1de7)),((char)(0x1622+99-0x1616)),
-((char)(0x1018+5853-0x2685)),((char)(0x71b+5082-0x1a84)),
-((char)(0x11f2+3906-0x20c2)),((char)(0xd90+359-0xe84)),
-((char)(0xd12+2047-0x149d)),((char)(0xa64+6514-0x2361)),
-((char)(0xa3a+5871-0x20b3)),((char)(0x14cd+827-0x1791)),
-((char)(0xd2d+1418-0x123f)),((char)(0xcd2+1638-0x12bf)),
-((char)(0xe99+5096-0x2207)),(0x2585+3159-0x16b4),(0x2692+1246-0x1030),6953,
-(0x25d0+4517-0x1c38),((char)(0x13d0+3192-0x2028)),((char)(0x1514+3770-0x23ae)),
-((char)(0x18e3+420-0x1a67)),((char)(0xbcf+4130-0x1bd1)),
-((char)(0x62+9112-0x23da)),((char)(0x57f+3833-0x1458)),
-((char)(0x5f4+6946-0x20f6)),((char)(0x182a+1088-0x1c4a)),
-((char)(0x8d1+6680-0x22c9)),((char)(0x8bb+1763-0xf7e)),((char)(0x44c+433-0x5dd))
-,((char)(0x1c9d+1843-0x23b0)),((char)(0x922+6169-0x211b)),
-((char)(0x2268+689-0x24f9)),((char)(0x351+3114-0xf5b)),
-((char)(0x184b+3714-0x26ad)),((char)(0x64c+1292-0xb38)),
-((char)(0x763+4568-0x191b)),((char)(0x311+7089-0x1ea2)),
-((char)(0x1b76+2379-0x24a1)),((char)(0xaa1+333-0xbce)),
-((char)(0x204+2166-0xa5a)),((char)(0x3ec+2363-0xd07)),((char)(0x83+7987-0x1f96))
-,((char)(0x634+1251-0xaf7)),((char)(0x1a33+3240-0x26bb)),
-((char)(0x10bd+3009-0x1c5e)),((char)(0xff5+1631-0x1634)),
-((char)(0x182+4467-0x12d5)),((char)(0x8bb+7271-0x2502)),
-((char)(0x1999+2893-0x24c6)),((char)(0x136+6520-0x1a8e)),
-((char)(0x681+5778-0x1cf3)),((char)(0xcfb+4094-0x1cd9)),(0x1dd4+909-0x2121),
-((char)(0xedc+589-0x1109)),(0x1087+5330-0x2558),(0x20a9+954-0x243f),
-(0x809+7492-0x254a),((char)(0x824+3853-0x1711)),(0xa4a+4259-0x1a8e),
-((char)(0x207d+1566-0x267b)),((char)(0x12b+9177-0x24e4)),
-((char)(0x1762+439-0x18f9)),((char)(0x130f+1314-0x1811)),
-((char)(0x428+2342-0xd2e)),((char)(0x934+2301-0x1211)),
-((char)(0x1513+2232-0x1dab)),((char)(0xaf7+2195-0x136a)),
-((char)(0x1933+3516-0x26cf)),((char)(0x56d+1701-0xbf2)),
-((char)(0x1291+5206-0x26c7)),((char)(0x1bb+1364-0x6ef)),
-((char)(0x20e7+718-0x2395)),((char)(0xb73+3464-0x18db)),
-((char)(0x15c7+4378-0x26c1)),((char)(0x7ff+2412-0x114b)),(0xb11+5321-0x1fcf),
-((char)(0x682+5462-0x1bb8)),((char)(0x828+6971-0x2343)),
-((char)(0xfe6+3139-0x1c09)),((char)(0x222+534-0x418)),((char)(0x4d9+159-0x558)),
-((char)(0x569+6184-0x1d71)),(0x1ae4+3031-0x265b),((char)(0x724+7881-0x25cd)),
-((char)(0x1a76+2954-0x25e0)),((char)(0x100c+3944-0x1f54)),
-((char)(0x139c+537-0x1595)),(0x11af+1866-0x189e),(0x118+1578-0x734),
-(0x1586+408-0x1702),(0x151f+4122-0x2530),((char)(0x257c+140-0x25e8)),
-(0x1072+2738-0x1b05),((char)(0x6f8+6929-0x21e9)),((char)(0x204+3557-0xfc9)),
-((char)(0x303+3630-0x1111)),((char)(0x189b+356-0x19df)),
-((char)(0xd51+1328-0x1261)),((char)(0x41b+6240-0x1c5b)),
-((char)(0x897+6844-0x2333)),(0x795+6639-0x2127),((char)(0x1d27+2135-0x255e)),
-((char)(0xa77+4905-0x1d80)),((char)(0x9c1+1354-0xeeb)),
-((char)(0x55a+8573-0x26b7)),(0x1089+5193-0x2476),((char)(0x193b+2576-0x232b)),
-((char)(0x1ed8+1274-0x23b2)),((char)(0x14bd+3619-0x22c0)),
-((char)(0x160c+936-0x1994)),((char)(0xff9+4269-0x2086)),(0x235c+734-0x25dc),
-((char)(0xbe8+5165-0x1ff5)),((char)(0x639+4368-0x1729)),(0x12c0+3479-0x2039),
-(0xe46+3250-0x1a79),((char)(0xfc1+5747-0x2614)),((char)(0x1608+1911-0x1d5f)),
-((char)(0x19fc+2515-0x23af)),(0x12b0+1237-0x170a),(0xf59+283-0x1065),
-(0xc81+5384-0x216c),((char)(0xadf+6794-0x2549)),(0x3ad+6023-0x1b30),
-(0xaaa+5632-0x20a5),((char)(0xce6+1424-0x1256)),((char)(0xeb4+3285-0x1b69)),
-(0x1282+4571-0x2456),((char)(0x1336+3694-0x2184)),((char)(0xdb8+1583-0x13c7)),
-((char)(0x801+5036-0x1b8d)),((char)(0x78f+5600-0x1d4f)),(0x106a+2174-0x186b),
-(0x541+408-0x6d1),((char)(0x736+5570-0x1cd8)),((char)(0xf7b+4837-0x2240)),
-((char)(0x181+1978-0x91b)),(0x586+1606-0xb50),((char)(0x9a+15-0x89)),
-(0x1656+1258-0x1b34),(0x699+1883-0xdee),((char)(0x17f5+3251-0x2488)),
-((char)(0x27+6116-0x17eb)),(0x577+3123-0x112c),((char)(0xc3b+2612-0x164f)),
-((char)(0x2da+7459-0x1fdd)),((char)(0x1c7+1327-0x6d6)),};const unsigned short
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0x195d+778-0x1c65)]={{
-(0x33f+6672-0x1d46),(0x14dc+4088-0x23ed)},{(0xa77+1649-0x10de),
-(0xd47+2257-0x160c)},{(0x168f+596-0x18d6),(0x328+2140-0xb77)},{
-(0x13a+9455-0x2615),(0x2af+5543-0x17f8)},{(0x420+3062-0xfee),(0x21db+666-0x23fa)
-},{(0x11f9+2538-0x1bba),(0xb03+5429-0x1fbb)},{(0x1d0b+239-0x1dcb),
-(0x1257+5047-0x25b2)},{(0x796+120-0x7d2),(0x107d+3555-0x1e05)},{
-(0x1727+346-0x1844),(0x887+3294-0x14e7)},{(0xfd6+50-0xfca),(0x528+2072-0xce3)},{
-(0xaf+2722-0xb11),(0xef0+1887-0x15d3)},{(0xb2d+5145-0x1f05),(0x299+5665-0x17f9)}
-,{(0x7d0+2797-0x1274),(0x1976+1823-0x1fc8)},{(0x154b+1611-0x1b47),
-(0x1bca+2264-0x23cf)},{(0x12f8+2636-0x1cef),(0x959+4561-0x1a50)},{
-(0x100b+2227-0x185d),(0x237+7105-0x1d17)},{(0xb0b+1422-0x1034),
-(0x21da+4774-0x13d4)},{(0x1aa+3966-0x10bf),(0x19cf+450-0x1aa4)},{
-(0x1592+511-0x1722),(0x3f0+5407-0x181c)},{(0xe6d+5861-0x24dd),
-(0x10c8+1327-0x14fd)},};const unsigned short Ucs2_To_Gsm7_SPANISH_Table_UCS[][
-(0x409+427-0x5b2)]={{(0x748+6577-0x20e9),(0xb1c+6967-0x22bf)},{(0x2f7+744-0x5cd)
-,(0x459+4074-0x109d)},{(0x55a+3635-0x137a),(0x1799+4267-0x24b1)},{
-(0xef0+4098-0x1ede),(0xae1+1332-0xc7a)},{(0x1fa1+1447-0x2533),
-(0x1deb+1111-0x1e99)},{(0x601+462-0x7b9),(0x132d+2604-0x19b9)},{
-(0x969+6145-0x2153),936},{(0x13ec+1262-0x18c2),(0x61c+3719-0x1100)},{
-(0x1d32+1234-0x21eb),(0x19ab+4031-0x25d2)},{(0x1700+520-0x18ee),
-(0xa76+2334-0xff6)},};const unsigned char Ucs2_To_Gsm7_SPANISH_Table_ASC[]={
+const_header;char g_zUfiSms_DigAscMap[(0x1beb+1705-0x2284)]={
+((char)(0x4b6+4086-0x147c)),((char)(0x15c2+3927-0x24e8)),
+((char)(0x205+6413-0x1ae0)),((char)(0xe93+3047-0x1a47)),
+((char)(0x285+2852-0xd75)),((char)(0x16c0+3952-0x25fb)),
+((char)(0xc39+4272-0x1cb3)),((char)(0x119a+1328-0x1693)),
+((char)(0xab0+732-0xd54)),((char)(0x1d9f+317-0x1ea3)),
+((char)(0xfe2+4917-0x22d6)),((char)(0x590+7627-0x2319)),
+((char)(0x10d1+1391-0x15fd)),((char)(0xe46+2279-0x16e9)),
+((char)(0x18e2+1635-0x1f00)),((char)(0x26ed+22-0x26bd))};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)(0x1c7a+962-0x201c)),((char)(0x201+4506-0x137b)),
+((char)(0xca5+5927-0x23ac)),((char)(0xf3f+79-0xf6e)),((char)(0xbb8+2625-0x15d9))
+,((char)(0x9eb+1662-0x1049)),((char)(0x703+5745-0x1d54)),
+((char)(0x222+6708-0x1c36)),((char)(0xbc9+2558-0x15a7)),
+((char)(0x124b+2533-0x1c10)),((char)(0xcca+3549-0x1a87)),
+((char)(0x1534+2988-0x20c0)),((char)(0x215+1050-0x60f)),
+((char)(0xb37+3728-0x19a7)),((char)(0x3af+4743-0x1616)),
+((char)(0x6b3+8127-0x2652)),((char)(0x7ca+3665-0x15fb)),
+((char)(0x7b8+4579-0x197b)),((char)(0x19ac+3319-0x2683)),
+((char)(0x1616+3693-0x2463)),((char)(0x40+866-0x382)),
+((char)(0x2139+1009-0x250a)),((char)(0x8f2+266-0x9dc)),
+((char)(0x1cf1+746-0x1fbb)),((char)(0x726+1772-0xdf2)),
+((char)(0x4c1+3208-0x1129)),((char)(0x1992+1754-0x204c)),
+((char)(0x11d4+3022-0x1d82)),((char)(0xea8+124-0xf04)),
+((char)(0x24f7+37-0x24fc)),((char)(0x1435+4530-0x25c7)),
+((char)(0x149+8328-0x21b1)),((char)(0x121c+1566-0x181a)),
+((char)(0x2d8+5417-0x17e0)),(0xb9c+4738-0x1dfc),((char)(0x2552+241-0x2620)),
+(0x3af+5529-0x1946),((char)(0xd1c+2670-0x1765)),((char)(0x189a+3428-0x25d8)),
+(0x453+2887-0xf73),((char)(0x860+3991-0x17cf)),((char)(0x1c10+621-0x1e54)),
+((char)(0x66d+736-0x923)),((char)(0x217+3457-0xf6d)),((char)(0x1ba0+230-0x1c5a))
+,((char)(0x6f+1502-0x620)),((char)(0xb87+420-0xcfd)),((char)(0x23b5+565-0x25bb))
+,((char)(0x125f+4789-0x24e4)),((char)(0xb7d+6459-0x2487)),
+((char)(0x1756+1607-0x1d6b)),((char)(0x58c+7185-0x216a)),
+((char)(0x640+5341-0x1ae9)),((char)(0x1e3+7555-0x1f31)),
+((char)(0x1b9+8478-0x22a1)),((char)(0x537+2474-0xeaa)),
+((char)(0x724+4375-0x1803)),((char)(0x2e7+8857-0x2547)),
+((char)(0x1577+1983-0x1cfc)),((char)(0xf27+5487-0x245b)),
+((char)(0x222a+245-0x22e3)),((char)(0x1317+2146-0x1b3c)),
+((char)(0x1819+3166-0x2439)),((char)(0x18b+425-0x2f5)),(0x4c8+4741-0x174d),
+((char)(0x7b7+3598-0x1584)),((char)(0x51f+2395-0xe38)),
+((char)(0x193c+1339-0x1e34)),((char)(0x86c+922-0xbc2)),
+((char)(0x422+4924-0x1719)),((char)(0x449+3350-0x1119)),
+((char)(0xb6d+988-0xf02)),((char)(0xffb+5096-0x239b)),
+((char)(0x505+6936-0x1fd4)),((char)(0xcba+4570-0x1e4a)),
+((char)(0x3dc+5833-0x1a5a)),((char)(0x992+1490-0xf18)),
+((char)(0x6a0+2943-0x11d2)),((char)(0xdec+3685-0x1c03)),
+((char)(0x779+1726-0xde8)),((char)(0x13e4+2431-0x1d13)),
+((char)(0x1118+5066-0x2491)),((char)(0x38d+1597-0x978)),
+((char)(0x25a9+330-0x26a0)),((char)(0x623+5924-0x1cf3)),
+((char)(0x1092+31-0x105c)),((char)(0x186d+1117-0x1c74)),
+((char)(0x107+6021-0x1835)),((char)(0x7a+507-0x21d)),
+((char)(0x1b0f+1968-0x2266)),((char)(0x1197+1672-0x17c5)),(0x2293+3040-0x1337),
+6959,6974,6932,(0x448+2537-0xe20),((char)(0x6c+2983-0xbf3)),
+((char)(0x23c3+722-0x2634)),((char)(0x582+4633-0x1739)),
+((char)(0x13c4+942-0x170f)),((char)(0x1f70+1869-0x2659)),
+((char)(0x314+8987-0x25ca)),((char)(0x1586+3984-0x24b0)),
+((char)(0x1561+96-0x155a)),((char)(0xc2f+4134-0x1bed)),
+((char)(0x14c+2148-0x947)),((char)(0x15ab+451-0x1704)),
+((char)(0x126d+2026-0x19ec)),((char)(0x5c3+7231-0x2196)),
+((char)(0x148+3454-0xe59)),((char)(0x9fa+3984-0x191c)),
+((char)(0xa64+6882-0x24d7)),((char)(0x7fb+6975-0x22ca)),
+((char)(0x640+2654-0x102d)),((char)(0xc88+2865-0x1747)),
+((char)(0x559+2097-0xd17)),((char)(0x6ea+1685-0xd0b)),((char)(0x9cc+1589-0xf8c))
+,((char)(0x2586+435-0x26c3)),((char)(0xda6+3381-0x1a64)),
+((char)(0x716+5604-0x1c82)),((char)(0x19d4+3076-0x255f)),
+((char)(0x1c5a+2022-0x23c6)),6952,6976,6953,6973,((char)(0x13a8+932-0x172c)),
+((char)(0x10b0+5561-0x2649)),((char)(0x174a+172-0x17d6)),
+((char)(0xc30+3222-0x18a6)),((char)(0x2b2+5073-0x1663)),
+((char)(0x9b2+4465-0x1b03)),((char)(0x17ab+148-0x181f)),
+((char)(0xce4+1305-0x11dd)),((char)(0xb08+4997-0x1e6d)),
+((char)(0x1cd3+2235-0x256e)),((char)(0x434+6595-0x1dd7)),
+((char)(0x796+1252-0xc5a)),((char)(0x1a89+625-0x1cda)),
+((char)(0x747+2190-0xfb5)),((char)(0x911+6954-0x241b)),
+((char)(0x1f29+333-0x2056)),((char)(0x48d+8227-0x2490)),
+((char)(0x657+5562-0x1bf1)),((char)(0x95a+7040-0x24ba)),
+((char)(0x42c+1261-0x8f9)),((char)(0xcc5+594-0xef7)),((char)(0x524+8692-0x26f8))
+,((char)(0x1660+3734-0x24d6)),((char)(0x3b8+896-0x718)),((char)(0x86+859-0x3c1))
+,((char)(0x21c9+936-0x2551)),((char)(0x19c7+1587-0x1fda)),
+((char)(0xda9+435-0xf3c)),((char)(0xd3b+4614-0x1f21)),
+((char)(0x570+6359-0x1e27)),((char)(0x1354+454-0x14fa)),
+((char)(0x13c5+3061-0x1f9a)),((char)(0x1275+2739-0x1d08)),
+((char)(0x58d+470-0x743)),(0x5a7+7917-0x2454),((char)(0x1065+1397-0x15ba)),
+(0x107b+2347-0x19a5),(0x6f5+2571-0x10dc),(0x740+1702-0xde3),
+((char)(0x2078+743-0x233f)),(0x21bb+1186-0x25fe),((char)(0x4b8+8447-0x2597)),
+((char)(0x18d5+1360-0x1e05)),((char)(0x2421+573-0x263e)),
+((char)(0x2e2+7675-0x20bd)),((char)(0x2d0+946-0x662)),
+((char)(0x1679+2114-0x1e9b)),((char)(0xca4+523-0xe8f)),
+((char)(0x1268+2844-0x1d64)),((char)(0x1073+3097-0x1c6c)),
+((char)(0x22b+5931-0x1936)),((char)(0xcc8+902-0x102e)),
+((char)(0x16f6+1631-0x1d35)),((char)(0x1f5b+1013-0x2330)),
+((char)(0x177d+168-0x1805)),((char)(0x13e6+1336-0x18fe)),
+((char)(0x1a6f+1226-0x1f19)),(0x804+3136-0x1439),((char)(0x6c0+5810-0x1d52)),
+((char)(0xb6b+883-0xebe)),((char)(0x9f2+3326-0x16d0)),
+((char)(0x280+4702-0x14be)),((char)(0x974+19-0x967)),
+((char)(0x1b10+1441-0x2091)),(0x14eb+3108-0x20af),((char)(0x95b+3872-0x185b)),
+((char)(0x3cf+1657-0xa28)),((char)(0x7e7+2259-0x109a)),
+((char)(0x557+8572-0x26b3)),(0x1772+1153-0x1b98),(0x10c1+1331-0x15e6),
+(0x146c+1194-0x18fa),(0x1448+2291-0x1d32),((char)(0xc4b+859-0xf86)),
+(0xd7f+3588-0x1b64),((char)(0x1572+1172-0x19e6)),((char)(0x658+452-0x7fc)),
+((char)(0x7d1+7254-0x2407)),((char)(0xe1f+2832-0x190f)),
+((char)(0x52c+4348-0x1608)),((char)(0x1262+389-0x13c7)),
+((char)(0x94f+3693-0x179c)),(0xd66+1586-0x133b),((char)(0xe36+4293-0x1edb)),
+((char)(0xb91+5547-0x211c)),((char)(0xa52+223-0xb11)),
+((char)(0x152f+3380-0x2243)),(0x1448+185-0x14a5),((char)(0x62+4024-0xffa)),
+((char)(0x870+797-0xb6d)),((char)(0x8a0+5261-0x1d0d)),
+((char)(0xca4+5019-0x201f)),((char)(0x1fec+589-0x2219)),(0xa6d+727-0xce6),
+((char)(0xe6c+5600-0x242c)),((char)(0xa33+5751-0x208a)),(0x52b+4474-0x1687),
+(0x7d0+3856-0x1661),((char)(0x18c6+3086-0x24b4)),((char)(0x4b1+5325-0x195e)),
+((char)(0x1b37+2861-0x2644)),(0xdc8+2547-0x1740),(0x387+8509-0x24b5),
+(0x166b+1055-0x1a6d),((char)(0xd5c+327-0xe83)),(0xb34+2842-0x164a),
+(0x6fc+114-0x769),((char)(0x76f+6781-0x21cc)),((char)(0x396+7821-0x2203)),
+(0x1ce3+2038-0x24d2),((char)(0x5c3+7934-0x24a1)),((char)(0xb95+5814-0x222b)),
+((char)(0x565+2384-0xe95)),((char)(0x98+7112-0x1c40)),(0x369+1416-0x874),
+(0xdad+2381-0x16f2),((char)(0xd88+3896-0x1ca0)),((char)(0x19eb+1366-0x1f21)),
+((char)(0x15da+2678-0x2030)),(0x16c6+292-0x176e),((char)(0x1123+3548-0x1edf)),
+(0x780+209-0x845),(0x7dc+6724-0x221a),((char)(0x117b+913-0x14ec)),
+((char)(0x481+7327-0x2100)),(0x9bd+3417-0x1698),((char)(0x15d9+2355-0x1eec)),
+((char)(0xa89+2935-0x15e0)),((char)(0x6cd+3807-0x158c)),};const unsigned short
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0x9f4+123-0xa6d)]={{(0x742+4105-0x1742)
+,(0x243+1518-0x74a)},{(0x1d64+2174-0x25d8),(0x609+6037-0x1d92)},{
+(0x3c+6595-0x19f2),(0x1dd+3456-0xf50)},{(0xa45+1106-0xe83),(0x18ca+1757-0x1f49)}
+,{(0x9e0+1189-0xe5d),(0x1b87+989-0x1ee9)},{(0x11fa+3381-0x1f06),
+(0xee0+5638-0x2469)},{(0x1b7f+2269-0x242d),(0xca0+3499-0x19ef)},{
+(0x1589+2603-0x1f78),(0x14e5+1392-0x19fa)},{(0x13b+6913-0x1bff),
+(0xcd2+3065-0x184d)},{(0x3b2+4795-0x162f),(0xdc6+1397-0x12de)},{
+(0x9ab+771-0xc6e),(0x445+5-0x3ce)},{(0x25c+3804-0x10f7),(0x1e81+1443-0x2363)},{
+(0x18c+9129-0x24ec),(0x13b+3916-0xfba)},{(0x15a7+4184-0x25b0),
+(0x11b3+2235-0x199b)},{(0xb7c+3955-0x1a9a),(0x4e2+7515-0x2163)},{
+(0x2e3+9306-0x26dc),(0xb25+6840-0x24fc)},{(0x938+677-0xb78),8364},{
+(0xac3+7153-0x264b),(0x36d+7624-0x2048)},{(0x1409+2129-0x1beb),
+(0x325+4242-0x12c4)},{(0x1639+3721-0x244d),(0x1907+715-0x1ad8)},};const unsigned
+ short Ucs2_To_Gsm7_SPANISH_Table_UCS[][(0xe8f+5563-0x2448)]={{(0xab2+125-0xb1f)
+,(0x8e7+4344-0x164b)},{(0x387+7422-0x2073),(0x67a+8755-0x2507)},{
+(0x1acc+2078-0x22d7),(0x954+5369-0x1aba)},{(0x137b+2966-0x1efd),
+(0xa12+1012-0xa6b)},{(0x11b0+4516-0x233f),(0xa63+3467-0x1445)},{
+(0x1549+3906-0x2475),(0xdb9+3382-0x174f)},{(0x32+8315-0x2096),
+(0x221b+331-0x1fbe)},{(0xbc4+3273-0x1875),(0x96b+8184-0x25c0)},{
+(0x1aa0+3120-0x26b7),(0xd27+2178-0x1211)},{(0x7b8+4926-0x1adc),
+(0x11fc+546-0x1080)},};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,
-(0x1f1+7695-0x1ff6),NON_GSM,NON_GSM,(0x1c9+2144-0xa1c),NON_GSM,NON_GSM,NON_GSM,
+(0x394+2118-0xbd0),NON_GSM,NON_GSM,(0x4ef+7688-0x22ea),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,(0x7fc+4067-0x17bf),(0xaa4+4648-0x1cab),
-(0xc14+2614-0x1628),(0x7d6+7587-0x2556),(0xb77+2085-0x139a),(0x9a7+4866-0x1c84),
-(0x10d2+2357-0x19e1),(0x65c+6749-0x2092),(0x1212+2136-0x1a42),
-(0x181c+2773-0x22c8),(0x357+5862-0x1a13),(0xa25+4504-0x1b92),(0x21b+5868-0x18db)
-,(0x11f8+4474-0x2345),(0x3d9+3405-0x10f8),(0x18e2+506-0x1aad),
-(0x65a+6719-0x2069),(0xb9c+640-0xdeb),(0xe3b+618-0x1073),(0x1d61+26-0x1d48),
-(0x182+2339-0xa71),(0xb95+5728-0x21c0),(0x1090+1862-0x17a0),(0x234+5801-0x18a6),
-(0x166f+3105-0x2258),(0x99a+3157-0x15b6),(0x1b1c+724-0x1db6),(0x531+3867-0x1411)
-,(0x1963+2309-0x222c),(0x16c0+1205-0x1b38),(0xec9+1942-0x1621),
-(0x11f3+3222-0x1e4a),(0x1b3d+864-0x1e9d),(0x7a9+3634-0x159a),(0x19b+6293-0x19ee)
-,(0xda+7400-0x1d7f),(0x76+348-0x18e),(0x1d69+243-0x1e17),(0x10ea+4062-0x2082),
-(0xc31+2316-0x14f6),(0xd38+5773-0x237d),(0x257+2861-0xd3b),(0x1293+1328-0x1779),
-(0x5f1+2655-0x1005),(0xe3c+1270-0x12e6),(0x99+4061-0x1029),(0x16e0+3034-0x226c),
-(0x1437+160-0x1488),(0x434+8410-0x24be),(0x5a+1848-0x741),(0xe46+5982-0x2552),
-(0x1057+1395-0x1577),(0x11f+4718-0x1339),(0x1a0d+2228-0x226c),
-(0x1511+2288-0x1dab),(0x1509+3997-0x244f),(0xcb+5162-0x149d),(0x43d+7146-0x1fce)
-,(0x328+7666-0x20c0),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xbf5+2938-0x175e),NON_GSM
-,(0x928+6028-0x2053),(0x164c+3642-0x2424),(0x9e0+1687-0x1014),
-(0xe22+2776-0x1896),(0xfb+4093-0x1093),(0x1ea3+1612-0x2489),(0x655+6400-0x1eee),
-(0xbef+6780-0x2603),(0x5dc+8281-0x25cc),(0x16d1+3632-0x2497),(0x9d6+316-0xaa7),
-(0x149c+85-0x1485),(0x6f7+1520-0xc7a),(0x1612+335-0x16f3),(0xb0+8784-0x2291),
-(0x481+3059-0x1004),(0x188f+3399-0x2565),(0xdcb+6057-0x2502),
-(0x1965+3469-0x267f),(0x6af+7438-0x2349),(0x761+2222-0xf9a),(0x60d+204-0x663),
-(0xcb5+3260-0x18fa),(0xf5d+1591-0x151c),(0x1953+1578-0x1f04),(0x1ea0+612-0x208a)
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xdb8+3986-0x1d2a),(0x1270+2325-0x1b64)
+,(0xc59+969-0x1000),(0x1b50+2018-0x230f),(0x82f+621-0xa9a),(0x13a4+1430-0x1915),
+(0x140f+2275-0x1ccc),(0x10b3+840-0x13d4),(0xcd4+931-0x104f),(0x109b+3975-0x1ff9)
+,(0x812+469-0x9bd),(0x358+8565-0x24a2),(0x1d94+717-0x2035),(0x1fc7+1274-0x2494),
+(0x751+4394-0x184d),(0x17a1+517-0x1977),(0x1e20+1220-0x22b4),(0x683+5388-0x1b5e)
+,(0x1749+3633-0x2548),(0x1bb+4374-0x129e),(0x1303+148-0x1363),(0x6d8+491-0x88e),
+(0x89a+258-0x966),(0x363+4029-0x12e9),(0x1d4+8721-0x23ad),(0x703+8094-0x2668),
+(0x709+6635-0x20ba),(0x16b+7566-0x1ebe),(0x786+5530-0x1ce4),(0xf1f+1338-0x141c),
+(0x54b+7108-0x20d1),(0x166a+2289-0x1f1c),(0x233d+491-0x2528),(0xe2b+5439-0x2329)
+,(0x1a25+1229-0x1eb0),(0x762+2753-0x11e0),(0x17c+4679-0x137f),
+(0x1151+4295-0x21d3),(0x39b+3103-0xf74),(0x7e5+102-0x804),(0x1442+1431-0x1991),
+(0xe09+5999-0x252f),(0xfd7+695-0x1244),(0x481+3660-0x1282),(0x338+8716-0x24f8),
+(0x1ac2+2175-0x22f4),(0x1594+523-0x1751),(0x471+8582-0x25a8),
+(0x1b34+2393-0x243d),(0x857+3464-0x158e),(0xbc+4038-0x1030),(0xd2c+1786-0x13d3),
+(0x976+3766-0x17d8),(0xe60+6211-0x264e),(0x17cf+3046-0x235f),
+(0x12a2+3616-0x206b),(0x545+1212-0x9a9),(0xcab+4244-0x1ce6),(0x6bb+6243-0x1ec4),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1480+4500-0x2603),NON_GSM,
+(0x1286+2773-0x1cfa),(0xc54+1562-0x120c),(0x17cc+1670-0x1def),(0x1212+30-0x11cc)
+,(0x160c+2004-0x1d7b),(0xe42+4033-0x1d9d),(0xad8+6962-0x25a3),
+(0x725+3943-0x1624),(0x1a22+2600-0x23e1),(0xf87+5457-0x246e),(0x21bd+940-0x24fe)
+,(0x159+276-0x201),(0x1148+4666-0x2315),(0x1465+571-0x1632),(0x2174+1098-0x254f)
+,(0x1f82+1412-0x2496),(0x119b+5489-0x269b),(0xb97+5497-0x209e),
+(0x16a3+2792-0x2118),(0xc55+4638-0x1dff),(0x589+3197-0x1191),(0x757+1368-0xc39),
+(0x4db+6229-0x1cb9),(0x1c3f+305-0x1cf8),(0x24f8+233-0x2568),(0x531+3969-0x1438),
+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,(0x10d2+350-0x1215),
+(0x933+2713-0x138c),NON_GSM,(0x62+2458-0x9fb),(0x190f+2701-0x2378),
+(0xcd2+4108-0x1cdb),NON_GSM,(0x1b57+1135-0x1f67),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,
+(0x24ab+312-0x2583),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x6d7+5640-0x1c84),
+(0x1e6+533-0x3ed),(0x67c+3433-0x13c9),(0x226+4410-0x1357),NON_GSM,
+(0x39b+901-0x701),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0x1338+4165-0x2320),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xd53+2255-0x15c6),NON_GSM
+,(0x1587+3023-0x214b),NON_GSM,NON_GSM,NON_GSM,(0x203b+654-0x226b),NON_GSM,
+NON_GSM,(0x1ae5+738-0x1da9),(0xac7+151-0xadf),NON_GSM,NON_GSM,NON_GSM,
+(0x20d6+1692-0x26f7),(0x50a+99-0x55e),(0x3bf+3265-0x1063),NON_GSM,
+(0xc2c+5814-0x22de),(0x19e8+858-0x1d3d),NON_GSM,NON_GSM,(0x68+5662-0x167f),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x10cb+4780-0x22fa),(0x89c+1089-0xcd5),NON_GSM,
+NON_GSM,NON_GSM,(0x14b9+4761-0x26d6),NON_GSM,(0x99d+4945-0x1ce2),
+(0xf37+2019-0x1714),NON_GSM,NON_GSM,(0x1004+1766-0x166c),NON_GSM,NON_GSM,NON_GSM
+};const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][
+(0x1878+604-0x1ad2)]={{(0x1603+888-0x1976),(0x3d3+1487-0x8b8)},{
+(0x1eb+359-0x349),(0x153+5482-0x15d6)},{(0x76c+545-0x983),(0x7d6+4038-0x1790)},{
+(0x247+2653-0xc99),(0x116f+4208-0x210b)},{(0xc63+2165-0x14cc),(0x592+1622-0xaf4)
+},{(0x102d+3409-0x1d71),(0xc94+638-0xf05)},{(0x886+1156-0xcfc),
+(0x1632+3588-0x2375)},{(0x1a47+2191-0x22c7),(0x2d6+5973-0x194a)},{
+(0xd82+3645-0x1bad),(0xebd+167-0xbbe)},{(0x121d+2600-0x1c32),(0xd55+5305-0x1e7b)
+},{(0x1eb4+1248-0x2380),(0x1605+2614-0x1fdd)},{(0xb32+1930-0x12a7),
+(0x4d9+6567-0x1ad7)},{(0x472+6740-0x1eb0),(0x8c1+6809-0x1fba)},{
+(0x18f7+1703-0x1f87),(0x945+7789-0x240a)},{(0x90+1726-0x736),(0x41c+2102-0x8af)}
+,{(0xb29+4942-0x1e5e),920},{(0x15f1+3365-0x22f7),(0xd3a+552-0xe98)},{
+(0x150f+1460-0x1a9b),(0x13b9+4755-0x25d1)},{(0x90a+5211-0x1d3c),
+(0x113b+4805-0x2383)},{(0xb93+7075-0x2707),(0x11d4+537-0x1391)},{
+(0x843+1365-0xd5c),(0x20e8+1289-0x2596)},{(0x114c+4907-0x243a),
+(0x93c+6814-0x235c)},{(0x65d+5659-0x1c3a),(0x125a+4604-0x23f9)},{
+(0x4bd+7673-0x2276),(0x45f+3364-0x1107)},{(0xe92+2372-0x1795),
+(0x1125+2456-0x19fd)},{(0x144f+3577-0x21ff),(0x326+3889-0x118a)},{
+(0xec3+1104-0x12c4),(0xdb0+5869-0x23ca)},{(0x6ff+5990-0x1e10),
+(0xbc4+5689-0x2123)},{(0x8f2+4949-0x1bec),(0x16f3+1596-0x1c6c)},{
+(0x4d4+463-0x647),(0x62a+3906-0x1497)},{(0x1067+5286-0x24ac),(0x90c+1530-0xe44)}
+,{(0x103+6870-0x1b74),8364},{(0x1a46+2455-0x2374),(0x180+4973-0x1400)},{
+(0x8aa+4924-0x1b77),(0x55a+1429-0x9fc)},{(0x4b9+1240-0x91c),(0x137a+4722-0x24f2)
+},{(0x625+7143-0x2191),(0x14f1+4676-0x2652)},{(0xaa6+2708-0x14be),
+(0x11a2+2173-0x192a)},{(0xdbf+1476-0x1304),(0xfd8+99-0xf59)},};const unsigned
+short Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0x976+4622-0x1b82)]={{
+(0x1853+843-0x1b8e),(0x45c+8295-0x212f)},{(0x413+576-0x63e),8929},{
+(0x16a4+4126-0x26aa),8364},{(0x2e1+5415-0x17a3),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,(0x17cc+3896-0x26fa),NON_GSM,NON_GSM,
+(0x139b+3837-0x228b),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,(0xb43+5337-0x1ffc),(0x1e27+649-0x208f),(0x5ea+5838-0x1c96),
+(0xc6a+4770-0x1ee9),(0xe7c+3461-0x1bff),(0x1ad9+1559-0x20cb),(0xef6+845-0x121d),
+(0xba2+2475-0x1526),(0x17e2+1180-0x1c56),(0xdb8+6042-0x2529),(0x93+2776-0xb41),
+(0xc5d+4358-0x1d38),(0x96b+2147-0x11a2),(0xf98+2659-0x19ce),(0x1317+3407-0x2038)
+,(0x1ba7+2023-0x235f),(0x1692+3123-0x2295),(0x700+7249-0x2320),
+(0x694+1148-0xade),(0x616+1489-0xbb4),(0x6da+6071-0x1e5d),(0x24d+1634-0x87a),
+(0xebd+3697-0x1cf8),(0x104d+3879-0x1f3d),(0x5d9+5151-0x19c0),
+(0x14bd+1805-0x1b91),(0xb3+9724-0x2675),(0x12ad+3494-0x2018),
+(0x19b3+1716-0x202b),(0x1214+514-0x13d9),(0xceb+5688-0x22e5),(0x7fd+3930-0x1718)
+,(0x19d+427-0x348),(0x23c7+128-0x2406),(0x10e8+2705-0x1b37),(0x1a27+321-0x1b25),
+(0xce1+5792-0x233d),(0x6d9+6312-0x1f3c),(0x689+4330-0x172d),(0x231+8-0x1f2),
+(0xf0b+1511-0x14aa),(0x303+324-0x3fe),(0x1a9+3045-0xd44),(0xdea+3428-0x1b03),
+(0x2105+857-0x2412),(0x1d0+7559-0x1f0a),(0x24a7+587-0x26a4),(0x6cc+7143-0x2264),
+(0x6b9+1813-0xd7e),(0x18b2+2214-0x2107),(0x1934+1035-0x1ced),
+(0x17a5+1251-0x1c35),(0x3e7+4628-0x15a7),(0xb1f+1814-0x11e0),(0x3e7+6521-0x1d0a)
+,(0x1440+444-0x15a5),(0x1324+634-0x1546),(0xe21+849-0x1119),(0x10ec+1447-0x1639)
+,NON_GSM,(0xfad+2771-0x1a69),NON_GSM,(0x1b7+2973-0xd3e),(0x3cb+1701-0xa5f),
+(0x1e5c+578-0x2021),(0x8ea+3613-0x16a6),(0x21f3+748-0x247d),(0x135+2260-0x9a6),
+(0x1902+3390-0x25dc),(0xe45+2652-0x183c),(0x772+7134-0x22ea),(0xd8f+2513-0x16f9)
+,(0x88b+6406-0x2129),(0x852+1316-0xd0d),(0x80b+3995-0x173c),(0x244+3334-0xedf),
+(0x199d+365-0x1a9e),(0x371+837-0x649),(0x2f7+7981-0x21b6),(0x18cd+2343-0x2185),
+(0x13e5+2222-0x1c23),(0x9da+6595-0x232c),(0x85a+101-0x84d),(0x32d+6770-0x1d2c),
+(0x15ab+2606-0x1f65),(0x1392+3829-0x2212),(0x11c+8998-0x23cc),(0x1ec+1596-0x7b1)
+,(0x642+3881-0x14f3),(0x290+1866-0x961),(0x1a54+3226-0x2674),NON_GSM,
+(0xc02+3706-0x1a62),NON_GSM,(0x1009+5000-0x2331),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,NON_GSM,(0xce9+1455-0x127d),
-(0x853+4535-0x19ca),NON_GSM,(0x92+5352-0x1579),(0x269+8728-0x245d),
-(0x185+8602-0x231c),NON_GSM,(0x84d+2934-0x1364),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,
+(0xf24+5661-0x2526),NON_GSM_P,NON_GSM,(0x1789+2728-0x2230),NON_GSM_P,
+(0x3a5+3111-0xfc9),NON_GSM,(0x183b+192-0x189c),NON_GSM,NON_GSM,
+(0xf3d+5028-0x22cf),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x359+8532-0x2489),
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,
-(0xc53+1849-0x132c),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xb91+4131-0x1b59),
-(0x118f+2290-0x1a73),(0x12a1+4603-0x2480),(0x278+6005-0x19e4),NON_GSM,
-(0x12a+4386-0x122d),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x932+5363-0x1dc8),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x939+7041-0x245e),NON_GSM,
-(0xc93+3233-0x1929),NON_GSM,NON_GSM,NON_GSM,(0x1f4+3160-0xdee),NON_GSM,NON_GSM,
-(0x845+3046-0x140d),(0x13f3+2800-0x1e64),NON_GSM,NON_GSM,NON_GSM,
-(0xa5c+1994-0x11ab),(0x1e6+7696-0x1fe7),(0x389+4200-0x13d4),NON_GSM,
-(0xe49+1134-0x12b3),(0x292+6084-0x1a51),NON_GSM,NON_GSM,(0xb48+1975-0x12f8),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x9b3+4541-0x1af3),(0x1722+586-0x1964),NON_GSM,
-NON_GSM,NON_GSM,(0x188c+396-0x199c),NON_GSM,(0x498+4156-0x14c8),
-(0x28+7537-0x1d93),NON_GSM,NON_GSM,(0x262+4742-0x146a),NON_GSM,NON_GSM,NON_GSM};
-const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][
-(0x22b8+670-0x2554)]={{(0x17c9+1060-0x1be8),(0x11f3+627-0x137c)},{
-(0xa42+6245-0x229e),(0x146b+655-0x1613)},{(0x1e1a+947-0x21c3),(0x23+9185-0x23f8)
-},{(0x71c+4821-0x19e6),(0x1030+2035-0x174f)},{(0x9ba+462-0xb7c),
-(0x1b17+3064-0x261b)},{(0x1af6+2563-0x24ec),(0x73d+3321-0x1429)},{
-(0x38c+5117-0x177b),(0x1ddb+858-0x2074)},{(0x9b4+6912-0x24a5),
-(0x146c+213-0x1460)},{(0x40+8693-0x2223),(0x1558+2674-0x1c24)},{
-(0x139f+555-0x15b7),(0x439+5918-0x17c4)},{(0x3d3+3965-0x133c),(0x912+675-0xb57)}
-,{(0xddb+5464-0x231e),(0xf02+6870-0x262f)},{(0x15f4+2399-0x1f3d),
-(0xddd+6247-0x22a4)},{(0x3f7+8643-0x25a3),(0x1dda+2545-0x2423)},{
-(0xba8+5969-0x22e1),(0xf3b+1741-0x1265)},{(0x1473+33-0x147b),
-(0x1d27+2185-0x2218)},{(0x2a4+8556-0x23f1),(0x1118+4578-0x2230)},{
-(0x7d3+4035-0x176e),(0x16ec+2928-0x21e1)},{(0x13d0+600-0x15ff),
-(0xf02+868-0x11e9)},{(0x548+5629-0x1b16),(0xc6b+5962-0x2359)},{(0x877+93-0x898),
-(0x964+3498-0x16b3)},{(0x863+2992-0x13d6),(0x1a65+2442-0x2371)},{
-(0xf61+4415-0x2062),(0x1d08+796-0x1fc7)},{(0x1e9f+1665-0x24e0),
-(0x710+3617-0x14b5)},{(0xaf6+2702-0x1543),(0x1631+3662-0x23bf)},{
-(0x2cb+2187-0xb0d),(0x1455+2560-0x1d88)},{(0x3e3+7714-0x21b6),(0xff4+769-0x1222)
-},{(0x144f+2359-0x1d31),(0x9af+6886-0x23bb)},{(0x786+3875-0x164e),
-(0x20d5+1729-0x26d3)},{(0x763+809-0xa30),(0x1c60+770-0x1e8d)},{
-(0x741+4013-0x168d),(0xba3+2574-0x14ef)},{(0x1de4+1412-0x2303),8364},{
-(0x5d9+4548-0x1734),(0x1341+3910-0x219a)},{(0x1268+3238-0x1e9f),
-(0x5e8+1787-0xbf0)},{(0x1f52+1154-0x235f),(0x254+7315-0x1ded)},{
-(0x1224+4796-0x2465),(0x2fa+189-0x2d4)},{(0x157a+2377-0x1e47),(0x8cc+419-0x97a)}
-,{(0xbf6+652-0xe03),(0x777+7680-0x2495)},};const unsigned short
-Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0x1edb+971-0x22a4)]={{(0xe65+6022-0x25db),
-(0x629+5835-0x1960)},{(0xdf3+538-0xff8),(0x2705+574-0x662)},{
-(0x16b7+1022-0x1a9d),(0x21e9+3310-0xe2b)},{(0x12b0+201-0x1314),
-(0x25d9+7729-0x235e)},};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
-,(0x3b4+5657-0x19c3),NON_GSM,NON_GSM,(0x824+1165-0xca4),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,(0x184+3924-0x10b8),(0x842+3409-0x1572),
-(0x738+2261-0xfeb),(0x349+3699-0x1199),(0x8a2+6703-0x22cf),(0x44a+7559-0x21ac),
-(0x6cf+890-0xa23),(0x1ee8+2043-0x26bc),(0x11ed+2832-0x1cd5),(0x7c9+5536-0x1d40),
-(0x3aa+7921-0x2271),(0x956+3211-0x15b6),(0x1af+348-0x2df),(0x12c5+213-0x136d),
-(0x631+8109-0x25b0),(0x503+1617-0xb25),(0x1842+18-0x1824),(0x1095+3768-0x1f1c),
-(0x1732+532-0x1914),(0x1044+736-0x12f1),(0x199+515-0x368),(0xb20+4551-0x1cb2),
-(0x6e7+1676-0xd3d),(0x1805+2818-0x22d0),(0x8a7+1409-0xdf0),(0xb19+5500-0x205c),
-(0xe6b+4671-0x2070),(0x9c+8849-0x22f2),(0x1a44+459-0x1bd3),(0x7a+4000-0xfdd),
-(0xa49+2854-0x1531),(0x26f+1574-0x856),(0x4a2+2902-0xff8),(0x18a8+2150-0x20cd),
-(0xc98+3382-0x198c),(0xd02+3135-0x18fe),(0x1d58+2070-0x252a),
-(0x159a+3561-0x233e),(0x1a42+947-0x1daf),(0x52a+7434-0x21ed),
-(0x1978+1429-0x1ec5),(0x7df+7807-0x2615),(0x951+6338-0x21c9),(0xaa2+69-0xa9c),
-(0x21df+667-0x242e),(0xfb+6988-0x1bfa),(0x1d5a+704-0x1fcc),(0x2218+916-0x255d),
-(0x10e9+1340-0x15d5),(0xea5+3592-0x1c5c),(0xb11+6980-0x2603),
-(0x1092+1582-0x166d),(0x24b9+316-0x25a1),(0x22c2+964-0x2631),(0x5aa+7397-0x2239)
-,(0x9e4+4665-0x1bc6),(0x56f+6696-0x1f3f),(0x184d+926-0x1b92),(0x721+1269-0xbbc),
-NON_GSM,(0x1343+4833-0x260d),NON_GSM,(0x1788+774-0x1a78),(0xc13+4419-0x1d45),
-(0x13df+3303-0x2049),(0xc65+214-0xcda),(0x9e9+2256-0x1257),(0xe99+3296-0x1b16),
-(0x2289+1038-0x2633),(0x1847+3856-0x26f2),(0x1733+3049-0x22b6),
-(0x19d7+2002-0x2142),(0x576+1470-0xacc),(0x1c26+457-0x1d86),(0xf63+5571-0x24bc),
-(0x10b1+5107-0x2439),(0x294+6832-0x1cd8),(0xa06+3458-0x171b),(0xa2d+517-0xbc4),
-(0x7eb+7312-0x240c),(0x53c+8181-0x24c1),(0xe47+4720-0x2046),(0x3fd+7822-0x2219),
-(0x1dc8+276-0x1e69),(0x1a36+3143-0x2609),(0x11c4+2448-0x1adf),
-(0x1a87+3136-0x2651),(0x2d0+4938-0x15a3),(0x2c9+5269-0x16e6),
-(0x1907+3237-0x2533),(0x1c23+2862-0x26d7),NON_GSM,(0x787+5776-0x1dfd),NON_GSM,
-(0x11d7+280-0x128f),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,(0xcb3+1859-0x13db),NON_GSM_P,
-NON_GSM,(0x997+1209-0xe4f),NON_GSM_P,(0x189a+653-0x1b24),NON_GSM,
-(0x240c+814-0x26db),NON_GSM,NON_GSM,(0x11b8+2612-0x1bda),NON_GSM,NON_GSM,NON_GSM
-,NON_GSM,NON_GSM,(0x601+6999-0x2134),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,
-(0x83f+7638-0x2601),(0xe2a+1557-0x1431),(0x12bf+4115-0x22b6),
-(0x1163+3729-0x1f99),NON_GSM_P,NON_GSM_P,NON_GSM_P,(0xb3d+5519-0x20b9),NON_GSM,
-(0x34f+1848-0xa68),(0x9d4+3704-0x182e),NON_GSM,NON_GSM,(0x4fc+3322-0x11b6),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM,(0x8b+4065-0x1053),(0xc06+6346-0x24c5)
-,(0xe92+5761-0x24b7),NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM,(0x1293+2798-0x1d24),
-NON_GSM,(0x1e05+1992-0x256f),NON_GSM,NON_GSM,NON_GSM_P,(0xa34+4197-0x1a1a),
-(0x6b7+6096-0x1e78),(0x243+8114-0x21d8),(0x534+358-0x61f),NON_GSM_P,NON_GSM_P,
-NON_GSM_P,(0x1f4f+73-0x1f8f),NON_GSM_P,(0x1d4+3517-0xf8c),(0xbdd+1029-0xfde),
-NON_GSM,NON_GSM_P,(0xb8c+262-0xc8b),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM_P,
-(0xecf+5113-0x22c0),(0x874+7086-0x2416),(0x797+2845-0x1238),NON_GSM_P,NON_GSM,
-NON_GSM_P,NON_GSM_P,(0x10b9+682-0x135d),NON_GSM,(0x85a+2589-0x11f9),NON_GSM,
-NON_GSM,NON_GSM};const unsigned short zte_sms_GSMDefault_To_UCS2_Table_Ex[][
-(0x1070+5075-0x2441)]={{(0xf5f+1763-0x1638),(0xe70+3380-0x1b98)},{
-(0x360+1178-0x7e6),(0x14b0+75-0x149d)},{(0xa38+1752-0x10e8),(0x235+2248-0xa82)},
-{(0x6f0+7063-0x225e),(0xd38+5440-0x21fb)},{(0x650+8281-0x267a),
-(0x8b+8048-0x1f9f)},{(0x16dc+3124-0x22d4),(0x273+8346-0x22b2)},{
-(0x506+5276-0x1965),(0xb03+5695-0x20c4)},{(0x295+2316-0xb63),
-(0x1232+2137-0x1a2e)},{(0x126f+5246-0x26ad),(0x93b+3584-0x16bf)},{
-(0x6f8+2-0x695),8364},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[][
-(0x1653+648-0x18d9)]={{(0x38+3822-0xf16),(0x104a+3156-0x190a)},{
-(0x1781+3678-0x25cd),(0x503+2250-0xa27)},{(0x15f3+1173-0x1a75),
-(0xc35+7058-0x2434)},{(0x5cb+4242-0x1649),(0x534+1886-0x8f7)},{
-(0x16ff+1756-0x1dc6),(0x83c+5467-0x19ee)},{(0xe08+380-0xf6e),(0x977+3570-0x13c9)
-},{(0x9cd+903-0xd3d),(0x130f+27-0xf82)},{(0x18f9+3309-0x25ce),
-(0x15b0+5019-0x25a8)},{(0x3b9+4376-0x14b8),(0x5b8+6850-0x1ce2)},{
-(0x82a+617-0xa79),(0x3d6+7077-0x1bdd)},};const unsigned char
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x113b+2564-0x1b2b),(0x4f3+1254-0x9cb),
+(0x15c0+397-0x1731),(0xfbc+2731-0x1a0c),NON_GSM_P,NON_GSM_P,NON_GSM_P,
+(0x12ec+2063-0x1ae8),NON_GSM,(0x1eb+2486-0xb82),(0x26a+3935-0x11ab),NON_GSM,
+NON_GSM,(0x998+5338-0x1e32),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM,
+(0x1993+1509-0x1f5f),(0x641+6338-0x1ef8),(0x30d+8514-0x23f3),NON_GSM_P,NON_GSM,
+NON_GSM_P,NON_GSM,(0x5b5+4342-0x164e),NON_GSM,(0x146d+4265-0x24b8),NON_GSM,
+NON_GSM,NON_GSM_P,(0x32d+6207-0x1aed),(0x19bf+1302-0x1ec6),(0x1df0+1081-0x220c),
+(0x3f8+7588-0x2121),NON_GSM_P,NON_GSM_P,NON_GSM_P,(0x67+2978-0xc00),NON_GSM_P,
+(0x1aeb+3073-0x26e7),(0x8bd+3925-0x180e),NON_GSM,NON_GSM_P,(0x1074+3121-0x1c9e),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM_P,(0x894+1370-0xde6),(0xc19+514-0xe0f)
+,(0x1c5a+2673-0x264f),NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM_P,(0x5d2+2629-0x1011),
+NON_GSM,(0x9b9+3503-0x16ea),NON_GSM,NON_GSM,NON_GSM};const unsigned short
+zte_sms_GSMDefault_To_UCS2_Table_Ex[][(0x17c5+2854-0x22e9)]={{(0x234a+32-0x2360)
+,(0x20eb+1403-0x265a)},{(0x346+6671-0x1d41),(0x1c31+2696-0x265b)},{
+(0x506+8001-0x241f),(0x1186+4622-0x2319)},{(0x176+6272-0x19cd),
+(0xdc6+844-0x1095)},{(0x1754+2993-0x22d6),(0x1607+2709-0x2040)},{
+(0x621+4319-0x16c4),(0x822+7634-0x2599)},{(0x1505+4203-0x2533),
+(0x1e0+7042-0x1ce4)},{(0x839+2508-0x11c7),(0x12ad+682-0x14fa)},{
+(0x185c+2726-0x22c2),(0x1524+2485-0x1e5d)},{(0x7a7+3656-0x158a),
+(0x2169+5778-0x174f)},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[][
+(0x766+4570-0x193e)]={{(0x15d0+3410-0x2312),(0x75a+2669-0xe33)},{
+(0x17cb+2368-0x20f9),(0x76b+5801-0x1a6e)},{(0x1419+229-0x14eb),
+(0x1137+1725-0x1461)},{(0x21cc+649-0x2441),(0x1503+3893-0x209d)},{
+(0x220b+1176-0x268e),(0x1c8b+328-0x1a2a)},{(0x91f+6649-0x2302),
+(0x115a+107-0xe25)},{(0x101b+4481-0x2185),(0x6b9+4858-0x160b)},{
+(0x20cf+358-0x221d),(0xa02+44-0x68b)},{(0x415+5148-0x1818),(0x486+6428-0x1a0a)},
+{(0xc1+731-0x382),(0xad6+1268-0xc2c)},};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,(0x130a+4256-0x23a0),NON_GSM,NON_GSM,
-(0xe8+2403-0xa3e),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x99d+6603-0x235e),NON_GSM,NON_GSM,
+(0x9ea+3036-0x15b9),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,(0x49d+1308-0x999),(0xd19+165-0xd9d),(0x891+7730-0x26a1),
-(0x107+9310-0x2542),(0xbea+2092-0x1414),(0xea3+3240-0x1b26),(0x224+2907-0xd59),
-(0x1c41+1545-0x2223),(0x9c4+3559-0x1783),(0x108f+5780-0x26fa),(0x267+193-0x2fe),
-(0x1342+3784-0x21df),(0x177+5424-0x167b),(0x14a1+1808-0x1b84),
-(0xd22+3123-0x1927),(0x1126+2099-0x192a),(0x1a5c+2841-0x2545),
-(0x988+6100-0x212b),(0x4f3+4794-0x177b),(0x4d3+6947-0x1fc3),(0x14f6+3327-0x21c1)
-,(0x8b7+523-0xa8d),(0x9c0+3269-0x164f),(0xd94+6566-0x2703),(0x1a5+7167-0x1d6c),
-(0x1daf+2090-0x25a0),(0x3c6+2019-0xb6f),(0x1e4c+1304-0x2329),
-(0x12df+3456-0x2023),(0x1947+2021-0x20ef),(0xb47+4127-0x1b28),
-(0x1771+152-0x17ca),(0x335+408-0x4cd),(0x4e8+6361-0x1d80),(0x1b7+902-0x4fb),
-(0x1216+2688-0x1c53),(0x1e7f+1629-0x2498),(0x2508+150-0x2559),(0x23b+336-0x345),
-(0x8da+387-0xa16),(0xc6+3046-0xc64),(0x41b+973-0x79f),(0x1c0+1987-0x939),
-(0x18fb+3202-0x2532),(0x156+4823-0x13e1),(0x4af+4171-0x14ad),
-(0x14af+3059-0x2054),(0x124b+2743-0x1cb3),(0x1612+2236-0x1e7e),
-(0x1992+3123-0x2574),(0x384+4349-0x142f),(0x452+6075-0x1bba),
-(0x167b+3018-0x21f1),(0x58a+1686-0xbcb),(0xb36+6965-0x2615),(0x750+1373-0xc56),
-(0x1b8f+709-0x1dfc),(0xd40+5499-0x2262),(0x1717+328-0x1805),NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0x200d+1610-0x2646),NON_GSM,(0x95a+7681-0x26fa),
-(0x10e0+4725-0x22f3),(0xc0d+5564-0x2166),(0x39b+5795-0x19da),(0x2135+545-0x22f1)
-,(0x1335+2495-0x1c8e),(0xd51+2385-0x163b),(0x53a+6654-0x1ed0),
-(0x10aa+1394-0x15b3),(0xd85+1661-0x1398),(0x19b9+2584-0x2366),(0x735+818-0x9fb),
-(0x37f+1305-0x82b),(0x106+3372-0xdc4),(0x232b+846-0x260a),(0xceb+4265-0x1d24),
-(0x1572+388-0x1685),(0x2486+708-0x26d8),(0xd9c+3223-0x19c0),(0x262+6923-0x1cf9),
-(0x212+3478-0xf33),(0x1874+2986-0x23a8),(0x8bb+7083-0x23ef),(0x1fb+7292-0x1dff),
-(0xf2a+4894-0x21cf),(0x1aa2+1853-0x2165),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,(0x10ff+5206-0x253a),(0x534+3326-0x11f2),NON_GSM,
-(0x2b8+8868-0x255b),(0x6f7+6996-0x2227),(0x1b6+3189-0xe28),NON_GSM,
-(0x1d8f+135-0x1db7),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0xff4+2210-0x1876),(0x336+3145-0xf5e),(0x61f+5086-0x19db),
+(0xe67+5602-0x2426),(0x1b03+1983-0x22c0),(0xf3c+2563-0x191a),(0x8ba+344-0x9ec),
+(0xd56+5659-0x234a),(0xeff+2127-0x1726),(0x1423+4004-0x239e),(0x789+5071-0x1b2e)
+,(0xc9c+2243-0x1534),(0x61b+5891-0x1cf2),(0x1074+5026-0x23e9),(0x1cb8+12-0x1c96)
+,(0xfa8+3645-0x1db6),(0x1a50+2642-0x2472),(0x92+6432-0x1981),(0xfc4+3054-0x1b80)
+,(0x48b+4830-0x1736),(0x222+8998-0x2514),(0x106a+1311-0x1554),(0x5b6+2424-0xef8)
+,(0xed2+2339-0x17be),(0xaec+4227-0x1b37),(0x1402+947-0x177c),(0x6d6+6803-0x212f)
+,(0x15f0+2973-0x2152),(0x3e6+7826-0x223c),(0x1da+5207-0x15f4),
+(0x5e1+7923-0x2496),(0x1d2+35-0x1b6),(0x19c6+2143-0x2225),(0x145f+3769-0x22d7),
+(0xfbf+529-0x118e),(0x700+4535-0x1874),(0xa84+4359-0x1b47),(0x1c49+859-0x1f5f),
+(0x7f5+7202-0x23d1),(0x129+8167-0x20c9),(0x2006+20-0x1fd2),(0x161+8851-0x23ab),
+(0x9f4+2794-0x1494),(0x95d+6469-0x2257),(0x1e72+1322-0x2350),
+(0x1840+1614-0x1e41),(0x1431+1075-0x1816),(0x439+4971-0x1755),(0x40f+1281-0x8c0)
+,(0x7a1+6546-0x20e2),(0x2131+1182-0x257d),(0x33a+6492-0x1c43),
+(0x1c4d+2119-0x2440),(0x139c+3959-0x22be),(0x3b3+2786-0xe3f),(0x1bb+186-0x21e),
+(0x15d+4538-0x12bf),(0x15bd+143-0x15f3),(0x14ea+2030-0x1c7e),NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,(0x5a1+1226-0xa5a),NON_GSM,(0x90+1784-0x727),(0xf4a+1804-0x15f4)
+,(0x11d3+3114-0x1d9a),(0xe74+4727-0x2087),(0x4d2+5529-0x1a06),(0x76+6550-0x19a6)
+,(0x640+4973-0x1946),(0x534+1033-0x8d5),(0xe9a+6073-0x25ea),(0xa70+304-0xb36),
+(0x59d+4623-0x1741),(0x2e3+1592-0x8af),(0x18b4+2050-0x2049),(0x1556+1889-0x1c49)
+,(0x232+5266-0x1655),(0x93+1179-0x4be),(0x5e6+2854-0x109b),(0x901+6216-0x20d7),
+(0x156+5862-0x17c9),(0x1b1c+2669-0x2515),(0x1861+3508-0x25a0),
+(0x2c5+7572-0x1fe3),(0x452+4672-0x161b),(0x2ba+1505-0x823),(0x12f+6985-0x1bff),
+(0x14f1+1775-0x1b66),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,(0x84b+1169-0xc7c),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0x299+8732-0x245a),(0x1055+4754-0x22d9),
-(0x6e9+4960-0x1a2d),(0x10d1+5325-0x2595),NON_GSM,(0x106a+2936-0x1bc3),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1822+3810-0x26a7),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0x1cb8+459-0x1e27),NON_GSM,(0xfe8+1190-0x1483),NON_GSM,
-NON_GSM,NON_GSM,(0x855+1771-0xee2),NON_GSM,NON_GSM,(0x341+1951-0xac2),
-(0x1671+2406-0x1f58),NON_GSM,NON_GSM,NON_GSM,(0x1cda+2454-0x25f5),
-(0xf62+320-0x1093),(0xde1+1611-0x140f),NON_GSM,(0x1489+1849-0x1bbe),
-(0x329+6601-0x1ced),NON_GSM,NON_GSM,(0x2577+57-0x25a9),NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0x102b+3116-0x1bda),(0xbf5+664-0xe85),NON_GSM,NON_GSM,NON_GSM,
-(0x99d+4229-0x19a6),NON_GSM,(0x10eb+1870-0x182d),(0xcb7+4060-0x1c8d),NON_GSM,
-NON_GSM,(0x377+3383-0x1030),NON_GSM,NON_GSM,NON_GSM};const unsigned short
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[]={(0x125+5823-0x17a4),(0x2c7+3932-0x1180)
-,(0x97d+7160-0x2551),(0x113d+4175-0x20e7),(0x5b7+7726-0x22fb),
-(0x1f7b+485-0x2077),(0xae9+3481-0x1788),(0x70a+7829-0x24b2),(0xb93+980-0xe74),
-(0x1766+3970-0x2601),(0xa77+2191-0x12fc),(0x2125+1719-0x2708),
-(0x2283+326-0x22d5),(0x125d+777-0x1559),(0x77d+2925-0x1229),(0xc64+1497-0x115c),
-(0x6fd+5333-0x183e),(0x645+6922-0x20f0),(0x2d3+2441-0xbb2),(0x230+8011-0x20b4),
-(0x1228+2524-0x1b44),8734,(0x1e7+826-0x4c3),(0x237+8554-0x2345),8364,
-(0xde8+6604-0x26e1),(0x6ea+1636-0xcd2),(0x66a+1581-0xbf7),(0xa1a+6200-0x2190),
-(0x394+3570-0x10a4),(0x2e5+2092-0xa47),(0x156d+1131-0x190f),(0x1242+240-0x1312),
-(0x5e0+5542-0x1b65),(0x1580+402-0x16f0),(0xc26+5382-0x2109),(0xe26+3937-0x1cd7),
-(0x1591+1608-0x1bb4),(0xe7+859-0x41c),(0xc3+8088-0x2034),(0xf18+5947-0x262b),
-(0xafc+1676-0x115f),(0x2b8+9245-0x26ab),(0x63f+5247-0x1a93),(0x90+7647-0x1e43),
-(0x7bc+7645-0x256c),(0x11b+1518-0x6db),(0x520+7969-0x2412),(0x149a+4085-0x245f),
-(0x37f+8593-0x24df),(0x275+8589-0x23d0),(0x15f+6872-0x1c04),(0xdd1+3353-0x1ab6),
-(0xee9+1516-0x14a0),(0x3cd+1409-0x918),(0xd82+3503-0x1afa),(0x31b+6165-0x1af8),
-(0xa00+6233-0x2220),(0x709+3687-0x1536),(0x1b52+2314-0x2421),(0x7fc+558-0x9ee),
-(0x8b4+5504-0x1df7),(0x561+8613-0x26c8),(0x133a+3888-0x222b),(0x23a+2052-0x971),
-(0xd10+1181-0x116c),(0x13a8+2309-0x1c6b),(0x15c1+45-0x15ab),(0x1eb+3531-0xf72),
-(0x13af+2850-0x1e8c),(0xa06+7058-0x2552),(0x241+1524-0x7ee),(0x1460+1593-0x1a51)
-,(0x632+4370-0x16fb),(0x3a3+6206-0x1b97),(0x62f+3239-0x128b),(0x329+6952-0x1e05)
-,(0x877+5650-0x1e3c),(0x4f1+2776-0xf7b),(0x2a4+1567-0x874),(0x135+5605-0x16ca),
-(0x7ca+7139-0x235c),(0x50a+688-0x768),(0x1b53+840-0x1e48),(0x1511+3025-0x208e),
-(0xbb9+6005-0x22d9),(0x6df+1141-0xafe),(0xf07+6194-0x26e2),(0xbf8+1045-0xfb5),
-(0xc64+3843-0x1b0e),(0x71b+1063-0xae8),(0x19f4+488-0x1b19),(0x290+2283-0xaa6),
-(0xa7d+1831-0x10ca),(0xd41+4561-0x1e36),(0x96d+1399-0xe3d),(0xe4+5843-0x1739),
-(0x7f3+458-0x95c),(0x293+5570-0x17f3),(0x1a9b+3277-0x2705),(0xf80+4895-0x223b),
-(0x15bb+628-0x17ca),(0x22f+5867-0x18b4),(0xf99+2678-0x19a8),(0xd6d+4157-0x1d42),
-(0x11fb+4239-0x2221),(0xf80+1373-0x1473),(0xafc+6413-0x239e),(0x9bb+6007-0x20c6)
-,(0x805+5142-0x1bae),(0x446+4283-0x1493),(0xf5d+138-0xf78),(0x9f5+605-0xbe2),
-(0xd7+3829-0xf5b),(0x7a2+4854-0x1a26),(0x1345+2758-0x1d98),(0x62a+6142-0x1db4),
-(0x1bac+2672-0x25a7),(0x7c3+2308-0x1051),(0xc0f+5862-0x227e),(0xdbd+3541-0x1b1a)
-,(0x404+171-0x436),(0x388+21-0x323),(0x343+4282-0x131a),(0x19b3+2208-0x215e),
-(0x4eb+6808-0x1f23),(0x732+626-0x8a8),(0x4af+1833-0xaf8)};const unsigned short
-zte_sms_GSMDefault_To_UCS2_Table[]={(0xdf7+876-0x1123),(0xc3d+5503-0x2119),
-(0x2256+1087-0x2671),(0x268+4047-0x1192),(0x610+1550-0xb36),(0xd33+5082-0x2024),
-(0x1ea4+645-0x2030),(0x66d+6854-0x2047),(0x47d+5321-0x1854),(0x423+603-0x5b7),
-(0x1877+551-0x1a94),(0xa26+6593-0x230f),(0x94d+60-0x891),(0x211+4173-0x1251),
-(0x93a+3998-0x1813),(0x1612+1210-0x19e7),(0x1c43+1163-0x1d3a),
-(0x1a31+2178-0x2254),(0x429+6492-0x19df),(0x11cc+3829-0x1d2e),
-(0x8a1+7391-0x21e5),(0xca9+1690-0xf9a),(0xa41+1261-0xb8e),(0xa46+1308-0xbba),
-(0xad4+2844-0x124d),(0xb84+1122-0xc4e),(0x1efa+2332-0x2478),(0xe6c+1549-0x13d9),
-(0xb8a+6762-0x252e),(0xd66+3081-0x1889),(0x74f+6792-0x20f8),(0x156+5327-0x155c),
-(0x10ed+5216-0x252d),(0x11d6+837-0x14fa),(0x16d4+1901-0x1e1f),
-(0x17a2+478-0x195d),(0x1e2d+23-0x1da0),(0xd05+4356-0x1de4),(0x419+1108-0x847),
-(0x844+5319-0x1ce4),(0x19e9+2672-0x2431),(0x1479+3103-0x206f),
-(0xa0f+6644-0x23d9),(0x9cc+1581-0xfce),(0x1c33+116-0x1c7b),(0x5e4+8273-0x2608),
-(0x570+4904-0x186a),(0x127f+4550-0x2416),(0x318+2530-0xcca),(0x2542+19-0x2524),
-(0x131f+4795-0x25a8),(0xf83+1424-0x14e0),(0x419+5400-0x18fd),(0xf2a+3547-0x1cd0)
-,(0x3d0+3599-0x11a9),(0x22d+8826-0x2470),(0xd43+4037-0x1cd0),(0xee4+5328-0x237b)
-,(0x1df0+993-0x2197),(0x772+6413-0x2044),(0x8b8+1613-0xec9),(0x1e07+1728-0x248a)
-,(0x1499+1053-0x1878),(0x1b9d+1412-0x20e2),(0x1800+1254-0x1c45),
-(0x1356+1480-0x18dd),(0x298+2021-0xa3b),(0x9af+2442-0x12f6),(0x258f+392-0x26d3),
-(0xe7+8597-0x2237),(0x1622+189-0x1699),(0x11c7+4849-0x2471),(0x1900+1863-0x1fff)
-,(0x102c+5322-0x24ad),(0x952+3009-0x14c9),(0xd00+2468-0x1659),
-(0x884+5640-0x1e40),(0xc2a+5163-0x2008),(0x7cd+6222-0x1fcd),(0x7d+6541-0x19bb),
-(0x463+2373-0xd58),(0x17f4+1970-0x1f55),(0x2a5+5942-0x1989),(0x1ae5+3043-0x2675)
-,(0x89+4342-0x112b),(0xac5+2265-0x1349),(0x57b+2845-0x1042),(0x17f+1543-0x72f),
-(0x75+5215-0x147c),(0x10fa+3147-0x1cec),(0x411+7304-0x203f),(0x10cd+2119-0x1850)
-,(0x424+3757-0x11fb),(0x6d5+1818-0xd1e),(0xda8+6534-0x2652),(0x800+971-0xb24),
-(0x1c3f+1422-0x210e),(0x2233+684-0x247e),(0x538+3823-0x13c5),(0xa15+126-0xa30),
-(0x9d6+7545-0x26eb),(0x1cd2+1224-0x2135),(0x186c+723-0x1ad9),(0x71b+4033-0x1675)
-,(0x8b7+311-0x986),(0x831+2922-0x1332),(0x4d3+3685-0x12ce),(0xc3+4076-0x1044),
-(0x1281+4906-0x253f),(0x27c+7277-0x1e7c),(0x1919+618-0x1b15),(0x4ad+1105-0x88f),
-(0x930+356-0xa24),(0x1392+700-0x15dd),(0xb42+3289-0x17a9),(0xb1+2062-0x84c),
-(0x1233+2162-0x1a31),(0x18ac+1622-0x1e8d),(0x2f5+4648-0x14a7),
-(0xd7d+2011-0x14e1),(0xe8+211-0x143),(0x1add+460-0x1c30),(0x27d+8033-0x2164),
-(0x7f0+2564-0x1110),(0x9e4+5576-0x1eb6),(0x1c35+2586-0x255e),(0x57d+541-0x69e),
-(0x1891+3804-0x268d)};int Bytes2String(const unsigned char*pSrc,char*pDst,int
-nSrcLength){const char tab[]="0123456789ABCDEF";int i=(0x922+5675-0x1f4d);if(
-pSrc==NULL||pDst==NULL||nSrcLength<(0x1bb4+1588-0x21e8)){return-
-(0xcb+9585-0x263b);}for(i=(0x1e4+2491-0xb9f);i<nSrcLength;i++){*pDst++=tab[*pSrc
->>(0x10fc+1156-0x157c)];*pDst++=tab[*pSrc&(0x346+8156-0x2313)];pSrc++;}*pDst=
-'\0';return nSrcLength*(0x5e9+8391-0x26ae);}int String2Bytes(const char*pSrc,
-unsigned char*pDst,int nSrcLength){int i=(0xb19+6112-0x22f9);if(pSrc==NULL||pDst
-==NULL||nSrcLength<(0x3eb+2744-0xea3)){return-(0x18f4+1777-0x1fe4);}for(i=
-(0x189+5389-0x1696);i<nSrcLength;i+=(0x1f53+7-0x1f58)){if(*pSrc>=
-((char)(0x816+397-0x973))&&*pSrc<=((char)(0x1d32+1152-0x2179))){*pDst=(*pSrc-
-((char)(0x4ab+8584-0x2603)))<<(0x13d8+4502-0x256a);}else{*pDst=((toupper(*pSrc)-
-((char)(0x686+5225-0x1aae)))+(0x15e3+1808-0x1ce9))<<(0x985+3670-0x17d7);}pSrc++;
-if(*pSrc>=((char)(0x2fb+4498-0x145d))&&*pSrc<=((char)(0x52a+3482-0x128b))){*pDst
-|=*pSrc-((char)(0xba7+3658-0x19c1));}else{*pDst|=(toupper(*pSrc)-
-((char)(0x16b0+2477-0x201c)))+(0x3f8+635-0x669);}pSrc++;pDst++;}return
-nSrcLength/(0x207+6558-0x1ba3);}int EncodeUcs2(const char*pSrc,unsigned char*
-pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1c25+795-0x1f40)){
-return-(0x15ac+1127-0x1a12);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);
-return nSrcLength/(0x1ee0+1102-0x232c);}int Encode7bit(const char*pSrc,unsigned
+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,
+(0x13e9+4488-0x2556),(0x236+2312-0xafe),NON_GSM,(0x1e00+1039-0x220e),
+(0x12cf+2875-0x1de6),(0x1844+2874-0x237b),NON_GSM,(0xc85+5929-0x234f),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,(0xaf9+3788-0x1965),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0xd45+4497-0x1e7b),(0x17fb+1822-0x1f0b),(0x11ba+879-0x150d),(0x997+2734-0x143c)
+,NON_GSM,(0xcf8+4083-0x1ccc),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0x671+2534-0xffa),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x75c+6698-0x212a),
+NON_GSM,(0x98a+6408-0x2287),NON_GSM,NON_GSM,NON_GSM,(0x4a0+3086-0x1050),NON_GSM,
+NON_GSM,(0x339+2986-0xec5),(0x3fc+5892-0x1a81),NON_GSM,NON_GSM,NON_GSM,
+(0x7a7+6150-0x1f32),(0xab7+1751-0x117f),(0x27f+1709-0x90f),NON_GSM,
+(0xff2+5004-0x237a),(0x22d3+412-0x246a),NON_GSM,NON_GSM,(0x137a+4038-0x2339),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xb6f+5325-0x1fbf),(0xb29+5918-0x223f),NON_GSM,
+NON_GSM,NON_GSM,(0x12a+5074-0x1480),NON_GSM,(0x1ab+5726-0x17fd),
+(0xe2d+1867-0x1572),NON_GSM,NON_GSM,(0x1c3+8711-0x234c),NON_GSM,NON_GSM,NON_GSM}
+;const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[]={
+(0x1b9d+1556-0x2171),(0xb7a+3098-0x16f1),(0xe6+1580-0x6ee),(0x955+2874-0x13ea),
+(0x951+4991-0x1be6),(0x283+3024-0xd6a),(0x196f+1275-0x1d70),(0xe17+3677-0x1b87),
+(0x18a5+1393-0x1d23),(0x1848+945-0x1b12),(0x1072+4881-0x2379),
+(0x92b+6948-0x237b),(0x13bc+3202-0x1f4a),(0xc6b+3131-0x1899),(0xda1+6351-0x25af)
+,(0x182+7353-0x1d5a),(0x17cc+2189-0x1cc5),(0x19a2+2486-0x22f9),
+(0xf47+3847-0x1da4),(0xc60+5531-0x2134),(0x6e7+1754-0xd01),8734,
+(0xa30+1292-0xede),(0x367+2072-0xb23),8364,(0xb37+227-0xb47),
+(0x103d+5580-0x258d),(0xf72+2817-0x19d3),(0x1d49+579-0x1eca),(0xc6d+5504-0x210b)
+,(0x1ec7+644-0x2081),(0x14d3+4602-0x2604),(0x69d+7077-0x2222),(0xd4+5214-0x1511)
+,(0x8e6+735-0xba3),(0x8d+2716-0xb06),(0x1db5+1181-0x21a2),(0x9d+5687-0x16af),
+(0x982+1889-0x10bd),(0x11d8+3355-0x1ecc),(0x187c+914-0x1be6),(0xcc0+3097-0x18b0)
+,(0x9e8+6226-0x2210),(0xdbd+4620-0x1f9e),(0x232+7091-0x1db9),(0x189a+843-0x1bb8)
+,(0xef2+4188-0x1f20),(0x10d1+5416-0x25ca),(0xe48+515-0x101b),(0x172+5786-0x17db)
+,(0x18c3+2364-0x21cd),(0x19ea+1943-0x214e),(0x92a+1314-0xe18),(0x11c+3307-0xdd2)
+,(0xb40+6778-0x2584),(0x16e3+4057-0x2685),(0x22c+7013-0x1d59),
+(0x12cb+1380-0x17f6),(0x192+4976-0x14c8),(0x24b+231-0x2f7),(0x62a+7100-0x21aa),
+(0x1320+4714-0x254d),(0xa4b+3814-0x18f3),(0x1fe2+1002-0x238d),(0x1ac+1428-0x673)
+,(0x91d+4175-0x192b),(0xa7+2222-0x913),(0xfb0+1155-0x13f0),(0xe84+2323-0x1753),
+(0x1afd+2584-0x24d0),(0x141d+2516-0x1dab),(0x32c+5039-0x1694),
+(0x87d+6538-0x21bf),(0x8b+7109-0x1c07),(0x380+6406-0x1c3c),(0x253+9431-0x26df),
+(0x11d1+2536-0x1b6d),(0x781+6627-0x2117),(0x4e2+4834-0x1776),(0x204+8160-0x2195)
+,(0x11dd+3086-0x1d9b),(0xed8+1645-0x14f4),(0x5a0+6108-0x1d2a),
+(0x5f9+5488-0x1b16),(0xd98+2795-0x182f),(0x77+9751-0x2639),(0x5fc+7258-0x2200),
+(0xaa7+5972-0x21a4),(0x46d+3763-0x12c8),(0xcbf+854-0xfbc),(0x67d+8286-0x2681),
+(0x5b9+5958-0x1c3c),(0x4da+4509-0x15a2),(0x415+3799-0x1212),(0x54f+6042-0x1c0d),
+(0x10d9+2928-0x1ba2),(0x703+2197-0xf1a),(0x3aa+8052-0x22bd),(0x1299+1201-0x16e8)
+,(0x1ee1+1244-0x235a),(0x362+5110-0x16f4),(0x93f+1231-0xda9),(0xd71+4118-0x1d21)
+,(0x1028+2481-0x1972),(0x39b+8072-0x22bb),(0x1089+1489-0x15f1),
+(0xbe3+4717-0x1de6),(0x927+7191-0x24d3),(0x9b7+1268-0xe3f),(0x2230+768-0x24c3),
+(0x75+1875-0x75a),(0x12dc+2881-0x1dae),(0x17bc+2893-0x2299),(0x1d3+8125-0x211f),
+(0x716+7545-0x241d),(0x3ba+53-0x37c),(0x3a3+5933-0x1a5c),(0x16a4+1077-0x1a64),
+(0x14fd+4078-0x2475),(0x9b8+2366-0x127f),(0x4ad+3019-0x1000),(0x8f3+744-0xb62),
+(0x421+267-0x4b2),(0x13e6+3032-0x1edb),(0x5b2+7678-0x22bb),(0x1313+1399-0x182a),
+(0x1682+3220-0x221a),(0xdf3+2076-0x152f)};const unsigned short
+zte_sms_GSMDefault_To_UCS2_Table[]={(0x36f+2914-0xe91),(0x126c+555-0x13f4),
+(0x52c+4230-0x158e),(0xc0d+1475-0x112b),(0x1d5+4893-0x140a),(0x22b+7415-0x1e39),
+(0x252+7214-0x1d87),(0x2287+1341-0x26d8),(0xec9+2187-0x1662),
+(0x171b+2101-0x1e89),(0x71d+5174-0x1b49),(0xc92+2357-0x14ef),
+(0x126a+1494-0x1748),(0x5c3+1443-0xb59),(0xb6d+805-0xdcd),(0x11e9+3416-0x1e5c),
+(0xb03+1163-0xbfa),(0x4e4+7879-0x234c),(0x1478+4267-0x217d),(0x22f2+611-0x21c2),
+(0xf08+1989-0x1332),(0x84c+98-0x505),(0x2330+110-0x1ffe),(0x4f9+332-0x29d),
+(0x13b8+1988-0x17d9),(0x422+6238-0x18e8),(0x771+187-0x48e),(0x897+2223-0x10a6),
+(0x826+1947-0xefb),(0x113b+1590-0x168b),(0x1fff+743-0x2207),(0x2186+608-0x231d),
+(0x8a+7497-0x1db3),(0xd50+4582-0x1f15),(0x871+7372-0x251b),(0x1311+949-0x16a3),
+(0x2001+1494-0x2533),(0x18cc+3410-0x25f9),(0x39+3994-0xfad),(0x13d3+3926-0x2302)
+,(0x352+8667-0x2505),(0x597+889-0x8e7),(0x112+1720-0x7a0),(0x136d+2812-0x1e3e),
+(0x1ef+6315-0x1a6e),(0xfd8+5308-0x2467),(0x1ae9+2387-0x240e),(0x18cb+310-0x19d2)
+,(0x96f+1121-0xda0),(0x412+4106-0x13eb),(0x14d8+95-0x1505),(0x1b45+936-0x1eba),
+(0x1595+1517-0x1b4e),(0x21d+7316-0x1e7c),(0xab3+6150-0x2283),
+(0x19bb+3162-0x25de),(0x1ae1+1963-0x2254),(0x1178+239-0x122e),
+(0x827+5492-0x1d61),(0xa56+2288-0x130b),(0x1384+3016-0x1f10),(0x86d+2079-0x104f)
+,(0xe32+2985-0x199d),(0x17ed+3446-0x2524),(0x1056+3728-0x1e45),
+(0x333+1828-0xa16),(0x8e7+5736-0x1f0d),(0x1078+1837-0x1762),(0x274+4081-0x1221),
+(0x1175+1488-0x1700),(0xd26+5566-0x229e),(0xb31+1-0xaeb),(0xd6f+1873-0x1478),
+(0x19d4+1324-0x1eb7),(0xa6+6413-0x1969),(0x13c9+1376-0x18de),(0x19c+7710-0x1f6e)
+,(0x130c+717-0x158c),(0x1867+636-0x1a95),(0x1130+93-0x113e),(0x1d05+895-0x2034),
+(0x978+1235-0xdfa),(0x2cc+1724-0x936),(0x569+2949-0x109b),(0x688+2560-0x1034),
+(0x390+4013-0x12e8),(0x1522+2483-0x1e7f),(0xee0+5051-0x2244),(0x559+832-0x841),
+(0xa81+6020-0x21ac),(0xbf9+341-0xcf4),(0x91f+5751-0x1ed2),(0xa60+3586-0x178c),
+(0xd90+22-0xcd5),(0x15ab+3283-0x21a2),(0xe8+3478-0xdd7),(0x1ba0+1229-0x1fae),
+(0xc7c+5053-0x1fd8),(0x1683+3-0x1624),(0x49b+52-0x46c),(0x13b7+3309-0x2040),
+(0x1136+1962-0x187b),(0x2618+198-0x2678),(0x68f+3817-0x1511),(0xbf+3347-0xd6a),
+(0x1035+3932-0x1f28),(0x4c1+7858-0x2309),(0xe60+5493-0x236a),(0x56d+7643-0x22dc)
+,(0x125c+4341-0x22e4),(0x25d+5757-0x186c),(0x85c+2385-0x113e),
+(0x198b+2220-0x21c7),(0xf7+1374-0x5e4),(0xac6+5969-0x21a5),(0xc35+3615-0x19e1),
+(0xc03+4712-0x1df7),(0x136b+3213-0x1f83),(0xfb2+3016-0x1b04),(0xdcb+4202-0x1dbe)
+,(0x1235+5449-0x2706),(0x201+7261-0x1de5),(0x606+6143-0x1d8b),(0x37d+1343-0x7d8)
+,(0xa5d+5943-0x209e),(0x6f2+4493-0x178e),(0xe5b+3016-0x1927),(0x187c+233-0x1885)
+};int Bytes2String(const unsigned char*pSrc,char*pDst,int nSrcLength){const char
+ tab[]="0123456789ABCDEF";int i=(0x120b+4986-0x2585);if(pSrc==NULL||pDst==NULL||
+nSrcLength<(0xc1f+1676-0x12ab)){return-(0x334+7999-0x2272);}for(i=
+(0x61f+6452-0x1f53);i<nSrcLength;i++){*pDst++=tab[*pSrc>>(0x1e7+645-0x468)];*
+pDst++=tab[*pSrc&(0x5f6+7662-0x23d5)];pSrc++;}*pDst='\0';return nSrcLength*
+(0x94b+784-0xc59);}int String2Bytes(const char*pSrc,unsigned char*pDst,int
+nSrcLength){int i=(0x1549+3353-0x2262);if(pSrc==NULL||pDst==NULL||nSrcLength<
+(0xe76+213-0xf4b)){return-(0x209+9017-0x2541);}for(i=(0x1051+2104-0x1889);i<
+nSrcLength;i+=(0x9f7+2148-0x1259)){if(*pSrc>=((char)(0x6d9+4693-0x18fe))&&*pSrc
+<=((char)(0x5eb+7145-0x219b))){*pDst=(*pSrc-((char)(0x9cf+1110-0xdf5)))<<
+(0xc61+6721-0x269e);}else{*pDst=((toupper(*pSrc)-((char)(0x11c6+1600-0x17c5)))+
+(0x912+1019-0xd03))<<(0x1408+4411-0x253f);}pSrc++;if(*pSrc>=
+((char)(0xec2+4816-0x2162))&&*pSrc<=((char)(0xbc3+3889-0x1abb))){*pDst|=*pSrc-
+((char)(0xc3f+5555-0x21c2));}else{*pDst|=(toupper(*pSrc)-
+((char)(0x970+5241-0x1da8)))+(0xaa1+6912-0x2597);}pSrc++;pDst++;}return
+nSrcLength/(0xda9+3208-0x1a2f);}int EncodeUcs2(const char*pSrc,unsigned char*
+pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x12e7+1299-0x17fa))
+{return-(0x415+5937-0x1b45);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);
+return nSrcLength/(0x1e28+2254-0x26f4);}int Encode7bit(const char*pSrc,unsigned
char*pDst,int nSrcLength){int nSrc;int nDst;int nChar;unsigned char nLeft=
-(0xe4b+209-0xf1c);if(pSrc==NULL||pDst==NULL||nSrcLength<(0xa0b+3455-0x178a)){
-return-(0x107a+1930-0x1803);}nSrc=(0x260+8354-0x2302);nDst=(0x476+4102-0x147c);
-while(nSrc<nSrcLength){nChar=nSrc&(0xb67+5245-0x1fdd);if(nChar==
-(0x1066+984-0x143e)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
-(0x100a+4460-0x2175))&&(nSrc==(nSrcLength-(0x19c0+831-0x1cfe)))){nDst++;}}else{*
-pDst=(*pSrc<<((0x3fc+6913-0x1ef5)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst++
-;}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst,
-UINT8 TP_FCS){SINT32 nLength=(0xea0+3580-0x1c9c);SINT32 nDstLength=
-(0x127f+4698-0x24d9);UINT8 buf[(0xac3+864-0xd23)]={(0x1387+1098-0x17d1)};if(NULL
-==pDst){return-(0x121+4493-0x12ad);}if(TP_FCS!=(0x343+1223-0x80a)){buf[
-(0x1d63+681-0x200c)]=(0x24c+8449-0x234d);buf[(0x1d5b+1448-0x2302)]=TP_FCS;buf[
-(0x9f4+1500-0xfce)]=(0x2c3+4964-0x1627);nDstLength+=Bytes2String(buf,&pDst[
-nDstLength],(0x13ad+318-0x14e8));}else{buf[(0xf68+551-0x118f)]=(0xb14+329-0xc5d)
-;buf[(0x331+5494-0x18a6)]=(0x8d5+3132-0x1511);nDstLength+=Bytes2String(buf,&pDst
-[nDstLength],(0xf3b+3519-0x1cf8));}return nDstLength;}unsigned long
-zUfiSms_ConvertAsciiToGsmDefault(const unsigned char*inputs,unsigned char*
-outputs,unsigned long len){unsigned long i=(0x11+4233-0x109a);unsigned long j=
-(0x1096+3910-0x1fdc);unsigned long k=(0x50f+8562-0x2681);if(NULL==inputs||NULL==
-outputs){printf(
+(0xb41+590-0xd8f);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x909+3445-0x167e)){
+return-(0x288+8438-0x237d);}nSrc=(0x2491+116-0x2505);nDst=(0x791+5508-0x1d15);
+while(nSrc<nSrcLength){nChar=nSrc&(0x981+5028-0x1d1e);if(nChar==
+(0x1cd5+1385-0x223e)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
+(0x1354+2369-0x1c94))&&(nSrc==(nSrcLength-(0xab6+1117-0xf12)))){nDst++;}}else{*
+pDst=(*pSrc<<((0x1869+2683-0x22dc)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst
+++;}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst
+,UINT8 TP_FCS){SINT32 nLength=(0x139a+4101-0x239f);SINT32 nDstLength=
+(0x2e6+3832-0x11de);UINT8 buf[(0x12b8+1455-0x1767)]={(0x114+6069-0x18c9)};if(
+NULL==pDst){return-(0xef3+4241-0x1f83);}if(TP_FCS!=(0x2018+55-0x204f)){buf[
+(0x143+5292-0x15ef)]=(0x5f4+6919-0x20fb);buf[(0x52b+964-0x8ee)]=TP_FCS;buf[
+(0xb7f+6880-0x265d)]=(0x657+4059-0x1632);nDstLength+=Bytes2String(buf,&pDst[
+nDstLength],(0xe50+2804-0x1941));}else{buf[(0x66f+3501-0x141c)]=
+(0x735+502-0x92b);buf[(0x1fb4+143-0x2042)]=(0x998+2681-0x1411);nDstLength+=
+Bytes2String(buf,&pDst[nDstLength],(0xebc+768-0x11ba));}return nDstLength;}
+unsigned long zUfiSms_ConvertAsciiToGsmDefault(const unsigned char*inputs,
+unsigned char*outputs,unsigned long len){unsigned long i=(0x339+7034-0x1eb3);
+unsigned long j=(0x1074+1804-0x1780);unsigned long k=(0x17e5+3320-0x24dd);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(0x451+3220-0x10e5);}for(i=(0x8e3+6883-0x23c6);i<len;i++){j=inputs[i];if(
-g_zUfiSms_AsciiToGsmdefaultTable[j]<(0x142a+399-0x14ba)){outputs[k]=
+return(0xa9+2109-0x8e6);}for(i=(0xbd1+605-0xe2e);i<len;i++){j=inputs[i];if(
+g_zUfiSms_AsciiToGsmdefaultTable[j]<(0x1061+1402-0x14dc)){outputs[k]=
g_zUfiSms_AsciiToGsmdefaultTable[j];}else{outputs[k]=(
-g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0x1d4a+2276-0x2626);k++;outputs[k]=
-(g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x1dc+2895-0xc2c));}k++;}return k;}
+g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0x1eb+6727-0x1c2a);k++;outputs[k]=(
+g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x64a+3079-0x1152));}k++;}return k;}
unsigned long zUfiSms_ConvertUcs2ToSpanish(const unsigned char*def,unsigned char
-*gsm_default,unsigned long len){unsigned long i=(0x1d7d+2148-0x25e1);unsigned
-long k=(0xee3+3810-0x1dc5);unsigned long p=(0x203d+1399-0x25b4);unsigned long
-tmp=(0xac9+5211-0x1f24);unsigned long s1=(0x1076+4144-0x20a6),s2=
-(0xd5d+3203-0x19e0);unsigned long q=(0x8f7+7633-0x26c8);s1=sizeof(
+*gsm_default,unsigned long len){unsigned long i=(0x185c+1724-0x1f18);unsigned
+long k=(0x213+8505-0x234c);unsigned long p=(0x112+4563-0x12e5);unsigned long tmp
+=(0x44a+8005-0x238f);unsigned long s1=(0xf5b+6024-0x26e3),s2=(0xb52+4513-0x1cf3)
+;unsigned long q=(0xbb5+4348-0x1cb1);s1=sizeof(
zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0x1151+5157-0x2576)]);s2=sizeof(
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0x6a4+3537-0x1475)]);s2=sizeof(
Ucs2_To_Gsm7_SPANISH_Table_UCS)/sizeof(Ucs2_To_Gsm7_SPANISH_Table_UCS[
-(0x54a+6017-0x1ccb)]);for(i=(0x58d+733-0x86a);i<len;i++){if(def[i]==
-(0x3c9+7699-0x21dc)){i++;if(Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]!=NON_GSM){
+(0xe9f+658-0x1131)]);for(i=(0x23+7755-0x1e6e);i<len;i++){if(def[i]==
+(0x7b5+1155-0xc38)){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]==(0x742+6748-0x217e)))
-{gsm_default[k]=(0x1574+1967-0x1d03);k++;continue;}for(q=(0x545+8158-0x2523);q<
-s1;q++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x18+7583-0x1db6)])
-{gsm_default[k]=(0x1420+3362-0x2127);k++;gsm_default[k]=
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0xa00+6333-0x22bd)];break;}}}else{tmp=
-(def[i]<<(0x129b+2070-0x1aa9))+def[i+(0x16ea+3603-0x24fc)];i++;if(tmp==
-(0x226b+833-0x500)){gsm_default[k]=(0x2400+526-0x25f3);k++;gsm_default[k]=
-(0x1907+2419-0x2215);k++;}for(p=(0x938+3569-0x1729);p<s2;p++){if(tmp==
-Ucs2_To_Gsm7_SPANISH_Table_UCS[p][(0x5d8+2384-0xf27)]){gsm_default[k]=
-Ucs2_To_Gsm7_SPANISH_Table_UCS[p][(0x723+2662-0x1189)];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=
-(0xb67+4996-0x1eeb);unsigned long k=(0x405+3624-0x122d);unsigned long p=
-(0x6f9+4356-0x17fd);unsigned long tmp=(0x1da+5171-0x160d);unsigned long s1=
-(0x145b+406-0x15f1),s2=(0x25d+7521-0x1fbe);unsigned long q=(0xaa1+4451-0x1c04);
-s1=sizeof(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x995+3059-0x1588)]);s2=sizeof(
+Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0x5f4+5378-0x1ad6)))
+{gsm_default[k]=(0xd11+3944-0x1c59);k++;continue;}for(q=(0xbaf+446-0xd6d);q<s1;q
+++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x54b+7985-0x247b)]){
+gsm_default[k]=(0x1f1+29-0x1f3);k++;gsm_default[k]=
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0xba4+1731-0x1267)];break;}}}else{tmp=
+(def[i]<<(0x1928+2796-0x240c))+def[i+(0x2e8+2914-0xe49)];i++;if(tmp==8364){
+gsm_default[k]=(0xf44+124-0xfa5);k++;gsm_default[k]=(0x867+3023-0x13d1);k++;}for
+(p=(0x846+1115-0xca1);p<s2;p++){if(tmp==Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0xf73+2438-0x18f8)]){gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0x42d+851-0x780)];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=(0x176d+1012-0x1b61);unsigned
+long k=(0x633+860-0x98f);unsigned long p=(0x10d+5365-0x1602);unsigned long tmp=
+(0x7f3+4539-0x19ae);unsigned long s1=(0xe25+5313-0x22e6),s2=(0x477+176-0x527);
+unsigned long q=(0x12c3+2957-0x1e50);s1=sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x11fa+1730-0x18bc)]);s2=sizeof(
Ucs2_To_Gsm7_PORTUGUESE_Table_UCS)/sizeof(Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[
-(0xf8c+2519-0x1963)]);for(i=(0xeab+5443-0x23ee);i<len;i++){if(def[i]==
-(0x40+2414-0x9ae)){i++;if(Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]!=NON_GSM){
+(0x11ed+417-0x138e)]);for(i=(0x60a+6869-0x20df);i<len;i++){if(def[i]==
+(0x6e2+4562-0x18b4)){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]==
-(0x1dcf+349-0x1f0c))){gsm_default[k]=(0x1072+1057-0x1473);k++;continue;}for(q=
-(0x380+6223-0x1bcf);q<s1;q++){if(def[i]==
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0x1426+0-0x1425)]){gsm_default[k]=
-(0x1a68+2742-0x2503);k++;gsm_default[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
-[q][(0x1e4+2667-0xc4f)];break;}}}else{tmp=(def[i]<<(0x1bba+2645-0x2607))+def[i+
-(0xc3c+1869-0x1388)];i++;if(tmp==8364){gsm_default[k]=(0x843+2754-0x12ea);k++;
-gsm_default[k]=(0x380+8601-0x24b4);k++;continue;}for(p=(0x8ca+3447-0x1641);p<s2;
-p++){if(tmp==Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0xbda+6080-0x2399)]){
-gsm_default[k]=Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x387+3933-0x12e4)];break;}
-}}k++;}gsm_default[k]='\0';return k;}unsigned long
+(0x2182+953-0x251b))){gsm_default[k]=(0x296+1636-0x8da);k++;continue;}for(q=
+(0x1758+2167-0x1fcf);q<s1;q++){if(def[i]==
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0x1c1+8458-0x22ca)]){gsm_default[k]
+=(0x12c1+123-0x1321);k++;gsm_default[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
+[q][(0x15cc+3751-0x2473)];break;}}}else{tmp=(def[i]<<(0x85b+232-0x93b))+def[i+
+(0xba9+6129-0x2399)];i++;if(tmp==8364){gsm_default[k]=(0x1f05+1871-0x2639);k++;
+gsm_default[k]=(0xf0b+2539-0x1891);k++;continue;}for(p=(0xec4+1903-0x1633);p<s2;
+p++){if(tmp==Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x1d4+749-0x4c0)]){
+gsm_default[k]=Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x146b+1417-0x19f4)];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=(0x1c71+445-0x1e2e);unsigned long
- k=(0x15c+8495-0x228b);unsigned long p=(0x1383+4853-0x2678);unsigned long tmp=
-(0x949+5644-0x1f55);unsigned long s1=(0xc05+6342-0x24cb),s2=(0x25b+8563-0x23ce);
-unsigned long q=(0x5aa+2019-0xd8d);s1=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex
-)/sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x524+3578-0x131e)]);s2=sizeof(
-UCS2_To_GSMDefault_Table_UCS2)/sizeof(UCS2_To_GSMDefault_Table_UCS2[
-(0xce4+1676-0x1370)]);for(i=(0x235+7198-0x1e53);i<len;i++){if(def[i]==
-(0x1188+4730-0x2402)){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]==(0x2c8+2897-0xdf9))){
-gsm_default[k]=(0xf7c+2059-0x1767);k++;continue;}for(q=(0xedd+6062-0x268b);q<s1;
-q++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x1c20+146-0x1cb1)]){
-gsm_default[k]=(0x789+5846-0x1e44);k++;gsm_default[k]=
-zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x646+2457-0xfdf)];break;}}}else{tmp=(
-def[i]<<(0x8c0+2402-0x121a))+def[i+(0xb8f+1670-0x1214)];i++;if(tmp==8364){
-gsm_default[k]=(0x1ba2+262-0x1c8d);k++;gsm_default[k]=(0x5e1+7189-0x2191);k++;
-continue;}for(p=(0x55+1409-0x5d6);p<s2;p++){if(tmp==
-UCS2_To_GSMDefault_Table_UCS2[p][(0xfba+298-0x10e3)]){gsm_default[k]=
-UCS2_To_GSMDefault_Table_UCS2[p][(0xe44+1810-0x1556)];break;}}}k++;}gsm_default[
+gsm_default,unsigned long len){unsigned long i=(0x181b+3631-0x264a);unsigned
+long k=(0x156f+1310-0x1a8d);unsigned long p=(0x6bd+7558-0x2443);unsigned long
+tmp=(0xacb+7034-0x2645);unsigned long s1=(0x845+3523-0x1608),s2=
+(0xc39+2070-0x144f);unsigned long q=(0x18b2+3156-0x2506);s1=sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[
+(0x255+4516-0x13f9)]);s2=sizeof(UCS2_To_GSMDefault_Table_UCS2)/sizeof(
+UCS2_To_GSMDefault_Table_UCS2[(0x877+3578-0x1671)]);for(i=(0x375+2558-0xd73);i<
+len;i++){if(def[i]==(0x62d+4496-0x17bd)){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]==
+(0x1a0b+1892-0x214f))){gsm_default[k]=(0x16d2+3370-0x23dc);k++;continue;}for(q=
+(0x1d2d+1306-0x2247);q<s1;q++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q]
+[(0x8cd+2337-0x11ed)]){gsm_default[k]=(0x1fd6+1687-0x2652);k++;gsm_default[k]=
+zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x16c9+1106-0x1b1b)];break;}}}else{tmp=(
+def[i]<<(0x1454+91-0x14a7))+def[i+(0x125f+4923-0x2599)];i++;if(tmp==
+(0x2104+5651-0x166b)){gsm_default[k]=(0x1222+825-0x1540);k++;gsm_default[k]=
+(0x83d+958-0xb96);k++;continue;}for(p=(0x122+7405-0x1e0f);p<s2;p++){if(tmp==
+UCS2_To_GSMDefault_Table_UCS2[p][(0x1835+433-0x19e5)]){gsm_default[k]=
+UCS2_To_GSMDefault_Table_UCS2[p][(0xc4f+1785-0x1348)];break;}}}k++;}gsm_default[
k]='\0';return k;}UINT8 zUfiSms_TsIntToBcd(const UINT8 i){return(UINT8)(((i%
-(0x21b+3863-0x1128))+((i/(0x663+6790-0x20df))<<(0x129c+3536-0x2068))));}void
+(0x163f+278-0x174b))+((i/(0x320+7227-0x1f51))<<(0x18b7+3271-0x257a))));}void
zUfiSms_DecodeRelativeTime(UINT8 iValidTime,T_zUfiSms_TimeStamp*ptTimeStamp){
-uint32 i=(0xa39+5715-0x208c);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
-(0x110a+4652-0x2336),sizeof(wms_timestamp_s_type));if(iValidTime<
-(0xdbc+6185-0x2555)){i=(iValidTime+(0x49+344-0x1a0))*(0x26c+2286-0xb55);
-ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0xd72+4725-0x1fab)));
-ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0x18df+3433-0x260c)));}
-else if(iValidTime<(0xb14+400-0xbfd)){i=(iValidTime-(0x943+1202-0xd66))*
-(0x4d6+4342-0x15ae);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
-(0x8af+7533-0x2610)+i/(0x45f+2751-0xee2)));ptTimeStamp->minute=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0xa1b+7376-0x26af)));}else if(iValidTime<
-(0x1246+1887-0x18e0)){i=iValidTime-(0x3a4+1439-0x89d);ptTimeStamp->month=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i/(0x95c+6020-0x20c2)));ptTimeStamp->day=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0x198f+1173-0x1e06)));}else{i=(iValidTime-
-(0xe75+5076-0x2189))*(0x736+6905-0x2228);ptTimeStamp->year=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i/(0x2142+789-0x22ea)));ptTimeStamp->month=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)((i%(0x7e7+398-0x808))/(0x900+6762-0x234c)));
-ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0x191+3645-0xe61))%
-(0x1e76+1929-0x25e1)));}}else{printf(
+uint32 i=(0x2130+1146-0x25aa);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
+(0x126d+5074-0x263f),sizeof(wms_timestamp_s_type));if(iValidTime<
+(0xdb7+4231-0x1dae)){i=(iValidTime+(0x19df+353-0x1b3f))*(0xb7f+140-0xc06);
+ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0x321+3484-0x1081)));
+ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0xeb+8144-0x207f)));}
+else if(iValidTime<(0x18b4+306-0x193f)){i=(iValidTime-(0x1656+1853-0x1d04))*
+(0x8e3+483-0xaa8);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
+(0x615+3008-0x11c9)+i/(0x2e7+9310-0x2709)));ptTimeStamp->minute=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0x16fb+466-0x1891)));}else if(iValidTime<
+(0x915+3168-0x14b0)){i=iValidTime-(0xa6a+7057-0x2555);ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0x2f3+800-0x5f5)));ptTimeStamp->day=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0x45c+5587-0x1a11)));}else{i=(iValidTime-
+(0x603+8139-0x250e))*(0x1e28+982-0x21f7);ptTimeStamp->year=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0x10aa+1525-0x1532)));ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)((i%(0xbcc+485-0xc44))/(0xb61+6805-0x25d8)));
+ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0x5af+2767-0xf11))%
+(0x896+2501-0x123d)));}}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=(0x1457+3040-0x2037);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}
-for(i=(0x14ed+1473-0x1aae);i<iLen;i++){pIntArray[i]=pCharArray[i]-
-((char)(0x845+6257-0x2086));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
+i=(0x937+1415-0xebe);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}for
+(i=(0xaa1+7114-0x266b);i<iLen;i++){pIntArray[i]=pCharArray[i]-
+((char)(0x8fb+1017-0xcc4));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
T_zUfiSms_SubmitTpdu*ptSubmit,T_zUfiSms_ConcatInfo*ptConcatSms,
-T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x16b3+1100-0x1aff);if(ptConcatSms->
-total_msg>(0x1199+1767-0x187f)){g_zUfiSms_SendingSms.TP_UDHI=(0xea5+2102-0x16da)
-;g_zUfiSms_SendingSms.TP_UD[(0xd4b+6464-0x268b)]=(0x1575+886-0x18e6);
-g_zUfiSms_SendingSms.TP_UD[(0x1cc6+1809-0x23d6)]=(0xc66+3196-0x18dd);
-g_zUfiSms_SendingSms.TP_UD[(0x1126+3214-0x1db2)]=(0x5b+1177-0x4f1);
-g_zUfiSms_SendingSms.TP_UD[(0x19c0+419-0x1b60)]=(char)ptDbSaveData->concat_info[
-(0x716+4453-0x187b)]%(0x3ab+5636-0x18b0);g_zUfiSms_SendingSms.TP_UD[
-(0x1767+26-0x177d)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
-(0x15f5+962-0x19b2)]=(char)ptConcatSms->current_sending+(0xab1+2565-0x14b5);
-g_zUfiSms_SendingSms.TP_UD[(0x8cf+4527-0x1a78)]=(0x1305+505-0x14f8);for(i=
-(0x1d9b+2167-0x2612);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.
-TP_UD[i+(0xe43+2445-0x17c9)]=ptSubmit->user_data.sm_data[i];}
-g_zUfiSms_SendingSms.TP_UDLength=ptSubmit->user_data.sm_len+(0x23f+2789-0xd1d);}
-else{for(i=(0x91+7574-0x1e27);i<ptSubmit->user_data.sm_len;i++){
+T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x1243+646-0x14c9);if(ptConcatSms->
+total_msg>(0x2dc+288-0x3fb)){g_zUfiSms_SendingSms.TP_UDHI=(0x3a4+4723-0x1616);
+g_zUfiSms_SendingSms.TP_UD[(0x606+7714-0x2428)]=(0x6ad+4578-0x188a);
+g_zUfiSms_SendingSms.TP_UD[(0x3f5+6419-0x1d07)]=(0x1540+2722-0x1fdd);
+g_zUfiSms_SendingSms.TP_UD[(0x1629+936-0x19cf)]=(0x26+5187-0x1466);
+g_zUfiSms_SendingSms.TP_UD[(0x69+7564-0x1df2)]=(char)ptDbSaveData->concat_info[
+(0xbf5+5498-0x216f)]%(0x1599+3969-0x241b);g_zUfiSms_SendingSms.TP_UD[
+(0x2a3+5262-0x172d)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
+(0x1ce3+519-0x1ee5)]=(char)ptConcatSms->current_sending+(0x1c26+2588-0x2641);
+g_zUfiSms_SendingSms.TP_UD[(0x1448+4560-0x2612)]=(0x1301+2212-0x1b9f);for(i=
+(0x195a+1926-0x20e0);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.
+TP_UD[i+(0x1abd+2716-0x2552)]=ptSubmit->user_data.sm_data[i];}
+g_zUfiSms_SendingSms.TP_UDLength=ptSubmit->user_data.sm_len+(0x1071+3613-0x1e87)
+;}else{for(i=(0x2126+448-0x22e6);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>
-(0x944+2347-0x126e)){g_zUfiSms_SendingSms.TP_UDHI=(0xaf3+906-0xe7c);
-g_zUfiSms_SendingSms.TP_UD[(0x209b+982-0x2471)]=(0x20d5+820-0x2404);
-g_zUfiSms_SendingSms.TP_UD[(0x2071+127-0x20ef)]=(0x4a4+2989-0x104c);
-g_zUfiSms_SendingSms.TP_UD[(0xc61+6061-0x240c)]=(0xf99+2148-0x17fa);
-g_zUfiSms_SendingSms.TP_UD[(0x61f+651-0x8a7)]=(char)ptDbSaveData->concat_info[
-(0x163+3971-0x10e6)]%(0xafa+6684-0x2417);g_zUfiSms_SendingSms.TP_UD[
-(0xd6a+3249-0x1a17)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
-(0x11a4+3776-0x205f)]=(char)ptConcatSms->current_sending+(0x9cf+6032-0x215e);(
+(0x1e29+2056-0x2630)){g_zUfiSms_SendingSms.TP_UDHI=(0xef6+2880-0x1a35);
+g_zUfiSms_SendingSms.TP_UD[(0x1640+3051-0x222b)]=(0x6e2+3899-0x1618);
+g_zUfiSms_SendingSms.TP_UD[(0x21ba+469-0x238e)]=(0x1456+2214-0x1cf7);
+g_zUfiSms_SendingSms.TP_UD[(0xc4+6191-0x18f1)]=(0x1bda+677-0x1e7c);
+g_zUfiSms_SendingSms.TP_UD[(0x202b+436-0x21dc)]=(char)ptDbSaveData->concat_info[
+(0x683+3619-0x14a6)]%(0x88c+7764-0x25e1);g_zUfiSms_SendingSms.TP_UD[
+(0x23a+3304-0xf1e)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
+(0xed7+2314-0x17dc)]=(char)ptConcatSms->current_sending+(0x1c11+1674-0x229a);(
void)Bytes2String(ptSubmit->user_data.sm_data,&g_zUfiSms_SendingSms.TP_UD[
-(0x1de3+780-0x20e9)],ptSubmit->user_data.sm_len);}else{(void)Bytes2String(
+(0x106f+2495-0x1a28)],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)(0x22c+6623-0x1baa))&&x<((char)(0x1eff+1262-0x2386))){x=(x-
-((char)(0x878+4549-0x19dc)))+((char)(0xad8+4812-0x1d63));}return x;}unsigned
-char zUfiSms_Char2Dec(unsigned char x){unsigned char d=(0xc1d+6459-0x2558);if(x
->=((char)(0x9d+3619-0xe7f))&&x<((char)(0x7a6+4716-0x19cb))){d=(x-
-((char)(0x30b+1344-0x80a)))+(0x50b+98-0x563);}else{d=x-
-((char)(0x11a0+2220-0x1a1c));}return d;}unsigned char zUfiSms_Char2Byte(unsigned
- char a,unsigned char b){unsigned char data=(0x9f4+3761-0x18a5);unsigned char l=
-(0xaf0+1589-0x1125),h=(0x598+5779-0x1c2b);a=zUfiSms_Low2High(a);b=
+((char)(0x159a+4493-0x26c6))&&x<((char)(0x14bc+3874-0x2377))){x=(x-
+((char)(0x2161+722-0x23d2)))+((char)(0x109a+4122-0x2073));}return x;}unsigned
+char zUfiSms_Char2Dec(unsigned char x){unsigned char d=(0xed1+2120-0x1719);if(x
+>=((char)(0x625+4516-0x1788))&&x<((char)(0x16c6+617-0x18e8))){d=(x-
+((char)(0x89d+4160-0x189c)))+(0x3c+8432-0x2122);}else{d=x-
+((char)(0x6f4+6905-0x21bd));}return d;}unsigned char zUfiSms_Char2Byte(unsigned
+char a,unsigned char b){unsigned char data=(0x175+9352-0x25fd);unsigned char l=
+(0x15ba+3514-0x2374),h=(0x11c3+4016-0x2173);a=zUfiSms_Low2High(a);b=
zUfiSms_Low2High(b);h=zUfiSms_Char2Dec(a);l=zUfiSms_Char2Dec(b);data=h*
-(0x1cc+2766-0xc8a)+l;return data;}void zUfiSms_Str2Bytes(unsigned char*text,int
-text_len,unsigned char*data,int data_len){int i=(0xd73+4226-0x1df5);while(
-(0x89f+4285-0x195a)*i+(0x1f78+1746-0x2649)<text_len){data[i]=zUfiSms_Char2Byte(
-text[(0x4f2+1141-0x965)*i],text[(0x3a7+6631-0x1d8c)*i+(0x199b+819-0x1ccd)]);i++;
-}}int zUfiSms_SplitString(char*input,char***output,char cMatchChar){int src=
-(0x7b4+7161-0x23ad);int dst=(0x78c+4610-0x198e);int count=(0x778+522-0x982);int
-size=(0x10a2+2981-0x1c3f);char quoted=(0x136b+1493-0x1940);char**tmpout=NULL;*
+(0x20f2+734-0x23c0)+l;return data;}void zUfiSms_Str2Bytes(unsigned char*text,int
+ text_len,unsigned char*data,int data_len){int i=(0x1ffa+1060-0x241e);while(
+(0x8e3+5824-0x1fa1)*i+(0x1174+4317-0x2250)<text_len){data[i]=zUfiSms_Char2Byte(
+text[(0x4cd+218-0x5a5)*i],text[(0x624+1398-0xb98)*i+(0x1972+1115-0x1dcc)]);i++;}
+}int zUfiSms_SplitString(char*input,char***output,char cMatchChar){int src=
+(0x1e4d+619-0x20b8);int dst=(0x81d+765-0xb1a);int count=(0x525+5282-0x19c7);int
+size=(0xeb6+1083-0x12e9);char quoted=(0xe5b+3119-0x1a8a);char**tmpout=NULL;*
output=(char**)malloc(sizeof(char*)*size);if(NULL==*output){return-
-(0x279+7772-0x20d4);}(*output)[count++]=input;for(src=dst=(0x2b9+2187-0xb44);
+(0xf07+2265-0x17df);}(*output)[count++]=input;for(src=dst=(0xde6+1614-0x1434);
input[src];){char cInputChar=input[src];if(!quoted&&cInputChar==cMatchChar){
-input[dst++]=(0xbed+6876-0x26c9);while(input[++src]&&(int)isspace(input[src])){}
-;if(count>=size){size+=(0x1613+2498-0x1fc5);tmpout=(char**)realloc(*output,
-sizeof(char*)*size);if(NULL==tmpout){return-(0xc3+5047-0x1479);}*output=tmpout;}
-(*output)[count++]=input+dst;}else if(!quoted&&(cInputChar=='\''||cInputChar==
-((char)(0x721+3045-0x12e4)))){quoted=cInputChar;src++;}else if(cInputChar==
-quoted){quoted=(0x16b+9508-0x268f);src++;}else{if(cInputChar=='\\'&"ed!='\''
+input[dst++]=(0x2457+115-0x24ca);while(input[++src]&&(int)isspace(input[src])){}
+;if(count>=size){size+=(0x37+794-0x341);tmpout=(char**)realloc(*output,sizeof(
+char*)*size);if(NULL==tmpout){return-(0xdc8+14-0xdd5);}*output=tmpout;}(*output)
+[count++]=input+dst;}else if(!quoted&&(cInputChar=='\''||cInputChar==
+((char)(0xf79+5863-0x263e)))){quoted=cInputChar;src++;}else if(cInputChar==
+quoted){quoted=(0x976+6252-0x21e2);src++;}else{if(cInputChar=='\\'&"ed!='\''
){src++;cInputChar=input[src];if(!cInputChar){free(*output);*output=NULL;return-
-(0xe42+2238-0x16ff);}}input[dst++]=cInputChar;src++;}}input[dst]=
-(0xeb7+4069-0x1e9c);if(quoted){free(*output);*output=NULL;return-
-(0x14a+8739-0x236c);}return count;}int zUfiSms_atohex(char c){int result=
-(0x1139+408-0x12d1);if(c>=((char)(0x48a+7584-0x21fa))&&c<=
-((char)(0x9f4+3388-0x16f7))){result=c-((char)(0xe93+3332-0x1b67));}else if(c>=
-((char)(0x1b0b+1141-0x1f1f))&&c<=((char)(0x68f+838-0x96f))){result=(c-
-((char)(0x274+3318-0xf09)))+(0x88a+1474-0xe42);}else if(c>=
-((char)(0x452+2673-0xe82))&&c<=((char)(0xabc+1489-0x1047))){result=(c-
-((char)(0x34b+3278-0xfd8)))+(0x800+6569-0x219f);}else{at_print(LOG_DEBUG,
+(0xd43+1112-0x119a);}}input[dst++]=cInputChar;src++;}}input[dst]=
+(0x223+1514-0x80d);if(quoted){free(*output);*output=NULL;return-
+(0x17fb+2882-0x233c);}return count;}int zUfiSms_atohex(char c){int result=
+(0x6cb+3755-0x1576);if(c>=((char)(0x1976+2687-0x23c5))&&c<=
+((char)(0x1759+2474-0x20ca))){result=c-((char)(0x981+3871-0x1870));}else if(c>=
+((char)(0x71c+7295-0x233a))&&c<=((char)(0x1864+1022-0x1bfc))){result=(c-
+((char)(0x1c15+1745-0x2285)))+(0xb5a+6056-0x22f8);}else if(c>=
+((char)(0x1e37+2266-0x26d0))&&c<=((char)(0x20e2+1559-0x26b3))){result=(c-
+((char)(0x1214+562-0x1405)))+(0x15d7+1299-0x1ae0);}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=(0xf4a+5433-0x2483);int high=
-(0xbd6+1029-0xfdb);if(in_ptr==NULL||out_ptr==NULL){printf(
+int iLength,unsigned char*out_ptr){int low=(0xe73+4023-0x1e2a);int high=
+(0x34d+8447-0x244c);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>(0x1134+317-0x1271)){low=in_ptr[iLength-
-(0xb72+940-0xf1d)]&(0x1374+74-0x13af);high=(in_ptr[iLength-(0x3a8+6798-0x1e35)]&
-(0x773+7983-0x25b2))>>(0xf88+2284-0x1870);out_ptr[(0x1e1d+336-0x1f6b)*iLength-
-(0x6f4+2261-0xfc8)]=g_zUfiSms_DigAscMap[low];out_ptr[(0x596+4311-0x166b)*iLength
--(0x24d+7320-0x1ee3)]=g_zUfiSms_DigAscMap[high];iLength--;}return ZUFI_SUCC;}
+);return ZUFI_FAIL;}while(iLength>(0x103f+3988-0x1fd3)){low=in_ptr[iLength-
+(0x1fa2+181-0x2056)]&(0x1c+6685-0x1a2a);high=(in_ptr[iLength-(0x1c5b+6-0x1c60)]&
+(0x367+5274-0x1711))>>(0x1ab1+1174-0x1f43);out_ptr[(0x224+8713-0x242b)*iLength-
+(0x525+4452-0x1688)]=g_zUfiSms_DigAscMap[low];out_ptr[(0x166+868-0x4c8)*iLength-
+(0x272+4144-0x12a0)]=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=(0x701+1770-0xdeb);unsigned
-int j=(0x1754+2863-0x2283);unsigned int k=(0x22ff+93-0x235c);unsigned int p=
-(0xaa+7227-0x1ce5);unsigned int s=(0x1d7c+1866-0x24c6);s=sizeof(
+unsigned char*ucs2,unsigned int len){unsigned int i=(0x772+4079-0x1761);unsigned
+ int j=(0x1f90+656-0x2220);unsigned int k=(0x9d8+7194-0x25f2);unsigned int p=
+(0xedf+5179-0x231a);unsigned int s=(0xf23+2976-0x1ac3);s=sizeof(
zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x92d+4123-0x1948)]);for(i=
-(0x1bbc+1128-0x2024);i<len;i++){j=gsmdef[i];if(j==(0x5b4+3069-0x1196)){i++;for(p
-=(0xfa9+2512-0x1979);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
-(0xb8+7710-0x1ed6)]==gsmdef[i]){ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
-[p][(0x404+8117-0x23b8)]>>(0x1630+1401-0x1ba1);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0xe94+2665-0x18fc)]);break;}}}else{
-ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x153b+3751-0x23da);k++;ucs2[
-k]=(unsigned char)(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]);}k++;}ucs2[k]='\0';
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x4c4+2499-0xe87)]);for(i=
+(0x91f+3414-0x1675);i<len;i++){j=gsmdef[i];if(j==(0x324+7705-0x2122)){i++;for(p=
+(0x5b5+5399-0x1acc);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
+(0x49c+5582-0x1a6a)]==gsmdef[i]){ucs2[k]=
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x91f+4229-0x19a3)]>>
+(0x18d9+2620-0x230d);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x49+7754-0x1e92)]);break;}}}else{
+ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0xa43+5800-0x20e3);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=
-(0x90c+4255-0x19ab);unsigned int j=(0x1fe8+1265-0x24d9);unsigned int k=
-(0x1512+1860-0x1c56);unsigned int p=(0xae9+4802-0x1dab);unsigned int s=
-(0x8ac+6257-0x211d);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x1b+2275-0x8fe)]);for(i=
-(0xf8f+2667-0x19fa);i<len;i++){j=gsmdef[i];if(j==(0xeeb+1191-0x1377)){i++;for(p=
-(0x1812+1349-0x1d57);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x604+6510-0x1f72)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x55b+6058-0x1d04)]>>(0x1674+571-0x18a7);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x1445+3159-0x209b)]);break;}}}else{ucs2
-[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0xdb7+2762-0x1879);k++;ucs2[k]=(
+(0x1890+1677-0x1f1d);unsigned int j=(0x15a+3008-0xd1a);unsigned int k=
+(0x17f0+3368-0x2518);unsigned int p=(0x203+6269-0x1a80);unsigned int s=
+(0x6f+1329-0x5a0);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[(0xea5+4306-0x1f77)]);for(i=
+(0x1e77+1504-0x2457);i<len;i++){j=gsmdef[i];if(j==(0x91+9692-0x2652)){i++;for(p=
+(0x6ef+1274-0xbe9);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x94+310-0x1ca)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x1e01+1346-0x2342)]>>(0xfbd+3922-0x1f07);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x72+752-0x361)]);break;}}}else{ucs2[k]=
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x1ce9+1202-0x2193);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=(0xbe6+6660-0x25ea)
-;unsigned long j=(0xdcc+5902-0x24da);unsigned long k=(0x1821+2079-0x2040);
-unsigned long p=(0x46d+3502-0x121b);unsigned long s=(0x408+1915-0xb83);unsigned
-long is_find=(0xfd+4304-0x11cd);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/
-sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x158c+1484-0x1b58)]);for(i=
-(0x423+3577-0x121c);i<len;i++){j=gsmdef[i];if(j==(0xebf+281-0xfbd)){i++;for(p=
-(0x3a1+1410-0x923);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x14c2+917-0x1857)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x17e2+3204-0x2465)]>>(0x329+8677-0x2506);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xf37+6031-0x26c5)]);is_find=
-(0x15dd+4043-0x25a7);break;}}if(!is_find){at_print(LOG_DEBUG,
+gsmdef,unsigned char*ucs2,unsigned long len){unsigned long i=
+(0x10ef+5326-0x25bd);unsigned long j=(0xccb+4333-0x1db8);unsigned long k=
+(0xc58+3755-0x1b03);unsigned long p=(0x878+7489-0x25b9);unsigned long s=
+(0x1b1c+174-0x1bca);unsigned long is_find=(0x138a+2114-0x1bcc);s=sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[
+(0x1b5+2026-0x99f)]);for(i=(0xdac+6077-0x2569);i<len;i++){j=gsmdef[i];if(j==
+(0x7e7+2887-0x1313)){i++;for(p=(0x1ed1+138-0x1f5b);p<s;p++){if(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xcf+1698-0x771)]==gsmdef[i]){ucs2[k]=
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x145b+2719-0x1ef9)]>>
+(0x16f4+3969-0x266d);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xadb+3013-0x169f)]);is_find=
+(0x139f+2411-0x1d09);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]>>(0x1fab+852-0x22f7)
+,gsmdef[i]);i--;ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0xa84+2744-0x1534)
;k++;ucs2[k]=(unsigned char)(zte_sms_GSMDefault_To_UCS2_Table[j]);}}else{ucs2[k]
-=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0xadd+1401-0x104e);k++;ucs2[k]=(unsigned
+=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x160+489-0x341);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[(0x1757+1262-0x1c43)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
-(0x2fd+3409-0x104d)]={(0x9da+3112-0x1602)};UINT16 len=(0x5f9+5777-0x1c8a);switch
-(g_zUfiSms_Language){case DCS_PORTUGUESE:if(g_zUfiSms_IsLanguageShift==
+ascii_content[(0x1cea+2242-0x25aa)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
+(0x7da+1040-0xbe9)]={(0x90c+1227-0xdd7)};UINT16 len=(0x2358+165-0x23fd);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==
WMS_UDH_NAT_LANG_LS){len=zte_wms_convert_PORTUGUESE_To_UCS2_USE_GSM7_SS_PORTU_LS
@@ -667,76 +667,76 @@
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[(0x4c5+4144-0x14f4)+(0x3ef+7399-0x2036)+(0xb2+7181-0x1cbe)]={
-(0x2e2+979-0x6b5)};int len=(0x1c00+888-0x1f78);if(msg_content==NULL||out_content
-==NULL||sms_len>(0x186b+2940-0x22a7)||sms_len<(0xef+5176-0x1525)){return endEsc;
-}len=sms_len;memset(data,(0x1b8+8931-0x249b),(0x327+249-0x37e));p=data;if(isEsc)
-{*p=(0x503+6694-0x1f0e);p++;}zUfiSms_Str2Bytes((unsigned char*)msg_content,len,(
-unsigned char*)p,(0x358+4037-0x127d));if(p[len/(0x10c4+5155-0x24e5)-
-(0x197d+2405-0x22e1)]==(0xd98+1832-0x14a5)){endEsc=TRUE;}zUfiSms_ConvertUcs2(
-data,len/(0x6ac+3020-0x1276)+(isEsc?(0x84+6914-0x1b85):(0x12e8+2153-0x1b51))-(
-endEsc?(0xcb8+33-0xcd8):(0x3c9+651-0x654)),out_content);return endEsc;}byte*
-zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){byte buf[(0xd57+6002-0x24a8)],c;
-int n;n=sizeof(buf)-(0x880+738-0xb61);buf[n]='\0';do{c=(byte)(v%r);if(n<=
-(0x1994+3034-0x256e)){printf("\x4f\x56\x45\x52\x46\x4c\x4f\x57\x20");break;}buf[
---n]=(byte)((c>(0xc7b+6134-0x2468))?c+((char)(0x115a+3236-0x1dbd))-
-(0x8a6+1689-0xf35):c+((char)(0xa05+1419-0xf60)));}while((v/=r)>
-(0x1263+3305-0x1f4c));while((*s++=buf[n++])!=(0xd30+110-0xd9e));return(s-
-(0x30c+2263-0xbe2));}byte*zUfiSms_SmsiAddrToStr(wms_address_s_type addr,byte*
-res_ptr,UINT8*type_of_addr){byte bcd_idx=(0x13b0+4349-0x24ad);UINT8 temp=
-(0x1758+504-0x1950);*type_of_addr=(0x1b47+2285-0x2434);temp=(UINT8)((uint32)addr
-.number_type&(0x20d0+1301-0x25de));*type_of_addr=(UINT8)((*type_of_addr|temp)<<
-(0x1937+801-0x1c54));temp=(UINT8)((uint32)addr.number_plan&(0x178+2812-0xc6d));*
-type_of_addr=*type_of_addr|temp;*type_of_addr=*type_of_addr|(0x7c4+6483-0x2097);
-while(bcd_idx<addr.number_of_digits){if(addr.digits[bcd_idx]==
-(0x9f0+5976-0x213e)){addr.digits[bcd_idx]=(0x11b9+3860-0x20cd);}res_ptr=
-zUfiSms_SmsiUtilitoa((uint32)addr.digits[bcd_idx],res_ptr,(0xe35+3826-0x1d17));
+data[(0x10ea+4659-0x231c)+(0x126+8654-0x2254)+(0x1d20+407-0x1eb6)]={
+(0x836+3314-0x1528)};int len=(0xbe2+674-0xe84);if(msg_content==NULL||out_content
+==NULL||sms_len>(0x1e4c+1681-0x239d)||sms_len<(0xa10+7381-0x26e3)){return endEsc
+;}len=sms_len;memset(data,(0x6d3+1603-0xd16),(0x160+5820-0x177a));p=data;if(
+isEsc){*p=(0xf93+1585-0x15a9);p++;}zUfiSms_Str2Bytes((unsigned char*)msg_content
+,len,(unsigned char*)p,(0xc04+959-0xf23));if(p[len/(0x2dd+7843-0x217e)-
+(0x1cd+5625-0x17c5)]==(0x183d+2356-0x2156)){endEsc=TRUE;}zUfiSms_ConvertUcs2(
+data,len/(0x3ec+182-0x4a0)+(isEsc?(0x1178+2874-0x1cb1):(0x1119+2397-0x1a76))-(
+endEsc?(0x82d+4882-0x1b3e):(0x1e64+71-0x1eab)),out_content);return endEsc;}byte*
+zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){byte buf[(0xc79+2210-0x14fa)],c;
+int n;n=sizeof(buf)-(0x721+1530-0xd1a);buf[n]='\0';do{c=(byte)(v%r);if(n<=
+(0x1a76+1529-0x206f)){printf("\x4f\x56\x45\x52\x46\x4c\x4f\x57\x20");break;}buf[
+--n]=(byte)((c>(0x142a+3110-0x2047))?c+((char)(0x335+2427-0xc6f))-
+(0x13dd+1575-0x19fa):c+((char)(0x15a1+2433-0x1ef2)));}while((v/=r)>
+(0xe1f+4436-0x1f73));while((*s++=buf[n++])!=(0x104+1391-0x673));return(s-
+(0x6cc+4653-0x18f8));}byte*zUfiSms_SmsiAddrToStr(wms_address_s_type addr,byte*
+res_ptr,UINT8*type_of_addr){byte bcd_idx=(0x11b2+3387-0x1eed);UINT8 temp=
+(0x1244+4046-0x2212);*type_of_addr=(0x58a+2529-0xf6b);temp=(UINT8)((uint32)addr.
+number_type&(0xf6f+3882-0x1e92));*type_of_addr=(UINT8)((*type_of_addr|temp)<<
+(0x4b4+3536-0x1280));temp=(UINT8)((uint32)addr.number_plan&(0x20da+664-0x236b));
+*type_of_addr=*type_of_addr|temp;*type_of_addr=*type_of_addr|(0x26b+5049-0x15a4)
+;while(bcd_idx<addr.number_of_digits){if(addr.digits[bcd_idx]==
+(0x14ea+1353-0x1a29)){addr.digits[bcd_idx]=(0x692+7980-0x25be);}res_ptr=
+zUfiSms_SmsiUtilitoa((uint32)addr.digits[bcd_idx],res_ptr,(0x1e9+4887-0x14f0));
bcd_idx++;}return res_ptr;}byte*zUfiSms_SmsiUtilitoaFill(word v,byte*rb_ptr){int
- n;byte c,*ptr;ptr=rb_ptr+(0xf74+639-0x11f1);*ptr='\0';for(n=
-(0x13e2+2450-0x1d74);n<(0xfcb+5378-0x24cb);++n){c=(byte)(v%(0x1cc1+379-0x1e32));
-v/=(0x219+9121-0x25b0);*--ptr=(c+((char)(0x865+268-0x941)));}return rb_ptr+
-(0x9b9+346-0xb11);}void zUfiSms_SprintfTime(char*str_time,int len,int t){if(t<
-(0x1382+3886-0x22a6)){snprintf(str_time,len,"\x30\x25\x78",t);}else{snprintf(
+ n;byte c,*ptr;ptr=rb_ptr+(0x310+8135-0x22d5);*ptr='\0';for(n=
+(0x17b0+1700-0x1e54);n<(0x7ea+2346-0x1112);++n){c=(byte)(v%(0x156b+516-0x1765));
+v/=(0x110f+3369-0x1e2e);*--ptr=(c+((char)(0x1637+4015-0x25b6)));}return rb_ptr+
+(0x14c+3928-0x10a2);}void zUfiSms_SprintfTime(char*str_time,int len,int t){if(t<
+(0xc19+6078-0x23cd)){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=
-(0x1ae7+252-0x1be3);concat_8->seq_num--;if(concat_8->total_sm>
+(0x1a44+668-0x1ce0);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=
-(0xfcc+1753-0x16a4);db_data->concat_info[(0x6ff+904-0xa87)]=(0x21a5+1493-0x267b)
-*mux+concat_8->msg_ref;db_data->concat_info[(0x3eb+4431-0x1538)]=concat_8->
-seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x194c+909-0x1cd8);db_data->concat_info[
-(0x1422+2650-0x1e7b)]=concat_8->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
-ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x955+574-0xb92)?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=DCS_PORTUGUESE;break;default:
-break;}}static void zUfiSms_ParserLangLs(T_zUfiSms_Udh*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=DCS_PORTUGUESE;
-break;default:break;}}static void zUfiSms_ParseDeliverConcat16(
-T_zUfiSms_UdhConcat16*concat_16,T_zUfiSms_DbStoreData*db_data){int mux=
-(0xe1c+3087-0x1a2b);concat_16->seq_num--;db_data->concat_sms=
-(0x1b52+1615-0x21a0);
-#if (0x41+8625-0x21f2)
-db_data->concat_info[(0x584+4813-0x1851)]=concat_16->msg_ref;db_data->
-concat_info[(0x2105+780-0x2410)]=concat_16->total_sm;db_data->concat_info[
-(0x4e8+4471-0x165d)]=concat_16->seq_num;
+(0x15fd+4043-0x25c7);db_data->concat_info[(0x136d+4152-0x23a5)]=
+(0x60d+5341-0x19eb)*mux+concat_8->msg_ref;db_data->concat_info[
+(0x122f+4129-0x224e)]=concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+
+(0x18a9+1901-0x2015);db_data->concat_info[(0x169+959-0x527)]=concat_8->total_sm-
+ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>ZTE_WMS_CONCAT_SMS_COUNT_MAX-
+(0x11b6+340-0x1309)?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=
+DCS_PORTUGUESE;break;default:break;}}static void zUfiSms_ParserLangLs(
+T_zUfiSms_Udh*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=DCS_PORTUGUESE;break;default:break;}}static void
+zUfiSms_ParseDeliverConcat16(T_zUfiSms_UdhConcat16*concat_16,
+T_zUfiSms_DbStoreData*db_data){int mux=(0xefc+3294-0x1bda);concat_16->seq_num--;
+db_data->concat_sms=(0x6c3+2662-0x1128);
+#if (0xb12+4901-0x1e37)
+db_data->concat_info[(0xa94+2988-0x1640)]=concat_16->msg_ref;db_data->
+concat_info[(0xf83+129-0x1003)]=concat_16->total_sm;db_data->concat_info[
+(0x1563+2585-0x1f7a)]=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[(0xba0+5005-0x1f2d)]=(0xcc9+823-0xf01)*mux+concat_16->
-msg_ref;db_data->concat_info[(0x368+281-0x47f)]=concat_16->seq_num%
-ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x1db6+1836-0x24e1);db_data->concat_info[
-(0x1603+2796-0x20ee)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
-ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x1177+3847-0x207d)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(
+db_data->concat_info[(0x8e6+5844-0x1fba)]=(0x1790+1326-0x1bbf)*mux+concat_16->
+msg_ref;db_data->concat_info[(0x1fea+252-0x20e4)]=concat_16->seq_num%
+ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x493+6167-0x1ca9);db_data->concat_info[
+(0x1301+749-0x15ed)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
+ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x2542+318-0x267f)?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=
-(0xe13+2177-0x1693);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8),
-db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0x14b8+786-0x17c9);
+(0x87b+5562-0x1e34);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8),
+db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0x352+6371-0x1c34);
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:
@@ -746,155 +746,155 @@
);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=(0x21a+6022-0x19a0);int ind=(0x72+5336-0x154a);if((
+WMS_GW_ALPHABET_MAX32;int i=(0x893+1286-0xd99);int ind=(0x1a23+2703-0x24b2);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,
-(0x1655+180-0x1709),ZTE_WMS_ADDRESS_LEN_MAX+(0x6ef+1879-0xe45));db_data->number[
-(0x79f+3946-0x1709)]=((char)(0x28f+8834-0x24e6));for(i=(0xbff+4028-0x1bbb);i<
-address_ptr->number_of_digits;i++){if((0x53+7174-0x1c4f)==address_ptr->digits[i]
-){db_data->number[i+(0x150+2956-0xcdb)]=((char)(0x1265+1454-0x17e3));}else{
-db_data->number[i+(0xf0c+4295-0x1fd2)]=((char)(0xb04+2756-0x1598))+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(
+(0xd79+1350-0x12bf),ZTE_WMS_ADDRESS_LEN_MAX+(0x44d+3792-0x131c));db_data->number
+[(0x6db+3207-0x1362)]=((char)(0x477+5297-0x18fd));for(i=(0x28d+1152-0x70d);i<
+address_ptr->number_of_digits;i++){if((0x5bf+3915-0x1500)==address_ptr->digits[i
+]){db_data->number[i+(0x301+4060-0x12dc)]=((char)(0xe66+6191-0x2665));}else{
+db_data->number[i+(0x123f+3801-0x2117)]=((char)(0x2317+539-0x2502))+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[
-(0x139c+4895-0x26ba)]),address_ptr->digits,address_ptr->number_of_digits);}else{
-for(i=(0xe81+2333-0x179e);i<address_ptr->number_of_digits;i++){if(
-(0x4a5+6137-0x1c94)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0x1930+2444-0x228c));}else{db_data->number[i]=
-((char)(0xa8f+6128-0x224f))+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=(0x161b+1150-0x1a98);}else{db_data->
-tp_udhi=(0x8d4+2857-0x13fd);}if(db_data->tp_udhi==(0x1364+3556-0x2147)){for(ind=
-(0x133+2690-0xbb5);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[
-(0xfbc+5887-0x26ba)]){printf(
+(0xaf+8212-0x20c2)]),address_ptr->digits,address_ptr->number_of_digits);}else{
+for(i=(0xa01+5949-0x213e);i<address_ptr->number_of_digits;i++){if(
+(0x156+1468-0x708)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0xafd+6222-0x231b));}else{db_data->number[i]=((char)(0x7b+5385-0x1554))+
+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=(0x75d+1322-0xc86);}
+else{db_data->tp_udhi=(0x57b+6875-0x2056);}if(db_data->tp_udhi==
+(0x1f1+2328-0xb08)){for(ind=(0x74a+1041-0xb5b);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[(0x1094+482-0x1275)]){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[(0x10e9+5035-0x2493)],ZTE_WMS_CONCAT_SMS_COUNT_MAX);if(
+,db_data->concat_info[(0x1285+203-0x134f)],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)
-(0x44a+4776-0x16f1);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
-unsigned char)(0x3cd+730-0x6a5);}else{printf(
+WMS_GW_ALPHABET_8_BIT>=tp_dcs){db_data->tp_dcs=(unsigned char)(0x703+707-0x9c5);
+}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(unsigned char)
+(0x18d5+1057-0x1cf4);}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=(0xf74+3877-0x1e99);ind<ts_data_ptr->u.
-gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[(0x2ed+7536-0x2059)
-*ind]=((char)(0xbcd+6441-0x24c6));db_data->sms_content[(0x1244+2171-0x1abb)*ind+
-(0x9e7+230-0xacc)]=((char)(0xbc5+5166-0x1fc3));db_data->sms_content[
-(0xadf+4069-0x1ac0)*ind+(0x53+4870-0x1357)]=g_zUfiSms_DigAscMap[((ts_data_ptr->u
-.gw_pp.u.deliver.user_data.sm_data[ind]&(0x1c95+1829-0x22ca))>>(0x8a+3680-0xee6)
-)];db_data->sms_content[(0x686+2509-0x104f)*ind+(0x8d5+6591-0x2291)]=
+alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x1e8+1858-0x92a);ind<ts_data_ptr->u.
+gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[(0xa05+3750-0x18a7)
+*ind]=((char)(0x1b4+7747-0x1fc7));db_data->sms_content[(0x23f4+697-0x26a9)*ind+
+(0x1871+2874-0x23aa)]=((char)(0x232b+670-0x2599));db_data->sms_content[
+(0x4d9+6661-0x1eda)*ind+(0x817+2217-0x10be)]=g_zUfiSms_DigAscMap[((ts_data_ptr->
+u.gw_pp.u.deliver.user_data.sm_data[ind]&(0xb01+3387-0x174c))>>(0xd30+287-0xe4b)
+)];db_data->sms_content[(0x1bb0+380-0x1d28)*ind+(0x548+3993-0x14de)]=
g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data[ind]&
-(0x16b9+1056-0x1aca))];db_data->alphabet=WMS_GW_ALPHABET_UCS2;}}else if(
+(0x4d8+5223-0x1930))];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)
-(0x8ab+6136-0x20a1);}return result;}int zUfiSms_FormatSubmitDbdata(
+(0xda+6005-0x184d);}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=(0xeff+1050-0x1319);int ind=(0x703+5811-0x1db6);if((
+WMS_GW_ALPHABET_MAX32;int i=(0xb69+994-0xf4b);int ind=(0x96d+3938-0x18cf);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[
-(0xc49+4305-0x1d1a)]=((char)(0x3f9+3552-0x11ae));for(i=(0x252+4357-0x1357);i<
-address_ptr->number_of_digits;i++){if((0x118d+3825-0x2074)==address_ptr->digits[
-i]){db_data->number[i+(0x10b7+3714-0x1f38)]=((char)(0x3aa+6259-0x1bed));}else{
-db_data->number[i+(0x1223+2650-0x1c7c)]=((char)(0x18bf+3656-0x26d7))+address_ptr
-->digits[i];}}}else{for(i=(0x287+7252-0x1edb);i<address_ptr->number_of_digits;i
-++){if((0x1baf+624-0x1e15)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0xad3+2619-0x14de));}else{db_data->number[i]=((char)(0x5d5+5220-0x1a09))
-+address_ptr->digits[i];}}}tp_dcs=ts_data_ptr->u.gw_pp.u.submit.dcs.alphabet;
+(0xb4f+386-0xcd1)]=((char)(0x395+685-0x617));for(i=(0x7b6+5855-0x1e95);i<
+address_ptr->number_of_digits;i++){if((0x36+3875-0xf4f)==address_ptr->digits[i])
+{db_data->number[i+(0x1591+2282-0x1e7a)]=((char)(0xa0a+5203-0x1e2d));}else{
+db_data->number[i+(0x12f+8227-0x2151)]=((char)(0x5a8+394-0x702))+address_ptr->
+digits[i];}}}else{for(i=(0x19a4+523-0x1baf);i<address_ptr->number_of_digits;i++)
+{if((0x2fd+2370-0xc35)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0x74+6767-0x1ab3));}else{db_data->number[i]=((char)(0x178+6659-0x1b4b))+
+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)
-(0x86d+5293-0x1d19);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
-unsigned char)(0x1301+3140-0x1f43);}else{printf(
+(0x8c6+3667-0x1718);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
+unsigned char)(0x1e3+6652-0x1bdd);}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=
-(0x10a8+587-0x12f2);}else{db_data->tp_udhi=(0x15f8+3483-0x2393);}if(db_data->
-tp_udhi==(0x2fd+6479-0x1c4b)){for(ind=(0x58d+7772-0x23e9);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[(0x4c3+7317-0x2157)]){printf(
+(0xb21+4779-0x1dcb);}else{db_data->tp_udhi=(0x3bf+7389-0x209c);}if(db_data->
+tp_udhi==(0x604+1104-0xa53)){for(ind=(0x9f5+591-0xc44);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[(0x9a5+1974-0x115a)]){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=(0x1d1+6688-0x1bf1);
+gw_pp.u.submit.dcs.alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x46c+1794-0xb6e);
ind<ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len;ind++){db_data->sms_content[
-(0x2213+943-0x25be)*ind]=((char)(0x156f+483-0x1722));db_data->sms_content[
-(0x17cc+2143-0x2027)*ind+(0x1669+758-0x195e)]=((char)(0x151b+3210-0x2175));
-db_data->sms_content[(0xf14+3124-0x1b44)*ind+(0xf11+123-0xf8a)]=
-g_zUfiSms_DigAscMap[((ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&
-(0x371+1743-0x950))>>(0x8bf+5967-0x200a))];db_data->sms_content[
-(0x1ee0+90-0x1f36)*ind+(0x1f1f+1391-0x248b)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u
-.gw_pp.u.submit.user_data.sm_data[ind]&(0x1536+1801-0x1c30))];db_data->alphabet=
+(0xd5f+5432-0x2293)*ind]=((char)(0x1904+519-0x1adb));db_data->sms_content[
+(0x45f+7368-0x2123)*ind+(0xc71+5286-0x2116)]=((char)(0x51c+5854-0x1bca));db_data
+->sms_content[(0xfb+8680-0x22df)*ind+(0x1860+252-0x195a)]=g_zUfiSms_DigAscMap[((
+ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&(0x10dc+3250-0x1c9e))>>
+(0x70a+1518-0xcf4))];db_data->sms_content[(0x1eef+1046-0x2301)*ind+
+(0x162+4435-0x12b2)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.submit.
+user_data.sm_data[ind]&(0x13b0+2601-0x1dca))];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)(0x9df+3381-0x1712);}return result;}int InvertNumbers(
+tp_dcs=(unsigned char)(0x22b2+841-0x25f9);}return result;}int InvertNumbers(
const char*pSrc,char*pDst,int nSrcLength){int nDstLength;char ch;int i=
-(0x2037+256-0x2137);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1272+1197-0x171f)){
-return-(0xd32+5644-0x233d);}nDstLength=nSrcLength;for(i=(0x1366+4409-0x249f);i<
-nSrcLength;i+=(0x9d3+4832-0x1cb1)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
-nSrcLength&(0x2a4+4783-0x1552)){*(pDst-(0xd71+5976-0x24c7))=
-((char)(0xaf8+78-0xb00));nDstLength++;}*pDst='\0';return nDstLength;}int
+(0x982+5976-0x20da);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1234+1031-0x163b)){
+return-(0x513+4775-0x17b9);}nDstLength=nSrcLength;for(i=(0x8f2+3452-0x166e);i<
+nSrcLength;i+=(0x3cc+2424-0xd42)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
+nSrcLength&(0x251f+420-0x26c2)){*(pDst-(0xf1b+1547-0x1524))=
+((char)(0xc8+7110-0x1c48));nDstLength++;}*pDst='\0';return nDstLength;}int
code_is_gsm7(const SMS_PARAM*pSrc,unsigned char buf[],int nLength){if(pSrc->
-TP_UDHI==(0x3fc+7177-0x2004)){buf[(0x157+3001-0xd0d)]=(unsigned char)nLength;buf
-[(0x3e4+8379-0x249b)]=(unsigned char)pSrc->TP_UD[(0x1c6f+1765-0x2354)];buf[
-(0xc86+4535-0x1e38)]=(0xbb4+2971-0x174f);buf[(0x475+1669-0xaf4)]=(unsigned char)
-pSrc->TP_UD[(0x1248+3059-0x1e39)];buf[(0x131c+2463-0x1cb4)]=(unsigned char)pSrc
-->TP_UD[(0xdcb+2049-0x15c9)];buf[(0xdb0+612-0x100c)]=(unsigned char)pSrc->TP_UD[
-(0x4a7+7094-0x2059)];buf[(0x1181+4846-0x2466)]=(unsigned char)pSrc->TP_UD[
-(0xe9c+2491-0x1852)];buf[(0xa9f+5209-0x1eee)]=(unsigned char)pSrc->TP_UD[
-(0x10d0+1411-0x164c)];buf[(0x24bb+377-0x262a)]=(unsigned char)(buf[
-(0x8b6+5826-0x1f6e)]<<(0x625+6934-0x213a));nLength=nLength-(0xc31+6389-0x251f);
-nLength=Encode7bit(&(pSrc->TP_UD[(0x437+1125-0x894)]),&buf[(0x462+7739-0x2292)],
-nLength+(0xd00+3009-0x18c0))+(0x713+3787-0x15da)+(0x7ff+3349-0x150e);
-#if (0x339+2375-0xc80)
-nLength+=(0x1561+4111-0x256e);
+TP_UDHI==(0xb88+1099-0xfd2)){buf[(0x1c50+1689-0x22e6)]=(unsigned char)nLength;
+buf[(0x6bf+877-0xa28)]=(unsigned char)pSrc->TP_UD[(0x13d3+4792-0x268b)];buf[
+(0x1430+2768-0x1efb)]=(0xf33+1573-0x1558);buf[(0xcfd+5451-0x2242)]=(unsigned
+char)pSrc->TP_UD[(0x1250+3881-0x2177)];buf[(0x201+1848-0x932)]=(unsigned char)
+pSrc->TP_UD[(0x2168+249-0x225e)];buf[(0x9f1+6997-0x253e)]=(unsigned char)pSrc->
+TP_UD[(0xb13+7075-0x26b2)];buf[(0x93b+3073-0x1533)]=(unsigned char)pSrc->TP_UD[
+(0x136+8021-0x2086)];buf[(0x859+6291-0x20e2)]=(unsigned char)pSrc->TP_UD[
+(0x1888+1310-0x1d9f)];buf[(0x811+4032-0x17c7)]=(unsigned char)(buf[
+(0x15a7+3352-0x22b5)]<<(0x9bd+4470-0x1b32));nLength=nLength-(0x15f3+1727-0x1cab)
+;nLength=Encode7bit(&(pSrc->TP_UD[(0xa4d+5311-0x1f04)]),&buf[
+(0x13a2+4678-0x25dd)],nLength+(0x945+3643-0x177f))+(0x320+8581-0x24a1)+
+(0xe35+1344-0x136f);
+#if (0x18f8+134-0x197e)
+nLength+=(0x48c+3265-0x114b);
#endif
-}else{nLength=pSrc->TP_UDLength;buf[(0x18c1+1457-0x1e6f)]=nLength;nLength=
-Encode7bit(pSrc->TP_UD,&buf[(0x913+6106-0x20e9)],nLength+(0x9ab+3947-0x1915))+
-(0x110c+400-0x1298);}at_print(LOG_DEBUG,
+}else{nLength=pSrc->TP_UDLength;buf[(0x4bc+7274-0x2123)]=nLength;nLength=
+Encode7bit(pSrc->TP_UD,&buf[(0x91c+1037-0xd25)],nLength+(0x15bf+1812-0x1cd2))+
+(0x1f6c+1807-0x2677);}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==(0xadf+791-0xdf5)){buf[(0x724+6909-0x221e)
-]=(unsigned char)nLength;buf[(0x11dc+2032-0x19c8)]=(unsigned char)pSrc->TP_UD[
-(0x22f1+792-0x2609)];buf[(0x2c1+7914-0x21a6)]=(0x3aa+4431-0x14f9);buf[
-(0x1281+1702-0x1921)]=(unsigned char)pSrc->TP_UD[(0x17aa+3742-0x2646)];buf[
-(0x1487+1466-0x1a3a)]=(unsigned char)pSrc->TP_UD[(0xb0a+1705-0x11b0)];buf[
-(0xe08+3316-0x1af4)]=(unsigned char)pSrc->TP_UD[(0xb1d+1783-0x1210)];buf[
-(0x1418+4845-0x26fc)]=(unsigned char)pSrc->TP_UD[(0x189a+3177-0x24fe)];buf[
-(0x95f+2396-0x12b8)]=(unsigned char)(EncodeUcs2(&(pSrc->TP_UD[(0x7a7+1969-0xf52)
-]),&buf[(0x17d2+1867-0x1f13)],nLength-(0x1bf7+2032-0x23e1))+(0x20ac+1073-0x24d7)
-);nLength=buf[(0x178d+1383-0x1cf1)]+(0x21e7+1309-0x2700);}else{buf[
-(0x788+3231-0x1424)]=EncodeUcs2(pSrc->TP_UD,&buf[(0x14c8+433-0x1675)],nLength);
-nLength=buf[(0x6bc+723-0x98c)]+(0x7f2+7860-0x26a2);}return nLength;}int
-Encode8bit(const char*pSrc,unsigned char*pDst,int nSrcLength){if(pSrc==NULL||
-pDst==NULL||nSrcLength<(0x1600+2996-0x21b4)){return-(0x1b9+1420-0x744);}memcpy(
-pDst,pSrc,nSrcLength);return nSrcLength;}int EncodePdu_Submit(const SMS_PARAM*
-pSrc,char*pDst){int nLength=(0xce2+233-0xdcb);int nDstLength=(0x1fc+7056-0x1d8c)
-;unsigned char buf[(0xf78+3692-0x1ce4)]={(0x87d+7688-0x2685)};char tmpSCA[
-(0x37f+5741-0x19c8)]={(0x773+5367-0x1c6a)};int check_udl=(0x10a2+84-0x10f6);
-memset(tmpSCA,(0x15da+3057-0x21cb),sizeof(tmpSCA));if(pSrc==NULL||pDst==NULL){
-return-(0x11e8+309-0x131c);}
-#if (0x1849+885-0x1bbd)
+strlen(pSrc->TP_UD);if(pSrc->TP_UDHI==(0xead+4821-0x2181)){buf[
+(0xe0a+4597-0x1ffc)]=(unsigned char)nLength;buf[(0xe3b+707-0x10fa)]=(unsigned
+char)pSrc->TP_UD[(0x8bd+334-0xa0b)];buf[(0x72b+6639-0x2115)]=
+(0x101a+3171-0x1c7d);buf[(0x1b9b+278-0x1cab)]=(unsigned char)pSrc->TP_UD[
+(0x90c+1706-0xfb4)];buf[(0x2cf+979-0x69b)]=(unsigned char)pSrc->TP_UD[
+(0x170f+3688-0x2574)];buf[(0xfd4+670-0x126a)]=(unsigned char)pSrc->TP_UD[
+(0x153+4742-0x13d5)];buf[(0x2c7+5239-0x1735)]=(unsigned char)pSrc->TP_UD[
+(0x1c8+151-0x25a)];buf[(0x1a12+1018-0x1e09)]=(unsigned char)(EncodeUcs2(&(pSrc->
+TP_UD[(0x848+109-0x8af)]),&buf[(0xdaa+3526-0x1b66)],nLength-(0x78+557-0x29f))+
+(0xb5b+800-0xe75));nLength=buf[(0x1c76+643-0x1ef6)]+(0x724+5883-0x1e1b);}else{
+buf[(0x554+6026-0x1cdb)]=EncodeUcs2(pSrc->TP_UD,&buf[(0xb25+6669-0x252e)],
+nLength);nLength=buf[(0x161+6501-0x1ac3)]+(0xf3d+646-0x11bf);}return nLength;}
+int Encode8bit(const char*pSrc,unsigned char*pDst,int nSrcLength){if(pSrc==NULL
+||pDst==NULL||nSrcLength<(0x1736+1653-0x1dab)){return-(0xf95+3531-0x1d5f);}
+memcpy(pDst,pSrc,nSrcLength);return nSrcLength;}int EncodePdu_Submit(const
+SMS_PARAM*pSrc,char*pDst){int nLength=(0x1485+3900-0x23c1);int nDstLength=
+(0x4d0+7850-0x237a);unsigned char buf[(0x1269+4491-0x22f4)]={(0x42f+1054-0x84d)}
+;char tmpSCA[(0xb69+6478-0x2493)]={(0xf73+2172-0x17ef)};int check_udl=
+(0x29f+1977-0xa58);memset(tmpSCA,(0x106d+4792-0x2325),sizeof(tmpSCA));if(pSrc==
+NULL||pDst==NULL){return-(0x1d16+1777-0x2406);}
+#if (0x538+4557-0x1704)
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(
@@ -905,392 +905,391 @@
"\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[(0x6d2+1635-0xd35)]=(char)(((nLength)&
-(0x27+2086-0x84c))==(0x1fb1+323-0x20f4)?(nLength):nLength+(0x14c+5927-0x1872))/
-(0xbe4+249-0xcdb)+(0x405+2560-0xe04);buf[(0x1f6+642-0x477)]=(0x38f+5314-0x17d0);
-strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0x114b+4895-0x2469));if(!(strncmp(pSrc
-->SCA,"\x30\x30\x38\x36",(0x50a+3343-0x1215)))){memset(tmpSCA,
-(0x8f7+5128-0x1cff),sizeof(tmpSCA));nLength=nLength-(0x4bc+6586-0x1e75);
-#if (0x166b+1762-0x1d4c)
-nLength=nLength-(0xfe2+5120-0x23e1);strncpy(tmpSCA,&(pSrc->SCA[
-(0x19b6+3014-0x257a)]),sizeof(tmpSCA)-(0x904+6632-0x22eb));
+nLength=strlen(pSrc->SCA);buf[(0xe29+127-0xea8)]=(char)(((nLength)&
+(0x43f+4736-0x16be))==(0x807+3178-0x1471)?(nLength):nLength+(0x191+5569-0x1751))
+/(0xcd6+6646-0x26ca)+(0x1ac+5481-0x1714);buf[(0xdfa+4650-0x2023)]=
+(0x126b+1825-0x190b);strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0x5bf+2070-0xdd4))
+;if(!(strncmp(pSrc->SCA,"\x30\x30\x38\x36",(0x4f1+1797-0xbf2)))){memset(tmpSCA,
+(0xfd6+3356-0x1cf2),sizeof(tmpSCA));nLength=nLength-(0x844+4930-0x1b85);
+#if (0xa04+3605-0x1818)
+nLength=nLength-(0x21+9837-0x268d);strncpy(tmpSCA,&(pSrc->SCA[(0xa2d+82-0xa7d)])
+,sizeof(tmpSCA)-(0x33a+2088-0xb61));
#else
-tmpSCA[(0x864+2716-0x1300)]=((char)(0x50a+7662-0x22cd));strcpy(&(tmpSCA[
-(0x646+4345-0x173e)]),&(pSrc->SCA[(0xfd1+1753-0x16a8)]));
+tmpSCA[(0x37d+6065-0x1b2e)]=((char)(0x12f9+2205-0x1b6b));strcpy(&(tmpSCA[
+(0x2df+6448-0x1c0e)]),&(pSrc->SCA[(0x23b5+166-0x2459)]));
#endif
-buf[(0x1e1f+1130-0x2289)]=(char)((nLength&(0x3f+5461-0x1593))==
-(0xba9+4743-0x1e30)?nLength:nLength+(0x9a+8567-0x2210))/(0x4d5+8331-0x255e)+
-(0x1346+4647-0x256c);buf[(0x17b+9455-0x2669)]=(0x2db+618-0x4b4);}else if(
-((char)(0x1879+1464-0x1e06))==pSrc->SCA[(0x183+4308-0x1257)]){memset(tmpSCA,
-(0x1762+1249-0x1c43),sizeof(tmpSCA));
-#if (0xdf3+5292-0x229e)
-nLength=nLength-(0x1f8a+1465-0x2542);strncpy(tmpSCA,&(pSrc->SCA[
-(0x16d+5701-0x17b1)]),sizeof(tmpSCA)-(0x1c5+3579-0xfbf));
+buf[(0x1856+877-0x1bc3)]=(char)((nLength&(0x618+2274-0xef9))==
+(0x76f+6125-0x1f5c)?nLength:nLength+(0x1468+3141-0x20ac))/(0x1d01+1779-0x23f2)+
+(0x4eb+1974-0xca0);buf[(0x1879+2926-0x23e6)]=(0x10c8+2449-0x19c8);}else if(
+((char)(0x6b0+2306-0xf87))==pSrc->SCA[(0x194+2783-0xc73)]){memset(tmpSCA,
+(0x4aa+8098-0x244c),sizeof(tmpSCA));
+#if (0x14da+766-0x17d7)
+nLength=nLength-(0x1bd8+1705-0x2280);strncpy(tmpSCA,&(pSrc->SCA[
+(0xd7+5607-0x16bd)]),sizeof(tmpSCA)-(0xe13+1655-0x1489));
#else
strcpy(tmpSCA,pSrc->SCA);
#endif
-buf[(0xe21+5049-0x21da)]=(char)((nLength&(0x20e4+1305-0x25fc))==(0x9d+11-0xa8)?(
-nLength):nLength+(0xa94+1112-0xeeb))/(0x9ef+7034-0x2567)+(0x18b7+2352-0x21e6);
-buf[(0x1961+1167-0x1def)]=(0xb3+9743-0x2631);}
-#if (0x22a+9368-0x26c1)
+buf[(0x530+7039-0x20af)]=(char)((nLength&(0xd30+1127-0x1196))==
+(0x768+6766-0x21d6)?(nLength):nLength+(0x56c+3933-0x14c8))/(0x3f6+3351-0x110b)+
+(0xfd0+4942-0x231d);buf[(0x615+6588-0x1fd0)]=(0x1060+3145-0x1c18);}
+#if (0x10db+653-0x1367)
printf(
"\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x32\x3a\x25\x73" "\n",
pDst);
#endif
-if(nLength<(0x1087+984-0x145e)||nLength>=sizeof(tmpSCA))return-
-(0x3ad+4175-0x13fb);nDstLength=Bytes2String(buf,pDst,(0x256+5631-0x1853));
+if(nLength<(0x1d87+613-0x1feb)||nLength>=sizeof(tmpSCA))return-
+(0x446+1321-0x96e);nDstLength=Bytes2String(buf,pDst,(0x106a+4775-0x230f));
nDstLength+=InvertNumbers(tmpSCA,&pDst[nDstLength],nLength);
-#if (0xdf3+4010-0x1d9c)
+#if (0xe3c+2918-0x19a1)
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[(0x2e4+2203-0xb7f)]==((char)(0x150+3240-0xdcd))){nLength=strlen(&(
-pSrc->TPA[(0x128f+4902-0x25b4)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
-TP_UDHI==(0xb12+5683-0x2145)){if(pSrc->TP_SRR==(0xa87+6707-0x24ba)){buf[
-(0x64b+522-0x855)]=(0x8b5+150-0x93a);}if(pSrc->TP_SRR==(0x11ec+3907-0x212e)){buf
-[(0xdf9+4571-0x1fd4)]=(0x128+5623-0x16ee);}}if(pSrc->TP_UDHI==(0x81b+925-0xbb7))
-{if(pSrc->TP_SRR==(0x6f0+1259-0xbdb)){buf[(0x8d5+6880-0x23b5)]=
-(0xe46+671-0x1094);}if(pSrc->TP_SRR==(0x1df+7757-0x202b)){buf[(0xd83+80-0xdd3)]=
-(0x77b+4075-0x16f5);}}buf[(0x1e34+1257-0x231c)]=(0x485+3123-0x10b8);buf[
-(0x2dd+1910-0xa51)]=(char)nLength;if(pSrc->TPA[(0xa24+6094-0x21f2)]==
-((char)(0x6d7+6425-0x1fc5))){buf[(0x3c7+579-0x607)]=(0x1f3+9352-0x25ea);
-nDstLength+=Bytes2String(buf,&pDst[nDstLength],(0x786+6710-0x21b8));nDstLength+=
-InvertNumbers(&(pSrc->TPA[(0x17d0+3394-0x2511)]),&pDst[nDstLength],nLength);}
-else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",(0x8e2+2303-0x11dd)))){buf[
-(0xccc+239-0xdb9)]=(char)nLength-(0x665+4270-0x1711);buf[(0x484+8744-0x26a9)]=
-(0x1cb+8196-0x213e);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
-(0x57f+5486-0x1ae9));nDstLength+=InvertNumbers(&(pSrc->TPA[(0x789+5152-0x1ba7)])
-,&pDst[nDstLength],nLength-(0x9da+2722-0x147a));}else{buf[(0x992+4252-0x1a2b)]=
-(0x5fc+7179-0x2186);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
-(0x677+4215-0x16ea));nDstLength+=InvertNumbers(pSrc->TPA,&pDst[nDstLength],
-nLength);}
-#if (0x8+3419-0xd62)
+if(pSrc->TPA[(0x764+4262-0x180a)]==((char)(0x917+7520-0x264c))){nLength=strlen(&
+(pSrc->TPA[(0x868+6628-0x224b)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
+TP_UDHI==(0xafa+3285-0x17cf)){if(pSrc->TP_SRR==(0x322+1100-0x76e)){buf[
+(0xbcc+2882-0x170e)]=(0x978+5555-0x1f1a);}if(pSrc->TP_SRR==(0x4ea+8260-0x252d)){
+buf[(0x94b+4267-0x19f6)]=(0x4b4+4710-0x16e9);}}if(pSrc->TP_UDHI==
+(0x8b2+1605-0xef6)){if(pSrc->TP_SRR==(0x1399+2120-0x1be1)){buf[
+(0x16d0+1211-0x1b8b)]=(0x2df+8177-0x227f);}if(pSrc->TP_SRR==(0x1792+68-0x17d5)){
+buf[(0x43+1178-0x4dd)]=(0xe82+3723-0x1c9c);}}buf[(0x12ff+225-0x13df)]=
+(0xa02+7430-0x2708);buf[(0xaf4+4771-0x1d95)]=(char)nLength;if(pSrc->TPA[
+(0x157c+3177-0x21e5)]==((char)(0x15f9+1220-0x1a92))){buf[(0x1e47+461-0x2011)]=
+(0x5dd+61-0x589);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
+(0x521+662-0x7b3));nDstLength+=InvertNumbers(&(pSrc->TPA[(0x19f+266-0x2a8)]),&
+pDst[nDstLength],nLength);}else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",
+(0x1f70+143-0x1ffb)))){buf[(0x49d+8007-0x23e2)]=(char)nLength-
+(0x1923+653-0x1bae);buf[(0x132+8459-0x223a)]=(0x1264+321-0x1314);nDstLength+=
+Bytes2String(buf,&pDst[nDstLength],(0x25d7+39-0x25fa));nDstLength+=InvertNumbers
+(&(pSrc->TPA[(0x921+6642-0x2311)]),&pDst[nDstLength],nLength-
+(0x1788+2025-0x1f6f));}else{buf[(0x9b0+217-0xa86)]=(0x408+5817-0x1a40);
+nDstLength+=Bytes2String(buf,&pDst[nDstLength],(0x9f0+1197-0xe99));nDstLength+=
+InvertNumbers(pSrc->TPA,&pDst[nDstLength],nLength);}
+#if (0x331+4958-0x168e)
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[(0x11c3+357-0x1328)]=pSrc->TP_PID;buf[
-(0x119a+551-0x13c0)]=pSrc->TP_DCS;buf[(0x758+4262-0x17fc)]=pSrc->TP_VP;if(pSrc->
+nLength=(int)pSrc->TP_UDLength;buf[(0x710+4488-0x1898)]=pSrc->TP_PID;buf[
+(0x6a+3593-0xe72)]=pSrc->TP_DCS;buf[(0x1011+5048-0x23c7)]=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==(0x2a6+2203-0xb40)){buf[(0x1477+2964-0x2008)]=(unsigned
- char)nLength;buf[(0x181f+3521-0x25dc)]=(unsigned char)pSrc->TP_UD[
-(0x13cb+2027-0x1bb6)];buf[(0x3d3+2683-0xe49)]=(0xcb3+1294-0x11c1);buf[
-(0x1d22+1583-0x234b)]=(unsigned char)pSrc->TP_UD[(0xe83+3297-0x1b62)];buf[
-(0x11db+4720-0x2444)]=(unsigned char)pSrc->TP_UD[(0x7d0+5400-0x1ce5)];buf[
-(0x55b+8498-0x2685)]=(unsigned char)pSrc->TP_UD[(0x6bc+3429-0x141d)];buf[
-(0x6ab+7797-0x2517)]=(unsigned char)pSrc->TP_UD[(0x281+1093-0x6c1)];if(nLength-
-(0x1220+4773-0x24bf)<=(0x1060+2139-0x18bb)||nLength-(0x261+3342-0xf69)>=sizeof(
-buf)-(0x215c+464-0x2322))return-(0x3a3+3295-0x1081);buf[(0x2d7+6273-0x1b55)]=(
-unsigned char)(Encode8bit(&(pSrc->TP_UD[(0xe8a+4216-0x1efc)]),&buf[
-(0xee3+2852-0x19fd)],(unsigned short)(nLength-(0x16d+1080-0x59f)))+
-(0x103f+2572-0x1a45));nLength=buf[(0x1424+191-0x14e0)]+(0x30f+3433-0x1074);}else
-{if(nLength<=(0x1344+64-0x1384)||nLength>=sizeof(buf)-(0x17c7+2589-0x21e0))
-return-(0x611+2929-0x1181);buf[(0x1c7d+1955-0x241d)]=Encode8bit(pSrc->TP_UD,&buf
-[(0xa71+5914-0x2187)],nLength);nLength=buf[(0x219+7534-0x1f84)]+
-(0xc3f+2972-0x17d7);}}check_udl=nLength-(0x12e8+5148-0x2700);nDstLength+=
+TP_UD);if(pSrc->TP_UDHI==(0x1abc+3032-0x2693)){buf[(0x2548+397-0x26d2)]=(
+unsigned char)nLength;buf[(0xeec+647-0x116f)]=(unsigned char)pSrc->TP_UD[
+(0x69+2939-0xbe4)];buf[(0xff7+4536-0x21aa)]=(0x827+3851-0x1732);buf[
+(0xa7a+6348-0x2340)]=(unsigned char)pSrc->TP_UD[(0xf33+4535-0x20e8)];buf[
+(0x637+4392-0x1758)]=(unsigned char)pSrc->TP_UD[(0x13f5+102-0x1458)];buf[
+(0x2541+271-0x2648)]=(unsigned char)pSrc->TP_UD[(0x575+5731-0x1bd4)];buf[
+(0x37c+634-0x5ed)]=(unsigned char)pSrc->TP_UD[(0x1701+130-0x177e)];if(nLength-
+(0x1946+709-0x1c05)<=(0x168d+1200-0x1b3d)||nLength-(0x618+2424-0xf8a)>=sizeof(
+buf)-(0x2532+434-0x26da))return-(0x9b7+1023-0xdb5);buf[(0x2cc+8670-0x24a7)]=(
+unsigned char)(Encode8bit(&(pSrc->TP_UD[(0x124c+4824-0x251e)]),&buf[
+(0x1b08+1657-0x2177)],(unsigned short)(nLength-(0xd37+274-0xe43)))+
+(0x1f27+1541-0x2526));nLength=buf[(0x4ab+6775-0x1f1f)]+(0x113a+1530-0x1730);}
+else{if(nLength<=(0x103b+2614-0x1a71)||nLength>=sizeof(buf)-(0x51d+3578-0x1313))
+return-(0x17b+8126-0x2138);buf[(0x6ad+1070-0xad8)]=Encode8bit(pSrc->TP_UD,&buf[
+(0x1dbf+1844-0x24ef)],nLength);nLength=buf[(0x1cd+5156-0x15ee)]+
+(0xe61+1743-0x152c);}}check_udl=nLength-(0xe1c+5434-0x2352);nDstLength+=
Bytes2String(buf,&pDst[nDstLength],nLength);sc_cfg_set(NV_CHECK_UDL,"");if(
-check_udl>(0x1d42+2603-0x26e1)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");
-}
-#if (0xfb3+2359-0x18e9)
+check_udl>(0x245+6302-0x1a57)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");}
+#if (0x1e46+1144-0x22bd)
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 (0xae5+736-0xdc4)
+#if (0x9df+3683-0x1841)
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<(0xfa+6260-0x196e)){return-(0x19f9+2773-0x24cd);}nSrc=
-(0x4d2+4182-0x1528);nDst=(0x4d5+973-0x8a2);nByte=(0x1ff1+400-0x2181);nLeft=
-(0x206f+256-0x216f);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
-(0x42d+7557-0x2133);nLeft=*pSrc>>((0xea8+5888-0x25a1)-nByte);pDst++;nDst++;nByte
-++;if(nByte==(0xa21+1436-0xfb6)){*pDst=nLeft;pDst++;nDst++;nByte=
-(0x1c7b+1018-0x2075);nLeft=(0x25f+7960-0x2177);}pSrc++;nSrc++;}*pDst='\0';return
- nDst;}int DecodePushPdu(const char*pSrcPdu,SMS_PARAM*pDst){int nDstLength=
-(0x284+856-0x5dc);unsigned char tmp=(0x39+9484-0x2545);int ud_length=
-(0x14fd+3240-0x21a5);unsigned char buf[(0x8db+2469-0x1180)]={(0xea4+1523-0x1497)
-};char temp_num[(0x579+3856-0x1425)]={(0xce5+3749-0x1b8a)};unsigned char
-first_octet=(0x878+2550-0x126e);unsigned char udhl=(0xc74+1737-0x133d);unsigned
-int halftmp=(0x14f6+4078-0x24e4);char tp_ra[(0x1a18+2583-0x242c)]={
-(0x1c3b+1555-0x224e)};int tmplen=(0x7d3+7006-0x2331);unsigned char IEIDL;int
-pushType=(0x1364+4255-0x2403);const char*pSrc=pSrcPdu;if(pSrcPdu==NULL||pDst==
-NULL){printf(
+==NULL||nSrcLength<(0x1baf+2033-0x23a0)){return-(0xa4f+4897-0x1d6f);}nSrc=
+(0x7ea+3472-0x157a);nDst=(0x1456+1941-0x1beb);nByte=(0x156f+1995-0x1d3a);nLeft=
+(0x107b+2041-0x1874);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
+(0x1575+4548-0x26ba);nLeft=*pSrc>>((0x886+3212-0x150b)-nByte);pDst++;nDst++;
+nByte++;if(nByte==(0xccd+1025-0x10c7)){*pDst=nLeft;pDst++;nDst++;nByte=
+(0x418+8930-0x26fa);nLeft=(0xaa4+3611-0x18bf);}pSrc++;nSrc++;}*pDst='\0';return
+nDst;}int DecodePushPdu(const char*pSrcPdu,SMS_PARAM*pDst){int nDstLength=
+(0x1666+1470-0x1c24);unsigned char tmp=(0xc58+1624-0x12b0);int ud_length=
+(0xbe6+6850-0x26a8);unsigned char buf[(0x96f+6727-0x22b6)]={(0x84+57-0xbd)};char
+ temp_num[(0x22ca+303-0x2395)]={(0xbfa+6737-0x264b)};unsigned char first_octet=
+(0x42c+8917-0x2701);unsigned char udhl=(0x270+7546-0x1fea);unsigned int halftmp=
+(0x93+3637-0xec8);char tp_ra[(0x972+5105-0x1d60)]={(0x19d+4604-0x1399)};int
+tmplen=(0x1987+802-0x1ca9);unsigned char IEIDL;int pushType=(0x2a3+5921-0x19c4);
+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-(0x11e9+2454-0x1b7e);}String2Bytes(pSrc,&tmp,(0x76+7580-0x1e10));
-at_print(LOG_DEBUG,
+);return-(0xf1b+5982-0x2678);}String2Bytes(pSrc,&tmp,(0x65a+123-0x6d3));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==(0x1620+1198-0x1ace)){pSrc+=(0x14a3+2771-0x1f74);}else{tmp=(tmp-
-(0x143+1753-0x81b))*(0xacd+4034-0x1a8d);pSrc+=(0xe5+2836-0xbf5);if(tmp>
-(0x11e2+2239-0x1a81)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x5cd+4707-0x1810));
-tmp=(0x67c+6534-0x1fe2);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=
-tmp;}String2Bytes(pSrc,&tmp,(0xff0+3152-0x1c3e));first_octet=tmp;pSrc+=
-(0x168d+4127-0x26aa);String2Bytes(pSrc,&tmp,(0xc20+1929-0x13a7));halftmp=tmp;if(
-tmp&(0x15cb+1404-0x1b46))tmp+=(0x130c+3513-0x20c4);pSrc+=(0x148b+3745-0x232a);
-memset(tp_ra,(0xa9+9058-0x240b),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
-(0xb59+2691-0x15da));pSrc+=(0x13d2+1859-0x1b13);if((tp_ra[(0x121a+1603-0x185d)]&
-(0x26c+3349-0xf31))==(0x2a7+2391-0xbae)){char tempra[(0x1057+3145-0x1c20)];char
-acAsc[(0x135+7546-0x1e2f)];if(halftmp>=(0xcad+2529-0x1680)){halftmp=(tmp/
-(0x4a4+2331-0xdbd))/(0x1a8a+3165-0x26e0)+(tmp/(0xc40+4176-0x1c8e));}else{halftmp
-=tmp/(0xad2+6434-0x23f2);}memset(tempra,(0x1e2+4784-0x1492),sizeof(tempra));
-memcpy(tempra,pSrc,tmp);memset(acAsc,(0x7df+855-0xb36),sizeof(acAsc));nDstLength
-=String2Bytes(tempra,buf,halftmp&(0xfb8+478-0x118f)?(int)halftmp*
-(0x11a9+2970-0x1d3c)/(0x1a1f+1579-0x2046)+(0xe0c+1952-0x15aa):(int)halftmp*
-(0xf16+1780-0x1603)/(0x320+4447-0x147b));halftmp=Decode7bit(buf,acAsc,nDstLength
-);memset(pDst->TPA,(0x11fd+2766-0x1ccb),sizeof(pDst->TPA));if(halftmp>
-(0x440+7473-0x2151)){memcpy(pDst->TPA,acAsc,(0xe2+8858-0x235c));tmp=
-(0x873+3009-0x1414);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
-(0x101f+5778-0x2691)){SerializeNumbers_sms(pSrc,pDst->TPA,(0x6c3+658-0x935));}
-else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0x3cd+7369-0x2096)]&
-(0x2067+1830-0x26fc))==(0x239c+510-0x2509)){memset(temp_num,(0x2168+860-0x24c4),
-sizeof(temp_num));if(pDst->TPA[(0x31f+8144-0x22ef)]!=((char)(0x199+8415-0x224d))
-){snprintf(temp_num,sizeof(temp_num),"\x25\x73\x25\x73","\x2b",pDst->TPA);if(
-strlen(temp_num)>(0x153+9634-0x26d5)){snprintf(pDst->TPA,sizeof(pDst->TPA),
+,tmp);if(tmp==(0xca+9492-0x25de)){pSrc+=(0xbe6+248-0xcdc);}else{tmp=(tmp-
+(0xfcf+1143-0x1445))*(0xb68+5218-0x1fc8);pSrc+=(0x39b+5776-0x1a27);if(tmp>
+(0x251+280-0x349)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x9f0+3685-0x1835));tmp=
+(0xb89+823-0xea0);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=tmp;}
+String2Bytes(pSrc,&tmp,(0x1a7c+1395-0x1fed));first_octet=tmp;pSrc+=
+(0x24f+138-0x2d7);String2Bytes(pSrc,&tmp,(0x11a0+3091-0x1db1));halftmp=tmp;if(
+tmp&(0x826+7296-0x24a5))tmp+=(0xb6b+1405-0x10e7);pSrc+=(0x69f+2927-0x120c);
+memset(tp_ra,(0x1f5a+830-0x2298),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
+(0x1056+5751-0x26cb));pSrc+=(0x136a+1917-0x1ae5);if((tp_ra[(0x129b+410-0x1435)]&
+(0xab9+1963-0x1214))==(0x26e4+60-0x26d0)){char tempra[(0x545+8568-0x263d)];char
+acAsc[(0x1af5+1162-0x1eff)];if(halftmp>=(0x273+6883-0x1d48)){halftmp=(tmp/
+(0x1627+2025-0x1e0e))/(0x2350+783-0x2658)+(tmp/(0x6ab+5017-0x1a42));}else{
+halftmp=tmp/(0x1ca2+2444-0x262c);}memset(tempra,(0x90c+2428-0x1288),sizeof(
+tempra));memcpy(tempra,pSrc,tmp);memset(acAsc,(0xaec+6273-0x236d),sizeof(acAsc))
+;nDstLength=String2Bytes(tempra,buf,halftmp&(0x864+2581-0x1272)?(int)halftmp*
+(0x7aa+4933-0x1ae8)/(0x1615+1220-0x1ad5)+(0xfa+8735-0x2317):(int)halftmp*
+(0x1377+1644-0x19dc)/(0xb2d+4952-0x1e81));halftmp=Decode7bit(buf,acAsc,
+nDstLength);memset(pDst->TPA,(0xc9f+2092-0x14cb),sizeof(pDst->TPA));if(halftmp>
+(0x1055+2386-0x1987)){memcpy(pDst->TPA,acAsc,(0x5b6+4969-0x18ff));tmp=
+(0xce9+605-0xf26);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
+(0xdf9+5469-0x2336)){SerializeNumbers_sms(pSrc,pDst->TPA,(0xf70+4924-0x228c));}
+else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0x11c4+2143-0x1a23)]&
+(0xd8c+4597-0x1ef0))==(0x900+484-0xa53)){memset(temp_num,(0x1165+5399-0x267c),
+sizeof(temp_num));if(pDst->TPA[(0xb5d+3087-0x176c)]!=((char)(0xe9d+21-0xe87))){
+snprintf(temp_num,sizeof(temp_num),"\x25\x73\x25\x73","\x2b",pDst->TPA);if(
+strlen(temp_num)>(0xdb8+2558-0x1796)){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,(0x17da+3143-0x241f));pSrc+=(0x844+6930-0x2354);String2Bytes(pSrc,(
-unsigned char*)&pDst->TP_DCS,(0x1130+4152-0x2166));pSrc+=(0x1636+946-0x19e6);
-SerializeNumbers_sms(pSrc,pDst->TP_SCTS,(0x1cd1+2539-0x26ae));pSrc+=
-(0x7f9+6993-0x233c);String2Bytes(pSrc,&tmp,(0xbcc+4859-0x1ec5));pSrc+=
-(0x16c3+2676-0x2135);memset(pDst->TP_UD,(0x223d+628-0x24b1),sizeof(pDst->TP_UD))
+TP_PID,(0x96f+4046-0x193b));pSrc+=(0x1861+2623-0x229e);String2Bytes(pSrc,(
+unsigned char*)&pDst->TP_DCS,(0xb6a+3502-0x1916));pSrc+=(0x60c+3411-0x135d);
+SerializeNumbers_sms(pSrc,pDst->TP_SCTS,(0x5d0+3246-0x1270));pSrc+=
+(0x110c+1894-0x1864);String2Bytes(pSrc,&tmp,(0x483+6966-0x1fb7));pSrc+=
+(0x11f0+3670-0x2044);memset(pDst->TP_UD,(0x76f+2954-0x12f9),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&(0x70d+6887-0x21b4)){const char*temp=pSrc;unsigned
-char pduType;unsigned char wspLen;unsigned char udhLen;unsigned char DestPort1;
+,first_octet);if(first_octet&(0x1501+2117-0x1d06)){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,(0x761+3362-0x1481));temp+=
-(0x17dd+3668-0x262f);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0x12a4+2548-0x1c96)
+SMS_NO_PUSH;String2Bytes(temp,&udhl,(0x1054+2479-0x1a01));temp+=
+(0x178a+3052-0x2374);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0x11fd+1395-0x176e)
);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==(0xc31+1282-0x112e)){temp+=(0x10f3+641-0x1372)*
-tmplen+(0xbcf+1043-0xfe0);tmplen=String2Bytes(temp,&DestPort1,
-(0x1307+3749-0x21aa));at_print(LOG_DEBUG,
+,pDst->TP_IEI);if(pDst->TP_IEI==(0x62f+3517-0x13e7)){temp+=(0x15d7+613-0x183a)*
+tmplen+(0xf77+5685-0x25aa);tmplen=String2Bytes(temp,&DestPort1,
+(0x2004+1209-0x24bb));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+=(0x1033+2547-0x1a24)*tmplen;tmplen=String2Bytes(temp,&
-DestPort2,(0x81a+971-0xbe3));at_print(LOG_DEBUG,
+,DestPort1);temp+=(0xa67+3324-0x1761)*tmplen;tmplen=String2Bytes(temp,&DestPort2
+,(0x140f+387-0x1590));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==(0x140c+1746-0x1ad3))&&((DestPort2==
-(0x192b+3602-0x26b9))||(DestPort2==(0x19ea+3170-0x25c7)))){pushType=SMS_PUSH;}}
-if(SMS_PUSH!=pushType){return pushType;}temp=pSrc+udhl*(0x20b2+611-0x2313)+
-(0x28a+2800-0xd76);tmplen=String2Bytes(temp,&pduType,(0xd08+5039-0x20b5));if(
-pduType==(0x535+2536-0xf17)){pushType=SMS_PUSH;temp+=(0x51d+3685-0x137e);tmplen=
-String2Bytes(temp,&pduType,(0x2451+606-0x26ad));if(pduType==(0xe41+5059-0x2140))
-{pushType=SMS_NOTIFICATION;}else{temp+=(0xcd3+3001-0x1888);tmplen=String2Bytes(
-temp,&pduType,(0x14b8+2021-0x1c9b));if((pduType==(0xcbd+4223-0x1c7a))||(pduType
-==(0x453+3569-0x118e))){pushType=SMS_BOOTSTRAP;}}}if((pDst->TP_IEI==
-(0x2eb+7503-0x2036))||(pDst->TP_IEI==(0xb13+1665-0x118f))||(pDst->TP_IEI==
-(0x14ab+4480-0x2623))){temp=pSrc+(0xeaa+5728-0x2506);tmplen=String2Bytes(temp,&
-IEIDL,(0x1a83+1068-0x1ead));if(IEIDL==(udhl-(0xdf+3843-0xfe0))){}else{temp+=
-(0x13b8+247-0x14ad)*(0x14c5+560-0x16ef);tmplen=String2Bytes(temp,&udhLen,
-(0xa37+7174-0x263b));if(udhLen==(0x4bc+6566-0x1e5f)){temp+=(0x76d+7106-0x232d)*
-tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x1e65+1172-0x22f7));pDst->TP_ReferNum
-=RefNum1;temp+=(0xc58+5142-0x206c)*tmplen;tmplen=String2Bytes(temp,&pDst->
-TP_AllPieceNum,(0xeed+3089-0x1afc));temp+=(0x1ac9+2001-0x2298)*tmplen;tmplen=
-String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x390+1503-0x96d));temp+=
-(0x119c+5379-0x269d)*tmplen;}else if(udhLen==(0x5df+6776-0x2053)){temp+=
-(0xe0b+896-0x1189)*tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x709+3357-0x1424))
-;temp+=(0x3b0+272-0x4be)*tmplen;tmplen=String2Bytes(temp,&RefNum2,
-(0x263+6099-0x1a34));int ReferNum=RefNum2+RefNum1*(0x532+4546-0x15f4);pDst->
-TP_ReferNum=ReferNum;temp+=(0x6d3+971-0xa9c)*tmplen;tmplen=String2Bytes(temp,&
-pDst->TP_AllPieceNum,(0xe38+5579-0x2401));temp+=(0xf0b+5028-0x22ad)*tmplen;
-tmplen=String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x8e1+6187-0x210a));temp+=
-(0xd27+5674-0x234f)*tmplen;}}}at_print(LOG_DEBUG,
+,DestPort2);if((DestPort1==(0xae6+6087-0x22a2))&&((DestPort2==(0x91b+1425-0xe28)
+)||(DestPort2==(0x11b4+5562-0x26e9)))){pushType=SMS_PUSH;}}if(SMS_PUSH!=pushType
+){return pushType;}temp=pSrc+udhl*(0x2035+981-0x2408)+(0x220+576-0x45c);tmplen=
+String2Bytes(temp,&pduType,(0xcf5+4941-0x2040));if(pduType==(0xca1+4674-0x1edd))
+{pushType=SMS_PUSH;temp+=(0x438+6190-0x1c62);tmplen=String2Bytes(temp,&pduType,
+(0x2205+510-0x2401));if(pduType==(0xc46+5486-0x20f0)){pushType=SMS_NOTIFICATION;
+}else{temp+=(0x160d+152-0x16a1);tmplen=String2Bytes(temp,&pduType,
+(0xf0c+4437-0x205f));if((pduType==(0x755+6315-0x1f3e))||(pduType==
+(0x1070+5486-0x2528))){pushType=SMS_BOOTSTRAP;}}}if((pDst->TP_IEI==
+(0xacd+3280-0x1799))||(pDst->TP_IEI==(0x102+9475-0x2600))||(pDst->TP_IEI==
+(0xc72+4774-0x1f10))){temp=pSrc+(0xd0f+3326-0x1a09);tmplen=String2Bytes(temp,&
+IEIDL,(0xd69+1366-0x12bd));if(IEIDL==(udhl-(0x24a0+322-0x25e0))){}else{temp+=
+(0xb5a+1488-0x1128)*(0xcf1+1403-0x1266);tmplen=String2Bytes(temp,&udhLen,
+(0xc90+1102-0x10dc));if(udhLen==(0xea4+1071-0x12d0)){temp+=(0xa59+5755-0x20d2)*
+tmplen;tmplen=String2Bytes(temp,&RefNum1,(0xe0a+1634-0x146a));pDst->TP_ReferNum=
+RefNum1;temp+=(0xcf3+5531-0x228c)*tmplen;tmplen=String2Bytes(temp,&pDst->
+TP_AllPieceNum,(0x553+3461-0x12d6));temp+=(0x1ac2+732-0x1d9c)*tmplen;tmplen=
+String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0xe4a+4750-0x20d6));temp+=
+(0x15bc+1583-0x1be9)*tmplen;}else if(udhLen==(0x40f+7764-0x225f)){temp+=
+(0x8da+1209-0xd91)*tmplen;tmplen=String2Bytes(temp,&RefNum1,(0x20a5+419-0x2246))
+;temp+=(0x1288+3433-0x1fef)*tmplen;tmplen=String2Bytes(temp,&RefNum2,
+(0xdb+2119-0x920));int ReferNum=RefNum2+RefNum1*(0x1b67+760-0x1d5f);pDst->
+TP_ReferNum=ReferNum;temp+=(0x136a+104-0x13d0)*tmplen;tmplen=String2Bytes(temp,&
+pDst->TP_AllPieceNum,(0xb33+5203-0x1f84));temp+=(0x7e9+5769-0x1e70)*tmplen;
+tmplen=String2Bytes(temp,&pDst->TP_CurrentPieceNum,(0x25c+8581-0x23df));temp+=
+(0xf29+2041-0x1720)*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*(0x166+9520-0x2694)+
-(0xc45+3071-0x183e);tmplen=String2Bytes(temp,&wspLen,(0x77c+6082-0x1f3c));temp=
-temp+wspLen*(0xc78+6802-0x2708)+(0x1866+265-0x196d);}else{temp=pSrc+udhl*
-(0x2039+964-0x23fb)+(0x2c4+9206-0x26b8);}nDstLength=((strlen(temp)<sizeof(pDst->
-TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x1089+2411-0x19f3)));memcpy(pDst->
+SMS_NOTIFICATION==pushType){temp=pSrc+udhl*(0xc3c+6374-0x2520)+
+(0xc4+5439-0x15fd);tmplen=String2Bytes(temp,&wspLen,(0xa12+3530-0x17da));temp=
+temp+wspLen*(0x11fc+2410-0x1b64)+(0xa12+4105-0x1a19);}else{temp=pSrc+udhl*
+(0xf59+4611-0x215a)+(0x1222+4495-0x23af);}nDstLength=((strlen(temp)<sizeof(pDst
+->TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x372+8197-0x2376)));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=(0x638+1355-0xb83);if(pSrc==
-NULL||pDst==NULL||nSrcLength<(0xfd0+4450-0x2132)){return-(0x2ad+6764-0x1d18);}
-nDstLength=nSrcLength;for(i=(0x1933+2105-0x216c);i<nSrcLength;i+=
-(0x1de4+1669-0x2467)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
-(0x818+7856-0x26c7))==((char)(0x582+2214-0xde2))){pDst--;nDstLength--;}*pDst=
+*pDst,int nSrcLength){int nDstLength;char ch;int i=(0xfed+3790-0x1ebb);if(pSrc==
+NULL||pDst==NULL||nSrcLength<(0x1086+5308-0x2542)){return-(0x1cc5+513-0x1ec5);}
+nDstLength=nSrcLength;for(i=(0x123a+2546-0x1c2c);i<nSrcLength;i+=
+(0x1136+4282-0x21ee)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
+(0x11b3+125-0x122f))==((char)(0x5f5+6089-0x1d78))){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=(0x697+313-0x7d0);
-UINT16 pos=(0x1a3+4005-0x1148);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+in_len,UINT16 shift,UINT16 out_len_max,UINT8*out){UINT16 i=(0x887+5814-0x1f3d);
+UINT16 pos=(0x4ab+6076-0x1c67);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(0xa99+1528-0x1091);}shift%=(0xc11+1878-0x1360);if(shift!=
-(0x16c7+1195-0x1b72)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0x285+3071-0xe7d)-
-shift)+(0x1878+3450-0x25f1);if(shift==(0x1a8a+2688-0x2503)){shift=
-(0xf21+5511-0x24a8);i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[
-pos]=in[i]>>shift;if(i+(0x42c+7339-0x20d6)<in_len){out[pos]|=(UINT8)(in[i+
-(0xeef+5949-0x262b)]<<((0x2196+1369-0x26e8)-shift));shift++;if(shift==
-(0x1f93+1633-0x25ed)){shift=(0x758+965-0xb1d);i++;}}}return pos;}UINT8
+);return(0x218+1092-0x65c);}shift%=(0x1281+4118-0x2290);if(shift!=
+(0x17d0+2940-0x234c)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0xd69+1720-0x141a)
+-shift)+(0x19b7+814-0x1ce4);if(shift==(0x115+7425-0x1e0f)){shift=
+(0x4f2+2803-0xfe5);i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[pos
+]=in[i]>>shift;if(i+(0x9a1+1594-0xfda)<in_len){out[pos]|=(UINT8)(in[i+
+(0x3ef+8539-0x2549)]<<((0x1480+1950-0x1c17)-shift));shift++;if(shift==
+(0x847+1693-0xedd)){shift=(0x408+3739-0x12a3);i++;}}}return pos;}UINT8
wms_ts_encode_address(const wms_address_s_type*addr,UINT8*data){UINT8 i,pos=
-(0x377+2287-0xc66);if(addr->number_of_digits>WMS_GW_ADDRESS_MAX){at_print(
+(0x23d+6801-0x1cce);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(0x15b2+3671-0x2409);}if(addr->number_type==
+,addr->number_of_digits);return(0xe18+5611-0x2403);}if(addr->number_type==
WMS_NUMBER_ALPHANUMERIC){data[pos]=(UINT8)((addr->number_of_digits*
-(0xec6+5260-0x234b)+(0x4e1+7543-0x2255))/(0xd5d+5205-0x21ae));}else{data[pos]=
-addr->number_of_digits;}pos++;data[pos]=(0x49a+7579-0x21b5);data[pos]|=(UINT8)((
-UINT8)addr->number_type<<(0x161+9502-0x267b));data[pos]|=(UINT8)addr->
+(0x10a2+5018-0x2435)+(0x19d5+1397-0x1f47))/(0x151f+195-0x15de));}else{data[pos]=
+addr->number_of_digits;}pos++;data[pos]=(0x13c+3307-0xda7);data[pos]|=(UINT8)((
+UINT8)addr->number_type<<(0x155a+4008-0x24fe));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,(0x75+1537-0x676)
-,WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=(0x1c8+6352-0x1a98);i<addr->
-number_of_digits;i++){data[pos]=(UINT8)(addr->digits[i++]&(0x60f+5295-0x1aaf));{
-data[pos]|=(UINT8)(addr->digits[i]<<(0x1c37+2474-0x25dd));}pos++;}}return pos;}
-UINT8 wms_ts_encode_dcs(const wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=
-(0xc38+4257-0x1cd9);if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE){data[pos]=dcs
-->is_compressed?(0xb85+7016-0x26cd):(0xf70+3409-0x1cc1);data[pos]|=(dcs->
-msg_class!=WMS_MESSAGE_CLASS_NONE)?(0x67f+7666-0x2461):(0xe10+4695-0x2067);data[
-pos]|=dcs->alphabet<<(0x1ff8+656-0x2286);data[pos]|=dcs->msg_class&
-(0x37+8117-0x1fe9);}else if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data
-[pos]=(0x1a9c+1894-0x2112);if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=
-(0x11b2+38-0x11d4);data[pos]|=dcs->msg_class&(0xda6+1403-0x131e);}else{if(dcs->
-msg_waiting==WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0x2077+311-0x20ee);}else if(
-dcs->msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
-WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0x1b96+1734-0x218c);}else{data[pos]=
-(0x738+2871-0x118f);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
-(0xf42+5625-0x2533):(0xe7d+943-0x122c);data[pos]|=dcs->msg_waiting_kind&
-(0x1d1+5462-0x1724);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
-UINT8*result){unsigned char low_bit=(bcd&(0x13a3+2197-0x1c29));unsigned char
-high_bit=((bcd&(0x6c3+5523-0x1b66))>>(0x2f0+9114-0x2686));if(low_bit>
-(0xd19+1279-0x120f)||high_bit>(0x9e6+6190-0x220b)){at_print(LOG_DEBUG,
+wms_ts_pack_gw_7_bit_chars(addr->digits,addr->number_of_digits,
+(0x678+2348-0xfa4),WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=
+(0xd2b+2960-0x18bb);i<addr->number_of_digits;i++){data[pos]=(UINT8)(addr->digits
+[i++]&(0x457+5268-0x18dc));{data[pos]|=(UINT8)(addr->digits[i]<<
+(0xa6f+626-0xcdd));}pos++;}}return pos;}UINT8 wms_ts_encode_dcs(const
+wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=(0x916+2629-0x135b);if(dcs->
+msg_waiting==WMS_GW_MSG_WAITING_NONE){data[pos]=dcs->is_compressed?
+(0x570+2471-0xef7):(0x2e8+2372-0xc2c);data[pos]|=(dcs->msg_class!=
+WMS_MESSAGE_CLASS_NONE)?(0x4bb+796-0x7c7):(0x142c+1577-0x1a55);data[pos]|=dcs->
+alphabet<<(0x1a5+4363-0x12ae);data[pos]|=dcs->msg_class&(0x6a+3477-0xdfc);}else
+if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data[pos]=(0x616+6358-0x1dfc)
+;if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=(0x14c7+2802-0x1fb5);data[
+pos]|=dcs->msg_class&(0x28+8255-0x2064);}else{if(dcs->msg_waiting==
+WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0x97c+3250-0x156e);}else if(dcs->
+msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
+WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0x15ca+3207-0x2181);}else{data[pos]=
+(0xcdb+252-0xcf7);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
+(0x18c1+1208-0x1d71):(0x953+1462-0xf09);data[pos]|=dcs->msg_waiting_kind&
+(0x133c+3665-0x218a);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
+UINT8*result){unsigned char low_bit=(bcd&(0x7f0+2347-0x110c));unsigned char
+high_bit=((bcd&(0x8cc+5598-0x1dba))>>(0x9e5+1959-0x1188));if(low_bit>
+(0xcb3+5662-0x22c8)||high_bit>(0x877+5489-0x1ddf)){at_print(LOG_DEBUG,
"\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x64\x69\x67\x69\x74\x21");*
-result=(0x327+5854-0x1a05);return FALSE;}else{*result=((bcd&(0x14d8+2340-0x1ded)
-)+(((bcd&(0xacd+1390-0xf4b))>>(0x10ed+4294-0x21af))*(0x1c8b+477-0x1e5e)));return
+result=(0x1edd+1145-0x2356);return FALSE;}else{*result=((bcd&(0x21db+656-0x245c)
+)+(((bcd&(0xac6+1173-0xe6b))>>(0x14aa+2691-0x1f29))*(0xc4c+4600-0x1e3a)));return
TRUE;}}UINT8 wms_ts_encode_timestamp(const wms_timestamp_s_type*timestamp,UINT8
-*data){sint7 i;UINT8 pos=(0xf6c+5790-0x260a),j;if(!wms_ts_bcd_to_int(timestamp->
-year,&j)){return(0xa7c+4031-0x1a3b);}data[pos]=((timestamp->year&
-(0x17a9+963-0x1b5d))<<(0x13b4+3887-0x22df))+((timestamp->year&
-(0x2278+319-0x22c7))>>(0x16f2+27-0x1709));pos++;if(wms_ts_bcd_to_int(timestamp->
-month,&j)){if(j>(0x6b1+4932-0x19e9)||j<(0xb2f+3281-0x17ff)){at_print(LOG_DEBUG,
+*data){sint7 i;UINT8 pos=(0x1171+2385-0x1ac2),j;if(!wms_ts_bcd_to_int(timestamp
+->year,&j)){return(0x3f9+1533-0x9f6);}data[pos]=((timestamp->year&
+(0xe9+4796-0x1396))<<(0x189f+3045-0x2480))+((timestamp->year&(0x1c3+62-0x111))>>
+(0xde7+1651-0x1456));pos++;if(wms_ts_bcd_to_int(timestamp->month,&j)){if(j>
+(0xad9+5465-0x2026)||j<(0xf20+4344-0x2017)){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(0x1e1b+564-0x204f);}}else{return(0xff3+1539-0x15f6);}data[pos]=((
-timestamp->month&(0x868+2082-0x107b))<<(0x2016+1180-0x24ae))+((timestamp->month&
-(0x2d1+3837-0x10de))>>(0x11cb+3061-0x1dbc));pos++;if(wms_ts_bcd_to_int(timestamp
-->day,&j)){if(j>(0x1660+3081-0x224a)||j<(0x48f+1905-0xbff)){at_print(LOG_DEBUG,
+,j);return(0xe23+5871-0x2512);}}else{return(0x1cef+2575-0x26fe);}data[pos]=((
+timestamp->month&(0x172+8873-0x240c))<<(0x603+1544-0xc07))+((timestamp->month&
+(0xde8+5402-0x2212))>>(0xc30+5036-0x1fd8));pos++;if(wms_ts_bcd_to_int(timestamp
+->day,&j)){if(j>(0xd0b+4937-0x2035)||j<(0x535+6742-0x1f8a)){at_print(LOG_DEBUG,
"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);
-return(0x550+5969-0x1ca1);}}else{return(0xe6b+5847-0x2542);}data[pos]=((
-timestamp->day&(0xc5d+4303-0x1d1d))<<(0x1018+3384-0x1d4c))+((timestamp->day&
-(0xc57+4974-0x1ed5))>>(0x7d6+4861-0x1acf));pos++;if(wms_ts_bcd_to_int(timestamp
-->hour,&j)){if(j>(0x1e7b+1152-0x22e4)){at_print(LOG_DEBUG,
+return(0xcd7+5230-0x2145);}}else{return(0x21ff+27-0x221a);}data[pos]=((timestamp
+->day&(0x114b+3493-0x1ee1))<<(0x15f8+755-0x18e7))+((timestamp->day&
+(0x594+1115-0x8ff))>>(0x1396+111-0x1401));pos++;if(wms_ts_bcd_to_int(timestamp->
+hour,&j)){if(j>(0xd63+1998-0x151a)){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(0x2d0+846-0x61e);}}else{return(0xa9f+4703-0x1cfe);}data[pos]=((
-timestamp->hour&(0xda5+1865-0x14df))<<(0x1dbf+1887-0x251a))+((timestamp->hour&
-(0xd7a+6329-0x2543))>>(0xaa3+4593-0x1c90));pos++;if(wms_ts_bcd_to_int(timestamp
-->minute,&j)){if(j>(0x4b4+6378-0x1d63)){at_print(LOG_DEBUG,
+);return(0x1f30+969-0x22f9);}}else{return(0x312+3572-0x1106);}data[pos]=((
+timestamp->hour&(0x1281+2931-0x1de5))<<(0x1578+2203-0x1e0f))+((timestamp->hour&
+(0x2ba+4300-0x1296))>>(0x11c9+3151-0x1e14));pos++;if(wms_ts_bcd_to_int(timestamp
+->minute,&j)){if(j>(0x669+6372-0x1f12)){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(0x1ba0+1993-0x2369);}}else{return(0x2e9+5643-0x18f4);}data[pos]=((
-timestamp->minute&(0x1055+3872-0x1f66))<<(0x954+3090-0x1562))+((timestamp->
-minute&(0x150c+4325-0x2501))>>(0xa74+4051-0x1a43));pos++;if(wms_ts_bcd_to_int(
-timestamp->second,&j)){if(j>(0xe04+6391-0x26c0)){at_print(LOG_DEBUG,
+,j);return(0x145d+1452-0x1a09);}}else{return(0xc92+305-0xdc3);}data[pos]=((
+timestamp->minute&(0xc7d+1131-0x10d9))<<(0x1799+666-0x1a2f))+((timestamp->minute
+&(0xe24+2114-0x1576))>>(0xc42+2259-0x1511));pos++;if(wms_ts_bcd_to_int(timestamp
+->second,&j)){if(j>(0x14d9+1051-0x18b9)){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(0x993+2723-0x1436);}}else{return(0x829+6584-0x21e1);}data[pos]=((
-timestamp->second&(0x910+7301-0x2586))<<(0x5b5+4276-0x1665))+((timestamp->second
-&(0x20d6+929-0x2387))>>(0x3bd+7695-0x21c8));pos++;i=(sint7)timestamp->timezone;
-if(i>(0x4ec+1480-0xa84)||i<-(0xb9b+3053-0x1758)){at_print(LOG_DEBUG,
+,j);return(0x158b+4414-0x26c9);}}else{return(0x1e2a+2153-0x2693);}data[pos]=((
+timestamp->second&(0x277+3675-0x10c3))<<(0xf2c+2579-0x193b))+((timestamp->second
+&(0xd13+3818-0x1b0d))>>(0xc03+3188-0x1873));pos++;i=(sint7)timestamp->timezone;
+if(i>(0xd8d+2443-0x16e8)||i<-(0xb28+1503-0x10d7)){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(0x85b+4648-0x1a83);}if(i>=(0x66c+2029-0xe59)){data[pos]=(UINT8)(((
-UINT8)(i%(0xd5+5375-0x15ca)))<<(0x459+743-0x73c));data[pos]|=(i/
-(0xd2f+2920-0x188d));}else{i*=(-(0x8d4+353-0xa34));data[pos]=(UINT8)(((UINT8)(i%
-(0x66b+5845-0x1d36)))<<(0x882+4311-0x1955));data[pos]|=(i/(0x92+4068-0x106c));
-data[pos]|=(0x7b7+5070-0x1b7d);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
-const wms_udh_s_type*udh){UINT8 length=(0x216c+573-0x23a9);if(udh!=NULL){switch(
-udh->header_id){case WMS_UDH_CONCAT_8:length=(0xc40+2127-0x148e)+
-(0x215+9202-0x2606)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
-(0x1eec+1889-0x264c)+(0x5b3+2539-0xf9d)+WMS_UDH_OCTETS_CONCAT16;break;case
-WMS_UDH_SPECIAL_SM:length=(0x1344+2911-0x1ea2)+(0x2a0+590-0x4ed)+
-WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0x141+536-0x358)+
-(0x1305+5031-0x26ab)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
-(0x1a1+6905-0x1c99)+(0x1ee9+1435-0x2483)+WMS_UDH_OCTETS_PORT16;break;case
-WMS_UDH_SMSC_CONTROL:length=(0x377+6673-0x1d87)+(0xe72+4965-0x21d6)+udh->u.other
-.header_length;break;case WMS_UDH_SOURCE:length=(0x249d+471-0x2673)+
-(0x1f60+1813-0x2674)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
-(0xe4+8719-0x22f2)+(0xe97+5786-0x2530)+udh->u.other.header_length;break;case
+,i);return(0x18bc+2980-0x2460);}if(i>=(0x2b4+3957-0x1229)){data[pos]=(UINT8)(((
+UINT8)(i%(0x4b4+1055-0x8c9)))<<(0x614+2207-0xeaf));data[pos]|=(i/
+(0x5a0+2341-0xebb));}else{i*=(-(0x1b30+1962-0x22d9));data[pos]=(UINT8)(((UINT8)(
+i%(0x1df+3743-0x1074)))<<(0x1855+31-0x1870));data[pos]|=(i/(0x52b+2695-0xfa8));
+data[pos]|=(0x21da+24-0x21ea);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
+const wms_udh_s_type*udh){UINT8 length=(0x1e15+244-0x1f09);if(udh!=NULL){switch(
+udh->header_id){case WMS_UDH_CONCAT_8:length=(0x1008+2869-0x1b3c)+
+(0x909+1597-0xf45)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
+(0xb21+6398-0x241e)+(0x503+3070-0x1100)+WMS_UDH_OCTETS_CONCAT16;break;case
+WMS_UDH_SPECIAL_SM:length=(0x1ca3+1546-0x22ac)+(0xe87+3290-0x1b60)+
+WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0x8d7+7399-0x25bd)+
+(0x83c+4983-0x1bb2)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
+(0x137f+2955-0x1f09)+(0x20f5+286-0x2212)+WMS_UDH_OCTETS_PORT16;break;case
+WMS_UDH_SMSC_CONTROL:length=(0x1d7c+1286-0x2281)+(0x5a0+1672-0xc27)+udh->u.other
+.header_length;break;case WMS_UDH_SOURCE:length=(0x14ba+1019-0x18b4)+
+(0x180f+277-0x1923)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
+(0x5e3+3776-0x14a2)+(0x7d8+7540-0x254b)+udh->u.other.header_length;break;case
WMS_UDH_TEXT_FORMATING:if(!udh->u.text_formating.is_color_present){length=
-(0x274+8362-0x231d)+(0xa78+2328-0x138f)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
-length=(0xfb5+3969-0x1f35)+(0xbcd+2929-0x173d)+WMS_UDH_OCTETS_TEXT_FORMATTING+
-(0x151b+3546-0x22f4);}break;case WMS_UDH_PRE_DEF_SOUND:length=
-(0x1649+3962-0x25c2)+(0x18d9+1010-0x1cca)+WMS_UDH_OCTETS_PRE_DEF;break;case
-WMS_UDH_USER_DEF_SOUND:length=(0x15e8+3746-0x2489)+(0xa7a+3149-0x16c6)+udh->u.
-user_def_sound.data_length+(0x7cc+1770-0xeb5);break;case WMS_UDH_PRE_DEF_ANIM:
-length=(0xa55+4080-0x1a44)+(0x23c7+397-0x2553)+WMS_UDH_OCTETS_PRE_DEF;break;case
- WMS_UDH_LARGE_ANIM:length=(0x185+373-0x2f9)+(0x645+1797-0xd49)+
-WMS_UDH_LARGE_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x6b6+4738-0x1937);break;
-case WMS_UDH_SMALL_ANIM:length=(0x1791+3383-0x24c7)+(0x21e1+282-0x22fa)+
-WMS_UDH_SMALL_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0xd6d+145-0xdfd);break;case
-WMS_UDH_LARGE_PICTURE:length=(0x5da+5044-0x198d)+(0x5e5+4469-0x1759)+
-WMS_UDH_LARGE_PIC_SIZE+(0x291+1268-0x784);break;case WMS_UDH_SMALL_PICTURE:
-length=(0x56+6068-0x1809)+(0x81b+912-0xbaa)+WMS_UDH_SMALL_PIC_SIZE+
-(0x2293+688-0x2542);break;case WMS_UDH_VAR_PICTURE:length=(0x1c4+3181-0xe30)+
-(0x1478+700-0x1733)+(UINT8)(udh->u.var_picture.height*udh->u.var_picture.width/
-(0xea6+5213-0x22fb))+(0x11f9+3762-0x20a8);break;case WMS_UDH_RFC822:length=
-(0x17a2+2740-0x2255)+(0x432+2529-0xe12)+WMS_UDH_OCTETS_RFC822;break;case
-WMS_UDH_NAT_LANG_SS:length=(0x246+2549-0xc3a)+(0x1a64+2685-0x24e0)+
+(0x18c2+1281-0x1dc2)+(0xe33+1419-0x13bd)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
+length=(0x99a+4353-0x1a9a)+(0xcb2+6715-0x26ec)+WMS_UDH_OCTETS_TEXT_FORMATTING+
+(0x1745+830-0x1a82);}break;case WMS_UDH_PRE_DEF_SOUND:length=
+(0x2266+1084-0x26a1)+(0x5+9448-0x24ec)+WMS_UDH_OCTETS_PRE_DEF;break;case
+WMS_UDH_USER_DEF_SOUND:length=(0x24b+6270-0x1ac8)+(0x619+5628-0x1c14)+udh->u.
+user_def_sound.data_length+(0x4f5+2175-0xd73);break;case WMS_UDH_PRE_DEF_ANIM:
+length=(0x1f11+157-0x1fad)+(0x703+1141-0xb77)+WMS_UDH_OCTETS_PRE_DEF;break;case
+WMS_UDH_LARGE_ANIM:length=(0x954+5938-0x2085)+(0x1761+1581-0x1d8d)+
+WMS_UDH_LARGE_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x431+2112-0xc70);break;case
+ WMS_UDH_SMALL_ANIM:length=(0x541+7911-0x2427)+(0x1371+4818-0x2642)+
+WMS_UDH_SMALL_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x16b0+2746-0x2169);break;
+case WMS_UDH_LARGE_PICTURE:length=(0x107b+2690-0x1afc)+(0x484+573-0x6c0)+
+WMS_UDH_LARGE_PIC_SIZE+(0x25c+5668-0x187f);break;case WMS_UDH_SMALL_PICTURE:
+length=(0x1a5c+1075-0x1e8e)+(0x213b+1387-0x26a5)+WMS_UDH_SMALL_PIC_SIZE+
+(0x5aa+4959-0x1908);break;case WMS_UDH_VAR_PICTURE:length=(0x2c2+538-0x4db)+
+(0x2bf+7136-0x1e9e)+(UINT8)(udh->u.var_picture.height*udh->u.var_picture.width/
+(0x2133+971-0x24f6))+(0xfac+5285-0x244e);break;case WMS_UDH_RFC822:length=
+(0x348+2180-0xbcb)+(0x19f+7753-0x1fe7)+WMS_UDH_OCTETS_RFC822;break;case
+WMS_UDH_NAT_LANG_SS:length=(0x90d+4413-0x1a49)+(0x31c+8344-0x23b3)+
WMS_UDH_OCTETS_NAT_LANG_SS;break;case WMS_UDH_NAT_LANG_LS:length=
-(0xb11+777-0xe19)+(0x491+3510-0x1246)+WMS_UDH_OCTETS_NAT_LANG_LS;break;case
-WMS_UDH_USER_PROMPT:length=(0x1b29+1641-0x2191)+(0xc83+787-0xf95)+
+(0x1052+1659-0x16cc)+(0x1153+2652-0x1bae)+WMS_UDH_OCTETS_NAT_LANG_LS;break;case
+WMS_UDH_USER_PROMPT:length=(0x37d+6026-0x1b06)+(0x5f0+1566-0xc0d)+
WMS_UDH_OCTETS_USER_PROMPT;break;case WMS_UDH_EXTENDED_OBJECT:length=
-(0x3cc+2223-0xc7a)+(0xbbf+198-0xc84)+udh->u.eo.content.length;if(udh->u.eo.
+(0x166b+876-0x19d6)+(0x322+1575-0x948)+udh->u.eo.content.length;if(udh->u.eo.
first_segment==TRUE){length+=WMS_UDH_OCTETS_EO_HEADER;}break;default:length=
-(0x103b+2498-0x19fc)+(0x39d+1678-0xa2a)+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=(0xc95+2156-0x1501);
-uint32 i;if(headers==NULL){at_print(LOG_DEBUG,
+(0x3cc+2021-0xbb0)+(0x870+7715-0x2692)+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=(0x1d31+2129-0x2582);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(0x1547+64-0x1587);}if(num_headers>(0x1332+2903-0x1e89)){length+=
-(0x11d2+1312-0x16f1);for(i=(0x1898+2689-0x2319);i<num_headers&&i<
+);return(0x1360+4912-0x2690);}if(num_headers>(0xbe8+184-0xca0)){length+=
+(0x727+3347-0x1439);for(i=(0x121b+3849-0x2124);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=(0x1502+2874-0x203c)
-;if(dcs==NULL||user_data==NULL){at_print(LOG_DEBUG,
+*dcs,const wms_gw_user_data_s_type*user_data){uint32 length=(0x1f2+8480-0x2312);
+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(0x1e8+8808-0x2450);}length+=wms_ts_compute_user_data_header_length(
+);return(0x133f+2058-0x1b49);}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*(0x14c0+128-0x1539))+
-(0xe2+7634-0x1ead))/(0x90b+5895-0x200a);}else{length+=user_data->sm_len;}return
-length;}static int wms_ts_encode_udh_concat_8(UINT8*udh){int pos=
-(0x18d+875-0x4f8);if(const_header->u.concat_8.total_sm==(0x1fb6+287-0x20d5)||
-const_header->u.concat_8.seq_num==(0x10af+2081-0x18d0)||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*(0x11c7+4650-0x23ea))
++(0xe52+3804-0x1d27))/(0x16fc+3242-0x239e);}else{length+=user_data->sm_len;}
+return length;}static int wms_ts_encode_udh_concat_8(UINT8*udh){int pos=
+(0x302+5326-0x17d0);if(const_header->u.concat_8.total_sm==(0x271+6628-0x1c55)||
+const_header->u.concat_8.seq_num==(0x1a8+6348-0x1a74)||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(0x1eb1+1355-0x23fc);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0x10dc+4928-0x241c);}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=(0xa80+3354-0x179a);if(
-const_header->u.concat_16.total_sm==(0x10d6+1853-0x1813)||const_header->u.
-concat_16.seq_num==(0x467+6177-0x1c88)||const_header->u.concat_16.seq_num>
-const_header->u.concat_16.total_sm){at_print(LOG_DEBUG,
+wms_ts_encode_udh_concat16(UINT8*udh){int pos=(0xfba+332-0x1106);if(const_header
+->u.concat_16.total_sm==(0x37c+6968-0x1eb4)||const_header->u.concat_16.seq_num==
+(0xb47+1281-0x1048)||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(0x19b+874-0x505);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0x70f+6981-0x2254);}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)>>(0x303+7024-0x1e6b));udh[pos++]=(UINT8
-)(const_header->u.concat_16.msg_ref&(0x751+530-0x864));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=(0x11a1+2572-0x1bad);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=(0x4ba+1154-0x93c);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
+const_header->u.concat_16.msg_ref&65280)>>(0x1c7d+748-0x1f61));udh[pos++]=(UINT8
+)(const_header->u.concat_16.msg_ref&(0x1f6+5370-0x15f1));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=(0x238+9105-0x25c9);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=(0x923+4795-0x1bde);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=
-(0x420+4362-0x152a);int pos=(0x26d+6376-0x1b55);udh[pos++]=(UINT8)const_header->
-u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
-(0x1188+3542-0x1f5e);i<const_header->u.other.header_length;i++){udh[pos++]=
+(0x18a6+3171-0x2509);int pos=(0x81d+2837-0x1332);udh[pos++]=(UINT8)const_header
+->u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
+(0x17a3+2529-0x2184);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=
-(0xdac+3397-0x1af1);if(num_headers==(0x10a1+1387-0x160c))return
-(0x304+4871-0x160b);++pos;for(i=(0x892+2870-0x13c8);i<WMS_MAX_UD_HEADERS&&i<
+(0xa52+1475-0x1015);if(num_headers==(0xdff+3504-0x1baf))return
+(0x179+8836-0x23fd);++pos;for(i=(0xa78+349-0xbd5);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 (0x1be8+1046-0x1ffe)
+#if (0x173+9087-0x24f2)
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
@@ -1310,49 +1309,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[
-(0x15d5+1542-0x1bdb)]=(UINT8)(pos-(0xc78+416-0xe17));return((UINT8)(pos-
-(0x41f+6399-0x1d1d)));}UINT8 wms_ts_encode_gw_user_data(const wms_gw_dcs_s_type*
+(0x1081+2999-0x1c38)]=(UINT8)(pos-(0x3bc+20-0x3cf));return((UINT8)(pos-
+(0x1f3+4242-0x1284)));}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=
-(0xb62+2860-0x168e);UINT8 fill_bits=(0x8da+4651-0x1b05);UINT16
+(0x449+6444-0x1d75);UINT8 fill_bits=(0x11b+6334-0x19d9);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>(0x548+6465-0x1e89)){if
+WMS_GW_ALPHABET_7_BIT_DEFAULT){if(user_data->num_headers>(0x1ecf+267-0x1fda)){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+(0x373+6854-0x1e38);total_bits_occupied=(
-user_data_header_length+(0x662+438-0x817))*(0x1e3+9011-0x250e);fill_bits=(
-total_bits_occupied%(0x418+1069-0x83e));if(fill_bits!=(0x1162+5273-0x25fb)){
-fill_bits=(0xd4a+542-0xf61)-fill_bits;}user_data_length=(total_bits_occupied+
-fill_bits+(user_data->sm_len*(0x183c+1379-0x1d98)))/(0x1854+3537-0x261e);data[
-(0x2041+1405-0x25be)]=(UINT8)user_data_length;data[(0x9d6+6687-0x23f4)]=
+pos);pos+=user_data_header_length+(0x9cf+4930-0x1d10);total_bits_occupied=(
+user_data_header_length+(0x1b3+9394-0x2664))*(0x296+4114-0x12a0);fill_bits=(
+total_bits_occupied%(0x1bf6+127-0x1c6e));if(fill_bits!=(0xe19+5474-0x237b)){
+fill_bits=(0x1c05+2699-0x2689)-fill_bits;}user_data_length=(total_bits_occupied+
+fill_bits+(user_data->sm_len*(0x5d7+3181-0x123d)))/(0x19cd+1616-0x2016);data[
+(0xa71+2359-0x13a8)]=(UINT8)user_data_length;data[(0x544+1556-0xb57)]=
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>
-(0xb0f+3853-0x1a1c)){if(wms_ts_compute_user_data_header_length(user_data->
+(0x1d60+1592-0x2398)){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[(0x7bb+7687-0x25c2)]=(UINT8)(user_data->sm_len+user_data_header_length
-+(0x6cf+2778-0x11a8));pos+=user_data_header_length+(0xd00+3653-0x1b44);}else{
+pos);data[(0x847+3816-0x172f)]=(UINT8)(user_data->sm_len+user_data_header_length
++(0xae1+637-0xd5d));pos+=user_data_header_length+(0x121+7664-0x1f10);}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=(0x5+9598-0x2583),i;if(
+wms_status_e_type st=WMS_OK_S;UINT8*data;UINT8 pos=(0x78d+6377-0x2076),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,
-(0x186f+2826-0x2379),WMS_MAX_LEN);data[pos]=(0x480+659-0x713);data[pos]|=deliver
-->more?(0xc8b+5632-0x228b):(0xba5+2144-0x1401);data[pos]|=deliver->
-status_report_enabled?(0x1099+4155-0x20b4):(0x1051+3941-0x1fb6);data[pos]|=
-deliver->user_data_header_present?(0x43d+3663-0x124c):(0xe06+4957-0x2163);data[
-pos]|=deliver->reply_path_present?(0x1205+221-0x1262):(0x12b7+425-0x1460);pos++;
-i=wms_ts_encode_address(&deliver->address,&data[pos]);if(i==(0x16f4+120-0x176c))
+(0x9e8+4585-0x1bd1),WMS_MAX_LEN);data[pos]=(0x9a4+1150-0xe22);data[pos]|=deliver
+->more?(0xc1f+4413-0x1d5c):(0x243+8530-0x2391);data[pos]|=deliver->
+status_report_enabled?(0x1cdf+1931-0x244a):(0x1803+1124-0x1c67);data[pos]|=
+deliver->user_data_header_present?(0x1a96+1062-0x1e7c):(0x24b+1047-0x662);data[
+pos]|=deliver->reply_path_present?(0x51f+2702-0xf2d):(0x1542+3187-0x21b5);pos++;
+i=wms_ts_encode_address(&deliver->address,&data[pos]);if(i==(0x2ab+9150-0x2669))
{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==(0xad1+6323-0x2384)){return WMS_INVALID_PARM_VALUE_S;}
+timestamp,data+pos);if(i==(0xb+9332-0x247f)){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"
@@ -1360,56 +1359,56 @@
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=(0xc28+993-0x1009),j;if(timestamp!=NULL){if(!wms_ts_bcd_to_int(timestamp->
+ v=(0xb8f+2470-0x1535),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*(0xf8b+1394-0x1390);if(!wms_ts_bcd_to_int(timestamp->month,&j)){at_print(
-LOG_DEBUG,
+);}i=j*(0x1512+1282-0x18a7);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*(0x4a3+4359-0x158c);if(!wms_ts_bcd_to_int(timestamp->day,&j)){
-at_print(LOG_DEBUG,
+,j);}i=i+j*(0x1e9+1968-0x97b);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>(0x54a+3425-0x128d)){v=(UINT8)((i+(0x197b+2319-0x2284))/
-(0x954+5390-0x1e5b)+(0x12d7+4466-0x2389));}else if(i>=(0x13b7+678-0x165c)){v=(
-UINT8)(i+(0x1f20+1388-0x23e6));}else{if(!wms_ts_bcd_to_int(timestamp->day,&j)){
-at_print(LOG_DEBUG,
++=j;if(i>(0x35+6736-0x1a67)){v=(UINT8)((i+(0x1969+1425-0x1ef4))/
+(0xedf+2344-0x1800)+(0x306+2705-0xcd7));}else if(i>=(0x14c+470-0x321)){v=(UINT8)
+(i+(0xb6d+1602-0x1109));}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*(0x22a+400-0x3a2)*(0x595+8225-0x257a);if(!wms_ts_bcd_to_int(timestamp->hour,&
-j)){at_print(LOG_DEBUG,
+=j*(0xb00+2408-0x1450)*(0xfc4+1192-0x1430);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*(0x205+4898-0x14eb);if(!wms_ts_bcd_to_int(timestamp->minute,&j)){
+);}i=i+j*(0x283+5862-0x192d);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>(0x159a+354-0x16f0)*(0xa1d+4455-0x1b48)){v=(UINT8)((i-((
-(0x60c+738-0x8e2)*(0x863+1482-0xdf1))+(0x17f8+3083-0x23e6)))/(0xbd7+5974-0x230f)
-+(0x1086+3770-0x1eb1));}else{v=(UINT8)((i+(0x1725+964-0x1ae5))/
-(0x881+1476-0xe40)-(0xad1+183-0xb87));}}}else{at_print(LOG_DEBUG,
+,j);}i+=j;if(i>(0xdef+3426-0x1b45)*(0x283+5593-0x1820)){v=(UINT8)((i-((
+(0x821+4324-0x18f9)*(0xdf0+5243-0x222f))+(0x7d1+1064-0xbdc)))/
+(0x1100+4512-0x2282)+(0x9a7+1181-0xdb5));}else{v=(UINT8)((i+(0xcb0+3273-0x1975))
+/(0xada+4559-0x1ca4)-(0x2b7+306-0x3e8));}}}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=(0x77a+7602-0x252c);switch(validity->format){
+validity,UINT8*data){UINT8 i,pos=(0x1222+3760-0x20d2);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==(0x8d7+6428-0x21f3)){at_print(LOG_DEBUG,
+if(i==(0x16a+4691-0x13bd)){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=(0x105+6095-0x18d4),i;if(submit==NULL||raw_ts_data_ptr==NULL){at_print
+UINT8 pos=(0xb10+5900-0x221c),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,
-(0xa2+9414-0x2568),WMS_MAX_LEN);data[pos]=(0x197+2606-0xbc4);data[pos]|=submit->
-reject_duplicates?(0x1b72+140-0x1bfa):(0x12df+3114-0x1f09);if(submit->validity.
-format>(0x6b8+2443-0x1040)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]|=
-submit->validity.format<<(0x131c+3833-0x2212);data[pos]|=submit->
-status_report_enabled?(0x3ec+5973-0x1b21):(0x1e67+1-0x1e68);data[pos]|=submit->
-user_data_header_present?(0x2310+517-0x24d5):(0x3fc+3151-0x104b);data[pos]|=
-submit->reply_path_present?(0x282+3367-0xf29):(0x154b+119-0x15c2);pos++;data[pos
-]=(UINT8)submit->message_reference;pos++;i=wms_ts_encode_address(&submit->
-address,&data[pos]);if(i==(0x507+8071-0x248e)){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(
+(0x9eb+810-0xd15),WMS_MAX_LEN);data[pos]=(0x68c+3061-0x1280);data[pos]|=submit->
+reject_duplicates?(0x2343+513-0x2540):(0x8e8+5603-0x1ecb);if(submit->validity.
+format>(0x100c+3415-0x1d60)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]
+|=submit->validity.format<<(0x1651+1519-0x1c3d);data[pos]|=submit->
+status_report_enabled?(0x1279+669-0x14f6):(0x1e76+1290-0x2380);data[pos]|=submit
+->user_data_header_present?(0x126a+2399-0x1b89):(0xa5c+1458-0x100e);data[pos]|=
+submit->reply_path_present?(0x130+708-0x374):(0x11b2+357-0x1317);pos++;data[pos]
+=(UINT8)submit->message_reference;pos++;i=wms_ts_encode_address(&submit->address
+,&data[pos]);if(i==(0x13a+9258-0x2564)){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)>
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"
@@ -1418,21 +1417,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=(0x1d8+5107-0x15cb),i;if(status_report==NULL||raw_ts_data_ptr==NULL){
+UINT8 pos=(0x372+377-0x4eb),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,
-(0x18b1+3292-0x258d),WMS_MAX_LEN);data[pos]=(0x1031+1778-0x1713);data[pos]|=
-status_report->more?(0xa01+5794-0x20a3):(0x15c0+3925-0x2511);data[pos]|=
-status_report->status_report_qualifier?(0x37f+2324-0xc73):(0xa5f+4430-0x1bad);
-data[pos]|=status_report->user_data_header_present?(0xd5b+2696-0x17a3):
-(0x231+7444-0x1f45);pos++;data[pos]=(UINT8)status_report->message_reference;pos
+(0x194+6342-0x1a5a),WMS_MAX_LEN);data[pos]=(0x17ff+3812-0x26d3);data[pos]|=
+status_report->more?(0x10e9+4325-0x21ce):(0x494+3380-0x11c4);data[pos]|=
+status_report->status_report_qualifier?(0x62c+7190-0x2222):(0x4dc+6613-0x1eb1);
+data[pos]|=status_report->user_data_header_present?(0x16ac+3995-0x2607):
+(0x927+6864-0x23f7);pos++;data[pos]=(UINT8)status_report->message_reference;pos
++;i=wms_ts_encode_address(&status_report->address,&data[pos]);if(i==
-(0xe45+4963-0x21a8)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0x10a2+4708-0x2306)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
wms_ts_encode_timestamp(&status_report->timestamp,data+pos);if(i==
-(0x1a8c+1766-0x2172)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0x43a+7450-0x2154)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
wms_ts_encode_timestamp(&status_report->discharge_time,data+pos);if(i==
-(0x14cf+759-0x17c6)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;data[pos]=
+(0xfac+4329-0x2095)){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->
@@ -1447,7 +1446,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 (0x998+6307-0x223b)
+#if (0x1ef+1600-0x82f)
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;
@@ -1457,7 +1456,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 (0xc05+2673-0x1676)
+#if (0x1215+383-0x1394)
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
@@ -1474,357 +1473,359 @@
"\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=(0x1c17+697-0x1ed0);UINT16 pos=
-(0x4ba+5246-0x1938);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+out_len_max,UINT16 shift,UINT8*out){int i=(0x878+3066-0x1472);UINT16 pos=
+(0x201+9479-0x2708);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(0x192f+633-0x1ba8);}if(shift!=(0x492+5979-0x1bed))pos=pos+
-(0x47c+6235-0x1cd6);if(shift==(0x5e5+3985-0x156f)){out[(0x5d6+165-0x67b)]=in[
-(0xdb9+2877-0x18f6)]>>(0x796+7315-0x2428);shift=(0xd6d+4781-0x201a);i=
-(0x782+1645-0xdee);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]<<
-shift)&(0x732+6195-0x1ee6);if(pos!=(0x169+8412-0x2245)){
-#if (0xf3+4483-0x1275)
-if(shift==(0x14d+3032-0xd25)){out[i]|=(0xd35+3168-0x1995);}else{out[i]|=in[pos-
-(0xd93+936-0x113a)]>>((0x550+3611-0x1363)-shift);}
+);return(0x418+3399-0x115f);}if(shift!=(0x11b0+2542-0x1b9e))pos=pos+
+(0x541+280-0x658);if(shift==(0x10e4+5414-0x2603)){out[(0x68b+2808-0x1183)]=in[
+(0xaeb+3021-0x16b8)]>>(0x283+1513-0x86b);shift=(0x10df+5465-0x2638);i=
+(0x1143+3248-0x1df2);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]
+<<shift)&(0x1295+930-0x15b8);if(pos!=(0x22f+3832-0x1127)){
+#if (0x1a24+2070-0x2239)
+if(shift==(0x107b+5518-0x2609)){out[i]|=(0x192f+2763-0x23fa);}else{out[i]|=in[
+pos-(0x226+5739-0x1890)]>>((0x688+4302-0x174e)-shift);}
#else
-out[i]|=in[pos-(0x1b4f+1657-0x21c7)]>>((0xacc+5723-0x211f)-shift);
+out[i]|=in[pos-(0xbc6+933-0xf6a)]>>((0x649+7690-0x244b)-shift);
#endif
-}shift++;if(shift==(0x837+338-0x982)){shift=(0xb11+508-0xd0d);i++;if(i>=
+}shift++;if(shift==(0x1d20+2417-0x268a)){shift=(0x2ea+6842-0x1da4);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]>>(0x6f8+8148-0x26cb);}}return(UINT8)(pos);}UINT8
+);break;}out[i]=in[pos]>>(0x1059+4542-0x2216);}}return(UINT8)(pos);}UINT8
wms_ts_decode_address(const UINT8*data,wms_address_s_type*addr){UINT8 i,pos=
-(0x49d+1542-0xaa3);i=data[pos];if(i>WMS_GW_ADDRESS_MAX){at_print(LOG_DEBUG,
+(0xd87+2054-0x158d);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(0x8bb+905-0xc44);}addr->number_of_digits=i;pos++;addr->digit_mode=
+,i);return(0x3e2+8031-0x2341);}addr->number_of_digits=i;pos++;addr->digit_mode=
WMS_DIGIT_MODE_4_BIT;addr->number_type=(wms_number_type_e_type)((data[pos]&
-(0x18f8+2244-0x214c))>>(0x427+902-0x7a9));addr->number_plan=(
-wms_number_plan_e_type)(data[pos]&(0x1d8+8765-0x2406));pos++;if(addr->
-number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0x19d9+489-0x1bc2);
-addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
-(0x1116+3926-0x206b))/(0x179a+1707-0x1e43);addr->number_of_digits=(UINT8)(addr->
-number_of_digits*(0x1092+2689-0x1b0f)/(0x19d4+14-0x19db));(void)
+(0x8d6+3218-0x14f8))>>(0x34b+6236-0x1ba3));addr->number_plan=(
+wms_number_plan_e_type)(data[pos]&(0x21ac+1082-0x25d7));pos++;if(addr->
+number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0x1084+3611-0x1e9f)
+;addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
+(0x1da1+87-0x1df7))/(0x18bf+1967-0x206c);addr->number_of_digits=(UINT8)(addr->
+number_of_digits*(0x12c6+671-0x1561)/(0x8d9+4347-0x19cd));(void)
wms_ts_unpack_gw_7_bit_chars(&data[pos],addr->number_of_digits,
-WMS_GW_ADDRESS_MAX,(0x86b+6745-0x22c4),addr->digits);pos+=bytes_increment;}else{
-for(i=(0x238+1507-0x81b);i<addr->number_of_digits;i++){addr->digits[i++]=data[
-pos]&(0x142+1640-0x79b);addr->digits[i]=(data[pos]&(0x87d+1683-0xe20))>>
-(0x5f0+6048-0x1d8c);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*data
-,wms_gw_dcs_s_type*dcs){UINT8 pos=(0x13+9253-0x2438);UINT8 i;if(data==NULL||dcs
-==NULL){at_print(LOG_DEBUG,
+WMS_GW_ADDRESS_MAX,(0x1b74+1085-0x1fb1),addr->digits);pos+=bytes_increment;}else
+{for(i=(0x121+7886-0x1fef);i<addr->number_of_digits;i++){addr->digits[i++]=data[
+pos]&(0x800+5788-0x1e8d);addr->digits[i]=(data[pos]&(0xab5+7083-0x2570))>>
+(0x143c+4451-0x259b);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*
+data,wms_gw_dcs_s_type*dcs){UINT8 pos=(0x68a+1382-0xbf0);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(0x53d+1520-0xb2d);}dcs->msg_class=WMS_MESSAGE_CLASS_NONE;dcs->
+);return(0x6a7+3797-0x157c);}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]&(0x140a+2477-0x1cf7))>>
-(0x183a+2902-0x238a);switch(i){case(0xf63+1158-0x13e9):dcs->is_compressed=data[
-pos]&(0xc0+6089-0x1869);if(data[pos]&(0xe64+340-0xfa8)){dcs->msg_class=(
-wms_message_class_e_type)(data[pos]&(0x115+4977-0x1483));}else{dcs->msg_class=
+dcs->is_compressed=FALSE;i=(data[pos]&(0x952+6982-0x23d8))>>(0x2422+28-0x2438);
+switch(i){case(0x1444+3636-0x2278):dcs->is_compressed=data[pos]&
+(0x44b+1066-0x855);if(data[pos]&(0xcc0+6471-0x25f7)){dcs->msg_class=(
+wms_message_class_e_type)(data[pos]&(0x170c+182-0x17bf));}else{dcs->msg_class=
WMS_MESSAGE_CLASS_NONE;}dcs->alphabet=(wms_gw_alphabet_e_type)((data[pos]&
-(0x8f2+154-0x980))>>(0x1a4c+178-0x1afc));break;case(0x6f4+515-0x8f4):if((data[
-pos]&(0xd8+4682-0x12f2))==(0x105+5276-0x1571)){dcs->alphabet=(data[pos]&
-(0x155+2031-0x940))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
-msg_class=(wms_message_class_e_type)(data[pos]&(0x5ed+2167-0xe61));dcs->
+(0x52+1569-0x667))>>(0xb46+519-0xd4b));break;case(0x9f8+2702-0x1483):if((data[
+pos]&(0x13f8+3679-0x2227))==(0x169b+2142-0x1ec9)){dcs->alphabet=(data[pos]&
+(0x41d+7237-0x205e))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
+msg_class=(wms_message_class_e_type)(data[pos]&(0x674+4475-0x17ec));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]&
-(0x4c7+3570-0x1289))==(0x12ba+2036-0x1aae)){dcs->msg_waiting=
+(0x2d8+6381-0x1b95))==(0x121d+169-0x12c6)){dcs->msg_waiting=
WMS_GW_MSG_WAITING_DISCARD;dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}else if(
-(data[pos]&(0x50+8040-0x1f88))==(0x4d2+4065-0x14a3)){dcs->msg_waiting=
+(data[pos]&(0x2dd+3185-0xf1e))==(0x473+657-0x6f4)){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]&(0x1a76+2450-0x2400))?TRUE:FALSE;dcs->
-msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0x18c+2120-0x9d1));
-}break;default:at_print(LOG_DEBUG,
+msg_waiting_active=(data[pos]&(0xaa5+4518-0x1c43))?TRUE:FALSE;dcs->
+msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0x1577+2561-0x1f75)
+);}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=(0x1662+3005-0x221f),i,j;if
-(data==NULL||timestamp==NULL){at_print(LOG_DEBUG,
+UINT8*data,wms_timestamp_s_type*timestamp){UINT8 pos=(0x7db+6272-0x205b),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(0x1226+1841-0x1957);}i=((data[pos]&(0xc9d+4817-0x1f5f))<<
-(0x9cd+7212-0x25f5))+((data[pos]&(0x13dc+4134-0x2312))>>(0xda+550-0x2fc));if(!
+);return(0x135c+1164-0x17e8);}i=((data[pos]&(0x1ea8+1874-0x25eb))<<
+(0xb85+2518-0x1557))+((data[pos]&(0xbba+6974-0x2608))>>(0x2454+380-0x25cc));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=(0x1150+5146-0x256a);}timestamp->year=i;pos++;i=((data[pos]&
-(0xf71+1314-0x1484))<<(0xacc+2354-0x13fa))+((data[pos]&(0xe85+5034-0x213f))>>
-(0xb4d+303-0xc78));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x819+5208-0x1c65)||j<
-(0x68c+6065-0x1e3c)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x1a48+2233-0x2301);}timestamp->year=i;pos++;i=((data[pos]&
+(0x1204+3166-0x1e53))<<(0x1bef+2595-0x260e))+((data[pos]&(0xf12+126-0xea0))>>
+(0x137c+920-0x1710));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x1a16+376-0x1b82)||j<
+(0x129c+2751-0x1d5a)){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=(0x195+4413-0x12d1);}}else{at_print(LOG_DEBUG,
+,j);i=(0x1445+1890-0x1ba6);}}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=(0x5b8+1672-0xc3f);}timestamp->month=i;pos++;i=((data[pos]&
-(0x10db+3688-0x1f34))<<(0x15f2+364-0x175a))+((data[pos]&(0x17f4+536-0x191c))>>
-(0x169+2144-0x9c5));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xf23+3442-0x1c76)||j<
-(0xfcb+4389-0x20ef)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x931+7245-0x257d);}timestamp->month=i;pos++;i=((data[pos]&
+(0x1bc8+1034-0x1fc3))<<(0xe44+5940-0x2574))+((data[pos]&(0xd71+6768-0x26f1))>>
+(0xb1b+476-0xcf3));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xab7+589-0xce5)||j<
+(0xc49+642-0xeca)){at_print(LOG_DEBUG,
"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);i=
-(0x2fd+6198-0x1b32);}}else{at_print(LOG_DEBUG,
+(0x13d+5823-0x17fb);}}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=(0xc46+6006-0x23bb);}timestamp->day=i;pos++;i=((data[pos]&
-(0xdff+2054-0x15f6))<<(0x13b9+4130-0x23d7))+((data[pos]&(0x17d+219-0x168))>>
-(0x1a39+2926-0x25a3));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xdda+5348-0x22a7)){
+,data[pos]);i=(0x593+6317-0x1e3f);}timestamp->day=i;pos++;i=((data[pos]&
+(0x28d+5046-0x1634))<<(0x109b+3613-0x1eb4))+((data[pos]&(0x2201+534-0x2327))>>
+(0xc10+3587-0x1a0f));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x53a+1668-0xba7)){
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=(0x80+3480-0xe18);}}else{at_print(LOG_DEBUG,
+,j);i=(0x11b9+5173-0x25ee);}}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=(0x133d+2720-0x1ddd);}timestamp->hour=i;pos++;i=((data[pos]&
-(0x598+652-0x815))<<(0x27d+2297-0xb72))+((data[pos]&(0x73f+1901-0xdbc))>>
-(0x1f4d+1090-0x238b));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xfb6+1033-0x1384)){
+,data[pos]);i=(0x3b0+8344-0x2448);}timestamp->hour=i;pos++;i=((data[pos]&
+(0x19a3+3271-0x265b))<<(0x5a8+1633-0xc05))+((data[pos]&(0x175+7492-0x1dc9))>>
+(0x1214+361-0x1379));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x1306+5076-0x269f)){
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=(0x4d5+2921-0x103e);}}else{at_print(LOG_DEBUG,
+,j);i=(0xe6b+28-0xe87);}}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=(0x1630+3170-0x2292);}timestamp->minute=i;pos++;i=((data[pos]&
-(0x108b+3686-0x1ee2))<<(0x7cc+7172-0x23cc))+((data[pos]&(0x11b4+2682-0x1b3e))>>
-(0x1e21+1803-0x2528));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x869+7773-0x268b)){
+,data[pos]);i=(0x1bb4+2484-0x2568);}timestamp->minute=i;pos++;i=((data[pos]&
+(0xd63+893-0x10d1))<<(0x126d+1405-0x17e6))+((data[pos]&(0x1133+115-0x10b6))>>
+(0x179b+1583-0x1dc6));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xe2+8828-0x2323)){
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=(0xa59+6439-0x2380);}}else{at_print(LOG_DEBUG,
+,i);i=(0x3d7+1831-0xafe);}}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=(0x268+3062-0xe5e);}timestamp->second=i;pos++;if(data[pos]&
-(0xfdb+913-0x1364)){timestamp->timezone=(data[pos]&(0x1bc0+2494-0x2577))*
-(0xc63+3568-0x1a49)+((data[pos]&(0x2d9+205-0x2b6))>>(0x87f+68-0x8bf));timestamp
-->timezone*=(-(0x635+4377-0x174d));}else{timestamp->timezone=(sint7)((data[pos]&
-(0x172f+2481-0x20d1))*(0x18a1+786-0x1ba9)+((data[pos]&(0x988+2609-0x12c9))>>
-(0xcf1+5635-0x22f0)));}if(timestamp->timezone>(0x6b+8995-0x235e)||timestamp->
-timezone<-(0xa71+1374-0xf9f)){at_print(LOG_DEBUG,
+,data[pos]);i=(0xa08+4004-0x19ac);}timestamp->second=i;pos++;if(data[pos]&
+(0xf8c+2416-0x18f4)){timestamp->timezone=(data[pos]&(0x507+3892-0x1434))*
+(0x17ed+2733-0x2290)+((data[pos]&(0x372+559-0x4b1))>>(0x1ced+104-0x1d51));
+timestamp->timezone*=(-(0xfd1+2569-0x19d9));}else{timestamp->timezone=(sint7)((
+data[pos]&(0x39f+3836-0x128c))*(0x74a+4145-0x1771)+((data[pos]&
+(0x165b+1280-0x1a6b))>>(0x1df6+2029-0x25df)));}if(timestamp->timezone>
+(0x1153+4384-0x2243)||timestamp->timezone<-(0x518+8117-0x249d)){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=(0x1b06+3034-0x26e0);}pos++;return pos
-;}static UINT8 wms_ts_decode_udh_concat_8(const UINT8*udh,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x1d12+2398-0x2670);if(udh==NULL||header_ptr==NULL){
-at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x1ac5+816-0x1df5);}if(udh[pos]<(0x1fc+1675-0x884)){at_print(LOG_DEBUG,
+,timestamp->timezone);timestamp->timezone=(0xb2f+2427-0x14aa);}pos++;return pos;
+}static UINT8 wms_ts_decode_udh_concat_8(const UINT8*udh,wms_udh_s_type*
+header_ptr){UINT8 pos=(0xcd6+350-0xe34);if(udh==NULL||header_ptr==NULL){at_print
+(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
+(0x12c3+389-0x1448);}if(udh[pos]<(0x1a9f+15-0x1aab)){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(0x6da+4229-0x175f);}if(udh[pos+(0x185f+2506-0x2227)]==
-(0x299+4917-0x15ce)||udh[pos+(0x192+4653-0x13bc)]>udh[pos+(0x60a+7055-0x2197)]){
+,udh[pos]);return(0x214+3634-0x1046);}if(udh[pos+(0x1dc6+632-0x203c)]==
+(0x224+8893-0x24e1)||udh[pos+(0x62a+581-0x86c)]>udh[pos+(0xd9+3150-0xd25)]){
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(0xe03+1361-0x1354);}pos++;header_ptr->header_id=WMS_UDH_CONCAT_8;
+);return(0xefa+2207-0x1799);}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[(0xff5+5581-0x25c2)]
-+(0x345+3153-0xf95));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x336+1027-0x739);if(udh==NULL||header_ptr
+pos++];header_ptr->u.concat_8.seq_num=udh[pos++];return(udh[(0x95a+1379-0xebd)]+
+(0xb5f+768-0xe5e));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0x2cd+433-0x47e);if(udh==NULL||header_ptr
==NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");
-return(0x9b+4574-0x1279);}if(udh[pos]<(0x129+6017-0x18a6)){at_print(LOG_DEBUG,
+return(0xca3+2700-0x172f);}if(udh[pos]<(0x1b7+6954-0x1cdd)){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(0x185+9188-0x2569);}if(udh[pos+(0x14dd+1438-0x1a78)]==
-(0x14c2+4012-0x246e)||udh[pos+(0x520+3235-0x11bf)]==(0xf65+5051-0x2320)||udh[pos
-+(0x25e1+122-0x2657)]>udh[pos+(0xeb1+2534-0x1894)])return(0x87b+5222-0x1ce1);
+,udh[pos]);return(0x250c+84-0x2560);}if(udh[pos+(0x1f24+1306-0x243b)]==
+(0x1d16+204-0x1de2)||udh[pos+(0x14+6355-0x18e3)]==(0x819+6373-0x20fe)||udh[pos+
+(0x334+8645-0x24f5)]>udh[pos+(0x993+7193-0x25a9)])return(0x940+1681-0xfd1);
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<<(0x203c+1118-0x2492))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
-pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[(0x18b+5217-0x15ec)
-]+(0x4d+2601-0xa75));}static UINT8 wms_ts_udh_decode_first_seg_check(const UINT8
- len,const UINT8*data,UINT8*is_first_segment_ptr){UINT8 pos=(0x9c5+622-0xc33);
-UINT8 num_headers=(0xa57+4441-0x1bb0);UINT8 udhl=(0xe8d+1746-0x155f);UINT8 iedl=
-(0x8aa+6905-0x23a3);UINT8 iei=(0x5ea+2838-0x1100);*is_first_segment_ptr=TRUE;if(
-data==NULL||data[pos]==(0x274+3342-0xf82)||len==(0x20f5+1302-0x260b)){at_print(
-LOG_DEBUG,
+msg_ref<<(0xa5a+4559-0x1c21))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
+pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[(0x220+5196-0x166c)
+]+(0x171a+989-0x1af6));}static UINT8 wms_ts_udh_decode_first_seg_check(const
+UINT8 len,const UINT8*data,UINT8*is_first_segment_ptr){UINT8 pos=
+(0x7f4+1378-0xd56);UINT8 num_headers=(0x417+6233-0x1c70);UINT8 udhl=
+(0x1282+2683-0x1cfd);UINT8 iedl=(0xa80+3748-0x1924);UINT8 iei=(0xebf+25-0xed8);*
+is_first_segment_ptr=TRUE;if(data==NULL||data[pos]==(0x5c1+7374-0x228f)||len==
+(0xe1f+795-0x113a)){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+(0xa20+1742-0x10ed)];if(iei==
-WMS_UDH_CONCAT_16){if(data[pos+(0xb1c+789-0xe2c)]!=(0x220+4694-0x1475)){at_print
-(LOG_DEBUG,
+WMS_MAX_UD_HEADERS)){iei=data[pos];iedl=data[pos+(0x59c+579-0x7de)];if(iei==
+WMS_UDH_CONCAT_16){if(data[pos+(0xd02+1981-0x14ba)]!=(0xe5c+3505-0x1c0c)){
+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+=((0x5f+8845-0x22ea)+iedl);}}return TRUE;}static UINT8
+;pos+=((0xdc5+3032-0x199b)+iedl);}}return TRUE;}static UINT8
wms_ts_decode_udh_special_sm(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
-pos=(0x1095+3911-0x1fdc);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x12f9+3878-0x221f);}if(
-udh[pos]<(0x2135+1042-0x2545)){at_print(LOG_DEBUG,
+pos=(0x196f+1073-0x1da0);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1bca+1606-0x2210);}if(
+udh[pos]<(0x1753+2564-0x2155)){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(0x19eb+2416-0x235b);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x4bf+6946-0x1fe1);}pos++;header_ptr->header_id=
WMS_UDH_SPECIAL_SM;header_ptr->u.special_sm.msg_waiting=(
-wms_gw_msg_waiting_e_type)((udh[pos]>>(0x15e5+3542-0x23b4)==(0x1dc8+1036-0x21d4)
-)?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++]&(0xb6b+1331-0x101f)
-);header_ptr->u.special_sm.message_count=udh[pos++];return(udh[
-(0x3f8+1401-0x971)]+(0x62f+7032-0x21a6));}static UINT8 wms_ts_decode_udh_port_8(
-const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x13d0+2531-0x1db3);if(udh
-==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xd44+6086-0x250a);}if(
-udh[pos]<(0x23d2+28-0x23ec)){at_print(LOG_DEBUG,
+wms_gw_msg_waiting_e_type)((udh[pos]>>(0x18c4+850-0x1c0f)==(0x1309+1687-0x19a0))
+?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++]&
+(0x119d+2438-0x1aa4));header_ptr->u.special_sm.message_count=udh[pos++];return(
+udh[(0xa4b+6164-0x225f)]+(0x802+7178-0x240b));}static UINT8
+wms_ts_decode_udh_port_8(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
+(0x90c+3956-0x1880);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x317+1813-0xa2c);}if(udh
+[pos]<(0x1383+3711-0x2200)){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(0xa1a+6856-0x24e2);}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[(0x1e13+1958-0x25b9)]+(0x1159+916-0x14ec));}static UINT8
-wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
-(0x1b4a+1362-0x209c);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x3bd+5801-0x1a66);}if(
-udh[pos]<(0x201+9238-0x2613)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x14a0+2231-0x1d57);}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[(0xe54+951-0x120b)]+(0x1adb+319-0x1c19));}static
+ UINT8 wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
+ pos=(0x228+727-0x4ff);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1045+2951-0x1bcc);}if(
+udh[pos]<(0x264+7201-0x1e81)){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(0x476+5576-0x1a3e);}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<<(0xfa+2739-0xba5))|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<<(0x12e0+1356-0x1824))|udh[pos++];return(udh[
-(0x1bb+9451-0x26a6)]+(0xf08+1150-0x1385));}static UINT8
+,udh[pos]);return(0x24+7579-0x1dbf);}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<<(0x12bd+2075-0x1ad0))|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<<(0x1655+2115-0x1e90))|udh[pos++];return(udh[
+(0x9d1+5429-0x1f06)]+(0x14+4721-0x1284));}static UINT8
wms_ts_decode_udh_text_formatting(const UINT8*udh,wms_udh_s_type*header_ptr){
-UINT8 pos=(0x1855+106-0x18bf);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
-,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xa00+6612-0x23d4);}if(
-udh[pos]<(0xf9c+431-0x1148)){at_print(LOG_DEBUG,
+UINT8 pos=(0x17d+516-0x381);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x8e8+5561-0x1ea1);}if(
+udh[pos]<(0x10+5346-0x14ef)){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(0x8ec+6502-0x2252);}if(udh[pos]>=(0x10e5+177-0x1192)){
+,udh[pos]);return(0xa87+2425-0x1400);}if(udh[pos]>=(0x9ba+2550-0x13ac)){
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]&
-(0x1728+2383-0x2074));header_ptr->u.text_formating.font_size=(
-wms_udh_font_size_e_type)((udh[pos]&(0xacd+703-0xd80))>>(0x231+139-0x2ba));
-header_ptr->u.text_formating.style_bold=(udh[pos]&(0x11a9+3374-0x1ec7))>>
-(0x53f+5430-0x1a71);header_ptr->u.text_formating.style_italic=(udh[pos]&
-(0x1e4+8041-0x212d))>>(0x1ea4+1207-0x2356);header_ptr->u.text_formating.
-style_underlined=(udh[pos]&(0xeb+516-0x2af))>>(0x5fc+4424-0x173e);header_ptr->u.
-text_formating.style_strikethrough=(udh[pos]&(0x247f+625-0x2670))>>
-(0x23ea+778-0x26ed);pos++;if(header_ptr->u.text_formating.is_color_present){
+(0xc47+1415-0x11cb));header_ptr->u.text_formating.font_size=(
+wms_udh_font_size_e_type)((udh[pos]&(0xfe7+237-0x10c8))>>(0xbc9+1414-0x114d));
+header_ptr->u.text_formating.style_bold=(udh[pos]&(0x25c+1065-0x675))>>
+(0x17ca+2576-0x21d6);header_ptr->u.text_formating.style_italic=(udh[pos]&
+(0x10b2+3417-0x1deb))>>(0x2521+253-0x2619);header_ptr->u.text_formating.
+style_underlined=(udh[pos]&(0x25f+6373-0x1b04))>>(0x6d+2712-0xaff);header_ptr->u
+.text_formating.style_strikethrough=(udh[pos]&(0xb5b+2986-0x1685))>>
+(0xa0b+2164-0x1278);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]&(0x134a+1045-0x1750));header_ptr->u.text_formating.
-text_color_background=(wms_udh_text_color_e_type)((udh[pos]&(0x1096+124-0x1022))
->>(0x98b+3585-0x1788));pos++;}return(udh[(0x1979+3389-0x26b6)]+(0x24+3067-0xc1e)
-);}static UINT8 wms_ts_decode_udh_pre_def_sound(const UINT8*udh,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x119d+2083-0x19c0);if(udh==NULL||header_ptr==NULL){
-at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0xb9f+150-0xc35);}if(udh[pos]<(0x1593+702-0x184f)){at_print(LOG_DEBUG,
+udh[pos]&(0x116+2959-0xc96));header_ptr->u.text_formating.text_color_background=
+(wms_udh_text_color_e_type)((udh[pos]&(0xf60+6102-0x2646))>>(0xcff+1557-0x1310))
+;pos++;}return(udh[(0x13b7+3800-0x228f)]+(0xd30+4445-0x1e8c));}static UINT8
+wms_ts_decode_udh_pre_def_sound(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
+ pos=(0x131d+3426-0x207f);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x11b3+1547-0x17be);}if(
+udh[pos]<(0x1f0b+195-0x1fcc)){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(0x1004+711-0x12cb);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x588+5904-0x1c98);}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[(0x1b28+1204-0x1fdc)]+
-(0x166d+565-0x18a1));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8*
-udh,wms_udh_s_type*header_ptr){UINT8 pos=(0xb25+497-0xd16),j;if(udh==NULL||
+->u.pre_def_sound.snd_number=udh[pos++];return(udh[(0x732+1019-0xb2d)]+
+(0x14b7+103-0x151d));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8*
+udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x55d+3120-0x118d),j;if(udh==NULL||
header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xe5d+2920-0x19c5);}if(
-udh[pos]==(0x160b+3707-0x2486)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1266+4216-0x22de);}if(
+udh[pos]==(0x20b+4127-0x122a)){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(0x103b+2592-0x1a5b);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
-header_ptr->u.user_def_sound.data_length=udh[pos++]-(0x140+5918-0x185d);
-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,
+);return(0x258+2979-0xdfb);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
+header_ptr->u.user_def_sound.data_length=udh[pos++]-(0x9cb+904-0xd52);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(0x9bb+786-0xccd);}memset(header_ptr->u.
-user_def_sound.user_def_sound,(0x4bf+2762-0xe8a),WMS_UDH_MAX_SND_SIZE);for(j=
-(0x999+6332-0x2255);j<header_ptr->u.user_def_sound.data_length;j++)header_ptr->u
+,header_ptr->header_id);return(0x729+444-0x8e5);}memset(header_ptr->u.
+user_def_sound.user_def_sound,(0xee7+4852-0x20dc),WMS_UDH_MAX_SND_SIZE);for(j=
+(0x158b+392-0x1713);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=(0xf65+2237-0x1822);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x9ed+5680-0x201d);}if(
-udh[pos]!=(0x14a9+2301-0x1da4)){at_print(LOG_DEBUG,
+pos=(0xd56+6333-0x2613);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x22e8+4-0x22ec);}if(udh[
+pos]!=(0x82b+1391-0xd98)){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(0x3d4+1592-0xa0c);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x1064+2906-0x1bbe);}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=(0xacc+1954-0x126e),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1d54+2123-0x259f);}if(
-udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_LARGE_BITMAP_SIZE+(0x634+1443-0xbd6)
-)){at_print(LOG_DEBUG,
+pos=(0x13d9+434-0x158b),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x399+1475-0x95c);}if(udh
+[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_LARGE_BITMAP_SIZE+(0xcc8+2793-0x17b0)))
+{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(0x1af1+2090-0x231b);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
-pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0x14c+1147-0x5c7);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x6d5+1634-0xd37);k<
+,udh[pos]);return(0x63c+7717-0x2461);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
+pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0x20c+1388-0x778);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x9c6+1088-0xe06);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=(0x67d+6205-0x1eba),j,k;if(udh==NULL||
+wms_udh_s_type*header_ptr){UINT8 pos=(0x14c1+572-0x16fd),j,k;if(udh==NULL||
header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x461+5868-0x1b4d);}if(
-udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_SMALL_BITMAP_SIZE+
-(0x1f83+1592-0x25ba))){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x28f+3106-0xeb1);}if(udh
+[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_SMALL_BITMAP_SIZE+(0x1140+529-0x1350)))
+{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(0x1698+3127-0x22cf);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
-pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0x1236+243-0x1329);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0xb41+614-0xda7);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=(0xb81+5593-0x215a),j;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1088+180-0x113c);}if(
-udh[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x123d+3370-0x1f66)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x14a2+4176-0x24f2);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
+pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0xef0+4929-0x2231);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x420+6915-0x1f23);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=(0x3f6+7771-0x2251),j;if(udh==NULL||
+header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x356+5140-0x176a);}if(
+udh[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x1cdc+418-0x1e7d)){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(0x411+3048-0xff9);}header_ptr->header_id=WMS_UDH_LARGE_PICTURE
-;pos++;header_ptr->u.large_picture.position=udh[pos++];for(j=
-(0x1386+3828-0x227a);j<WMS_UDH_LARGE_PIC_SIZE;j++)header_ptr->u.large_picture.
+,udh[pos]);return(0x2220+1034-0x262a);}header_ptr->header_id=
+WMS_UDH_LARGE_PICTURE;pos++;header_ptr->u.large_picture.position=udh[pos++];for(
+j=(0x15e6+3989-0x257b);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=(0x1bb8+1712-0x2268),j;if(
-udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xb06+6141-0x2303);}if(
-udh[pos]!=WMS_UDH_SMALL_PIC_SIZE+(0x8cc+708-0xb8f)){at_print(LOG_DEBUG,
+const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x4f+912-0x3df),j;if(udh==
+NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xae4+396-0xc70);}if(udh[
+pos]!=WMS_UDH_SMALL_PIC_SIZE+(0x15e3+1011-0x19d5)){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(0x1196+1851-0x18d1);}header_ptr->header_id=
+,udh[pos]);return(0x1a83+806-0x1da9);}header_ptr->header_id=
WMS_UDH_SMALL_PICTURE;pos++;header_ptr->u.small_picture.position=udh[pos++];for(
-j=(0x1660+1118-0x1abe);j<WMS_UDH_SMALL_PIC_SIZE;j++)header_ptr->u.small_picture.
+j=(0x4b2+1094-0x8f8);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=(0x2343+179-0x23f6),j,pic_size;if
+UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x85b+5861-0x1f40),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(0x12a6+3909-0x21eb);}if(
-udh[pos]>WMS_UDH_VAR_PIC_SIZE+(0x18f+6501-0x1af1)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x13eb+1765-0x1ad0);}if(
+udh[pos]>WMS_UDH_VAR_PIC_SIZE+(0x1172+3519-0x1f2e)){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(0x1dea+1006-0x21d8);}if((udh[pos]-(0x1189+1431-0x171d))!=(udh[
-pos+(0x548+7347-0x21f9)]*udh[pos+(0x90b+1701-0xfad)])){at_print(LOG_DEBUG,
+,udh[pos]);return(0x1c0+6792-0x1c48);}if((udh[pos]-(0x797+6618-0x216e))!=(udh[
+pos+(0x1985+604-0x1bdf)]*udh[pos+(0xa84+1987-0x1244)])){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(0x1d1+3377-0xf02);}pic_size=udh[pos++]-(0x18d6+1483-0x1e9e);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++]*(0x1787+2880-0x22bf));
-header_ptr->u.var_picture.height=udh[pos++];for(j=(0xb6a+2981-0x170f);j<pic_size
+);return(0x6b4+1998-0xe82);}pic_size=udh[pos++]-(0x875+4738-0x1af4);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++]*(0x485+6627-0x1e60));
+header_ptr->u.var_picture.height=udh[pos++];for(j=(0x278+3406-0xfc6);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=(0xfe9+5455-0x2538);if(udh==NULL||header_ptr==NULL){
+header_ptr){UINT8 pos=(0x704+1853-0xe41);if(udh==NULL||header_ptr==NULL){
at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0xc7+7008-0x1c27);}if(udh[pos]<(0xc21+1914-0x139a)){at_print(LOG_DEBUG,
+(0x14c8+1038-0x18d6);}if(udh[pos]<(0xc57+3779-0x1b19)){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(0x7c2+39-0x7e9);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x108b+1157-0x1510);}pos++;header_ptr->header_id=
WMS_UDH_USER_PROMPT;header_ptr->u.user_prompt.number_of_objects=udh[pos++];
-return(udh[(0x4a2+664-0x73a)]+(0x55+9610-0x25de));}static UINT8
+return(udh[(0x1c74+297-0x1d9d)]+(0x1a3f+179-0x1af1));}static UINT8
wms_ts_decode_udh_eo(const UINT8*udh,UINT8 first_segment,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x1d8d+2073-0x25a6),udh_length;if(udh==NULL||header_ptr==
+header_ptr){UINT8 pos=(0x1e6+4925-0x1523),udh_length;if(udh==NULL||header_ptr==
NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x21df+738-0x24c1);}if(udh[pos]==(0x11c+860-0x478)){at_print(LOG_DEBUG,
+(0x907+4649-0x1b30);}if(udh[pos]==(0xe88+4211-0x1efb)){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(0x128d+4437-0x23e2);}udh_length=udh[pos++];header_ptr->header_id=
+);return(0x2eb+8330-0x2375);}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
-(0x3ec+2426-0xd66);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.
-length=udh[pos++]<<(0x95d+561-0xb86);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++]<<(0xc55+868-0xfb1);header_ptr->u
-.eo.position|=udh[pos++];}header_ptr->u.eo.content.length=(udh_length-pos)+
-(0x1831+2287-0x211f);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=
-(0x1427+2423-0x1d9e);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x6e8+5710-0x1d36);}if(
-udh[pos]<(0xe3a+49-0xe6a)){at_print(LOG_DEBUG,
+(0xd82+246-0xe78);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.length
+=udh[pos++]<<(0x1791+3696-0x25f9);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++]<<(0x1b25+101-0x1b82);header_ptr->u.eo.
+position|=udh[pos++];}header_ptr->u.eo.content.length=(udh_length-pos)+
+(0x223+134-0x2a8);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=
+(0x55b+1203-0xa0e);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x11df+2562-0x1be1);}if(
+udh[pos]<(0x1c18+1788-0x2313)){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(0x14ac+950-0x1862);}pos++;header_ptr->header_id=WMS_UDH_RFC822
-;header_ptr->u.rfc822.header_length=udh[pos++];return(udh[(0x169d+3378-0x23cf)]+
-(0x446+718-0x713));}static UINT8 wms_ts_decode_udh_nat_lang_ss(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x1ccb+811-0x1ff6);if(udh==NULL||
-header_ptr==NULL){return(0xad0+1547-0x10db);}if(udh[pos]!=
-WMS_UDH_OCTETS_NAT_LANG_SS){return(0x13f4+3588-0x21f8);}pos++;header_ptr->
+,udh[pos]);return(0x881+347-0x9dc);}pos++;header_ptr->header_id=WMS_UDH_RFC822;
+header_ptr->u.rfc822.header_length=udh[pos++];return(udh[(0x19d5+2239-0x2294)]+
+(0x719+876-0xa84));}static UINT8 wms_ts_decode_udh_nat_lang_ss(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0x1e1+3863-0x10f8);if(udh==NULL||
+header_ptr==NULL){return(0x17ef+1372-0x1d4b);}if(udh[pos]!=
+WMS_UDH_OCTETS_NAT_LANG_SS){return(0x11b0+151-0x1247);}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(0x32a+2666-0xd94);}header_ptr->u.
-nat_lang_ss.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
-(0x861+6634-0x224b)]+(0x16e4+373-0x1858));}static UINT8
+WMS_UDH_NAT_LANG_PORTUGUESE<udh[pos])){return(0x1622+3194-0x229c);}header_ptr->u
+.nat_lang_ss.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
+(0xdfc+5778-0x248e)]+(0xf62+3056-0x1b51));}static UINT8
wms_ts_decode_udh_nat_lang_ls(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
-pos=(0x334+2139-0xb8f);if(udh==NULL||header_ptr==NULL){return(0xef7+4348-0x1ff3)
-;}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_LS){return(0x281+4270-0x132f);}pos++;
+pos=(0x151f+935-0x18c6);if(udh==NULL||header_ptr==NULL){return(0x516+2522-0xef0)
+;}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_LS){return(0x309+8812-0x2575);}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(0x3ed+3105-0x100e);}header_ptr
-->u.nat_lang_ls.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
-(0x10a6+57-0x10df)]+(0xfd3+1082-0x140c));}static UINT8 wms_ts_decode_udh_other(
-const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x1c1+5424-0x16f1),i=
-(0x14f9+4296-0x25c1);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xb6+8176-0x20a6);}if(udh
-[pos+(0x19ac+3351-0x26c2)]>WMS_UDH_OTHER_SIZE){at_print(LOG_DEBUG,
+||(WMS_UDH_NAT_LANG_PORTUGUESE<udh[pos])){return(0x7e8+1681-0xe79);}header_ptr->
+u.nat_lang_ls.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
+(0x95f+6919-0x2466)]+(0xef7+344-0x104e));}static UINT8 wms_ts_decode_udh_other(
+const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x22f6+985-0x26cf),i=
+(0x1b2+5030-0x1558);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x793+3795-0x1666);}if(
+udh[pos+(0x8b3+294-0x9d8)]>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(0x191+769-0x492);}header_ptr->header_id=(wms_udh_id_e_type)udh[pos];
+);return(0x2d6+8380-0x2392);}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=(0xa0+8428-0x218c);i<header_ptr->u.other.
+header_length=udh[pos++];for(i=(0x17eb+3788-0x26b7);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=(0x1583+3802-0x245d);UINT8
-header_length=(0x7d3+7900-0x26af),num_headers=(0x2425+676-0x26c9);UINT8 udhl;
-UINT8 first_segment=TRUE;if(data==NULL||len==(0xd9d+3628-0x1bc9)||data[pos]==
-(0x1463+1325-0x1990)||num_headers_ptr==NULL||udh_ptr==NULL){at_print(LOG_DEBUG,
+num_headers_ptr,wms_udh_s_type*udh_ptr){UINT8 pos=(0x15e3+3863-0x24fa);UINT8
+header_length=(0x6e0+2402-0x1042),num_headers=(0x253b+347-0x2696);UINT8 udhl;
+UINT8 first_segment=TRUE;if(data==NULL||len==(0x1c+5216-0x147c)||data[pos]==
+(0xca8+3356-0x19c4)||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(0x96+794-0x3b0);}udhl=data[pos];pos++;while((pos<udhl)&&(num_headers<
-WMS_MAX_UD_HEADERS)){switch(data[pos++]){case WMS_UDH_CONCAT_8:header_length=
+);return(0xa4a+3026-0x161c);}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[
num_headers]);break;case WMS_UDH_SPECIAL_SM:header_length=
@@ -1857,66 +1858,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(0xcd0+4681-0x1f19);}else if(header_length!=(0x13b1+2198-0x1c47)){
+,udhl);return(0x9a9+6910-0x24a7);}else if(header_length!=(0x2349+855-0x26a0)){
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=(0x1c45+1869-0x2392);return(0xab1+2018-0x1293);
-}}if(num_headers>=WMS_MAX_UD_HEADERS){at_print(LOG_DEBUG,
+,pos,data[pos]);*num_headers_ptr=(0x2ff+8945-0x25f0);return(0xf01+1724-0x15bd);}
+}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+(0x4a4+329-0x5ec);}if(pos!=(udhl+(0x144+4978-0x14b5))){at_print(
+);pos=udhl+(0x1968+1387-0x1ed2);}if(pos!=(udhl+(0x1914+855-0x1c6a))){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=(0x18fa+917-0x1c8f);udhl=(0xe13+1990-0x15d9);}if(num_headers>
-(0x84a+6585-0x2203)){*num_headers_ptr=num_headers;}return udhl;}UINT8
+);num_headers=(0x1012+1278-0x1510);udhl=(0x51a+7618-0x22dc);}if(num_headers>
+(0x1755+294-0x187b)){*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=(0x6b4+7198-0x22d2);UINT8 fill_bits=(0xefc+2490-0x18b6);
-UINT8 user_data_length;UINT8 user_data_header_length=(0x6b+6311-0x1912);if(dcs==
-NULL||data==NULL||user_data==NULL){at_print(LOG_DEBUG,
+user_data){UINT8 i,pos=(0xd1c+2688-0x179c);UINT8 fill_bits=(0x658+4079-0x1647);
+UINT8 user_data_length;UINT8 user_data_header_length=(0x749+3053-0x1336);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(0x1840+1388-0x1dac);}(void)memset(user_data,(0x93a+2510-0x1308),sizeof(
-wms_gw_user_data_s_type));if(len==(0xcdf+2752-0x179f)){return(0xa85+3635-0x18b8)
+);return(0x2ac+1435-0x847);}(void)memset(user_data,(0x1ab7+1769-0x21a0),sizeof(
+wms_gw_user_data_s_type));if(len==(0x720+6536-0x20a8)){return(0x1f7+7436-0x1f03)
;}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(0x631+1848-0xd69);}user_data_length=len;if(user_data_header_present){
+);return(0x9f8+4297-0x1ac1);}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(0x18e5+2880-0x2425);}if(user_data_header_length>(0x1434+3165-0x2091)){
-fill_bits=((len*(0x432+1341-0x968))-((user_data_header_length+
-(0xe52+5195-0x229c))*(0x146+7923-0x2031)))%(0xe48+6208-0x2681);user_data_length=
-(UINT8)(((len*(0xac0+6670-0x24c7))-((user_data_header_length+(0xd99+6198-0x25ce)
-)*(0x10fc+5026-0x2496)))/(0xdf9+3045-0x19d7));pos=user_data_header_length+
-(0xe90+3313-0x1b80);if(fill_bits!=(0x675+4844-0x1961)){fill_bits=
-(0x76a+4512-0x1902)-fill_bits;}}i=wms_ts_unpack_gw_7_bit_chars(&data[pos],
+);return(0x1680+2665-0x20e9);}if(user_data_header_length>(0xc64+5984-0x23c4)){
+fill_bits=((len*(0x18d6+1480-0x1e97))-((user_data_header_length+
+(0xbc7+1677-0x1253))*(0x2187+80-0x21cf)))%(0xf50+525-0x1156);user_data_length=(
+UINT8)(((len*(0x40b+7374-0x20d2))-((user_data_header_length+(0x2273+822-0x25a8))
+*(0xecc+3598-0x1cd2)))/(0xc9b+1320-0x11bc));pos=user_data_header_length+
+(0x2db+5215-0x1739);if(fill_bits!=(0x470+2478-0xe1e)){fill_bits=
+(0x2f8+8969-0x25f9)-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(0x210+5884-0x190c);}user_data_length=len;if(user_data_header_present){
+);return(0x1904+2555-0x22ff);}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(0x83a+1776-0xf2a);}pos+=user_data_header_length+(0x2f1+37-0x315);
-user_data_length=(len-user_data_header_length)-(0x1ec+1767-0x8d2);}memcpy(
+);return(0xbd6+4637-0x1df3);}pos+=user_data_header_length+(0xdd1+3335-0x1ad7);
+user_data_length=(len-user_data_header_length)-(0x1c4+2231-0xa7a);}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=
-(0xd0c+4068-0x1cf0),i;const UINT8*data=ptRawTsData->data;if(ptRawTsData==NULL||
+(0x10b1+2257-0x1982),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]&(0x1276+1301-0x1788))!=
-(0x1a62+2772-0x2536)){printf(
+);return WMS_NULL_PTR_S;}else if((data[pos]&(0x1c3c+1755-0x2314))!=
+(0x136c+1014-0x1762)){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]&
-(0x1b09+1283-0x2008))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
-(0x589+1524-0xb5d))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
-(0x1564+947-0x18d7))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
-(0x1adf+1220-0x1f23))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&
-deliver->address);if(i==(0xcf9+2157-0x1566)){printf(
+(0x1902+1436-0x1e9a))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
+(0x5bc+358-0x702))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
+(0x154+1856-0x854))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
+(0x1b4+6812-0x1bd0))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&
+deliver->address);if(i==(0xa7f+5395-0x1f92)){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.
@@ -1924,75 +1925,74 @@
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==(0xc16+920-0xfae)){printf(
+timestamp);if(i==(0x1482+1130-0x18ec)){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-(0x86+5360-0x1575)],data+pos,deliver->
+deliver->dcs,data[pos-(0x6c7+3682-0x1528)],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=(0x23a+2241-0xafb);if(data==NULL||validity==NULL){at_print(LOG_DEBUG
-,
+UINT8 i,pos=(0xc12+4425-0x1d5b);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(0xd2f+755-0x1022);}else{switch(validity->format){case
-WMS_GW_VALIDITY_NONE:memset(validity,(0x103f+3621-0x1e64),sizeof(
+);return(0x1fa5+1572-0x25c9);}else{switch(validity->format){case
+WMS_GW_VALIDITY_NONE:memset(validity,(0xb9+307-0x1ec),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=
-(0x1a88+1452-0x2034),i;const UINT8*data;if(ptRawTsData==NULL||submit==NULL){
+(0x15d2+4382-0x26f0),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]&(0x1385+4110-0x238f))?TRUE:FALSE;submit->validity.format=(
-wms_gw_validity_format_e_type)((data[pos]&(0x69+2718-0xaef))>>
-(0x1660+2567-0x2064));submit->status_report_enabled=(data[pos]&
-(0xc04+2306-0x14e6))?TRUE:FALSE;submit->user_data_header_present=(data[pos]&
-(0x10d4+1213-0x1551))?TRUE:FALSE;submit->reply_path_present=(data[pos]&
-(0x1365+4198-0x234b))?TRUE:FALSE;pos++;submit->message_reference=data[pos];pos++
-;i=wms_ts_decode_address(&data[pos],&submit->address);if(i==(0xbd3+6682-0x25ed))
-{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==(0x953+5839-0x2022))){return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=
-wms_ts_decode_gw_user_data(&submit->dcs,data[pos-(0x144f+3850-0x2358)],data+pos,
-submit->user_data_header_present,&submit->user_data);if(i>WMS_SMS_UDL_MAX_8_BIT)
-{printf(
+pos]&(0xb7c+4514-0x1d1a))?TRUE:FALSE;submit->validity.format=(
+wms_gw_validity_format_e_type)((data[pos]&(0xbaa+3259-0x184d))>>
+(0xc58+700-0xf11));submit->status_report_enabled=(data[pos]&(0x425+5040-0x17b5))
+?TRUE:FALSE;submit->user_data_header_present=(data[pos]&(0x607+4666-0x1801))?
+TRUE:FALSE;submit->reply_path_present=(data[pos]&(0x907+6208-0x20c7))?TRUE:FALSE
+;pos++;submit->message_reference=data[pos];pos++;i=wms_ts_decode_address(&data[
+pos],&submit->address);if(i==(0x6c9+6497-0x202a)){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==(0x183b+1424-0x1dcb))){
+return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=wms_ts_decode_gw_user_data(&
+submit->dcs,data[pos-(0x655+7129-0x222d)],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=(0x389+2777-0xe62),i;const UINT8*data;if(ptRawTsData==NULL||status_report==
+pos=(0x22dd+776-0x25e5),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]&
-(0xde8+3978-0x1d6e)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
-(0x137c+4516-0x2500)?TRUE:FALSE;status_report->user_data_header_present=(data[
-pos]&(0xbcd+3709-0x1a0a))?TRUE:FALSE;pos++;status_report->message_reference=data
-[pos];pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i==
-(0x18a+6250-0x19f4)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0x50+9202-0x243e)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
+(0x949+7414-0x261f)?TRUE:FALSE;status_report->user_data_header_present=(data[pos
+]&(0x1540+248-0x15f8))?TRUE:FALSE;pos++;status_report->message_reference=data[
+pos];pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i==
+(0xaf1+2166-0x1367)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
wms_ts_decode_timestamp(data+pos,&status_report->timestamp);if(i==
-(0x1e6f+770-0x2171)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0x14+7923-0x1f07)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
wms_ts_decode_timestamp(data+pos,&status_report->discharge_time);if(i==
-(0xbcd+3818-0x1ab7)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;status_report->
+(0x72b+1963-0xed6)){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)(0x47b+128-0x4fb);status_report->user_data.
-sm_len=(0xbc6+663-0xe5d);status_report->mask&=(0xfaa+956-0x1267);if((
-status_report->mask!=(0x1260+1858-0x18a3))&&(status_report->mask!=
-(0x1d8b+607-0x1fea))){pos++;if(status_report->mask&WMS_TPDU_MASK_PID){
+status_report->pid=(wms_pid_e_type)(0xfe8+114-0x105a);status_report->user_data.
+sm_len=(0x94a+2152-0x11b2);status_report->mask&=(0xbf1+332-0xc3e);if((
+status_report->mask!=(0x9ef+6176-0x2110))&&(status_report->mask!=
+(0x205+213-0x2da))){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-(0x9ec+6675-0x23fe)],data+pos,status_report->
+&status_report->dcs,data[pos-(0x535+6475-0x1e7f)],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=
-(0xb0+8144-0x2080);}return st;}wms_status_e_type wms_ts_decode(const
+(0x1623+2263-0x1efa);}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 1f81aea..72ca814 100755
--- a/ap/app/zte_comm/sms/src/sms_db.c
+++ b/ap/app/zte_comm/sms/src/sms_db.c
@@ -101,82 +101,82 @@
#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=
-(0x54a+4828-0x1826);extern T_zUfiSms_ParaInfo g_zUfiSms_CurSmsPara;extern
+(0x1051+3639-0x1e88);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={(0x778+2067-0xf8b)};int
-tmp_i=(0x10f2+4432-0x2242);
-#if (0xcc9+4580-0x1ead)
-if(atoi(date.year)>(0x1929+590-0x1b14)||atoi(date.year)<(0xa57+6373-0x233c)){
+T_zUfiSms_Date date){time_t timet;struct tm tmtime={(0x19c3+1594-0x1ffd)};int
+tmp_i=(0x3c4+2697-0xe4d);
+#if (0x142a+3415-0x2181)
+if(atoi(date.year)>(0x13f6+2564-0x1d97)||atoi(date.year)<(0x11+4955-0x136c)){
printf("[SMS] getsecond error, year out of range: %d!!!",atoi(date.year));return
-(0x1a82+137-0x1b0b);}
+(0x2374+322-0x24b6);}
#endif
-tmp_i=atoi(date.year);if(tmp_i<(0x1740+995-0x1b23)||tmp_i>INT_MAX-
-(0xc15+3780-0x1ad8)){at_print(LOG_ERR,
+tmp_i=atoi(date.year);if(tmp_i<(0x11b+5657-0x1734)||tmp_i>INT_MAX-
+(0x1e1f+415-0x1fbd)){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(0xdf2+1665-0x1473);}tmtime.tm_year=tmp_i+(0xb05+3423-0x1094)-
-(0x1a63+267-0x1402);tmp_i=atoi(date.month);if(tmp_i<(0x30c+4910-0x163a)||tmp_i>
-INT_MAX-(0xc82+574-0xebf)){at_print(LOG_ERR,
+,tmp_i);return(0x979+530-0xb8b);}tmtime.tm_year=tmp_i+(0x13b6+2200-0x147e)-
+(0x1c86+511-0x1719);tmp_i=atoi(date.month);if(tmp_i<(0x894+4012-0x1840)||tmp_i>
+INT_MAX-(0x2533+319-0x2671)){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(0x9e3+1108-0xe37);}tmtime.tm_mon=tmp_i-(0x61d+7617-0x23dd);tmp_i=
-atoi(date.day);if(tmp_i<(0x535+2869-0x106a)||tmp_i>INT_MAX-(0x7b+7000-0x1bd2)){
-at_print(LOG_ERR,
+,tmp_i);return(0x23d+6618-0x1c17);}tmtime.tm_mon=tmp_i-(0xfb4+3683-0x1e16);tmp_i
+=atoi(date.day);if(tmp_i<(0x1345+4081-0x2336)||tmp_i>INT_MAX-(0xb85+5616-0x2174)
+){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(0x46c+3856-0x137c);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);if
-(tmp_i<(0xa88+1551-0x1097)||tmp_i>INT_MAX-(0xda8+4736-0x2027)){at_print(LOG_ERR,
+,tmp_i);return(0xbe9+4972-0x1f55);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);if
+(tmp_i<(0xb4c+3478-0x18e2)||tmp_i>INT_MAX-(0xa5b+7169-0x265b)){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(0x6e4+5742-0x1d52);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if(
-tmp_i<(0x1451+2103-0x1c88)||tmp_i>INT_MAX-(0x298+4897-0x15b8)){at_print(LOG_ERR,
+,tmp_i);return(0x1f99+216-0x2071);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if(
+tmp_i<(0xad2+1221-0xf97)||tmp_i>INT_MAX-(0x5ab+2925-0x1117)){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(0x14e6+2468-0x1e8a);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
-tmp_i<(0x4cc+554-0x6f6)||tmp_i>INT_MAX-(0x128d+3755-0x2137)){at_print(LOG_ERR,
+,tmp_i);return(0xee0+5033-0x2289);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
+tmp_i<(0x1fa6+415-0x2145)||tmp_i>INT_MAX-(0x1133+5341-0x260f)){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(0xc5b+6015-0x23da);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
+,tmp_i);return(0x1383+3218-0x2015);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
return timet;}T_zUfiSms_DbResult zUfiSms_OpenDb(void){int retry_times=
-(0x1785+2232-0x203d);int open_rst=SQLITE_ERROR;if(g_zUfiSms_DbPointer!=NULL){
+(0xd7d+2366-0x16bb);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++<(0x773+813-0xa96));printf(
+SQLITE_CANTOPEN&&retry_times++<(0x1492+1976-0x1c40));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=(0xb83+1109-0xfd8);int sqlRst=SQLITE_ERROR;while(try_times++<
-(0x1294+1534-0x1888)){sqlRst=sqlite3_exec(g_zUfiSms_DbPointer,exec_sql,callback,
+ try_times=(0xd4c+4080-0x1d3c);int sqlRst=SQLITE_ERROR;while(try_times++<
+(0x1600+867-0x1959)){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(
-(0x1380+404-0x1513));}if(sqlRst!=SQLITE_OK){printf(
+(0x1f8f+1887-0x26ed));}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)==(0xc23+3437-0x1990)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZTE_WMS_TMP1_PATH,F_OK)==(0x1fbb+459-0x2186)){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)!=(0x119f+5195-0x25ea)){slog(SMS_PRINT,SLOG_ERR,
+);if(remove(ZTE_WMS_TMP1_PATH)!=(0x1275+4874-0x257f)){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[(0x770+314-0x892)]={(0x32+637-0x2af)};char cmd[
-(0xd4+7216-0x1c84)]={(0x4a0+3108-0x10c4)};sc_cfg_get(
+);}}{char rnum_buf[(0x13a+1496-0x6fa)]={(0x384+4658-0x15b6)};char cmd[
+(0xab3+392-0xbbb)]={(0x19b+3629-0xfc8)};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)==(0x113a+4719-0x23a9)){if(remove(ZTE_WMS_SEC_PATH)!=
-(0x1f66+573-0x21a3)){slog(SMS_PRINT,SLOG_ERR,
+ZTE_WMS_TMP1_PATH,F_OK)==(0x216c+72-0x21b4)){if(remove(ZTE_WMS_SEC_PATH)!=
+(0x513+2006-0xce9)){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)!=(0x276+336-0x3c6)){slog(
+);}if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=(0x1dba+2067-0x25cd)){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>=(0x1dec+1014-0x21e1)){if(zresult[
-(0x7c7+7536-0x2537)]==NULL){*(int*)fvarg=(0x14cb+1810-0x1bdd);}else{*(int*)fvarg
-=atoi(zresult[(0x910+1151-0xd8f)]);}return SQLITE_OK;}else{return SQLITE_ERROR;}
+**zresult,char**lname){if(columns>=(0xaea+2025-0x12d2)){if(zresult[
+(0x5d4+1445-0xb79)]==NULL){*(int*)fvarg=(0x696+3479-0x142d);}else{*(int*)fvarg=
+atoi(zresult[(0x640+7975-0x2567)]);}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"
@@ -187,28 +187,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((0xc3b+5250-0x20bd)==(int)para->status_report_on){sc_cfg_set(
+para){if((0xf2c+4178-0x1f7e)==(int)para->status_report_on){sc_cfg_set(
NV_REPORT_ENABLE,"\x30");}else{sc_cfg_set(NV_REPORT_ENABLE,"\x31");}if(
-(0xcf+3395-0xe12)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
-"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0x1533+2299-0x1e2e)==(
-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((0xfa8+5200-0x23f8)
-==(int)para->mem_store){sc_cfg_set(NV_PRA_MEMSTORE,"\x30");}else{sc_cfg_set(
-NV_PRA_MEMSTORE,"\x31");}if((0x32d+6810-0x1cc8)==(int)para->tp_validity_period){
-sc_cfg_set(NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0x21a+2444-0xaf9)
-==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP,
-"\x6f\x6e\x65\x77\x65\x65\x6b");}else if((0x635+2729-0x1037)==(int)para->
-tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x6f\x6e\x65\x5f\x64\x61\x79");}else
-if((0x617+4015-0x1537)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP,
-"\x74\x77\x65\x6c\x76\x65\x68");}printf(
+(0xc16+3262-0x18d4)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
+"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0x5d4+5490-0x1b46)==(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((0x1a00+1965-0x21ad)==(int)para
+->mem_store){sc_cfg_set(NV_PRA_MEMSTORE,"\x30");}else{sc_cfg_set(NV_PRA_MEMSTORE
+,"\x31");}if((0xfa9+5132-0x22b6)==(int)para->tp_validity_period){sc_cfg_set(
+NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0xf94+2001-0x16b8)==(int)
+para->tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x6f\x6e\x65\x77\x65\x65\x6b");}
+else if((0xcb0+2478-0x15b7)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP
+,"\x6f\x6e\x65\x5f\x64\x61\x79");}else if((0xf76+1919-0x1666)==(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=
-(0x374+2363-0xcaf);if(NULL==para){return-(0x3ca+5214-0x1827);}zUfiSms_ExecSql(
+(0xba8+1617-0x11f9);if(NULL==para){return-(0x6bc+3776-0x157b);}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>(0x21f3+514-0x23f5)){strSQL=
+zUfiSms_GetFirstColumnInt,&count);if(count>(0xe09+1760-0x14e9)){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->
@@ -221,13 +221,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(0x17d0+707-0x1a93);}return-(0xf6b+1468-0x1526);}int zUfiSms_GetTotalCount
-(const char*pDbTable,int*pTotalCount){T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;
-char*strSQL=NULL;strSQL=sqlite3_mprintf(
+return(0x1e14+1338-0x234e);}return-(0x49c+4331-0x1586);}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=-(0xff6+4912-0x2325);zUfiSms_ExecSql(
+void){int max_sms_ref=-(0x1711+464-0x18e0);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",
@@ -236,19 +236,19 @@
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,-
-(0x1259+3870-0x2176),&stmt,(0xfd1+3549-0x1dae));while(SQLITE_ROW==sqlite3_step(
-stmt)){char*column_text=NULL;memset(pac->IndStr,(0x198c+414-0x1b2a),sizeof(pac->
-IndStr));memset(pac->Seg_Seq,(0x372+8083-0x2305),sizeof(pac->Seg_Seq));if((
-column_text=sqlite3_column_text(stmt,(0xa23+5762-0x20a5)))!=NULL)strncpy(pac->
-IndStr,column_text,sizeof(pac->FormatInd)-(0x4e8+659-0x77a));if((column_text=
-sqlite3_column_text(stmt,(0x8a1+6953-0x23c9)))!=NULL)strncpy(pac->Seg_Seq,
-column_text,sizeof(pac->FormatSeq)-(0x242f+290-0x2550));if((column_text=
-sqlite3_column_text(stmt,(0x174c+2398-0x20a8)))!=NULL)strncpy(content,
-column_text,len-(0xa2b+2955-0x15b5));printf(
+(0x12cc+4252-0x2367),&stmt,(0x86c+6023-0x1ff3));while(SQLITE_ROW==sqlite3_step(
+stmt)){char*column_text=NULL;memset(pac->IndStr,(0x1e66+1249-0x2347),sizeof(pac
+->IndStr));memset(pac->Seg_Seq,(0x4f6+8414-0x25d4),sizeof(pac->Seg_Seq));if((
+column_text=sqlite3_column_text(stmt,(0x6ef+1464-0xca7)))!=NULL)strncpy(pac->
+IndStr,column_text,sizeof(pac->FormatInd)-(0xfb8+1330-0x14e9));if((column_text=
+sqlite3_column_text(stmt,(0xa94+4382-0x1bb1)))!=NULL)strncpy(pac->Seg_Seq,
+column_text,sizeof(pac->FormatSeq)-(0x1eb5+1475-0x2477));if((column_text=
+sqlite3_column_text(stmt,(0x17d6+3149-0x2421)))!=NULL)strncpy(content,
+column_text,len-(0x8d2+5762-0x1f53));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(0xab8+295-0xbdf);}int zUfiSms_UpdateConcatSmsToDb(T_zUfiSms_DbStoreData*
-db_data,const char*mem_store,char*format_concat,char*content,
+return(0x6b4+6457-0x1fed);}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(
"\x55\x50\x44\x41\x54\x45\x20\x73\x6d\x73\x20\x53\x45\x54\x20\x69\x6e\x64\x3d\x27\x25\x73\x27\x2c\x54\x61\x67\x3d\x27\x25\x64\x27\x2c\x43\x63\x5f\x53\x65\x71\x3d\x27\x25\x73\x27\x2c\x43\x63\x5f\x4e\x75\x6d\x3d\x27\x25\x64\x27\x2c\x20"
@@ -269,8 +269,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[(0x11da+944-0x158a)],db_data->concat_info[
-(0x1cdd+2082-0x24fe)],pac->FormatSeq,concat_num,format_concat,db_data->tp_dcs,
+db_data->concat_info[(0x3f6+3891-0x1329)],db_data->concat_info[
+(0xfe9+2933-0x1b5d)],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.
@@ -279,22 +279,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=
-(0xa30+4358-0x1b36);int result=(0xd50+5501-0x22cd);result=zUfiSms_ExecSql(
+(0x2175+991-0x2554);int result=(0x1a04+331-0x1b4f);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-
-(0xbd7+2012-0x13b2);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap=
-(0x2eb+6742-0x1d41);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x878+5866-0x1f61),
-ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x722+2756-0x11e5),ZTE_WMS_DEL_SIM_SQL},{
-(0xafd+2718-0x159a),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0xe29+584-0x1070),
-ZTE_WMS_CREATE_SMS_REP_SQL},{(0x12d5+2302-0x1bd2),ZTE_WMS_CREATE_PAR_SQL},{
-(0x531+6458-0x1e6a),ZTE_WMS_CREATE_INFO_SQL},{(0x32f+7204-0x1f52),
-ZTE_WMS_CREATE_CELL_BRO_SQL},{(0x3d1+21-0x3e5),ZTE_WMS_CREATE_SEND_CONTENT_SQL},
-};for(iMap=(0xf92+679-0x1239);iMap<sizeof(SQL_MAP)/sizeof(T_zUfiSms_SQLMap);iMap
-++){if(SQL_MAP[iMap].valid==(0x745+2427-0x10bf)){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(
+(0x2a7+6555-0x1c41);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap=
+(0x314+3519-0x10d3);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x8fb+116-0x96e),
+ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x1ea5+1716-0x2558),ZTE_WMS_DEL_SIM_SQL},{
+(0x1431+77-0x147d),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0xc70+218-0xd49),
+ZTE_WMS_CREATE_SMS_REP_SQL},{(0x18b9+399-0x1a47),ZTE_WMS_CREATE_PAR_SQL},{
+(0x12f7+3215-0x1f85),ZTE_WMS_CREATE_INFO_SQL},{(0xd31+5892-0x2434),
+ZTE_WMS_CREATE_CELL_BRO_SQL},{(0x1342+2218-0x1beb),
+ZTE_WMS_CREATE_SEND_CONTENT_SQL},};for(iMap=(0xb93+1699-0x1236);iMap<sizeof(
+SQL_MAP)/sizeof(T_zUfiSms_SQLMap);iMap++){if(SQL_MAP[iMap].valid==
+(0x1afd+2399-0x245b)){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(
@@ -323,9 +324,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[(0x6b7+3485-0x1454)],
-ptDbSaveData->concat_info[(0xa5f+2924-0x15ca)],ptDbSaveData->concat_info[
-(0x350+4367-0x145d)],ptDbSaveData->tp_dcs,ptDbSaveData->msg_ref,pContent,"\x30",
+ptDbSaveData->concat_sms,ptDbSaveData->concat_info[(0x836+1053-0xc53)],
+ptDbSaveData->concat_info[(0x1230+2274-0x1b11)],ptDbSaveData->concat_info[
+(0xee5+4031-0x1ea2)],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->
@@ -347,25 +348,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>=(0x172a+2328-0x2041)&&fvarg!=NULL){if(zresult[
-(0x803+363-0x96e)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
-strncpy(para->buf_addr,zresult[(0x827+1072-0xc57)],para->buf_len-
-(0x7f6+7421-0x24f2));return SQLITE_OK;}}return SQLITE_ERROR;}int
+zresult,char**lname){if(columns>=(0xc75+2815-0x1773)&&fvarg!=NULL){if(zresult[
+(0x1be1+2117-0x2426)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
+strncpy(para->buf_addr,zresult[(0x1322+3497-0x20cb)],para->buf_len-
+(0x1e8+6813-0x1c84));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={
-(0x799+7135-0x2378)};char*strSQL=NULL;if(NULL==item||NULL==item_data){return
+(0x1f92+243-0x2085)};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)||((0x911+5182-0x1d4f)==strcmp(
+sqlite3_free(strSQL);if((ZTE_WMS_DB_OK!=result)||((0x189+6950-0x1caf)==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[
-(0x2190+1446-0x26b6)]={(0x749+284-0x865)};snprintf(sql,sizeof(sql),
+(0x516+7459-0x21b9)]={(0x32a+247-0x421)};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-
-(0x129a+1992-0x1a61)]);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}int
+(0x116d+2049-0x196d)]);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(
@@ -374,10 +375,10 @@
"\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=(0x51f+3926-0x1475);printf(
+);return WMS_CMD_FAILED;}}else{int i=(0x74a+5925-0x1e6f);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=(0x470+4972-0x17dc);i<g_zUfiSms_DelMsg.
-nv_count;i++){char sql[(0x576+3602-0x1308)]={(0xaa2+2146-0x1304)};snprintf(sql,
+,g_zUfiSms_DelMsg.nv_count);for(i=(0xf25+4783-0x21d4);i<g_zUfiSms_DelMsg.
+nv_count;i++){char sql[(0x662+3488-0x1382)]={(0xa8d+5477-0x1ff2)};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!=
@@ -386,39 +387,39 @@
,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[(0xa28+355-0xb0b)]={(0x7bb+7356-0x2477)};
-T_zUfiSms_BufInfo buf_info={(0x13a7+1234-0x1879)};char str_index[
-(0x781+7323-0x241a)*WMS_MESSAGE_LIST_MAX]={(0x1bf9+1936-0x2389)};buf_info.
+ptModifyTag,int is_cc){char sql[(0x1ca8+1988-0x23ec)]={(0x8eb+6893-0x23d8)};
+T_zUfiSms_BufInfo buf_info={(0x1372+3725-0x21ff)};char str_index[
+(0x6a1+2991-0x124e)*WMS_MESSAGE_LIST_MAX]={(0x9a5+2023-0x118c)};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((0x15e9+1348-0x1b2c)==is_cc){int i=(0x73b+2407-0x10a2);
-int j=(0x17da+2378-0x2124);int count=(0x6b7+2756-0x117b);char**out_result=NULL;
-count=zUfiSms_SplitString(str_index,&out_result,((char)(0xe75+1722-0x14f4)));for
-(i=(0x4b6+869-0x81b);i<count;i++){if((0x681+4923-0x19bc)!=strcmp(out_result[i],
+);return ZUFI_FAIL;}if((0x1afa+25-0x1b12)==is_cc){int i=(0x581+4799-0x1840);int
+j=(0x805+5675-0x1e30);int count=(0x1831+3096-0x2449);char**out_result=NULL;count
+=zUfiSms_SplitString(str_index,&out_result,((char)(0xaab+2144-0x12d0)));for(i=
+(0x11dd+3076-0x1de1);i<count;i++){if((0x9f1+4695-0x1c48)!=strcmp(out_result[i],
"")){ptModifyTag->indices[j++]=atoi(out_result[i]);}}ptModifyTag->num_of_indices
-=j;free(out_result);}else{ptModifyTag->indices[(0x535+17-0x546)]=atoi(str_index)
-;ptModifyTag->num_of_indices=(0x176+7735-0x1fac);}ptModifyTag->total_indices=
-ptModifyTag->num_of_indices;printf(
+=j;free(out_result);}else{ptModifyTag->indices[(0x1795+2836-0x22a9)]=atoi(
+str_index);ptModifyTag->num_of_indices=(0x1817+2384-0x2166);}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[(0x20f7+761-0x2370)]={(0xdfa+1106-0x124c)};int is_cc=(0xc1+4337-0x11b2)
-;T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;snprintf(sql,sizeof(sql),
+char sql[(0xe68+516-0xfec)]={(0xeb5+1512-0x149d)};int is_cc=(0x1bc+255-0x2bb);
+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-(0x1353+4730-0x25cc);}return is_cc;}int
+,ZTE_WMS_DB_SMS_TABLE);return-(0xb80+1452-0x112b);}return is_cc;}int
zUfiSms_UpdateSmsTagInDb(unsigned long id,unsigned int tags){char sql[
-(0x7c2+6296-0x1fda)]={(0x12b+8711-0x2332)};snprintf(sql,sizeof(sql),
+(0x3af+5323-0x17fa)]={(0x18d+9176-0x2565)};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[
-(0x199+6537-0x1aa2)]={(0x19f0+1083-0x1e2b)};if(pTotalCount==NULL){return
-ZUFI_FAIL;}if(mem_store==ZTE_WMS_MEMORY_MAX){snprintf(sql,sizeof(sql),
+(0x15a4+210-0x15f6)]={(0x329+1304-0x841)};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,
sizeof(sql),
@@ -427,17 +428,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[(0xd30+1955-0x1453)]={
-(0x1340+1923-0x1ac3)};snprintf(sql,sizeof(sql),
+result);}int zUfiSms_DeleteDraftSms(long iSmsId){char sql[(0x48d+2214-0xcb3)]={
+(0xb+3778-0xecd)};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[(0x1608+1911-0x1cff)]={
-(0x4e5+1400-0xa5d)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0x19f1+1846-0x2127);}
+int zUfiSms_SetConcatMaxRefer(int ref){char sql[(0x1368+2782-0x1dc6)]={
+(0xefb+4051-0x1ece)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0xa97+2589-0x14b4);}
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[(0x71f+1840-0xdcf)]={
-(0x4f2+5818-0x1bac)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0x15f8+4168-0x2640);}
+;}int zUfiSms_SetMaxReference(int ref){char sql[(0x3a3+1371-0x87e)]={
+(0x4ad+1215-0x96c)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0x25b+6792-0x1ce3);}
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))
@@ -450,75 +451,75 @@
->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>=(0x1c08+2322-0x2519)&&fvarg!=NULL){if(zresult[(0x8d2+6506-0x223c)]
-!=NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
-zresult[(0x1538+2158-0x1da6)],sizeof(para->sca)-(0xd0c+2306-0x160d));para->
-mem_store=atoi(zresult[(0x1569+852-0x18bc)]);para->tp_validity_period=atoi(
-zresult[(0x2136+846-0x2482)]);para->status_report_on=atoi(zresult[
-(0x17b+3501-0xf25)]);para->sendfail_retry_on=atoi(zresult[(0xe79+5534-0x2413)]);
-para->outdate_delete_on=atoi(zresult[(0xba1+4079-0x1b8b)]);(void)strncpy(para->
-default_store,zresult[(0x8d4+5957-0x2013)],sizeof(para->default_store)-
-(0x1305+4669-0x2541));return SQLITE_OK;}}return SQLITE_ERROR;}int
+{if(columns>=(0x1876+95-0x18d4)&&fvarg!=NULL){if(zresult[(0x8c+5855-0x176b)]!=
+NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
+zresult[(0xbd7+2234-0x1491)],sizeof(para->sca)-(0x477+1023-0x875));para->
+mem_store=atoi(zresult[(0x62a+7550-0x23a7)]);para->tp_validity_period=atoi(
+zresult[(0x2cd+6307-0x1b6e)]);para->status_report_on=atoi(zresult[
+(0x342+1267-0x832)]);para->sendfail_retry_on=atoi(zresult[(0x12da+4589-0x24c3)])
+;para->outdate_delete_on=atoi(zresult[(0x1663+2513-0x202f)]);(void)strncpy(para
+->default_store,zresult[(0x10fd+3627-0x1f22)],sizeof(para->default_store)-
+(0x9d1+6349-0x229d));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,
-(0x387+5742-0x19f5),sizeof(T_zUfiSms_ParaInfo));return isSucess(zUfiSms_ExecSql(
+(0x581+5610-0x1b6b),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>=(0x201+2442-0xb8a)&&
-para!=NULL)(void)strncpy(para->buf_addr,zresult[(0x22b+7265-0x1e8c)],para->
-buf_len-(0xcc6+2542-0x16b3));return(0x602+367-0x771);}int zUfiSms_GetSmsContent(
-char*pSmsBuf,int len){T_zUfiSms_BufInfo buf_info={(0xa17+236-0xb03)};char*strSQL
-=
+T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;if(column>=(0x14f6+4336-0x25e5)
+&¶!=NULL)(void)strncpy(para->buf_addr,zresult[(0xe52+2956-0x19de)],para->
+buf_len-(0xeb0+1868-0x15fb));return(0x2275+419-0x2418);}int
+zUfiSms_GetSmsContent(char*pSmsBuf,int len){T_zUfiSms_BufInfo buf_info={
+(0x212d+1103-0x257c)};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,(0xc49+3588-0x1a4d),len);return isSucess(
+len;memset(buf_info.buf_addr,(0x14ed+580-0x1731),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=-(0x35c+7513-0x20b4);switch(
+char*sql=NULL;sqlite3_stmt*stmt=NULL;int id=-(0x17f+7278-0x1dec);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[(0x4ca+7996-0x2406)],
-ptDbSaveData->concat_info[(0x60+4704-0x12bf)],pMemStore,WMS_TAG_TYPE_MO_SENT_V01
-,WMS_TAG_TYPE_MO_NOT_SENT_V01);break;}case(0x2b8+8493-0x23e1):{sql=
-sqlite3_mprintf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0xf0+948-0x4a4)],ptDbSaveData->
+concat_info[(0xcc0+2571-0x16ca)],pMemStore,WMS_TAG_TYPE_MO_SENT_V01,
+WMS_TAG_TYPE_MO_NOT_SENT_V01);break;}case(0x1545+89-0x159a):{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[(0x4b2+3023-0x1081)],
-ptDbSaveData->concat_info[(0x187a+3270-0x253f)],pMemStore,(0xb5c+6571-0x2503));
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x17cd+2642-0x221f)],
+ptDbSaveData->concat_info[(0x665+535-0x87b)],pMemStore,(0x162c+498-0x181a));
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[(0xdc+7392-0x1dbc)],ptDbSaveData
-->concat_info[(0x583+1810-0xc94)],pMemStore,WMS_TAG_TYPE_MT_READ_V01,
-WMS_TAG_TYPE_MT_NOT_READ_V01);break;}default:{sql=sqlite3_mprintf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x630+6364-0x1f0c)],
+ptDbSaveData->concat_info[(0x2d1+2938-0xe4a)],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[(0x3a5+1852-0xae1)],ptDbSaveData
-->concat_info[(0x1a5+2600-0xbcc)],pMemStore);at_print(LOG_ERR,
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x1939+2180-0x21bd)],
+ptDbSaveData->concat_info[(0x1600+1265-0x1af0)],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,-(0x862+1442-0xe03),&stmt,
-(0xd3+7058-0x1c65))!=SQLITE_OK){at_print(LOG_ERR,
+sqlite3_prepare(g_zUfiSms_DbPointer,sql,-(0x804+5715-0x1e56),&stmt,
+(0xb5d+3532-0x1929))!=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-
-(0x16d5+3699-0x2547);}while(SQLITE_ROW==sqlite3_step(stmt)){int j=
-(0x1588+4357-0x268d);char**out_result=NULL;char*column_text=sqlite3_column_text(
-stmt,(0x9bf+1080-0xdf7));int count=-(0x127a+1104-0x16c9);if(column_text!=NULL)
-count=zUfiSms_SplitString(column_text,&out_result,((char)(0x134d+1446-0x18b8)));
-for(j=(0x3a3+8552-0x250b);j<count;j++){if((0xdc7+817-0x10f8)==strcmp(out_result[
-j],"")){if(j+(0xad6+6927-0x25e4)==ptDbSaveData->concat_info[(0x1aac+147-0x1b3d)]
-){id=sqlite3_column_int(stmt,(0x79+7335-0x1d1f));break;}}}if(out_result!=NULL){
-free(out_result);out_result=NULL;}if(-(0x68c+6508-0x1ff7)!=id){break;}}(void)
-sqlite3_finalize(stmt);sqlite3_free(sql);return id;}int
+(0xa37+2652-0x1492);}while(SQLITE_ROW==sqlite3_step(stmt)){int j=
+(0x3df+7255-0x2036);char**out_result=NULL;char*column_text=sqlite3_column_text(
+stmt,(0xda7+5165-0x21d4));int count=-(0xef5+409-0x108d);if(column_text!=NULL)
+count=zUfiSms_SplitString(column_text,&out_result,((char)(0x158f+4109-0x2561)));
+for(j=(0x1b9+8468-0x22cd);j<count;j++){if((0x1974+3167-0x25d3)==strcmp(
+out_result[j],"")){if(j+(0x14d8+3316-0x21cb)==ptDbSaveData->concat_info[
+(0x1f68+193-0x2027)]){id=sqlite3_column_int(stmt,(0xfaa+999-0x1390));break;}}}if
+(out_result!=NULL){free(out_result);out_result=NULL;}if(-(0x109+5392-0x1618)!=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>=(0x1a0f+755-0x1d01)){if(zresult[
-(0x16e9+1001-0x1ad2)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
-result->id[result->all_or_count]=atoi(zresult[(0x23d3+447-0x2592)]);result->
+lname){if(fvarg!=NULL&&columns>=(0x3a3+2148-0xc06)){if(zresult[
+(0x431+6952-0x1f59)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
+result->id[result->all_or_count]=atoi(zresult[(0x2064+836-0x23a8)]);result->
all_or_count++;return SQLITE_OK;}}return SQLITE_ERROR;}VOID
zUfiSms_CheckDbOutdateSms(const char*pDbTable,T_zUfiSms_DelReq*pSmsDel){char
-acSql[(0x3d8+4863-0x1657)]={(0x1a2f+1726-0x20ed)};struct timeval tp;if(
-(0x2f6+683-0x5a1)!=gettimeofday(&tp,NULL)){printf(
+acSql[(0x1af0+318-0x1bae)]={(0x3c7+1893-0xb2c)};struct timeval tp;if(
+(0x21d6+1178-0x2670)!=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"
@@ -528,21 +529,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>=(0xda4+17-0xdb3)){if(zresult[
-(0xb03+6306-0x23a5)]!=NULL&&zresult[(0x961+33-0x981)]!=NULL){SMS_MSG_INFO*msg=(
-SMS_MSG_INFO*)fvarg;memset(msg->id,(0x1f3+2688-0xc73),sizeof(msg->id));memset(
-msg->total_seq,(0x75+5068-0x1441),sizeof(msg->total_seq));strncpy(msg->id,
-zresult[(0x96d+6138-0x2167)],sizeof(msg->id)-(0x4fd+6383-0x1deb));strncpy(msg->
-total_seq,zresult[(0x1181+561-0x13b1)],sizeof(msg->total_seq)-
-(0x19d+6449-0x1acd));printf(
+**lname){if(fvarg!=NULL&&column>=(0x13a2+633-0x1619)){if(zresult[
+(0x233d+577-0x257e)]!=NULL&&zresult[(0x8aa+1411-0xe2c)]!=NULL){SMS_MSG_INFO*msg=
+(SMS_MSG_INFO*)fvarg;memset(msg->id,(0xad1+2260-0x13a5),sizeof(msg->id));memset(
+msg->total_seq,(0x1e59+485-0x203e),sizeof(msg->total_seq));strncpy(msg->id,
+zresult[(0x1a0f+1098-0x1e59)],sizeof(msg->id)-(0x17ca+3068-0x23c5));strncpy(msg
+->total_seq,zresult[(0x653+5778-0x1ce4)],sizeof(msg->total_seq)-
+(0x11cd+827-0x1507));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[(0xc9d+4278-0x1d53)],
-ptDbSaveData->concat_info[(0x159b+1111-0x19f1)]);printf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x173f+738-0x1a21)],
+ptDbSaveData->concat_info[(0x13b8+1265-0x18a8)]);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 a3d2bda..6e87c05 100755
--- a/ap/app/zte_comm/sms/src/sms_fnc.c
+++ b/ap/app/zte_comm/sms/src/sms_fnc.c
@@ -8,22 +8,22 @@
#include "sms_fnc.h"
#include "sms_db.h"
#include "sms_code.h"
-#define SMS_RETRY_COUNT (0x1feb+72-0x2030)
-#define SHORT_INT_LEN (0x1674+1003-0x1a59)
+#define SMS_RETRY_COUNT (0x949+3604-0x175a)
+#define SHORT_INT_LEN (0x2a5+8793-0x24f8)
SMS_LOCATION g_zUfiSms_CurLocation=SMS_LOCATION_SIM;int
-g_zUfiSms_ConcatSmsReference=(0x1a37+434-0x1be9);T_zUfiSms_ParaInfo
+g_zUfiSms_ConcatSmsReference=(0xd9a+1665-0x141b);T_zUfiSms_ParaInfo
g_zUfiSms_CurSmsPara={"",WMS_STORAGE_TYPE_UIM_V01,
-ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0x33b+477-0x518),(0x143d+378-0x15b7),
-(0x7a9+2111-0xfe8),"\x6e\x76"};int g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;int
-g_zUfiSms_Dcs=(0x837+2895-0x1386);unsigned long g_zUfiSms_StoreCapablity[
-ZTE_WMS_MEMORY_MAX]={(0x1072+1229-0x14db),ZTE_WMS_DB_MSG_COUNT_MAX};
-T_zSms_SendSmsReq g_zUfiSms_FinalCmgsBuf;SMS_PARAM g_zUfiSms_SendingSms;UINT16
-g_zUfiSms_IsLanguageShift=(0xcf8+3097-0x1911);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[
-ZTE_WMS_MEMORY_MAX];extern int g_zUfiSms_ConcatTotalNum;extern
-T_zUfiSms_ConcatInfo g_zUfiSms_ConcatSms;extern T_zUfiSms_GroupInfo
+ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0x983+2969-0x151c),
+(0x17c5+3086-0x23d3),(0x30a+8126-0x22c8),"\x6e\x76"};int g_zUfiSms_Language=
+NOT_DEFINE_LANGUAGE;int g_zUfiSms_Dcs=(0x192c+2791-0x2413);unsigned long
+g_zUfiSms_StoreCapablity[ZTE_WMS_MEMORY_MAX]={(0x912+6362-0x2188),
+ZTE_WMS_DB_MSG_COUNT_MAX};T_zSms_SendSmsReq g_zUfiSms_FinalCmgsBuf;SMS_PARAM
+g_zUfiSms_SendingSms;UINT16 g_zUfiSms_IsLanguageShift=(0x356+1104-0x7a6);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[ZTE_WMS_MEMORY_MAX];extern int g_zUfiSms_ConcatTotalNum;
+extern T_zUfiSms_ConcatInfo g_zUfiSms_ConcatSms;extern T_zUfiSms_GroupInfo
g_zUfiSms_GroupSms;extern int g_zUfiSms_UnitLen;extern UINT8
g_zUfiSms_IsConcatSendSuc;extern int g_zUfiSms_SendFailedCount;extern
T_zUfiSms_DbStoreData g_zUfiSms_DbStoreData[ZTE_WMS_CONCAT_SMS_COUNT_MAX];extern
@@ -31,20 +31,21 @@
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[(0x498+684-0x712)];int i=
-(0x1bb9+2082-0x23db);g_zUfiSms_DelMsg.nv_count=(0x27b+2159-0xaea);
-g_zUfiSms_DelMsg.nv_index=(0x82d+55-0x864);g_zUfiSms_DelMsg.sim_count=
-(0x91+9716-0x2685);g_zUfiSms_DelMsg.sim_index=(0xf6+5896-0x17fe);for(i=
-(0x126b+2413-0x1bd8);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
-(0xcb4+398-0xe42),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+T_zUfiSms_DelReq*ptDelMsg){char acStorePos[(0x908+4089-0x18cf)];int i=
+(0xb17+3756-0x19c3);g_zUfiSms_DelMsg.nv_count=(0x132d+3998-0x22cb);
+g_zUfiSms_DelMsg.nv_index=(0x1b2b+85-0x1b80);g_zUfiSms_DelMsg.sim_count=
+(0x3ff+8154-0x23d9);g_zUfiSms_DelMsg.sim_index=(0x813+4547-0x19d6);for(i=
+(0x1b18+2412-0x2484);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
+(0x89f+1531-0xe9a),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
"Mem_Store",acStorePos,sizeof(acStorePos),ptDelMsg->id[i])){return ZUFI_FAIL;}if
-((0x900+2098-0x1132)==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){g_zUfiSms_DelMsg.
+((0x54b+547-0x76e)==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((0xeeb+971-0x12b6)==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(T_zUfiSms_MainState iNewState){
-char*ptStrSmsState[]={"\x73\x6d\x73\x5f\x69\x6e\x69\x74\x69\x6e\x67",
+g_zUfiSms_DelMsg.nv_index_count++;}else if((0x1434+2014-0x1c12)==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(
+T_zUfiSms_MainState iNewState){char*ptStrSmsState[]={
+"\x73\x6d\x73\x5f\x69\x6e\x69\x74\x69\x6e\x67",
"\x73\x6d\x73\x5f\x69\x6e\x69\x74\x65\x64",
"\x73\x6d\x73\x5f\x6c\x6f\x61\x64\x69\x6e\x67",
"\x73\x6d\x73\x5f\x6c\x6f\x61\x64\x65\x64",
@@ -68,66 +69,66 @@
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(-
-(0x1215+4669-0x2451)==access(ZTE_WMS_DB_DIR,F_OK)){printf(
+(0x63a+6229-0x1e8e)==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(-(0x6af+4993-0x1a2f)==mkdir(ZTE_WMS_DB_DIR,
-(0x1151+520-0x115a))){printf(
+,ZTE_WMS_DB_DIR);if(-(0x999+7163-0x2593)==mkdir(ZTE_WMS_DB_DIR,
+(0x1735+348-0x1692))){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(-
-(0x395+3960-0x130c)==access(ZTE_WMS_DB_PATH,F_OK)){printf(
+(0x1b2f+109-0x1b9b)==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=(0x18d+8998-0x24b3);unsigned char mem_store_flag=
-(0x6df+6461-0x201c);unsigned int tp_validity_period=(0x104b+455-0x1212);char
-Temp_sms_vp[(0x267+8741-0x2484)]={(0x914+3759-0x17c3)};CHAR reportEnable[
-(0x666+1452-0xbe0)]={(0x19b8+2930-0x252a)};CHAR smsLocation[(0xe28+1742-0x14c4)]
-={(0x2bf+4433-0x1410)};CHAR sendfailRetry[(0x8f3+5161-0x1cea)]={
-(0xa4b+7206-0x2671)};CHAR outdateDelete[(0x81b+2261-0x10be)]={
-(0x543+8215-0x255a)};CHAR defaultStore[(0x1883+1140-0x1cc5)]={
-(0x1c87+395-0x1e12)};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(
+unsigned char sts_flag=(0x2109+88-0x2161);unsigned char mem_store_flag=
+(0x1238+2220-0x1ae4);unsigned int tp_validity_period=(0x302+1153-0x783);char
+Temp_sms_vp[(0x97c+3349-0x1689)]={(0x11a1+1890-0x1903)};CHAR reportEnable[
+(0x540+929-0x8af)]={(0x11d6+314-0x1310)};CHAR smsLocation[(0x4c+8600-0x21b2)]={
+(0xabd+1841-0x11ee)};CHAR sendfailRetry[(0x1296+2912-0x1dc4)]={
+(0x20a1+763-0x239c)};CHAR outdateDelete[(0xb4d+5739-0x2186)]={(0xc7a+341-0xdcf)}
+;CHAR defaultStore[(0xf39+2001-0x16d8)]={(0x612+3644-0x144e)};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((0xd7+3427-0xe3a)==strcmp
-(reportEnable,"\x31")){sts_flag=(0x16bb+1257-0x1ba3);}g_zUfiSms_CurSmsPara.
-status_report_on=sts_flag;if((0x6c6+2011-0xea1)==strcmp(smsLocation,"\x4d\x45"))
-{mem_store_flag=(0xc2a+1909-0x139f);}else{mem_store_flag=(0xac2+1400-0x1039);}
-g_zUfiSms_CurSmsPara.mem_store=(unsigned int)((0xe64+5877-0x2559)==
+NV_DEFAULT_STORE,defaultStore,sizeof(defaultStore));if((0x8fb+2562-0x12fd)==
+strcmp(reportEnable,"\x31")){sts_flag=(0x82c+6675-0x223e);}g_zUfiSms_CurSmsPara.
+status_report_on=sts_flag;if((0x8f+6001-0x1800)==strcmp(smsLocation,"\x4d\x45"))
+{mem_store_flag=(0xd03+3377-0x1a34);}else{mem_store_flag=(0x15b7+2714-0x2050);}
+g_zUfiSms_CurSmsPara.mem_store=(unsigned int)((0x778+7707-0x2593)==
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=
-(0x759+5897-0x1d63);if((0x72f+5223-0x1b96)==strncmp(Temp_sms_vp,
-"\x6c\x6f\x6e\x67\x65\x73\x74",(0x20bb+421-0x2259))){tp_validity_period=
-(0x112c+446-0x11eb);}if((0x16af+1842-0x1de1)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x5f\x64\x61\x79",(0x13e9+2869-0x1f17))){tp_validity_period=
-(0xe44+4493-0x1f2a);}if((0x936+6787-0x23b9)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x77\x65\x65\x6b",(0x1383+24-0x1394))){tp_validity_period=
-(0x8c1+6269-0x2091);}if((0xd06+6266-0x2580)==strncmp(Temp_sms_vp,
-"\x74\x77\x65\x6c\x76\x65\x68",(0x3a7+4973-0x170d))){tp_validity_period=
-(0x404+5254-0x17fb);}g_zUfiSms_CurSmsPara.tp_validity_period=tp_validity_period;
-if((0x1c7b+560-0x1eab)==strcmp(sendfailRetry,"\x31")){g_zUfiSms_CurSmsPara.
-sendfail_retry_on=(0xb9+8558-0x2226);}else{g_zUfiSms_CurSmsPara.
-sendfail_retry_on=(0xd46+1379-0x12a9);}if((0x1ea4+1567-0x24c3)==strcmp(
-outdateDelete,"\x31")){g_zUfiSms_CurSmsPara.outdate_delete_on=(0x55b+122-0x5d4);
-}else{g_zUfiSms_CurSmsPara.outdate_delete_on=(0x1c22+1835-0x234d);}if(
-(0xa01+3740-0x189d)==strcmp(defaultStore,"\x73\x69\x6d")){strncpy(
-g_zUfiSms_CurSmsPara.default_store,"\x73\x69\x6d",sizeof(g_zUfiSms_CurSmsPara.
-default_store)-(0x7f3+7052-0x237e));}else{strncpy(g_zUfiSms_CurSmsPara.
-default_store,"\x6e\x76",sizeof(g_zUfiSms_CurSmsPara.default_store)-
-(0x1873+366-0x19e0));}}void zUfiSms_GetDefaultPara(void){memset(&
-g_zUfiSms_CurSmsPara,(0xcf1+5211-0x214c),sizeof(T_zUfiSms_ParaInfo));
-g_zUfiSms_CurSmsPara.status_report_on=(0x2da+7407-0x1fc9);g_zUfiSms_CurSmsPara.
+(0xad7+1796-0x10dc);if((0x9a8+2775-0x147f)==strncmp(Temp_sms_vp,
+"\x6c\x6f\x6e\x67\x65\x73\x74",(0x69b+533-0x8a9))){tp_validity_period=
+(0x4a5+5040-0x1756);}if((0xba1+2079-0x13c0)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0xd49+1029-0x1147))){tp_validity_period=
+(0x61b+456-0x73c);}if((0xffb+1026-0x13fd)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0xa1+4637-0x12b7))){tp_validity_period=
+(0x120d+33-0x1181);}if((0x13ff+2127-0x1c4e)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0x321+8456-0x2422))){tp_validity_period=
+(0x16f+9101-0x246d);}g_zUfiSms_CurSmsPara.tp_validity_period=tp_validity_period;
+if((0xc75+4139-0x1ca0)==strcmp(sendfailRetry,"\x31")){g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0x1252+405-0x13e6);}else{g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0x11d5+38-0x11fb);}if((0xcb4+3389-0x19f1)==strcmp(
+outdateDelete,"\x31")){g_zUfiSms_CurSmsPara.outdate_delete_on=
+(0x1806+2951-0x238c);}else{g_zUfiSms_CurSmsPara.outdate_delete_on=
+(0x483+8524-0x25cf);}if((0x14f3+31-0x1512)==strcmp(defaultStore,"\x73\x69\x6d"))
+{strncpy(g_zUfiSms_CurSmsPara.default_store,"\x73\x69\x6d",sizeof(
+g_zUfiSms_CurSmsPara.default_store)-(0xcf8+5014-0x208d));}else{strncpy(
+g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(g_zUfiSms_CurSmsPara.
+default_store)-(0x1126+5318-0x25eb));}}void zUfiSms_GetDefaultPara(void){memset(
+&g_zUfiSms_CurSmsPara,(0x12b+9570-0x268d),sizeof(T_zUfiSms_ParaInfo));
+g_zUfiSms_CurSmsPara.status_report_on=(0xfe2+633-0x125b);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
-=(0x1d6a+670-0x2008);g_zUfiSms_CurSmsPara.outdate_delete_on=(0x60a+305-0x73b);
+=(0xf0+7037-0x1c6d);g_zUfiSms_CurSmsPara.outdate_delete_on=(0x44f+8100-0x23f3);
strncpy(g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(
-g_zUfiSms_CurSmsPara.default_store)-(0xc1+3122-0xcf2));}
-#if (0x938+2817-0x1439)
+g_zUfiSms_CurSmsPara.default_store)-(0x1f0c+174-0x1fb9));}
+#if (0x1704+3623-0x252b)
T_zUfiSms_CmdStatus zUfiSms_SetParameters(T_zUfiSms_CmdMsgBuff*ptSmsBuffer){
T_zUfiSms_ParaInfo*ptSmsParameter=NULL;T_zUfiSms_ParaInfo tNewSmsParameter={
-(0x985+5471-0x1ee4)};if(NULL==ptSmsBuffer){return WMS_CMD_FAILED;}ptSmsParameter
-=(T_zUfiSms_ParaInfo*)(&(ptSmsBuffer->cmd_info.set_sms_para));memcpy((void*)&
+(0x6f7+1844-0xe2b)};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(
@@ -135,28 +136,28 @@
"\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)!=(0xb92+3776-0x1a52)){if(ZUFI_SMS_FAILURE==
+if(strlen(ptSmsParameter->sca)!=(0x10b4+4080-0x20a4)){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=(0x1f08+1135-0x2377);if(ZUFI_SUCC!=
+int zUfiSms_LoadSmsPara(){int count=(0x126+7085-0x1cd3);if(ZUFI_SUCC!=
zUfiSms_IsDbEmpty(ZTE_WMS_DB_PARAMETER_TABLE,&count)){return ZUFI_FAIL;}if(count
-==(0x860+2404-0x11c4)){zUfiSms_GetDefaultCfgPara();if((0x1f17+126-0x1f95)!=
+==(0xe6+2024-0x8ce)){zUfiSms_GetDefaultCfgPara();if((0x6bd+4981-0x1a32)!=
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((0x5f2+6844-0x20ae)!=zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){
+();if((0x1008+3519-0x1dc7)!=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=(0x669+3173-0x12ce);if((ZTE_WMS_MEMORY_SIM==mem_store)||(
+int total_count=(0x1040+2756-0x1b04);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"
@@ -173,55 +174,54 @@
,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((0x48c+4065-0x146d)==strcmp(
+int zUfiSms_SetStorePara(char*mem_store){if((0xcac+4373-0x1dc1)==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(
-(0xc51+4924-0x1f8d)==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((0x1345+2643-0x1d98)==strcmp(mem_store,
-"\x53\x52")){g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0x1858+3581-0x2653);(
-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)){
-at_print(LOG_ERR,
+(0xe6+242-0x1d8)==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((0x398+3400-0x10e0)==strcmp(mem_store,"\x53\x52")){
+g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0xb00+20-0xb12);(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)){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;}int zUfiSms_SetScaPara(char*sca){strncpy(
g_zUfiSms_CurSmsPara.sca,sca,sizeof(g_zUfiSms_CurSmsPara.sca)-
-(0x1585+1380-0x1ae8));if(ZUFI_FAIL==zUfiSms_SetDbParameters(&
-g_zUfiSms_CurSmsPara)){at_print(LOG_ERR,
+(0x958+6089-0x2120));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==(0x1a58+1109-0x1eac)){g_zUfiSms_Dcs=DCS_ASC;
-g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0x114+7551-0x1e91)){
+char cDcs){if(cDcs==(0x21dc+678-0x2481)){g_zUfiSms_Dcs=DCS_ASC;
+g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0x1a3d+1140-0x1eaf)){
g_zUfiSms_Dcs=DCS_USC;g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==
-(0xef1+969-0x12b7)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;}
-else if(cDcs==(0xd6b+14-0xd74)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=
+(0x485+115-0x4f5)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;}
+else if(cDcs==(0x596+5413-0x1ab6)){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=(0x27+5230-0x1495);i<ptGroupSms->
-total_receiver;i++){strncpy(ptGroupSms->receivers[i],ptSendMsg->dest_num[i],
+total_receiver=ptSendMsg->receiver_count;for(i=(0x2219+501-0x240e);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=(0x6d9+855-0xa30);
+,i,ptGroupSms->receivers[i]);}ptGroupSms->current_receiver=(0x1a46+1601-0x2087);
return ZUFI_SUCC;}int zUfiSms_FillConcatSms(T_zUfiSms_SendReq*pSendSrcMsg,
-T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x12f9+4033-0x22ba);int
-iUnitlen=(0xfb5+120-0x102d);int iSegNo=(0x18ea+3424-0x264a);unsigned char*
+T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x109c+906-0x1426);int
+iUnitlen=(0x5fc+5428-0x1b30);int iSegNo=(0x136c+3259-0x2027);unsigned char*
pSmsConverted=NULL;unsigned char acConvertContent[
ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
-(0x1923+1343-0x1e5e)+(0xd96+2890-0x18dc)]={(0x614+7046-0x219a)};unsigned char
+(0x1201+3749-0x20a2)+(0x207+5929-0x192c)]={(0x2014+272-0x2124)};unsigned char
acTmpContent[ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
-(0x16c+7577-0x1f01)+(0x81+6276-0x1901)]={(0x12f1+4842-0x25db)};int iTimeZone=
-(0xfba+2889-0x1b03);int tmp_i=(0x374+5061-0x1739);if(NULL==pSendSrcMsg||NULL==
-pDestConcatMsg){return-(0x1e91+1295-0x239f);}iTotalLen=pSendSrcMsg->msg_len;if(
+(0x14b0+4158-0x24ea)+(0x2012+1284-0x2512)]={(0x176+3395-0xeb9)};int iTimeZone=
+(0xe65+2115-0x16a8);int tmp_i=(0x1589+3888-0x24b9);if(NULL==pSendSrcMsg||NULL==
+pDestConcatMsg){return-(0x2ed+3052-0xed8);}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-(0x18da+2631-0x2320);}printf(
+);return-(0xaf8+4199-0x1b5e);}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,(0x122f+1693-0x18cc),sizeof(acTmpContent));if
-(DCS_USC==g_zUfiSms_Dcs){pSmsConverted=acConvertContent;}else{if(
+acTmpContent));memset(acTmpContent,(0xb71+2054-0x1377),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=
@@ -230,55 +230,55 @@
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)-(0x931+1322-0xe5a))){
-iTotalLen=sizeof(acConvertContent)-(0x142c+4753-0x26bc);}pDestConcatMsg->sms_len
-=iTotalLen;if((iTotalLen>ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX)||(g_zUfiSms_Language==
-DCS_PORTUGUESE&&iTotalLen>(0x492+4179-0x144a))||((g_zUfiSms_Dcs==DCS_USC)&&
+=acTmpContent;}if(iTotalLen>(sizeof(acConvertContent)-(0x21fb+199-0x22c1))){
+iTotalLen=sizeof(acConvertContent)-(0x6bd+4019-0x166f);}pDestConcatMsg->sms_len=
+iTotalLen;if((iTotalLen>ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX)||(g_zUfiSms_Language==
+DCS_PORTUGUESE&&iTotalLen>(0x19c1+1821-0x2043))||((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*
-(0x6d5+759-0x9ca);}else{if(g_zUfiSms_Language==NOT_DEFINE_LANGUAGE||
+(0x15f+8721-0x236e);}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>
-(0x1dd7+1076-0x220b)&&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=(0x1d2b+1085-0x2167);memcpy(pDestConcatMsg->
-msg_contents[(0x4c8+4467-0x163b)],pSmsConverted,iTotalLen);printf(
+(0xbf9+37-0xc1e)&&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=(0x729+5344-0x1c08);memcpy(pDestConcatMsg->
+msg_contents[(0x1b5b+1499-0x2136)],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[(0x8b2+5029-0x1c57)]);}
+,iUnitlen,pDestConcatMsg->msg_contents[(0xe78+5675-0x24a3)]);}
g_zUfiSms_ConcatTotalNum=pDestConcatMsg->total_msg;pDestConcatMsg->
-current_sending=(0x4ad+6339-0x1d70);memcpy(&(pDestConcatMsg->date),&(pSendSrcMsg
+current_sending=(0x7fc+6219-0x2047);memcpy(&(pDestConcatMsg->date),&(pSendSrcMsg
->date),sizeof(T_zUfiSms_Date));tmp_i=atoi(pDestConcatMsg->date.timezone);if(
-tmp_i<INT_MIN+(0x6bc+3254-0x1371)||tmp_i>INT_MAX-(0x1042+1886-0x179f)){printf(
+tmp_i<INT_MIN+(0x1764+2973-0x2300)||tmp_i>INT_MAX-(0x2c4+6193-0x1af4)){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*(0x4af+4096-0x14ab);memset(
-pDestConcatMsg->date.timezone,(0xe89+2175-0x1708),sizeof(pDestConcatMsg->date.
-timezone));if(iTimeZone>(0x597+3007-0x1156)){snprintf(pDestConcatMsg->date.
+,tmp_i);return ZUFI_FAIL;}iTimeZone=tmp_i*(0xb18+762-0xe0e);memset(
+pDestConcatMsg->date.timezone,(0x75+4574-0x1253),sizeof(pDestConcatMsg->date.
+timezone));if(iTimeZone>(0x109d+3190-0x1d13)){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=
-(0x1d9+8417-0x22ba);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
-user_data_header_present=TRUE;if((0xa7f+984-0xe57)==ptConcatSms->current_sending
-){g_zUfiSms_ConcatSmsReference++;(void)zUfiSms_SetConcatMaxRefer(
+(0x680+3120-0x12b0);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
+user_data_header_present=TRUE;if((0xd96+1084-0x11d2)==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+(0x23e4+439-0x259a);ptSubmit->user_data.
+seq_num=ptConcatSms->current_sending+(0x1663+1440-0x1c02);ptSubmit->user_data.
headers[iHeaderNum].u.concat_8.msg_ref=g_zUfiSms_ConcatSmsReference%
-(0x5c7+571-0x703);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
-(0x28f+8406-0x2364);ptDbSaveData->concat_info[(0x943+81-0x994)]=
+(0x870+2693-0x11f6);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
+(0x370+1205-0x824);ptDbSaveData->concat_info[(0x2bf+7056-0x1e4f)]=
g_zUfiSms_ConcatSmsReference;}int zUfiSms_MakeFinalCmgsBuf(){SMS_PARAM tSmsData;
-int iPduLength=(0x244+259-0x347);int nSmscLength=(0x81a+6047-0x1fb9);char
-Tempstrr[(0x6c6+1133-0xb31)]={(0x3c+586-0x286)};char Temp_sms_vp[
-(0x10a5+819-0x13d0)]={(0x2075+1536-0x2675)};char tmpBuf1[(0x218b+818-0x24ba)]={
-(0x1776+239-0x1865)};char tmpBuf2[(0xf81+4026-0x1f35)]={(0xb33+6910-0x2631)};
-CHAR smsCenter[(0x727+6852-0x21b9)]={(0x3df+3338-0x10e9)};memset(&tSmsData,
-(0x1b9d+2025-0x2386),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
-(0xf79+5530-0x2513),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==
-g_zUfiSms_SendingSms.TP_DCS){int i=(0x1d1+8168-0x21b9);for(;i<
+int iPduLength=(0x757+4898-0x1a79);int nSmscLength=(0x16d+196-0x231);char
+Tempstrr[(0x1097+881-0x1406)]={(0x1b3f+2195-0x23d2)};char Temp_sms_vp[
+(0x118+1790-0x80e)]={(0xa6c+470-0xc42)};char tmpBuf1[(0x8cd+6500-0x222e)]={
+(0x2b4+9003-0x25df)};char tmpBuf2[(0x13e4+2978-0x1f80)]={(0x631+1341-0xb6e)};
+CHAR smsCenter[(0x739+7319-0x239e)]={(0x578+4438-0x16ce)};memset(&tSmsData,
+(0x752+1311-0xc71),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
+(0x1415+3458-0x2197),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==
+g_zUfiSms_SendingSms.TP_DCS){int i=(0xad7+5080-0x1eaf);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);
@@ -286,40 +286,40 @@
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(((0x96+1449-0x63f)==strncmp(
-Tempstrr,"\x31",(0x1cb+4230-0x1250)))&&(g_zUfiSms_ConcatSms.current_sending==
-g_zUfiSms_ConcatSms.total_msg-(0xf0+1608-0x737))){tSmsData.TP_SRR=
-(0x139a+479-0x1578);}else{tSmsData.TP_SRR=(0x2ac+7568-0x203c);}tSmsData.TP_UDHI=
-g_zUfiSms_SendingSms.TP_UDHI;tSmsData.TP_VP=(0xc8a+5984-0x22eb);sc_cfg_get(
-NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));if((0x14ef+2539-0x1eda)==strncmp(
-Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0x698+5448-0x1bd9))){tSmsData.TP_VP=
-(0x137f+2880-0x1dc0);}else if((0x96a+4869-0x1c6f)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x5f\x64\x61\x79",(0x403+3125-0x1031))){tSmsData.TP_VP=
-(0x620+4002-0x151b);}else if((0x559+637-0x7d6)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x77\x65\x65\x6b",(0x2b8+2216-0xb59))){tSmsData.TP_VP=
-(0x367+8691-0x24ad);}else if((0x29b+174-0x349)==strncmp(Temp_sms_vp,
-"\x74\x77\x65\x6c\x76\x65\x68",(0x1114+3687-0x1f74))){tSmsData.TP_VP=
-(0xfb9+3069-0x1b27);}tSmsData.TP_PID=(0x29d+9060-0x2601);
-#if (0x11ff+4019-0x21b1)
+(NV_REPORT_ENABLE,Tempstrr,sizeof(Tempstrr));if(((0x19c9+1965-0x2176)==strncmp(
+Tempstrr,"\x31",(0x1000+837-0x1344)))&&(g_zUfiSms_ConcatSms.current_sending==
+g_zUfiSms_ConcatSms.total_msg-(0xdf1+2046-0x15ee))){tSmsData.TP_SRR=
+(0x616+7020-0x2181);}else{tSmsData.TP_SRR=(0xb6+8635-0x2271);}tSmsData.TP_UDHI=
+g_zUfiSms_SendingSms.TP_UDHI;tSmsData.TP_VP=(0xe9f+3330-0x1aa2);sc_cfg_get(
+NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));if((0x10b5+3728-0x1f45)==strncmp(
+Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0xd61+5943-0x2491))){tSmsData.TP_VP=
+(0x381+8424-0x236a);}else if((0x89d+4163-0x18e0)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0xf13+2725-0x19b1))){tSmsData.TP_VP=
+(0x273+7150-0x1dba);}else if((0x8a5+4037-0x186a)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0x1499+1957-0x1c37))){tSmsData.TP_VP=
+(0x1a3+2800-0xbe6);}else if((0x17dd+3197-0x245a)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0x1889+3410-0x25d4))){tSmsData.TP_VP=
+(0x4ed+6750-0x1ebc);}tSmsData.TP_PID=(0xf61+2263-0x1838);
+#if (0x12bf+2638-0x1d0c)
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 (0x195+922-0x52e)
+#if (0x147a+2813-0x1f76)
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,(0x12d4+3630-0x2100));
+(void)String2Bytes(g_zUfiSms_FinalCmgsBuf.pdu,tmpBuf1,(0x83b+6108-0x2015));
Bytes2String(tmpBuf1,tmpBuf2,strlen(tmpBuf1));nSmscLength=atoi(tmpBuf2);if(
-nSmscLength<(0x795+1537-0xd96)||nSmscLength>INT_MAX-(0x1bb6+2101-0x23ea)){
+nSmscLength<(0xe42+5466-0x239c)||nSmscLength>INT_MAX-(0x19bc+1375-0x1f1a)){
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=(0x511+987-0x8ec);;}nSmscLength++;
-g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0xfe6+4567-0x21bb)-nSmscLength;
-#if (0x1242+2445-0x1bce)
+,nSmscLength);nSmscLength=(0xc5d+2862-0x178b);;}nSmscLength++;
+g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0xf14+2310-0x1818)-nSmscLength;
+#if (0x17b0+1569-0x1dd0)
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(
@@ -329,74 +329,75 @@
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-(0x717+6492-0x2072);}ptSubmit->
+ptGroupSms||NULL==ptDbSaveData){return-(0x874+4909-0x1ba0);}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(((0x1f32+1735-0x25f8)<ptConcatSms->
-total_msg)&&(ptConcatSms->current_sending+(0xba4+3049-0x178c)<ptConcatSms->
-total_msg)){ptSubmit->status_report_enabled=(0x3d0+2228-0xc84);}ptSubmit->
+g_zUfiSms_CurSmsPara.status_report_on;if(((0x74+1988-0x837)<ptConcatSms->
+total_msg)&&(ptConcatSms->current_sending+(0xc06+1849-0x133e)<ptConcatSms->
+total_msg)){ptSubmit->status_report_enabled=(0x461+5672-0x1a89);}ptSubmit->
message_reference=g_zUfiSms_MsgRefer;ptSubmit->pid=WMS_PID_DEFAULT;ptSubmit->dcs
-.msg_class=(wms_message_class_e_type)(0x4a2+4583-0x1685);ptSubmit->dcs.
-is_compressed=(0x10f0+5431-0x2627);ptSubmit->dcs.alphabet=(g_zUfiSms_Dcs==
+.msg_class=(wms_message_class_e_type)(0xa82+7014-0x25e4);ptSubmit->dcs.
+is_compressed=(0x1276+3489-0x2017);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=
-(0x2f2+9051-0x264d);if(ptConcatSms->total_msg>(0x1348+2117-0x1b8c)){
+(0x150a+2572-0x1f16);if(ptConcatSms->total_msg>(0x919+3748-0x17bc)){
zUfiSms_FillDateheader(ptSubmit,ptConcatSms,ptDbSaveData);ptDbSaveData->
-concat_info[(0x124a+2797-0x1d35)]=ptConcatSms->current_sending+(0x375+796-0x690)
-;ptDbSaveData->concat_info[(0x1232+4063-0x2210)]=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.num_headers
-].u.nat_lang_ss.nat_lang_id=WMS_UDH_NAT_LANG_PORTUGUESE;ptSubmit->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][(0x4b0+2438-0xe36)]==((char)(0xd85+42-0xd84))){(void)
-zUfiSms_CharToInt(ptGroupSms->receivers[ptGroupSms->current_receiver]+
-(0x1707+3491-0x24a9),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])
--(0x24+6395-0x191e),ptSubmit->address.digits);ptSubmit->address.number_type=
+concat_info[(0x1150+968-0x1516)]=ptConcatSms->current_sending+
+(0x16fb+3548-0x24d6);ptDbSaveData->concat_info[(0x11f0+4757-0x2484)]=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
+.num_headers].u.nat_lang_ss.nat_lang_id=WMS_UDH_NAT_LANG_PORTUGUESE;ptSubmit->
+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][(0x177b+3564-0x2567)]==
+((char)(0x1014+1135-0x1458))){(void)zUfiSms_CharToInt(ptGroupSms->receivers[
+ptGroupSms->current_receiver]+(0x7b3+28-0x7ce),strlen(ptGroupSms->receivers[
+ptGroupSms->current_receiver])-(0x19b3+1945-0x214b),ptSubmit->address.digits);
+ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL;ptSubmit->address.
+number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])-
+(0x510+203-0x5da);}else if(ptGroupSms->receivers[ptGroupSms->current_receiver][
+(0x970+383-0xaef)]==((char)(0x1049+4326-0x20ff))&&ptGroupSms->receivers[
+ptGroupSms->current_receiver][(0x165d+358-0x17c2)]==((char)(0x139f+2095-0x1b9e))
+){(void)zUfiSms_CharToInt(ptGroupSms->receivers[ptGroupSms->current_receiver]+
+(0x83d+1780-0xf2f),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])-
+(0x1438+563-0x1669),ptSubmit->address.digits);ptSubmit->address.number_type=
WMS_NUMBER_INTERNATIONAL;ptSubmit->address.number_of_digits=strlen(ptGroupSms->
-receivers[ptGroupSms->current_receiver])-(0x881+6332-0x213c);}else if(ptGroupSms
-->receivers[ptGroupSms->current_receiver][(0x19fb+481-0x1bdc)]==
-((char)(0x22f+1784-0x8f7))&&ptGroupSms->receivers[ptGroupSms->current_receiver][
-(0x661+3208-0x12e8)]==((char)(0x9d4+4376-0x1abc))){(void)zUfiSms_CharToInt(
-ptGroupSms->receivers[ptGroupSms->current_receiver]+(0xa62+2235-0x131b),strlen(
-ptGroupSms->receivers[ptGroupSms->current_receiver])-(0x15e5+999-0x19ca),
-ptSubmit->address.digits);ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL
-;ptSubmit->address.number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->
-current_receiver])-(0x5a1+1140-0xa13);}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)(0x15f1+131-0x1674);ptSubmit->address.number_mode=(
-wms_number_mode_e_type)(0xc95+4499-0x1e28);ptSubmit->address.number_plan=
-WMS_NUMBER_PLAN_TELEPHONY;memset(&g_zUfiSms_SendingSms,(0x2ac+8432-0x239c),
-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])-(0x1f36+157-0x1fd1);}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)(0x38a+2841-0xea3);ptSubmit
+->address.number_mode=(wms_number_mode_e_type)(0x1bd5+715-0x1ea0);ptSubmit->
+address.number_plan=WMS_NUMBER_PLAN_TELEPHONY;memset(&g_zUfiSms_SendingSms,
+(0x884+2829-0x1391),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]={
-(0x150d+2346-0x1e37)};int i=(0x16e7+2784-0x21c7);if(NULL==ptClientMsg){return;}
+(0x36+2309-0x93b)};int i=(0x1b61+2986-0x270b);if(NULL==ptClientMsg){return;}
memcpy((void*)sca,(void*)(g_zUfiSms_CurSmsPara.sca),sizeof(g_zUfiSms_CurSmsPara.
-sca));if(sca[(0xb19+6334-0x23d7)]==((char)(0x12cc+43-0x12cc))){ptClientMsg->u.
+sca));if(sca[(0x38+5029-0x13dd)]==((char)(0x635+5883-0x1d05))){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[(0xbc+4215-0x1133)]==
-((char)(0x1a64+1484-0x2005))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits--;for(i=(0x1862+3334-0x2568);i<ptClientMsg->u.gw_message.
-sc_address.number_of_digits;i++){sca[i]=sca[i+(0xf69+785-0x1279)];}}else if(sca[
-(0x1b49+1517-0x2136)]==((char)(0xaef+1028-0xec3))&&sca[(0x653+220-0x72e)]==
-((char)(0x1ef4+502-0x20ba))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits-=(0x18fc+2922-0x2464);for(i=(0xe2c+3846-0x1d32);i<ptClientMsg->
-u.gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0x6b4+1365-0xc07)];}
-}(void)zUfiSms_CharToInt(sca,ptClientMsg->u.gw_message.sc_address.
+sc_address.number_of_digits=strlen(sca);if(sca[(0x1cd+912-0x55d)]==
+((char)(0x1768+109-0x17aa))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits--;for(i=(0xbfc+967-0xfc3);i<ptClientMsg->u.gw_message.
+sc_address.number_of_digits;i++){sca[i]=sca[i+(0x9c8+3563-0x17b2)];}}else if(sca
+[(0x1289+5110-0x267f)]==((char)(0x7e2+7933-0x26af))&&sca[(0xe95+1388-0x1400)]==
+((char)(0x84c+3826-0x170e))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits-=(0x495+702-0x751);for(i=(0xe4+4994-0x1466);i<ptClientMsg->u.
+gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0x16a+4199-0x11cf)];}}
+(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
@@ -406,12 +407,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,
-(0xfdc+4493-0x2169),ZTE_WMS_ADDRESS_LEN_MAX+(0xcf2+2534-0x16d7));memcpy(
+(0x2524+200-0x25ec),ZTE_WMS_ADDRESS_LEN_MAX+(0x9ea+2923-0x1554));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,(0x667+7667-0x245a),sizeof(ptDbSaveData->sms_content));if(
+sms_content,(0x6ab+7771-0x2506),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
@@ -422,7 +423,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,(0x11c0+4071-0x21a7),sizeof(
+is_broadcast=FALSE;memset((void*)&tClientTsData,(0xbc7+2708-0x165b),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
@@ -431,95 +432,95 @@
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=(0x15ec+2292-0x1ee0);pContent=(char
-*)malloc((0x18a4+3122-0x24d2)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent
-==NULL){return ZUFI_FAIL;}memset(pContent,(0x15d4+1479-0x1b9b),(0xec+2730-0xb92)
+ZUFI_SUCC;char*pContent=NULL;int iTotalCount=(0x1200+4960-0x2560);pContent=(char
+*)malloc((0x9c8+3997-0x1961)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent
+==NULL){return ZUFI_FAIL;}memset(pContent,(0x27f+9044-0x25d3),(0x480+1433-0xa15)
*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(WMS_GW_ALPHABET_7_BIT_DEFAULT==
-ptDbSaveData->alphabet){static char data[(0x126d+2483-0x1c1c)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x953+3574-0x1748)]={(0x941+7081-0x24ea)};
-memset(data,(0xc2a+6673-0x263b),(0x546+8333-0x25cf)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x15f2+1801-0x1cfa));(void)
-zUfiSms_DecodeContent((char*)ptDbSaveData->sms_content,strlen(ptDbSaveData->
-sms_content),FALSE,data);strncpy(pContent,data,(0x1501+1614-0x1b4b)*
-ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0xd01+5173-0x2135));}else{strncpy(
-pContent,ptDbSaveData->sms_content,(0x1b2d+2429-0x24a6)*
-ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0xed1+5946-0x260a));}ptDbSaveData->tp_dcs
-=(unsigned char)(0x152a+4176-0x2578);if(-(0x1c9b+2519-0x2671)==iSmsId){if(
+ptDbSaveData->alphabet){static char data[(0x7b4+3991-0x1747)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x430+5764-0x1ab3)]={(0x966+1118-0xdc4)};memset
+(data,(0xefa+2403-0x185d),(0x108+4316-0x11e0)*ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+
+(0x16b5+3702-0x252a));(void)zUfiSms_DecodeContent((char*)ptDbSaveData->
+sms_content,strlen(ptDbSaveData->sms_content),FALSE,data);strncpy(pContent,data,
+(0x13c3+3081-0x1fc8)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x1402+682-0x16ab));
+}else{strncpy(pContent,ptDbSaveData->sms_content,(0xcf8+5924-0x2418)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x741+3195-0x13bb));}ptDbSaveData->tp_dcs
+=(unsigned char)(0x7b2+7709-0x25cd);if(-(0xbfb+2825-0x1703)==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-(0x439+986-0x812);}if(ZUFI_FAIL==zUfiSms_InsertNormalSmsToDb(
+;return-(0x196f+3329-0x266f);}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=(0xaa6+4591-0x1c95);for(i=(0x335+2706-0xdc7);i<count;i++){if(
-ptDbSaveData->concat_info[(0xdf3+1600-0x1431)]==i+(0xc30+1742-0x12fd)){free(
-out_result[i]);out_result[i]=NULL;break;}}return(0x1153+2279-0x1a3a);}int
+out_result){int i=(0x770+6014-0x1eee);for(i=(0xcc2+2119-0x1509);i<count;i++){if(
+ptDbSaveData->concat_info[(0x13d2+2263-0x1ca7)]==i+(0x2f4+4909-0x1620)){free(
+out_result[i]);out_result[i]=NULL;break;}}return(0x1b11+1382-0x2077);}int
zUfiSms_AddNewSmsToConcatData(T_zUfiSms_DbStoreData*ptDbSaveData,char*
pOldContent,char*pFormatNewContent,char*pRealNewContent,T_zUfiSms_DbStoreStr*pac
-,int*pConcatTotalNum,int len){int count=(0x745+3859-0x1658);char**out_result=
-NULL;char cSegChar=((char)(0x1a64+837-0x1d6e));int i=(0x50+982-0x426);int
-iTotalSegNum=(0xa54+2465-0x13f5);char acContentSeg[(0xba8+940-0xf52)*
-ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX*ZTE_WMS_SMS_COUNT_MAX]={(0x290+24-0x2a8)};
-char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==pOldContent){return-
-(0x285+4534-0x143a);}count=zUfiSms_SplitString(pOldContent,&out_result,cSegChar)
-;for(i=(0x14f7+833-0x1838);i<count;i++){if(ptDbSaveData->concat_info[
-(0x3cf+8162-0x23af)]==i+(0x15f+2741-0xc13)){out_result[i]=(char*)malloc(sizeof(
-ptDbSaveData->sms_content));memset(out_result[i],(0x16ad+2455-0x2044),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)-(0xd53+2696-0x17da))
-;}break;}}for(i=(0x5ab+5041-0x195c);i<count;i++){snprintf(acContentSeg+strlen(
-acContentSeg),sizeof(acContentSeg)-strlen(acContentSeg),"\x25\x73",out_result[i]
-);strcat(pFormatNewContent,out_result[i]);if(i!=count-(0x3ab+1007-0x799)){strcat
-(pFormatNewContent,"\x3b");}}strncpy(pRealNewContent,acContentSeg,len);
+,int*pConcatTotalNum,int len){int count=(0x8bf+6177-0x20e0);char**out_result=
+NULL;char cSegChar=((char)(0x121+1783-0x7dd));int i=(0x1db1+808-0x20d9);int
+iTotalSegNum=(0xf87+1859-0x16ca);char acContentSeg[(0x8e3+5759-0x1f60)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX*ZTE_WMS_SMS_COUNT_MAX]={
+(0xa2b+6555-0x23c6)};char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==
+pOldContent){return-(0x1c4a+973-0x2016);}count=zUfiSms_SplitString(pOldContent,&
+out_result,cSegChar);for(i=(0x1b+1718-0x6d1);i<count;i++){if(ptDbSaveData->
+concat_info[(0xb9+507-0x2b2)]==i+(0x784+6825-0x222c)){out_result[i]=(char*)
+malloc(sizeof(ptDbSaveData->sms_content));memset(out_result[i],
+(0x733+1623-0xd8a),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)-(0x3fd+5970-0x1b4e));}break;}}for(i=
+(0x773+1024-0xb73);i<count;i++){snprintf(acContentSeg+strlen(acContentSeg),
+sizeof(acContentSeg)-strlen(acContentSeg),"\x25\x73",out_result[i]);strcat(
+pFormatNewContent,out_result[i]);if(i!=count-(0x12d9+2803-0x1dcb)){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=(0xee9+4845-0x21d6);i<count;i++){if(ptDbSaveData->concat_info[
-(0x197c+361-0x1ae3)]==i+(0xea1+5331-0x2373)){out_result[i]=(char*)malloc(
-SHORT_INT_LEN);memset(out_result[i],(0x551+7402-0x223b),SHORT_INT_LEN);snprintf(
+i=(0x1298+4736-0x2518);i<count;i++){if(ptDbSaveData->concat_info[
+(0x137a+1310-0x1896)]==i+(0x18f3+1431-0x1e89)){out_result[i]=(char*)malloc(
+SHORT_INT_LEN);memset(out_result[i],(0x1e1+5524-0x1775),SHORT_INT_LEN);snprintf(
out_result[i],SHORT_INT_LEN,"\x25\x64",ptDbSaveData->index);break;}}for(i=
-(0x606+6182-0x1e2c);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd),
-sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x25\x73",out_result[i]);if(i!=
-count-(0xc5a+737-0xf3a)){snprintf(pac->FormatInd+strlen(pac->FormatInd),sizeof(
+(0x14f2+3842-0x23f4);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd)
+,sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x25\x73",out_result[i]);if(i!=
+count-(0x5c+2616-0xa93)){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=(0x17e8+744-0x1ad0)
-;i<count;i++){if(ptDbSaveData->concat_info[(0x14dc+2228-0x1d8e)]==i+
-(0x450+8700-0x264b)){out_result[i]=(char*)malloc(SHORT_INT_LEN);memset(
-out_result[i],(0x472+5942-0x1ba8),SHORT_INT_LEN);snprintf(out_result[i],
-SHORT_INT_LEN,"\x25\x64",ptDbSaveData->concat_info[(0xa70+302-0xb9c)]);break;}}
-for(i=(0xaa8+5959-0x21ef);i<count;i++){snprintf(pac->FormatSeq+strlen(pac->
-FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x25\x73",out_result[i
-]);if(i!=count-(0x1a1b+3223-0x26b1)){snprintf(pac->FormatSeq+strlen(pac->
-FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x3b");}if(
-(0x544+1901-0xcb1)!=strcmp(out_result[i],"")){iTotalSegNum++;}}*pConcatTotalNum=
-iTotalSegNum;zUfiSms_ConcatDataFree(ptDbSaveData,count,out_result);free(
-out_result);out_result=NULL;return(0x175f+1484-0x1d2b);}int
-zUfiSms_UpdateConcatSms(T_zUfiSms_DbStoreData*ptDbSaveData,const char*pStorePos,
-long iSmsId){T_zUfiSms_DbStoreStr ac={(0x1f6f+1831-0x2696)};char*pOldContent=
-NULL;char*pFormatNewContent=NULL;char*pRealNewContent=NULL;int iTotalNum=
-(0x12f3+799-0x1612);int result=ZUFI_SUCC;int spaceLen=(0x984+922-0xd1a)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x5dc+1557-0xbed);
-pOldContent=(char*)malloc(spaceLen);pFormatNewContent=(char*)malloc(spaceLen);
+zUfiSms_SplitString(pac->Seg_Seq,&out_result,cSegChar);for(i=(0x579+7956-0x248d)
+;i<count;i++){if(ptDbSaveData->concat_info[(0x18d3+1494-0x1ea7)]==i+
+(0x1a4+618-0x40d)){out_result[i]=(char*)malloc(SHORT_INT_LEN);memset(out_result[
+i],(0x6e1+6949-0x2206),SHORT_INT_LEN);snprintf(out_result[i],SHORT_INT_LEN,
+"\x25\x64",ptDbSaveData->concat_info[(0xcf0+1391-0x125d)]);break;}}for(i=
+(0x279+274-0x38b);i<count;i++){snprintf(pac->FormatSeq+strlen(pac->FormatSeq),
+sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x25\x73",out_result[i]);if(i!=
+count-(0x1081+682-0x132a)){snprintf(pac->FormatSeq+strlen(pac->FormatSeq),sizeof
+(pac->FormatSeq)-strlen(pac->FormatSeq),"\x3b");}if((0x2277+136-0x22ff)!=strcmp(
+out_result[i],"")){iTotalSegNum++;}}*pConcatTotalNum=iTotalSegNum;
+zUfiSms_ConcatDataFree(ptDbSaveData,count,out_result);free(out_result);
+out_result=NULL;return(0x12d6+392-0x145e);}int zUfiSms_UpdateConcatSms(
+T_zUfiSms_DbStoreData*ptDbSaveData,const char*pStorePos,long iSmsId){
+T_zUfiSms_DbStoreStr ac={(0x4eb+3493-0x1290)};char*pOldContent=NULL;char*
+pFormatNewContent=NULL;char*pRealNewContent=NULL;int iTotalNum=
+(0x1f87+1293-0x2494);int result=ZUFI_SUCC;int spaceLen=(0x888+4621-0x1a91)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x240+7907-0x211f)
+;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,(0x5c5+5883-0x1cc0),
-spaceLen);memset(pOldContent,(0x1d9d+543-0x1fbc),spaceLen);memset(
-pFormatNewContent,(0xc90+5248-0x2110),spaceLen);(void)zUfiSms_GetConcatInfo(
+pRealNewContent);return ZUFI_FAIL;}memset(pRealNewContent,(0xa5+3136-0xce5),
+spaceLen);memset(pOldContent,(0xa05+5952-0x2145),spaceLen);memset(
+pFormatNewContent,(0x1fbd+434-0x216f),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(-(0x12e7+4368-0x23f6)==
+,ac.IndStr,ac.Seg_Seq,ac.FormatInd,ac.FormatSeq);if(-(0x5f1+5405-0x1b0d)==
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=
-(0x7a1+4005-0x1744);if(ZUFI_FAIL==zUfiSms_UpdateConcatSmsToDb(ptDbSaveData,
+(0x1ad+5549-0x1758);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"
@@ -528,33 +529,34 @@
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={(0xef5+3978-0x1e7f)};int
-iSms_TotalCount=(0x6d+3097-0xc86);int i=(0x1cd0+763-0x1fcb);char acTmpContent[
-(0xc3d+2281-0x1426)];int iConcatNum=(0x602+6812-0x209e);char*pFormatConcat=NULL;
-char*pContent=NULL;int spaceLen=(0xa51+676-0xcf1)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x1c3+333-0x30c);
-if(NULL==ptDbSaveData||NULL==pStorePos){return ZUFI_FAIL;}printf(
+const char*pStorePos){T_zUfiSms_DbStoreStr ac={(0x629+2320-0xf39)};int
+iSms_TotalCount=(0x3c2+6891-0x1ead);int i=(0x520+3367-0x1247);char acTmpContent[
+(0x1e2+4541-0x129f)];int iConcatNum=(0x21b2+1367-0x2709);char*pFormatConcat=NULL
+;char*pContent=NULL;int spaceLen=(0xd42+5632-0x233e)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+
+(0x1601+3476-0x2391);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,(0x1210+4133-0x2235),sizeof(acTmpContent));iSms_TotalCount
-=ptDbSaveData->concat_info[(0x14d3+1656-0x1b4a)];for(i=(0x1160+305-0x1290);i<
+);memset(acTmpContent,(0x5ab+2983-0x1152),sizeof(acTmpContent));iSms_TotalCount=
+ptDbSaveData->concat_info[(0x1409+2833-0x1f19)];for(i=(0x22c7+59-0x2301);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,(0x133d+2306-0x1c3f),
+pFormatConcat){return ZUFI_FAIL;}memset(pFormatConcat,(0x2e5+6111-0x1ac4),
spaceLen);pContent=(char*)malloc(spaceLen);if(pContent==NULL){free(pFormatConcat
-);return ZUFI_FAIL;}memset(pContent,(0xdf7+943-0x11a6),spaceLen);if(-
-(0x3c4+3428-0x1127)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
+);return ZUFI_FAIL;}memset(pContent,(0x2030+1752-0x2708),spaceLen);if(-
+(0x8c9+3605-0x16dd)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
pFormatConcat,pContent,&ac,&iConcatNum,spaceLen)){free(pFormatConcat);free(
pContent);pFormatConcat=NULL;pContent=NULL;return ZUFI_FAIL;}ptDbSaveData->
-tp_dcs=(0x3b9+6118-0x1b9d);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(
+tp_dcs=(0x3b9+2323-0xcca);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=(0x932+1220-0xdf6);int total_count=
-(0x279+1950-0xa17);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
+ptDbSaveData,char*pMemStore){long iSmsId=(0x1948+1689-0x1fe1);int total_count=
+(0xcb0+5348-0x2194);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
iSmsId=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,pMemStore);if(-
-(0xa84+7202-0x26a5)!=iSmsId){printf(
+(0x413+7844-0x22b6)!=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(
@@ -566,205 +568,206 @@
"\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[(0x33a+8780-0x257c)];int iTotalCount=
-(0xc01+5026-0x1fa3);int id=(0x8a6+6027-0x2031);UINT8 needCheckMemory=
-(0x57+6864-0x1b26);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore,
-(0xc81+1755-0x135c),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==iMemStore
+iMemStore,long iSmsId){char acDbMemStore[(0xbaf+2961-0x1736)];int iTotalCount=
+(0xfc+6049-0x189d);int id=(0x22b2+571-0x24ed);UINT8 needCheckMemory=
+(0xcbb+371-0xe2d);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore,
+(0x2221+299-0x234c),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==iMemStore
){strncpy(acDbMemStore,ZTE_WMS_DB_SIM_TABLE,sizeof(acDbMemStore)-
-(0xbcf+5010-0x1f60));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
-acDbMemStore)-(0x1022+5728-0x2681));}if((0x113d+4115-0x214f)==ptDbSaveData->
+(0x745+2922-0x12ae));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
+acDbMemStore)-(0x12b0+3582-0x20ad));}if((0x5bf+5073-0x198f)==ptDbSaveData->
concat_sms){id=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,&acDbMemStore);if(-
-(0xc2+9251-0x24e4)!=id){needCheckMemory=(0xd6+404-0x26a);}}if(needCheckMemory==
-(0x4e7+3700-0x135a)){if(ZUFI_FAIL==zUfiSms_GetTotalCount(acDbMemStore,&
-iTotalCount)){return ZUFI_FAIL;}printf(
+(0x1653+3744-0x24f2)!=id){needCheckMemory=(0x263+5253-0x16e8);}}if(
+needCheckMemory==(0x12ec+2746-0x1da5)){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[
-(0xf8f+4093-0x1f8a)]==(0x10f4+2462-0x1a92)||ptDbSaveData->concat_info[
-(0x214+3214-0xea0)]>ptDbSaveData->concat_info[(0x2bf+3737-0x1157)]){ptDbSaveData
-->concat_sms=(0x12b0+3237-0x1f55);}printf(
+(0x889+1341-0xdc4)]==(0x9bb+3589-0x17c0)||ptDbSaveData->concat_info[
+(0x10cb+4627-0x22dc)]>ptDbSaveData->concat_info[(0x2e4+5497-0x185c)]){
+ptDbSaveData->concat_sms=(0xe43+2124-0x168f);}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[
-(0x1134+93-0x1190)]);if((0x834+1001-0xc1c)==ptDbSaveData->concat_sms){if(
-ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x207+7575-0x1f9d)]){
+(0x12a2+1680-0x1931)]);if((0x184f+3676-0x26aa)==ptDbSaveData->concat_sms){if(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x12c0+4150-0x22f5)]){
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=(0xd9d+5644-0x23a9);if(NULL==ptDbSaveData){
+ptDbSaveData,int cid){int atRes=(0x1261+5063-0x2628);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,-(0x829+289-0x949))){g_zUfiSms_MsgRefer++;ptDbSaveData->
-msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(g_zUfiSms_MsgRefer);}}
-else{CHAR sendfailRetry[(0xa4b+4547-0x1bdc)]={(0xad0+1050-0xeea)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0xa3+1362-0x5f5)==
-strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x428+3555-0x1208);}
+WMS_STORAGE_TYPE_NV_V01,-(0x79c+5943-0x1ed2))){g_zUfiSms_MsgRefer++;ptDbSaveData
+->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(g_zUfiSms_MsgRefer);}
+}else{CHAR sendfailRetry[(0x13f6+1815-0x1adb)]={(0x1ed+9228-0x25f9)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x1d9d+1066-0x21c7)==
+strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x5c8+6719-0x2004);}
atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{
zSms_RecvCmgsOk();}}return WMS_CMD_SUCCESS;}int zUfiSms_SendConcatSms(int cid){
-int atRes=(0x1db0+913-0x2141);T_zUfiSms_ClientMsg tClientMsg;
+int atRes=(0xfd6+301-0x1103);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,(0x1525+766-0x1823),sizeof(T_zUfiSms_ClientMsg));memset((void*)&
-tDbSaveData,(0x1c2f+2509-0x25fc),sizeof(tDbSaveData));zUfiSms_SetPduData(&
+&tClientMsg,(0xf46+4447-0x20a5),sizeof(T_zUfiSms_ClientMsg));memset((void*)&
+tDbSaveData,(0x2+7325-0x1c9f),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,-(0x4b+1328-0x57a));g_zUfiSms_SendFailedCount++;}else{
-CHAR sendfailRetry[(0x676+1676-0xcd0)]={(0x5f6+3936-0x1556)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x969+5433-0x1ea2)==
-strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x198d+2534-0x2370);}
+WMS_STORAGE_TYPE_NV_V01,-(0xd64+722-0x1035));g_zUfiSms_SendFailedCount++;}else{
+CHAR sendfailRetry[(0x1a7+8464-0x2285)]={(0xdb9+1775-0x14a8)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x15b8+315-0x16f3)==
+strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x536+7340-0x21df);}
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+(0x93a+4360-0x1a41))){
+g_zUfiSms_UnitLen*(g_zUfiSms_ConcatSms.current_sending+(0x37c+3811-0x125e))){
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,(0xa50+1371-0xfab),sizeof(
+tSendStatus;memset((void*)&tSendStatus,(0x4eb+2945-0x106c),sizeof(
T_zUfiSms_StatusInfo));tSendStatus.err_code=ZTE_SMS_CMS_NONE;tSendStatus.
send_failed_count=g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=
-(0x13f5+1475-0x19b8);tSendStatus.cmd_status=WMS_CMD_FAILED;tSendStatus.cmd=
+(0x301+4695-0x1558);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=(0x14cb+1385-0x1a34);int i=
-(0x1ed2+510-0x20d0);atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){CHAR
-sendfailRetry[(0xf73+3370-0x1c6b)]={(0x1674+2959-0x2203)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x726+7459-0x2449)==
-strcmp("\x31",sendfailRetry)){for(i=(0xa52+5030-0x1df8);i<SMS_RETRY_COUNT;i++){
+return result;}int zSvr_sendCmgs(VOID){int atRes=(0x1d2+2784-0xcb2);int i=
+(0x924+2129-0x1175);atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){CHAR
+sendfailRetry[(0xefa+231-0xfaf)]={(0x10d1+1473-0x1692)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0xfa6+5528-0x253e)==
+strcmp("\x31",sendfailRetry)){for(i=(0x1afd+2739-0x25b0);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=(0x22ec+246-0x23e2);if(-
-(0x19d5+1068-0x1e00)==g_zUfiSms_UnitLen){printf(
+T_zUfiSms_DbStoreData tDbSaveData;int res=(0xee4+3966-0x1e62);if(-
+(0xd05+3759-0x1bb3)==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,(0xc65+658-0xef7),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x94d+2294-0x1243),
+g_zUfiSms_ConcatSms.total_msg){memset((void*)&tClientMsg,(0x542+2388-0xe96),
+sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0xc08+3654-0x1a4e),
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,-(0x1340+4625-0x2550))
+zUfiSms_WriteSmsToDb(&tDbSaveData,WMS_STORAGE_TYPE_NV_V01,-(0x110f+3815-0x1ff5))
;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+(0xba9+5752-0x2220))){g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.
+current_sending+(0x54f+4766-0x17ec))){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,(0x5e8+1206-0xa9e),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
+tSendStatus,(0x261+9388-0x270d),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
err_code=ZTE_SMS_CMS_NONE;tSendStatus.send_failed_count=
-g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0x310+4364-0x141c);
+g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0x49c+1018-0x896);
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 (0x542+4442-0x169c)
-if(g_zUfiSms_ConcatSms.total_msg>(0x1260+2559-0x1c5e)){printf(
+#if (0x1b6+8025-0x210f)
+if(g_zUfiSms_ConcatSms.total_msg>(0x2c7+2953-0xe4f)){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,(0xa46+463-0xc15),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x65+2810-0xb5f),sizeof
-(tDbSaveData));zUfiSms_SetPduData(&tClientMsg,&tDbSaveData);printf(
+);zUfiSms_SendConcatSms(cid);}else{memset((void*)&tClientMsg,
+(0x107f+5219-0x24e2),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,
+(0x1503+3515-0x22be),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(
"\x21\x21\x21\x21\x21\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x6e\x64\x4f\x75\x74\x53\x6d\x73\x20\x46\x61\x69\x6c\x2e" "\n"
);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[(0x16eb+1720-0x1d9e)]={
-(0x2ad+2415-0xc1c)};int tmp_i=(0xc34+3786-0x1afe);memset(ptTimestamp,
-(0x1654+3014-0x221a),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
-(0xee5+820-0x1218)){ptTimestamp->year=zUfiSms_atohex(((char)(0x141+3959-0x1088))
-)*(0xae2+6232-0x232a)+zUfiSms_atohex(tData.year[(0x1bb2+278-0x1cc8)]);}else if(
-strlen(tData.year)==(0xdc9+1358-0x1315)){ptTimestamp->year=zUfiSms_atohex(tData.
-year[(0x22b+409-0x3c4)])*(0x53a+8057-0x24a3)+zUfiSms_atohex(tData.year[
-(0x4d+2282-0x936)]);}else if(strlen(tData.year)==(0x14f4+115-0x1563)){
-ptTimestamp->year=zUfiSms_atohex(tData.year[(0xa49+5596-0x2023)])*
-(0x166+6986-0x1ca0)+zUfiSms_atohex(tData.year[(0xbd9+2192-0x1466)]);}else{printf
-("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x79\x65\x61\x72\x2e");return ZUFI_FAIL;}if(
-strlen(tData.month)==(0x149+1922-0x8ca)){ptTimestamp->month=zUfiSms_atohex(
-((char)(0x5e3+4019-0x1566)))*(0x4eb+1129-0x944)+zUfiSms_atohex(tData.month[
-(0xab3+2598-0x14d9)]);}else if(strlen(tData.month)==(0xd11+3234-0x19b1)){
-ptTimestamp->month=zUfiSms_atohex(tData.month[(0x362+1988-0xb26)])*
-(0x249+5244-0x16b5)+zUfiSms_atohex(tData.month[(0x1376+4016-0x2325)]);}else{
-printf("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)
-==(0x746+5389-0x1c52)){ptTimestamp->day=zUfiSms_atohex(
-((char)(0x17ff+342-0x1925)))*(0x3d1+8811-0x262c)+zUfiSms_atohex(tData.day[
-(0x4f8+3567-0x12e7)]);}else if(strlen(tData.day)==(0x325+8304-0x2393)){
-ptTimestamp->day=zUfiSms_atohex(tData.day[(0x8d5+3423-0x1634)])*
-(0x47d+6971-0x1fa8)+zUfiSms_atohex(tData.day[(0xe5f+1028-0x1262)]);}else{printf(
+T_zUfiSms_TimeStamp*ptTimestamp){unsigned char tTimeZone[(0x482+6277-0x1d02)]={
+(0x1020+5549-0x25cd)};int tmp_i=(0x9d3+6934-0x24e9);memset(ptTimestamp,
+(0x3e6+924-0x782),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
+(0x461+625-0x6d1)){ptTimestamp->year=zUfiSms_atohex(((char)(0x10b0+740-0x1364)))
+*(0x1c7+8253-0x21f4)+zUfiSms_atohex(tData.year[(0xfc+3718-0xf82)]);}else if(
+strlen(tData.year)==(0xc07+6295-0x249c)){ptTimestamp->year=zUfiSms_atohex(tData.
+year[(0xfdf+435-0x1192)])*(0x798+2068-0xf9c)+zUfiSms_atohex(tData.year[
+(0x84+733-0x360)]);}else if(strlen(tData.year)==(0xa14+6081-0x21d1)){ptTimestamp
+->year=zUfiSms_atohex(tData.year[(0x1acb+89-0x1b22)])*(0xf70+5378-0x2462)+
+zUfiSms_atohex(tData.year[(0x17d9+2978-0x2378)]);}else{printf(
+"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x79\x65\x61\x72\x2e");return ZUFI_FAIL;}if(
+strlen(tData.month)==(0xcb2+4852-0x1fa5)){ptTimestamp->month=zUfiSms_atohex(
+((char)(0xc27+5351-0x20de)))*(0x156f+1962-0x1d09)+zUfiSms_atohex(tData.month[
+(0x1cb0+1371-0x220b)]);}else if(strlen(tData.month)==(0x6d2+6692-0x20f4)){
+ptTimestamp->month=zUfiSms_atohex(tData.month[(0x628+5922-0x1d4a)])*
+(0xc61+4914-0x1f83)+zUfiSms_atohex(tData.month[(0x6b9+1611-0xd03)]);}else{printf
+("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)==
+(0x20f+6517-0x1b83)){ptTimestamp->day=zUfiSms_atohex(((char)(0x593+5328-0x1a33))
+)*(0xb1a+4779-0x1db5)+zUfiSms_atohex(tData.day[(0x399+2733-0xe46)]);}else if(
+strlen(tData.day)==(0x6e3+6382-0x1fcf)){ptTimestamp->day=zUfiSms_atohex(tData.
+day[(0x7a5+1338-0xcdf)])*(0xf27+720-0x11e7)+zUfiSms_atohex(tData.day[
+(0x3e9+4450-0x154a)]);}else{printf(
"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.hour)==
-(0x1430+217-0x1508)){ptTimestamp->hour=zUfiSms_atohex(
-((char)(0x1e0b+1153-0x225c)))*(0x34d+4407-0x1474)+zUfiSms_atohex(tData.hour[
-(0x55f+4986-0x18d9)]);}else if(strlen(tData.hour)==(0x46b+7934-0x2367)){
-ptTimestamp->hour=zUfiSms_atohex(tData.hour[(0x409+480-0x5e9)])*
-(0xf7b+3940-0x1ecf)+zUfiSms_atohex(tData.hour[(0x12fd+3366-0x2022)]);}else{
-printf("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.
-min)==(0x1c1c+154-0x1cb5)){ptTimestamp->minute=zUfiSms_atohex(
-((char)(0x15fd+2969-0x2166)))*(0x1c19+1345-0x214a)+zUfiSms_atohex(tData.min[
-(0x2a4+1553-0x8b5)]);}else if(strlen(tData.min)==(0xce3+5254-0x2167)){
-ptTimestamp->minute=zUfiSms_atohex(tData.min[(0x11c5+3205-0x1e4a)])*
-(0x1057+1777-0x1738)+zUfiSms_atohex(tData.min[(0x567+6887-0x204d)]);}else{printf
+(0x1bb1+363-0x1d1b)){ptTimestamp->hour=zUfiSms_atohex(((char)(0xa64+803-0xd57)))
+*(0x110d+1569-0x171e)+zUfiSms_atohex(tData.hour[(0x154d+3313-0x223e)]);}else if(
+strlen(tData.hour)==(0x75a+6399-0x2057)){ptTimestamp->hour=zUfiSms_atohex(tData.
+hour[(0x1467+1253-0x194c)])*(0x18a2+2149-0x20f7)+zUfiSms_atohex(tData.hour[
+(0x1d01+229-0x1de5)]);}else{printf(
+"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.min)==
+(0x2d3+4026-0x128c)){ptTimestamp->minute=zUfiSms_atohex(
+((char)(0x7b7+4953-0x1ae0)))*(0x1ce0+2323-0x25e3)+zUfiSms_atohex(tData.min[
+(0x99c+2631-0x13e3)]);}else if(strlen(tData.min)==(0x119+3514-0xed1)){
+ptTimestamp->minute=zUfiSms_atohex(tData.min[(0x1d00+1373-0x225d)])*
+(0x1256+3692-0x20b2)+zUfiSms_atohex(tData.min[(0x60c+5563-0x1bc6)]);}else{printf
("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x6d\x69\x6e\x75\x74\x65\x2e");}if(strlen(
-tData.sec)==(0xce0+5462-0x2235)){ptTimestamp->second=zUfiSms_atohex(
-((char)(0x3a6+8857-0x260f)))*(0xe5+9193-0x24be)+zUfiSms_atohex(tData.sec[
-(0x56b+5353-0x1a54)]);}else if(strlen(tData.sec)==(0x3a7+5521-0x1936)){
-ptTimestamp->second=zUfiSms_atohex(tData.sec[(0xa10+3639-0x1847)])*
-(0xcb6+863-0x1005)+zUfiSms_atohex(tData.sec[(0xd95+5760-0x2414)]);}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+(0x190+8252-0x21cb)||tmp_i>INT_MAX-
-(0x2001+1197-0x24ad)){printf(
+tData.sec)==(0x6f0+3495-0x1496)){ptTimestamp->second=zUfiSms_atohex(
+((char)(0x965+3964-0x18b1)))*(0x661+4079-0x1640)+zUfiSms_atohex(tData.sec[
+(0xc3d+2396-0x1599)]);}else if(strlen(tData.sec)==(0x865+5975-0x1fba)){
+ptTimestamp->second=zUfiSms_atohex(tData.sec[(0x1294+3388-0x1fd0)])*
+(0xf76+3053-0x1b53)+zUfiSms_atohex(tData.sec[(0x113b+5312-0x25fa)]);}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+(0x69f+6254-0x1f0c)||tmp_i>INT_MAX-
+(0x94c+3522-0x170d)){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,(0x6b+9611-0x25f6),sizeof(tTimeZone))
-;snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0x1f6b+1745-0x2638));if(
-tData.timezone[(0x175c+2354-0x208e)]==((char)(0x8c4+7056-0x2427))){if(strlen(
-tTimeZone)==(0x695+7635-0x2466)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0x1b9+3474-0xf1b)))*(0x30d+6588-0x1cb9)+zUfiSms_atohex(tTimeZone[
-(0x590+3677-0x13ec)]);}else if(strlen(tTimeZone)==(0x7b7+2680-0x122c)){
-ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x12f5+2766-0x1dc2)])*
-(0x304+5787-0x1995)+zUfiSms_atohex(tTimeZone[(0x5c0+508-0x7ba)]);}else{printf(
+,tmp_i);return ZUFI_FAIL;}memset(tTimeZone,(0x495+4635-0x16b0),sizeof(tTimeZone)
+);snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0x2549+399-0x26d4));if(
+tData.timezone[(0xd06+4176-0x1d56)]==((char)(0x730+3592-0x150b))){if(strlen(
+tTimeZone)==(0x14ba+3684-0x231c)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0xb64+799-0xe53)))*(0x1aa1+1260-0x1f7d)+zUfiSms_atohex(tTimeZone[
+(0x1859+894-0x1bd6)]);}else if(strlen(tTimeZone)==(0xed5+2030-0x16c0)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x2a7+8407-0x237d)])*
+(0x1a1+383-0x316)+zUfiSms_atohex(tTimeZone[(0xdac+6285-0x2637)]);}else{printf(
"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x2d\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x2e");}
-ptTimestamp->timezone=(0x16a4+1104-0x1af4)-ptTimestamp->timezone;}else{if(strlen
-(tTimeZone)==(0x82f+7030-0x23a4)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0xa42+6544-0x23a2)))*(0x42f+5993-0x1b88)+zUfiSms_atohex(tTimeZone[
-(0xc4f+2314-0x1559)]);}else if(strlen(tTimeZone)==(0x131d+1222-0x17e1)){
-ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x48d+8018-0x23df)])*
-(0x728+5348-0x1c02)+zUfiSms_atohex(tTimeZone[(0x3f+9466-0x2538)]);}else{printf(
+ptTimestamp->timezone=(0x833+7771-0x268e)-ptTimestamp->timezone;}else{if(strlen(
+tTimeZone)==(0x1172+4083-0x2164)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0xba3+5993-0x22dc)))*(0x1571+1109-0x19b6)+zUfiSms_atohex(tTimeZone[
+(0x1579+1091-0x19bc)]);}else if(strlen(tTimeZone)==(0xaba+7022-0x2626)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x444+5404-0x1960)])*
+(0x740+1867-0xe81)+zUfiSms_atohex(tTimeZone[(0xc2f+1994-0x13f8)]);}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=(0x942+4964-0x1ca6);deliver->user_data_header_present=TRUE;if(
-(0xad9+4603-0x1cd4)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference++
+UINT16 msg_ref=(0xb89+1797-0x128e);deliver->user_data_header_present=TRUE;if(
+(0x92f+6310-0x21d5)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference++
;(void)zUfiSms_SetConcatMaxRefer(g_zUfiSms_ConcatSmsReference);}deliver->
-user_data_header_present=TRUE;deliver->user_data.num_headers=
-(0x212a+1387-0x2694);deliver->user_data.headers[(0x40a+6251-0x1c75)].header_id=
-WMS_UDH_CONCAT_8;deliver->user_data.headers[(0x37c+5825-0x1a3d)].u.concat_8.
-msg_ref=msg_ref;deliver->user_data.headers[(0x13ad+4857-0x26a6)].u.concat_8.
-total_sm=concat_sms->total_msg;deliver->user_data.headers[(0xd9+5216-0x1539)].u.
-concat_8.seq_num=concat_sms->current_sending+(0x956+4790-0x1c0b);ptDbSaveData->
-concat_sms=(0x22a5+787-0x25b7);ptDbSaveData->concat_info[(0x757+3143-0x139e)]=
-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>(0x1a+5220-0x147d)){zUfiSms_FillDeliver(ptDeliver,
-concat_sms,ptDbSaveData);ptDbSaveData->concat_sms=(0x1f53+391-0x20d9);
-ptDbSaveData->concat_info[(0x14b7+3358-0x21d3)]=concat_sms->current_sending+
-(0x9e6+7334-0x268b);ptDbSaveData->concat_info[(0x13a5+3428-0x2108)]=concat_sms->
-total_msg;ptDbSaveData->concat_info[(0x13aa+4886-0x26c0)]=ptDeliver->user_data.
-headers[(0xa6b+2402-0x13cd)].u.concat_8.msg_ref;}else{ptDeliver->
+user_data_header_present=TRUE;deliver->user_data.num_headers=(0xaa8+4494-0x1c35)
+;deliver->user_data.headers[(0xc73+671-0xf12)].header_id=WMS_UDH_CONCAT_8;
+deliver->user_data.headers[(0x549+6887-0x2030)].u.concat_8.msg_ref=msg_ref;
+deliver->user_data.headers[(0x1e97+1985-0x2658)].u.concat_8.total_sm=concat_sms
+->total_msg;deliver->user_data.headers[(0x18eb+3156-0x253f)].u.concat_8.seq_num=
+concat_sms->current_sending+(0xb13+4975-0x1e81);ptDbSaveData->concat_sms=
+(0xc16+2291-0x1508);ptDbSaveData->concat_info[(0xb3a+5909-0x224f)]=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>
+(0x8fb+787-0xc0d)){zUfiSms_FillDeliver(ptDeliver,concat_sms,ptDbSaveData);
+ptDbSaveData->concat_sms=(0xa82+6722-0x24c3);ptDbSaveData->concat_info[
+(0x3b+712-0x301)]=concat_sms->current_sending+(0xa16+6739-0x2468);ptDbSaveData->
+concat_info[(0x10aa+5380-0x25ad)]=concat_sms->total_msg;ptDbSaveData->
+concat_info[(0x12a7+1698-0x1949)]=ptDeliver->user_data.headers[
+(0x1c04+573-0x1e41)].u.concat_8.msg_ref;}else{ptDeliver->
user_data_header_present=FALSE;ptDeliver->user_data.num_headers=
-(0xcea+2213-0x158f);}ptDeliver->user_data.sm_len=iSmsLen;memcpy(ptDeliver->
+(0x13a6+413-0x1543);}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][(0x715+6773-0x218a)]==
-((char)(0xf5c+3087-0x1b40))){(void)zUfiSms_CharToInt(group_sms->receivers[
-group_sms->current_receiver]+(0xb53+1830-0x1278),strlen(group_sms->receivers[
-group_sms->current_receiver])-(0x46b+7236-0x20ae),ptDeliver->address.digits);
+;if(group_sms->receivers[group_sms->current_receiver][(0x65+9890-0x2707)]==
+((char)(0x177+2006-0x922))){(void)zUfiSms_CharToInt(group_sms->receivers[
+group_sms->current_receiver]+(0xfd7+4875-0x22e1),strlen(group_sms->receivers[
+group_sms->current_receiver])-(0x129+751-0x417),ptDeliver->address.digits);
ptDeliver->address.number_type=WMS_NUMBER_INTERNATIONAL;ptDeliver->address.
number_of_digits=(UINT8)strlen(group_sms->receivers[group_sms->current_receiver]
-)-(0xcfc+6662-0x2701);}else{(void)zUfiSms_CharToInt(group_sms->receivers[
+)-(0x12b+5776-0x17ba);}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->
@@ -777,7 +780,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,-
-(0x537+2676-0xfaa))){at_print(LOG_ERR,
+(0xb23+3263-0x17e1))){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(
@@ -793,19 +796,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=
-(0xc93+5514-0x221d);if(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-
-(0x251+6543-0x1bdf)==iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->
-current_sending=(0x917+7394-0x25f9);ptConcatSms->current_sending<ptConcatSms->
+(0x22a+7440-0x1f3a);if(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-
+(0x5e7+3676-0x1442)==iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->
+current_sending=(0x648+1612-0xc94);ptConcatSms->current_sending<ptConcatSms->
total_msg;ptConcatSms->current_sending++){memset((void*)&tClientMsg,
-(0xfb9+5925-0x26de),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,
-(0x10a6+1087-0x14e5),sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,
-(0xa44+7318-0x26da),sizeof(T_zUfiSms_DbStoreData));tClientMsg.msg_hdr.mem_store=
-(ptSaveSms->mem_store==WMS_STORAGE_TYPE_UIM_V01)?WMS_STORAGE_TYPE_UIM_V01:
+(0x1f0+689-0x4a1),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,
+(0x80f+2702-0x129d),sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,
+(0x0+1812-0x714),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
-(0x6ba+2144-0xf16):{tClientTsData.u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)
+(0x1e3a+1445-0x23db):{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;(
@@ -817,41 +820,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)-
-(0x496+5725-0x1af2));if(TRUE==g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){result=
+(0x1d43+2423-0x26b9));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==(0x1341+618-0x15aa)){result=
+);}else{if(tDbSaveData.concat_sms==(0x969+378-0xae2)){result=
zUfiSms_SaveConcatSms(ptSaveSms,ptConcatSms,ptGroupSms,&tDbSaveData,iSmsLength);
-current_sending=ptConcatSms->current_sending+(0xf0d+800-0x122c);if(ptConcatSms->
-sms_len<iSmsLength*(current_sending+(0x90+1814-0x7a5))){iSmsLength=ptConcatSms->
-sms_len-iSmsLength*current_sending;}}else{result=zUfiSms_SaveNormalSms(ptSaveSms
-,&tDbSaveData);}}}return result;}int zUfiSms_DeleteSmsInSim(){char str_index[
-(0x8c8+7493-0x258d)]={(0x1d92+340-0x1ee6)};int index=(0xca3+4291-0x1d66);int
-is_cc=(0x1c8f+1923-0x2412);int iSmsId=(0x106f+398-0x11fd);T_zUfiSms_ModifyTag
-tDeleteInfo={(0x16e8+532-0x18fc)};char StrValue[(0x1671+1226-0x1b31)]={
-(0x334+1596-0x970)};memset(&tDeleteInfo,(0x861+3253-0x1516),sizeof(
-T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_DelMsg.sim_id[g_zUfiSms_DelMsg.sim_index]
-;if(-(0xf01+5072-0x22d0)==(is_cc=zUfiSms_IsConcatSms(iSmsId))){printf(
+current_sending=ptConcatSms->current_sending+(0x1499+3551-0x2277);if(ptConcatSms
+->sms_len<iSmsLength*(current_sending+(0x99+2043-0x893))){iSmsLength=ptConcatSms
+->sms_len-iSmsLength*current_sending;}}else{result=zUfiSms_SaveNormalSms(
+ptSaveSms,&tDbSaveData);}}}return result;}int zUfiSms_DeleteSmsInSim(){char
+str_index[(0x2c0+5775-0x18cf)]={(0x4b8+4696-0x1710)};int index=
+(0x946+3602-0x1758);int is_cc=(0x159b+3950-0x2509);int iSmsId=
+(0x1c2d+465-0x1dfe);T_zUfiSms_ModifyTag tDeleteInfo={(0xd1f+3831-0x1c16)};char
+StrValue[(0xdc4+4806-0x2080)]={(0xec7+5524-0x245b)};memset(&tDeleteInfo,
+(0xb85+5491-0x20f8),sizeof(T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_DelMsg.sim_id[
+g_zUfiSms_DelMsg.sim_index];if(-(0x4c7+2196-0xd5a)==(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((0xe1a+4923-0x2154)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(
+,is_cc,iSmsId);if((0xcc+1247-0x5aa)==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>
-(0x40b+2084-0xc2f)){index=tDeleteInfo.indices[tDeleteInfo.id_index];
+(0xa56+2719-0x14f5)){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,
-(0x1711+207-0x17e0),sizeof(str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+(0xe49+5619-0x243c),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=(0xef1+4870-0x21f7);
-char StrValue[(0x255+1762-0x92d)]={(0x1c6d+1859-0x23b0)};zUfiSms_SetSmsLocation(
-SMS_LOCATION_SIM);memset(&g_deleteIndex,(0xd82+711-0x1049),sizeof(
+T_zUfiSms_CmdStatus zUfiSms_DeleteSimSms(VOID){int atRes=(0x2d5+6338-0x1b97);
+char StrValue[(0x44b+6950-0x1f67)]={(0x808+4578-0x19ea)};zUfiSms_SetSmsLocation(
+SMS_LOCATION_SIM);memset(&g_deleteIndex,(0x960+3230-0x15fe),sizeof(
T_zUfiSms_DelIndexInfo));while(g_zUfiSms_DelMsg.sim_index_count>
-(0x408+6874-0x1ee2)){if(ZUFI_FAIL==zUfiSms_DeleteSmsInSim()){printf(
+(0x16b4+1231-0x1b83)){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.
@@ -860,68 +864,69 @@
"\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,(0x170+5506-0x16f0));if(tmp==(0x2b3+4737-0x1534)){
-pdu_tmp+=(0xe9f+2410-0x1807);}else{tmp=(tmp+(0x171c+2622-0x2159))*
-(0x12bc+2163-0x1b2d);pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,
-(0x12c+1099-0x575));first_octet=tmp;if(first_octet&(0x2267+336-0x23b5)){*stat=
-(0x52d+7967-0x2447);}}T_zUfiSms_TpduType zUfiSms_GetTpduType(UINT8*pData){
-T_zUfiSms_TpduType iTpduType;UINT8 mti=(0x4f1+7941-0x23f6);mti=(
-T_zUfiSms_TpduType)(pData[(0xaa3+1106-0xef5)]&(0x1e5d+352-0x1fba));switch(mti){
-case(0x1017+1785-0x1710):iTpduType=WMS_TPDU_DELIVER;break;case(0x70+2532-0xa53):
-iTpduType=WMS_TPDU_SUBMIT;break;case(0x188b+2407-0x21f0):iTpduType=
+String2Bytes(pdu_tmp,&tmp,(0xf39+6057-0x26e0));if(tmp==(0xb71+4608-0x1d71)){
+pdu_tmp+=(0x756+7003-0x22af);}else{tmp=(tmp+(0x1edf+1662-0x255c))*
+(0xb6c+5028-0x1f0e);pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,
+(0x1e34+1772-0x251e));first_octet=tmp;if(first_octet&(0x1645+3588-0x2447)){*stat
+=(0x4ed+8000-0x2428);}}T_zUfiSms_TpduType zUfiSms_GetTpduType(UINT8*pData){
+T_zUfiSms_TpduType iTpduType;UINT8 mti=(0xd6b+307-0xe9e);mti=(T_zUfiSms_TpduType
+)(pData[(0x80f+5193-0x1c58)]&(0x9b8+6059-0x2160));switch(mti){case
+(0xcd5+4981-0x204a):iTpduType=WMS_TPDU_DELIVER;break;case(0x853+3521-0x1613):
+iTpduType=WMS_TPDU_SUBMIT;break;case(0x27a+7011-0x1ddb):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=(0x1e03+100-0x1e67);memset(pNumber,
-(0x9fb+412-0xb97),ZTE_WMS_ADDRESS_LEN_MAX+(0x4e9+2295-0xddf));if(tAddress.
-number_type==WMS_NUMBER_INTERNATIONAL){pNumber[(0x99b+2314-0x12a5)]=
-((char)(0x1477+3859-0x235f));pNumber++;}if(tAddress.digit_mode!=
+unsigned char*pNumber){UINT8 number_type=(0x17a8+292-0x18cc);memset(pNumber,
+(0xd40+3930-0x1c9a),ZTE_WMS_ADDRESS_LEN_MAX+(0x105c+5145-0x2474));if(tAddress.
+number_type==WMS_NUMBER_INTERNATIONAL){pNumber[(0xa46+4016-0x19f6)]=
+((char)(0x1234+1236-0x16dd));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[(0xf25+598-0x117b)]));}}byte*zUfiSms_UtilTimeStamp(
+sizeof(tAddress.digits[(0x758+1052-0xb74)]));}}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)(0x1adb+313-0x1bf2));tmp=zte_wms_time
-.year;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x6da+5696-0x1d0b))+((tmp>>
-(0xa33+185-0xae8))*(0x88f+826-0xbbf)),res_ptr);zUfiSms_SprintfTime(date->year,
-sizeof(date->year),zte_wms_time.year);*res_ptr++=((char)(0x20d+9312-0x263e));tmp
-=zte_wms_time.month;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x338+5902-0x1a37))+(
-(tmp>>(0x6dc+2631-0x111f))*(0xb95+2436-0x150f)),res_ptr);zUfiSms_SprintfTime(
-date->month,sizeof(date->month),zte_wms_time.month);*res_ptr++=
-((char)(0x4b3+303-0x5b3));tmp=zte_wms_time.day;res_ptr=zUfiSms_SmsiUtilitoaFill(
-(tmp&(0x1069+843-0x13a5))+((tmp>>(0x1cfa+1143-0x216d))*(0x1be3+44-0x1c05)),
+NULL==date){return NULL;}*res_ptr++=((char)(0x967+5020-0x1ce1));tmp=zte_wms_time
+.year;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xcd+3450-0xe38))+((tmp>>
+(0x3a4+2016-0xb80))*(0x243+1060-0x65d)),res_ptr);zUfiSms_SprintfTime(date->year,
+sizeof(date->year),zte_wms_time.year);*res_ptr++=((char)(0x980+3077-0x1556));tmp
+=zte_wms_time.month;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x459+2269-0xd27))+((
+tmp>>(0xc2b+2713-0x16c0))*(0x374+458-0x534)),res_ptr);zUfiSms_SprintfTime(date->
+month,sizeof(date->month),zte_wms_time.month);*res_ptr++=
+((char)(0x1490+81-0x14b2));tmp=zte_wms_time.day;res_ptr=zUfiSms_SmsiUtilitoaFill
+((tmp&(0x1d5+6465-0x1b07))+((tmp>>(0x61d+7109-0x21de))*(0xa2+6513-0x1a09)),
res_ptr);zUfiSms_SprintfTime(date->day,sizeof(date->day),zte_wms_time.day);*
-res_ptr++=((char)(0xcdb+1948-0x144b));tmp=zte_wms_time.hour;res_ptr=
-zUfiSms_SmsiUtilitoaFill((tmp&(0x441+2599-0xe59))+((tmp>>(0xc75+3975-0x1bf8))*
-(0x116+1695-0x7ab)),res_ptr);zUfiSms_SprintfTime(date->hour,sizeof(date->hour),
-zte_wms_time.hour);*res_ptr++=((char)(0x7ff+6176-0x1fe5));tmp=zte_wms_time.
-minute;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x421+8512-0x2552))+((tmp>>
-(0x98f+3584-0x178b))*(0x4d0+7481-0x21ff)),res_ptr);zUfiSms_SprintfTime(date->min
-,sizeof(date->min),zte_wms_time.minute);*res_ptr++=((char)(0x1791+1316-0x1c7b));
-tmp=zte_wms_time.second;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&
-(0x1a26+1116-0x1e73))+((tmp>>(0x10ea+1256-0x15ce))*(0x5ab+7781-0x2406)),res_ptr)
-;zUfiSms_SprintfTime(date->sec,sizeof(date->sec),zte_wms_time.second);if(
-zte_wms_time.timezone<(0x1faf+1462-0x2565)){*res_ptr++=((char)(0x41b+479-0x5cd))
-;tmp=(UINT8)(zte_wms_time.timezone*(-(0xbc+1968-0x86b)));snprintf(date->timezone
-,sizeof(date->timezone),"\x2d\x25\x64",-(0x1ba6+806-0x1ecb)*zte_wms_time.
-timezone);}else{*res_ptr++=((char)(0x2cc+2751-0xd60));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)(0x10b1+214-0x1165));return res_ptr;}T_zUfiSms_CmdStatus
-zUfiSms_HandleReport(unsigned char*ptPduData){T_zUfiSms_RawTsData tRawTsData;
-T_zUfiSms_ClientTsData tClientTsData;int iReportStatus=(0xbbb+1835-0x12e6);
-unsigned char acDeliverNumber[ZTE_WMS_ADDRESS_LEN_MAX+(0x26c+1057-0x68c)];
-unsigned char tTpScts[ZTE_WMS_TP_SCTS_LEN_MAX+(0xaf4+386-0xc75)];T_zUfiSms_Date
-tSmsDate;char acRecFlag[(0x60b+2407-0xf6d)]={(0xbb9+5513-0x2142)};int iRpCount=
-(0x9f1+4962-0x1d53);char tmp[(0x90c+1414-0xe88)];int tmp_i=(0x816+7613-0x25d3);
-unsigned int pos=(0x730+4037-0x16f5);if(NULL==ptPduData){return WMS_CMD_FAILED;}
-memset(acDeliverNumber,(0x1367+4158-0x23a5),sizeof(acDeliverNumber));memset(&
-tSmsDate,(0x188c+2639-0x22db),sizeof(T_zUfiSms_Date));memset(tTpScts,
-(0xae9+4774-0x1d8f),sizeof(tTpScts));memset(&tRawTsData,(0x1829+87-0x1880),
-sizeof(T_zUfiSms_RawTsData));memset(&tClientTsData,(0x1f31+806-0x2257),sizeof(
-T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),"\x25\x58",ptPduData[
-(0x36d+5956-0x1ab1)]);tmp_i=atoi(tmp);if(tmp_i<(0x1b9+6838-0x1c6f)||tmp_i>
-INT_MAX-(0x1654+950-0x1a09)){at_print(LOG_ERR,
+res_ptr++=((char)(0xea9+3785-0x1d46));tmp=zte_wms_time.hour;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x3a3+3130-0xfce))+((tmp>>(0xf47+779-0x124e))*
+(0xb6+628-0x320)),res_ptr);zUfiSms_SprintfTime(date->hour,sizeof(date->hour),
+zte_wms_time.hour);*res_ptr++=((char)(0x1c2b+370-0x1d63));tmp=zte_wms_time.
+minute;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xbf4+5088-0x1fc5))+((tmp>>
+(0x1072+4154-0x20a8))*(0x159+8905-0x2418)),res_ptr);zUfiSms_SprintfTime(date->
+min,sizeof(date->min),zte_wms_time.minute);*res_ptr++=
+((char)(0x1e63+534-0x203f));tmp=zte_wms_time.second;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x14c7+2070-0x1cce))+((tmp>>(0x1e37+141-0x1ec0))*
+(0x1232+4779-0x24d3)),res_ptr);zUfiSms_SprintfTime(date->sec,sizeof(date->sec),
+zte_wms_time.second);if(zte_wms_time.timezone<(0x236+7183-0x1e45)){*res_ptr++=
+((char)(0x1963+1801-0x203f));tmp=(UINT8)(zte_wms_time.timezone*(-
+(0x764+6231-0x1fba)));snprintf(date->timezone,sizeof(date->timezone),
+"\x2d\x25\x64",-(0xa24+7159-0x261a)*zte_wms_time.timezone);}else{*res_ptr++=
+((char)(0x8c8+1176-0xd35));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)(0xed6+5338-0x238e));
+return res_ptr;}T_zUfiSms_CmdStatus zUfiSms_HandleReport(unsigned char*ptPduData
+){T_zUfiSms_RawTsData tRawTsData;T_zUfiSms_ClientTsData tClientTsData;int
+iReportStatus=(0x9d3+6890-0x24bd);unsigned char acDeliverNumber[
+ZTE_WMS_ADDRESS_LEN_MAX+(0x9a+2267-0x974)];unsigned char tTpScts[
+ZTE_WMS_TP_SCTS_LEN_MAX+(0x37b+8483-0x249d)];T_zUfiSms_Date tSmsDate;char
+acRecFlag[(0x612+6784-0x208d)]={(0x471+8519-0x25b8)};int iRpCount=
+(0x1b42+1972-0x22f6);char tmp[(0x43c+4881-0x1743)];int tmp_i=
+(0x1c18+2070-0x242e);unsigned int pos=(0x4c6+5762-0x1b48);if(NULL==ptPduData){
+return WMS_CMD_FAILED;}memset(acDeliverNumber,(0xdd8+3957-0x1d4d),sizeof(
+acDeliverNumber));memset(&tSmsDate,(0x140b+4235-0x2496),sizeof(T_zUfiSms_Date));
+memset(tTpScts,(0x7ea+4552-0x19b2),sizeof(tTpScts));memset(&tRawTsData,
+(0x348+2364-0xc84),sizeof(T_zUfiSms_RawTsData));memset(&tClientTsData,
+(0x862+7049-0x23eb),sizeof(T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),
+"\x25\x58",ptPduData[(0x22bb+1098-0x2705)]);tmp_i=atoi(tmp);if(tmp_i<
+(0x162+7821-0x1fef)||tmp_i>INT_MAX-(0x138a+1951-0x1b28)){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+(0xd54+2772-0x1827);if(pos>=
+,tmp_i);return WMS_CMD_FAILED;}pos=tmp_i+(0x1388+3572-0x217b);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(&
@@ -930,59 +935,59 @@
"\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=(0x1582+510-0x177f);break;}case
+case WMS_TP_STATUS_REPLACED:{iReportStatus=(0x135f+1948-0x1afa);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=(0x434+7447-0x2148);break;}default:{iReportStatus=
-(0x1780+3524-0x2542);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=(0x9ca+3335-0x16ce);break;}default:{iReportStatus=
+(0x610+2021-0xdf3);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,(0x116+7341-0x1dc3),sizeof(acRecFlag))
+);return WMS_CMD_FAILED;}memset(acRecFlag,(0x1606+785-0x1917),sizeof(acRecFlag))
;sc_cfg_get(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag,sizeof(acRecFlag));iRpCount=
-atoi(acRecFlag);if(iRpCount<(0x858+3106-0x147a)||iRpCount>INT_MAX-
-(0x168a+2374-0x1fcf)){at_print(LOG_ERR,
+atoi(acRecFlag);if(iRpCount<(0x8c7+7063-0x245e)||iRpCount>INT_MAX-
+(0x238+2877-0xd74)){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,(0x3c2+7304-0x204a),sizeof(
+,iRpCount);return WMS_CMD_FAILED;}memset(acRecFlag,(0x6da+5686-0x1d10),sizeof(
acRecFlag));snprintf(acRecFlag,sizeof(acRecFlag),"\x25\x64",iRpCount+
-(0x2340+892-0x26bb));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return
+(0xa0a+5951-0x2148));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return
WMS_CMD_SUCCESS;}void zUfiSms_DelModemSms(int in_index){
-#if (0x1d7d+2273-0x265e)
-char StrValue[(0xa95+866-0xded)]={(0xb43+2362-0x147d)};printf(
+#if (0x5ba+1908-0xd2e)
+char StrValue[(0x501+6533-0x1e7c)]={(0x1d8+7162-0x1dd2)};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=(0x1a9f+2105-0x22d8);atRes=zSms_SendCmgdReq(in_index);if(atRes==
+int atRes=(0x1f1+1353-0x73a);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=
-(0x367+6117-0x1b4c);memset(&g_zUfiSms_modifyMsg,(0xa39+1579-0x1064),sizeof(
-T_zUfiSms_ModifySms));for(i=(0xa21+4461-0x1b8e);i<ptModifyBuff->total_id;i++){
+(0x7a2+4341-0x1897);memset(&g_zUfiSms_modifyMsg,(0xbf4+452-0xdb8),sizeof(
+T_zUfiSms_ModifySms));for(i=(0x3af+2306-0xcb1);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[(0x629+7055-0x2138)]={
-(0x273+959-0x632)};int index=(0x5f0+1699-0xc93);int is_cc=(0x1af8+2352-0x2428);
-int iSmsId=(0x6fa+665-0x993);T_zUfiSms_ModifyTag tModifyInfo={
-(0x47c+4882-0x178e)};char StrValue[(0x1a1a+1284-0x1f14)]={(0xaf6+5433-0x202f)};
-memset(&tModifyInfo,(0x4cc+4503-0x1663),sizeof(T_zUfiSms_ModifyTag));iSmsId=
+zUfiSms_GetUnreadSmsIndexInSim(){char str_index[(0x39a+7403-0x2005)]={
+(0xb99+1380-0x10fd)};int index=(0xb0c+1650-0x117e);int is_cc=(0x683+8229-0x26a8)
+;int iSmsId=(0xdfd+357-0xf62);T_zUfiSms_ModifyTag tModifyInfo={
+(0x633+8360-0x26db)};char StrValue[(0x1426+1387-0x1987)]={(0x393+878-0x701)};
+memset(&tModifyInfo,(0x1584+4098-0x2586),sizeof(T_zUfiSms_ModifyTag));iSmsId=
g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.sim_index];if(-
-(0x3f1+5814-0x1aa6)==(is_cc=zUfiSms_IsConcatSms(iSmsId))){at_print(LOG_ERR,
+(0x4a8+7275-0x2112)==(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((0x27a+8280-0x22d1)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(iSmsId,
+,is_cc);if((0x2600+114-0x2671)==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>
-(0x559+6362-0x1e33)){index=tModifyInfo.indices[tModifyInfo.id_index];
+(0x1520+613-0x1785)){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,(0x8cc+7662-0x26ba),sizeof(
+,index,g_modifyIndex.total);}}else{memset(str_index,(0x1725+760-0x1a1d),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"
@@ -991,14 +996,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=(0xba2+6931-0x26b5);char StrValue[
-(0xa3b+2192-0x12c1)]={(0x627+5904-0x1d37)};printf(
+T_zUfiSms_ModifyFlag*ptModifyBuff){int atRes=(0x1a5d+2549-0x2452);char StrValue[
+(0x732+2612-0x115c)]={(0xd98+1149-0x1215)};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,
-(0x3e1+5742-0x1a4f),sizeof(T_zUfiSms_ModifyIndexInfo));printf(
+(0x913+5747-0x1f86),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>
-(0x5ba+6553-0x1f53)){if(ZUFI_FAIL==zUfiSms_GetUnreadSmsIndexInSim()){at_print(
+(0x12b3+418-0x1455)){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.
@@ -1017,21 +1022,21 @@
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[(0x1720+3693-0x2583)];int tmp_i=
-(0x522+5497-0x1a9b);unsigned int pos=(0x1126+3879-0x204d);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[(0x323+165-0x3be)];int tmp_i=
+(0x501+1950-0xc9f);unsigned int pos=(0xe5c+4686-0x20aa);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,
-(0x1771+931-0x1b14),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
-(0x1408+4422-0x254e),sizeof(wms_client_ts_data_s_type));memset(tmp,
-(0x1ac2+1355-0x200d),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
-pPdu_Received[(0x599+2731-0x1044)]);tmp_i=atoi(tmp);if(tmp_i<
-(0x1348+4875-0x2653)||tmp_i>INT_MAX-(0xdfb+3301-0x1adf)){at_print(LOG_ERR,
+(0x4d5+4793-0x178e),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
+(0x47d+8571-0x25f8),sizeof(wms_client_ts_data_s_type));memset(tmp,
+(0x266+2402-0xbc8),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
+pPdu_Received[(0x57d+6876-0x2059)]);tmp_i=atoi(tmp);if(tmp_i<(0x121+6744-0x1b79)
+||tmp_i>INT_MAX-(0xeb7+2892-0x1a02)){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+(0xa1+8366-0x214e);if(pos>=iPdu_Len){return
+,tmp_i);return ZUFI_FAIL;}pos=tmp_i+(0x5ed+376-0x764);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)?
@@ -1041,62 +1046,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[
-(0x205+1994-0x9ab)]={(0xb88+4469-0x1cfd)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit,
-sizeof(IsInit));if((0x9a3+2152-0x120b)==strcmp("\x6f\x6b",IsInit)){printf(
+(0x6e9+4693-0x191a)]={(0x485+1124-0x8e9)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit,
+sizeof(IsInit));if((0x979+2173-0x11f6)==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 (0x0+869-0x365)
+#if (0x686+2721-0x1127)
int zUfiSms_FormatSms(CHAR*pSmsRawContent,int contentSize,T_zUfiSms_SmsItem*
-ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0x2000+847-0x2323)))
-;if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0x193+7295-0x1e11)),
-((char)(0x636+5868-0x1cf6)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
-*)(P2+(0xc59+5670-0x227e)),((char)(0x8b7+4424-0x19d3)));atBase_PreProcRes(
-pSmsRawContent,contentSize);if((0x269+9248-0x2688)==iCmdId){if(P3==P2+
-(0x198b+1557-0x1f9f)){sscanf(pSmsRawContent,
+ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0x956+168-0x9d2)));
+if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0x1f5a+341-0x20ae)),
+((char)(0x1e2+5413-0x16db)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
+*)(P2+(0x1b+4701-0x1277)),((char)(0x227+7001-0x1d54)));atBase_PreProcRes(
+pSmsRawContent,contentSize);if((0x270+7443-0x1f82)==iCmdId){if(P3==P2+
+(0xb0b+6787-0x258d)){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(
-(0xdf5+4346-0x1eed)==iCmdId){if(P2==P1+(0x13c+7770-0x1f95)){sscanf(
+(0x1bd6+1619-0x2227)==iCmdId){if(P2==P1+(0x1bd5+1571-0x21f7)){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={(0xddc+2864-0x190c)};
+WMS_CMD_PROCESSING;T_zUfiSms_DbStoreData db_data={(0x82a+1772-0xf16)};
zUfiSms_StoreType mem_store=WMS_STORAGE_TYPE_UIM_V01;unsigned char pdu_tmp[
-ZSMS_PDU_SIZE]={(0x628+477-0x805)};int total_count=(0x232c+505-0x2525);int
-sim_capability=(0x1b9f+2062-0x23ad);printf(
+ZSMS_PDU_SIZE]={(0x430+5138-0x1842)};int total_count=(0x3aa+8719-0x25b9);int
+sim_capability=(0x158d+3625-0x23b6);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,(0xf52+5257-0x23db),sizeof
-(db_data));memset(pdu_tmp,(0x85b+6965-0x2390),sizeof(pdu_tmp));(void)
-String2Bytes(pSmsItem->pdu,pdu_tmp,(int)strlen(pSmsItem->pdu));
-#if (0x515+2974-0x10b2)
-zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x19f3+941-0x1d9b)==
+,strlen(pSmsItem->pdu),pSmsItem->pdu);memset(&db_data,(0xf9f+4125-0x1fbc),sizeof
+(db_data));memset(pdu_tmp,(0x1c0+1379-0x723),sizeof(pdu_tmp));(void)String2Bytes
+(pSmsItem->pdu,pdu_tmp,(int)strlen(pSmsItem->pdu));
+#if (0x396+5548-0x1941)
+zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x8b+2827-0xb91)==
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 (0xdb+6449-0x1a0b)
+#if (0xf4+244-0x1e7)
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 (0xcf+2240-0x98e)
+#if (0xfab+5137-0x23bb)
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,-(0x1f13+533-0x2127));{}
-#if (0xfe5+3433-0x1d4d)
+(void)zUfiSms_WriteSmsToDb(&db_data,mem_store,-(0xc3+6980-0x1c06));{}
+#if (0x37d+2233-0xc35)
if(SMS_LOCATION_SIM==g_zUfiSms_CurLocation){CHAR simCapability[
-(0x1978+2721-0x23e7)]={(0x52f+5514-0x1ab9)};sc_cfg_get(
+(0x2c2+6835-0x1d43)]={(0x109a+112-0x110a)};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){
@@ -1106,18 +1111,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)!=(0x118f+4510-0x232d)){if((access(
-ZTE_WMS_TMP1_PATH,F_OK)==(0x1ca7+2057-0x24b0))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
-(0x25c9+61-0x2606))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
-(0x45b+2812-0xf57)){printf(
+if(access(ZTE_WMS_DB_PATH,F_OK)!=(0x1cd0+1315-0x21f3)){if((access(
+ZTE_WMS_TMP1_PATH,F_OK)==(0x185f+826-0x1b99))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
+(0xa59+328-0xba1))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
+(0x335+7403-0x2020)){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)==(0x183+5726-0x17e1))&&(access(
-ZTE_WMS_SEC_PATH,F_OK)!=(0x799+1881-0xef2))){if(rename(ZTE_WMS_TMP0_PATH,
-ZTE_WMS_SEC_PATH)!=(0x5a3+6034-0x1d35)){printf(
+);}}if((access(ZTE_WMS_TMP0_PATH,F_OK)==(0x1102+906-0x148c))&&(access(
+ZTE_WMS_SEC_PATH,F_OK)!=(0x1a60+1519-0x204f))){if(rename(ZTE_WMS_TMP0_PATH,
+ZTE_WMS_SEC_PATH)!=(0x14bb+3845-0x23c0)){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)==(0x1365+3079-0x1f6c)){char rnum_buf[
-(0x1b7+6363-0x1a7a)]={(0x11db+1202-0x168d)};char cmd[(0x149+3464-0xe51)]={
-(0x68d+7777-0x24ee)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZTE_WMS_SEC_PATH,F_OK)==(0xa48+5225-0x1eb1)){char rnum_buf[
+(0x1dd1+1073-0x21ea)]={(0x1818+2563-0x221b)};char cmd[(0x77a+5668-0x1d1e)]={
+(0xdb4+5344-0x2294)};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);}}
@@ -1129,47 +1134,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[(0xa70+4639-0x1c85)]={(0xe3d+5886-0x253b)};
+zUfiSms_CfgSmsNvInit(void){char tmp[(0x901+5107-0x1cea)]={(0x11ab+514-0x13ad)};
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,(0x662+7311-0x22f1),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
+pStatusInfo,(0xb81+187-0xc3c),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
iCmdId;pStatusInfo->cmd_status=WMS_CMD_PROCESSING;pStatusInfo->err_code=
-ZTE_SMS_CMS_NONE;pStatusInfo->send_failed_count=(0x365+4869-0x166a);pStatusInfo
-->delete_failed_count=(0xb+6192-0x183b);(void)zUfiSms_SetCmdStatus(pStatusInfo);
-}void zUfiSms_CfgInit(void){char tmp[(0xc61+1068-0x1083)]={(0xcf+7120-0x1c9f)};
-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=(0xfe3+4169-0x202c);char buf[(0x1890+2376-0x21c4)]={
-(0x1a51+91-0x1aac)};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=(0x1cf6+1843-0x2429);pStatusInfo
+->delete_failed_count=(0xa21+6763-0x248c);(void)zUfiSms_SetCmdStatus(pStatusInfo
+);}void zUfiSms_CfgInit(void){char tmp[(0x507+5129-0x1906)]={(0x2051+630-0x22c7)
+};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=(0x83a+4380-0x1956);char buf[
+(0x1344+1301-0x1845)]={(0x141b+1685-0x1ab0)};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(
-(0xe48+1265-0x1339)==total_count){return FALSE;}else{return TRUE;}}VOID
+(0xeb2+3150-0x1b00)==total_count){return FALSE;}else{return TRUE;}}VOID
zUfiSms_SendSmsStatusInfo(wms_message_status_info sms_op){
-T_zUfi_SmsStatusInfoInd ind={(0xf3c+372-0x10b0)};CHAR temp[(0xc53+5619-0x2214)]=
-{(0x1cf+1762-0x8b1)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=(0x93b+7088-0x24ea)
-;}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=(0x1551+1129-0x19b9);}if(
-zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.sms_unread_ind=(0x1476+350-0x15d3);}
-else{ind.sms_unread_ind=(0x173f+3760-0x25ef);}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[
+T_zUfi_SmsStatusInfoInd ind={(0x1e55+851-0x21a8)};CHAR temp[(0x10c7+1484-0x1661)
+]={(0xcfa+1881-0x1453)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=
+(0xe7b+5356-0x2366);}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=
+(0x3d5+3277-0x10a1);}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.
+sms_unread_ind=(0x17c+5649-0x178c);}else{ind.sms_unread_ind=(0xe01+3536-0x1bd1);
+}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=(0x201+2970-0xd9a);}else{ind.
-sms_memory_full_ind=(0x359+2685-0xdd6);}printf(
+]==TRUE)){ind.sms_memory_full_ind=(0x8bb+793-0xbd3);}else{ind.
+sms_memory_full_ind=(0x67b+457-0x844);}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,(0x1943+367-0x1ab2));if(ind.sms_memory_full_ind==
-(0xef3+5802-0x259c)){sc_cfg_set(NV_SMS_INIT_STATUS,
+T_zUfi_SmsStatusInfoInd),&ind,(0x194+5549-0x1741));if(ind.sms_memory_full_ind==
+(0x1e17+664-0x20ae)){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==(0x5a0+1531-0xb9a)){sc_cfg_set(NV_SMS_INIT_STATUS,
+sms_unread_ind==(0x14ab+2019-0x1c8d)){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(
@@ -1178,7 +1183,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,(0x74c+7268-0x23af),pushSmsLen,fp);if(len==
+);return;}len=fwrite(pushSms,(0xbe4+2011-0x13be),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 2225e4e..e4f0db9 100755
--- a/ap/app/zte_comm/sms/src/sms_main.c
+++ b/ap/app/zte_comm/sms/src/sms_main.c
@@ -15,43 +15,43 @@
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=(0x15c3+1868-0x1d0f);int g_zSms_MsqId=-
-(0x244+9220-0x2647);int g_zSms_LocalMsqId=-(0x69d+5539-0x1c3f);sem_t
-g_sms_sem_id;T_zSms_optRsp g_smsOptRsp={(0x16a4+1007-0x1a93)};static const
+g_zUfiSms_IsConcatSendSuc;int iSmsIndex=(0x26b4+4-0x26b8);int g_zSms_MsqId=-
+(0xf64+3433-0x1ccc);int g_zSms_LocalMsqId=-(0x434+8149-0x2408);sem_t
+g_sms_sem_id;T_zSms_optRsp g_smsOptRsp={(0x157+3428-0xebb)};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},{(0x4c6+8695-0x26bd),NULL,FALSE}};VOID atWeb_SendSms
-(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;T_zUfiSms_StatusInfo tStatus={
-(0x839+5126-0x1c3f)};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={
-(0x775+4836-0x1a59)};T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;
-T_zUfiSms_StatusInfo tStatus={(0xc4d+2677-0x16c2)};assert(pDatabuf!=NULL);printf
-("[SMS] atWeb_DelSmsByIndex recv msg\n");memcpy(&tDelReq,pDatabuf,sizeof(
+atWeb_OutdateSmsCheck,TRUE},{(0x1f60+1175-0x23f7),NULL,FALSE}};VOID
+atWeb_SendSms(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;
+T_zUfiSms_StatusInfo tStatus={(0xfab+2965-0x1b40)};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={
+(0xd23+2887-0x186a)};T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;
+T_zUfiSms_StatusInfo tStatus={(0x177b+3641-0x25b4)};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 (0x118b+4403-0x22be)
+#if (0xc2d+1328-0x115d)
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,(0x56+123-0xd1),req->
-eBoxName);if(req->eBoxName==SMS_INBOX){sms_LoadSmsFromSim();}
+,req->eBoxName);SMS_DeleteRecordFromXML(SMS_LOCATION_SIM,(0x146+7322-0x1de0),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={
-(0x138d+2241-0x1c4e)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)
+(0xff6+5763-0x2679)};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={(0x1840+3704-0x26b8)};assert(
+WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={(0xacc+5809-0x217d)};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 +61,249 @@
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={
-(0x101+2317-0xa0e)};printf(
+(0x7d9+5018-0x1b73)};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={(0x1b3f+1370-0x2099)};
+pDatabuf){T_zUfiSms_DelReq tSmsDel={(0x1099+5731-0x26fc)};
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>(0x1329+4066-0x230b)){
-atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0xa86+6908-0x2582),sizeof(
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x1a7f+1123-0x1ee2)){
+atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0x1048+4809-0x2311),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>(0x439+7657-0x2222)){
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0xef3+5464-0x244b)){
atWeb_DelSmsByIndex(&tSmsDel);}}VOID zSms_HandleWebMsg(MSG_BUF*ptMsgBuf){UINT32
-i=(0xbc5+2659-0x1628);assert(ptMsgBuf!=NULL);printf(
+i=(0xae8+6847-0x25a7);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((0xcd+4979-0x1440)!=SmsHandleWebTab[i].msg_id){if(
+,ptMsgBuf->usMsgCmd);while((0xbc5+5475-0x2128)!=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,(0xd0c+4170-0x1d56));}else if(NULL!=SmsHandleWebTab[i].
+ptMsgBuf->aucDataBuf,(0x955+1136-0xdc5));}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,(0x150b+1730-0x1bcd));return(0x18dd+507-0x1ad8);}SINT32
-zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x16f+8185-0x2168)};
-memset(&sendSmsInfo,(0x1271+1797-0x1976),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
+unsigned char*)pData,(0x42d+4517-0x15d2));return(0x36c+7659-0x2157);}SINT32
+zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x1c98+1538-0x229a)};
+memset(&sendSmsInfo,(0x21d0+1022-0x25ce),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
length=g_zUfiSms_FinalCmgsBuf.length;if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<
-ZSMS_PDU_SIZE-(0x1e9b+1205-0x234f)){memcpy(sendSmsInfo.pdu,
+ZSMS_PDU_SIZE-(0x114c+1993-0x1914)){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-(0x761+7334-0x2405));}*(sendSmsInfo.pdu+strlen(
+ZSMS_PDU_SIZE-(0x1965+1803-0x206e));}*(sendSmsInfo.pdu+strlen(
g_zUfiSms_FinalCmgsBuf.pdu))=ZSMS_CTRL_Z_CHAR;
-#if (0x1755+3721-0x25dd)
+#if (0x3b7+5023-0x1755)
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==(0xffc+613-0x1260)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x37b+1851-0xab5)){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-(0x1acd+478-0x1caa)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0x18b6+557-0x1ae2)].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-(0x1308+1637-0x196c)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x142+6329-0x19fa)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0xc4f+3516-0x1a0a)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x133c+2697-0x1dc4)){
g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc();}SINT32 zSms_SendCmgdReq
-(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x1160+497-0x1351)};delSmsReq.index=
+(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x975+713-0xc3e)};delSmsReq.index=
index;zSms_SendMsg(MSG_CMD_DELSMS_REQ,sizeof(T_zSms_DelSmsReq),&delSmsReq);
-sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x13e6+707-0x16a8)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1768+101-0x17cc)){return
ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmgdOk(VOID){CHAR
-strUsed[(0x44b+7413-0x2136)]={(0xb6c+4426-0x1cb6)};int used=(0x1518+75-0x1563);
-int tmp_i=(0x26f+8777-0x24b8);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+strUsed[(0x1995+423-0x1b32)]={(0x5da+7660-0x23c6)};int used=(0xc2c+5530-0x21c6);
+int tmp_i=(0xe4f+2615-0x1886);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<(0x915+1175-0xdac)||tmp_i>INT_MAX-(0x251f+73-0x2567)){at_print
-(LOG_ERR,
+strUsed);if(tmp_i<(0x66f+7675-0x246a)||tmp_i>INT_MAX-(0x446+8174-0x2433)){
+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=(0x51d+3069-0x111a);}used=tmp_i-(0xb57+1597-0x1193);if(used<
-(0x24a9+342-0x25ff)){used=(0x1208+4854-0x24fe);}memset(&strUsed,
-(0x5d8+7081-0x2181),(0x3a3+2447-0xd28));snprintf(strUsed,sizeof(strUsed),
+,tmp_i);tmp_i=(0x1a19+761-0x1d12);}used=tmp_i-(0x1+2827-0xb0b);if(used<
+(0x602+3989-0x1597)){used=(0xa0b+5069-0x1dd8);}memset(&strUsed,
+(0x7a+7830-0x1f10),(0xbe0+5978-0x2330));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[(0x6ac+2724-0x1146)]={
-(0x55+7012-0x1bb9)};CHAR strTotal[(0x534+4369-0x163b)]={(0xcbd+6586-0x2677)};
-CHAR strUsed[(0x65+2608-0xa8b)]={(0x4cb+297-0x5f4)};int total=
-(0x15e4+118-0x165a);int used=(0x21d7+526-0x23e5);int remain=(0x8a5+1406-0xe23);
-sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(
-strUsed);if(used<(0xd69+2516-0x173d)||used>INT_MAX-(0x19f3+2896-0x2542)){
-at_print(LOG_ERR,
+);}VOID zSms_RecvCmgdFinish(VOID){char StrValue[(0xa33+4169-0x1a72)]={
+(0x267+7274-0x1ed1)};CHAR strTotal[(0xbec+976-0xfb2)]={(0x888+781-0xb95)};CHAR
+strUsed[(0x9b5+1383-0xf12)]={(0x3c8+3394-0x110a)};int total=(0xb71+2524-0x154d);
+int used=(0x9af+588-0xbfb);int remain=(0x805+4202-0x186f);sc_cfg_get(
+ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(strUsed);if(
+used<(0x1031+284-0x114d)||used>INT_MAX-(0x109+8433-0x21f9)){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=(0x105d+2785-0x1b3e);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
-strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0xc46+4063-0x1c25)||
-total>INT_MAX-(0x90+6284-0x191b)){at_print(LOG_ERR,
+,used);used=(0x143c+4236-0x24c8);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
+strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0xe8f+5360-0x237f)||
+total>INT_MAX-(0x3a+1105-0x48a)){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=(0x103+6330-0x19bd);}remain=total-used;if(remain<
-(0xf42+5321-0x240b)){remain=(0x4a6+7314-0x2138);}memset(&StrValue,
-(0x418+6470-0x1d5e),(0x1433+724-0x16fd));snprintf(StrValue,sizeof(StrValue),
+,total);total=(0x2da+4098-0x12dc);}remain=total-used;if(remain<
+(0x171+7990-0x20a7)){remain=(0x534+5046-0x18ea);}memset(&StrValue,
+(0x8c2+7257-0x251b),(0x1930+3256-0x25de));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={(0x6e9+2380-0x1035)};storageReq.type=avail;zSms_SendMsg(
+storageReq={(0xa86+5761-0x2107)};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==(0x3ab+7148-0x1f96)){return ZSMS_RESULT_OK;
+g_sms_sem_id);if(g_smsOptRsp.result==(0xaaa+3095-0x16c0)){return ZSMS_RESULT_OK;
}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCmgrReq(UINT8 index){
-T_zSms_ModifyTagReq modTagReq={(0x19+5975-0x1770)};modTagReq.index=index;
+T_zSms_ModifyTagReq modTagReq={(0x857+6698-0x2281)};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==(0xb47+2167-0x13bd)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x6dd+4344-0x17d4)){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)-
-(0x173c+1198-0x1be9));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),
-&setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x97+2682-0xb10)){
+(0x58d+3466-0x1316));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),&
+setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x2158+837-0x249c)){
return ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCnmiReq(PSTR
- pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x1150+2845-0x1c6d)};if(
-(0xf3d+4172-0x1f89)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
-(0x6ac+5318-0x1b71);}else{notifySetReq.mt=(0x1097+3927-0x1fec);}zSms_SendMsg(
+ pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x1687+1482-0x1c51)};if(
+(0x957+4244-0x19eb)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
+(0x1195+4064-0x2174);}else{notifySetReq.mt=(0x13+4908-0x133d);}zSms_SendMsg(
MSG_CMD_NOTIFY_SET_REQ,sizeof(T_zSms_NotifySetReq),¬ifySetReq);sem_wait(&
-g_sms_sem_id);if(g_smsOptRsp.result==(0x516+2894-0x1063)){return ZSMS_RESULT_OK;
-}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR
-needSMS[(0x91b+6697-0x2312)]={(0x14d3+411-0x166e)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xbc8+5208-0x2020)==strcmp(
+g_sms_sem_id);if(g_smsOptRsp.result==(0x175d+1509-0x1d41)){return ZSMS_RESULT_OK
+;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR
+needSMS[(0x591+6393-0x1e58)]={(0x9ea+5546-0x1f94)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x177c+3734-0x2612)==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={(0x1a30+612-0x1c94)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0x129d+3894-0x21d3)};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[(0x134a+1406-0x18aa)]={
-(0x94c+1488-0xf1c)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
-CHAR needSMS[(0x18ea+3503-0x2667)]={(0x579+5562-0x1b33)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x24b+6015-0x19ca)==strcmp(
+zSms_RecvCmtiInd(UINT8*pDatabuf){char sms_Main_state[(0x15a8+258-0x168c)]={
+(0x5bd+1726-0xc7b)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
+CHAR needSMS[(0xc7a+2022-0x142e)]={(0x1a8a+2991-0x2639)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x133b+4103-0x2342)==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")==
-(0xe5a+5884-0x2556)){printf(
+(0x12f9+1105-0x174a)){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((0x506+2949-0x108b)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0x1920+2847-0x243d))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0xde5+572-0x1021)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x15e6+297-0x170d))){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[(0xc41+1220-0x10d3)]={(0x120b+283-0x1326)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x4d+2870-0xb83)==strcmp(
+needSMS[(0x1251+4721-0x2490)]={(0x494+3481-0x122d)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xfd0+1895-0x1737)==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={(0x1136+3765-0x1feb)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0x35a+3204-0xfde)};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[(0x549+6632-0x1f13)]={
-(0xe91+3696-0x1d01)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
-CHAR needSMS[(0x37d+3644-0x1187)]={(0xbe6+1015-0xfdd)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xab6+1460-0x106a)==strcmp(
+zSms_RecvCdsiInd(UINT8*pDatabuf){char sms_Main_state[(0x1f2b+243-0x2000)]={
+(0xfc1+1288-0x14c9)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
+CHAR needSMS[(0x10b+652-0x365)]={(0x2ed+9247-0x270c)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1e98+1496-0x2470)==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")==
-(0x65d+1955-0xe00)){printf(
+(0x90a+7249-0x255b)){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((0x224+8798-0x2482)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0x2302+866-0x2662))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0x117b+316-0x12b7)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x356+2890-0xe9e))){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={(0x133d+2421-0x1cb2)};CHAR ackPduStr[
-(0xe10+2989-0x198b)]={(0x1731+3203-0x23b4)};ackReq.ackmode=ack_mode;if(ack_mode
-==(0x1049+3294-0x1d25)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,
-(0x62d+2131-0xdad));memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
-#if (0x1715+1256-0x1bfd)
-if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0xc91+4481-0x1e11)){memcpy(ackReq.pdu,
+T_zSms_SmsAckReq ackReq={(0xe7d+4626-0x208f)};CHAR ackPduStr[
+(0x1716+1263-0x1bd3)]={(0x145f+3509-0x2214)};ackReq.ackmode=ack_mode;if(ack_mode
+==(0x5da+5010-0x196a)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,
+(0x5d7+6317-0x1db1));memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
+#if (0x109+8147-0x20dc)
+if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0x419+1407-0x997)){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-(0xe3+8616-0x2289));}
+,ackPduStr);memcpy(ackReq.pdu,ackPduStr,ZSMS_PDU_SIZE-(0x1120+1779-0x1811));}
#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)/(0x164+8118-0x2118);}zSms_SendMsg(
+,ackReq.pdu);ackReq.length=strlen(ackPduStr)/(0x2503+314-0x263b);}zSms_SendMsg(
MSG_CMD_SMSACK_REQ,sizeof(T_zSms_SmsAckReq),&ackReq);sem_wait(&g_sms_sem_id);if(
-g_smsOptRsp.result==(0x429+6007-0x1b9f)){return ZSMS_RESULT_OK;}else{return
+g_smsOptRsp.result==(0x64c+7551-0x23ca)){return ZSMS_RESULT_OK;}else{return
ZSMS_RESULT_ERROR;}}int zSms_SendZmgrReq(int index){T_zSms_ReadSmsReq readSmsReq
-={(0x16c7+2663-0x212e)};iSmsIndex=index;printf(
+={(0x585+306-0x6b7)};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(0x483+2429-0xe00);}VOID zSms_RecvZmgrRsp(
-UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0xb16+6482-0x2468)};memcpy(&tCmgrRsp,(
+T_zSms_ReadSmsReq),&readSmsReq);return(0x638+1338-0xb72);}VOID zSms_RecvZmgrRsp(
+UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0xda7+1267-0x129a)};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={(0x528+1006-0x916)};memcpy(&smsOptRsp,(
+UINT8*pDatabuf){T_zSms_optRsp smsOptRsp={(0x2b8+745-0x5a1)};memcpy(&smsOptRsp,(
T_zSms_optRsp*)pDatabuf,sizeof(T_zSms_optRsp));if(smsOptRsp.result==
-(0x197+5309-0x1653)){sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{printf(
+(0xa8+7782-0x1f0d)){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((
-(0xc12+4906-0x1f3b)==ptPara->result)&&((0x77a+3599-0x1589)==ptPara->opertype)){
-CHAR needSms[(0x3ab+916-0x70d)]={(0x76a+7460-0x248e)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0x7f3+123-0x86e)!=strcmp(
+(0x1667+286-0x1784)==ptPara->result)&&((0x9e2+1610-0x102c)==ptPara->opertype)){
+CHAR needSms[(0x1f31+1326-0x242d)]={(0x98a+236-0xa76)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0x16f7+1763-0x1dda)!=strcmp(
needSms,"\x6e\x6f")){zSvr_Zpbic_Sms_Init();}}}VOID zSms_RecvCpmsInd(UINT8*
pDatabuf){T_zSms_CpmsInd*cpmsInd=(T_zSms_CpmsInd*)pDatabuf;CHAR strBuf[
-(0x6c0+3016-0x127e)]={(0x58a+7431-0x2291)};int remainSpace=(0x35d+7738-0x2197);
+(0x1c2+7241-0x1e01)]={(0x1206+495-0x13f5)};int remainSpace=(0x1788+368-0x18f8);
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,(0x276+3126-0xeac),
-(0x80f+7940-0x2709));snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->used);
+ZTE_WMS_NVCONFIG_SIM_CAPABILITY,strBuf);memset(&strBuf,(0x18e4+552-0x1b0c),
+(0x591+3079-0x118e));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,(0x1972+303-0x1aa1),(0x6e9+4058-0x16b9));snprintf(
+cpmsInd->used;memset(&strBuf,(0x24da+425-0x2683),(0xe9c+3214-0x1b20));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 (0x1193+4695-0x23aa)
+#define AT_CMD_MAX (0x1e3c+1857-0x253d)
#define ZAT_TAB_REPLACE ((unsigned char )(\
-(0x3c5+6609-0x1c9a)))
-#define ZAT_NULL_FILL ((unsigned char )((0x2f0+621-0x460))\
-)
+(0x2a8+7523-0x1f0f)))
+#define ZAT_NULL_FILL ((unsigned char )(\
+(0x1bc7+460-0x1c96)))
#define ZAT_SPACE_REPLACE ((unsigned char )(\
-(0x4da+3788-0x12a8)))
+(0x667+5508-0x1aed)))
#define ZAT_LF_REPLACE ((unsigned char )(\
-(0xc83+1371-0x10e3)))
-#define ZAT_CR_REPLACE ((unsigned char )(\
-(0xe11+6594-0x26d9)))
+(0x44d+7767-0x21a9)))
+#define ZAT_CR_REPLACE ((unsigned char )((0xde4+860-0x1046)\
+))
static void atBase_PreProcRes(char*pParaLine,int paraSize){signed long flg=
-(0x12cf+4932-0x2613);unsigned long i=(0xb06+5415-0x202d);unsigned long length=
-(0x5a5+2738-0x1057);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=(
+(0x1154+2675-0x1bc7);unsigned long i=(0x27+9338-0x24a1);unsigned long length=
+(0x2538+10-0x2542);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=(
char*)malloc(AT_CMD_MAX);if(NULL==pStrDestMalloc){return;}memset(pStrDestMalloc,
-(0xc7f+2366-0x15bd),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
-length=strlen(pParaLine);if((length==(0x1684+15-0x1693))||(length>=AT_CMD_MAX)){
-free(pStrDestMalloc);return;}for(i=(0x10aa+4594-0x229c);(i<length)&&(pDest-
-pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0x10f+2382-0xa3b))==*pSource){flg=(
-(0x15a9+2249-0x1e72)==flg)?(0x615+1522-0xc06):(0xacd+5146-0x1ee7);if(
-((char)(0x98f+2047-0x116c))==*(pSource+(0xa41+1270-0xf36))){*pDest++=(char)
-ZAT_NULL_FILL;}}else if((((char)(0x786+4812-0x1a26))==*pSource)&&(
-(0xd9d+3474-0x1b2f)==flg)){*pDest++=((char)(0x1708+920-0x1a80));if(
-((char)(0x358+1517-0x919))==*(pSource+(0x1bb5+2495-0x2573))){*pDest++=
-((char)(0x189b+2679-0x22d9));}else if('\0'==*(pSource+(0x7fb+1687-0xe91))){*
-pDest++=(char)ZAT_NULL_FILL;}}else{if((((char)(0xa0a+1557-0xfff))==*pSource)&&(
-(0xc2d+3432-0x1994)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
-pSource)&&((0x1c1a+375-0x1d90)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if((
-'\n'==*pSource)&&((0x72d+3411-0x147f)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}else
- if(('\r'==*pSource)&&((0x32c+3628-0x1157)==flg)){*pDest++=(char)ZAT_CR_REPLACE;
-}else{*pDest++=*pSource;}}pSource++;}memset(pParaLine,(0xd18+4929-0x2059),
-paraSize);strncpy(pParaLine,pStrDestMalloc,paraSize-(0x647+857-0x99f));free(
+(0x1475+2279-0x1d5c),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
+length=strlen(pParaLine);if((length==(0x706+2414-0x1074))||(length>=AT_CMD_MAX))
+{free(pStrDestMalloc);return;}for(i=(0xab+9032-0x23f3);(i<length)&&(pDest-
+pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0xd65+3338-0x1a4d))==*pSource){flg=(
+(0x1fc+1883-0x957)==flg)?(0x470+2066-0xc81):(0x9b+9117-0x2438);if(
+((char)(0xaf7+5491-0x2048))==*(pSource+(0x8d7+3489-0x1677))){*pDest++=(char)
+ZAT_NULL_FILL;}}else if((((char)(0x215a+1140-0x25a2))==*pSource)&&(
+(0xfa4+5698-0x25e6)==flg)){*pDest++=((char)(0x5ba+4511-0x1739));if(
+((char)(0x10aa+1080-0x14b6))==*(pSource+(0x515+4223-0x1593))){*pDest++=
+((char)(0x242+1089-0x64a));}else if('\0'==*(pSource+(0x895+5801-0x1f3d))){*pDest
+++=(char)ZAT_NULL_FILL;}}else{if((((char)(0x10b9+1129-0x1502))==*pSource)&&(
+(0x1436+614-0x169b)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
+pSource)&&((0xdeb+38-0xe10)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if(('\n'
+==*pSource)&&((0x4a4+2266-0xd7d)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}else if((
+'\r'==*pSource)&&((0x760+5517-0x1cec)==flg)){*pDest++=(char)ZAT_CR_REPLACE;}else
+{*pDest++=*pSource;}}pSource++;}memset(pParaLine,(0xe19+2933-0x198e),paraSize);
+strncpy(pParaLine,pStrDestMalloc,paraSize-(0xbd0+1660-0x124b));free(
pStrDestMalloc);}VOID zSms_RecvCscaInd(UINT8*pDatabuf){T_zSms_CscaInd cscaInd={
-(0x1276+4925-0x25b3)};
-#if (0x12a5+3058-0x1e96)
+(0x1a63+1004-0x1e4f)};
+#if (0x1634+1492-0x1c07)
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 (0x697+6830-0x2144)
+#if (0x1582+405-0x1716)
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 +311,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,
-(0x11d0+5174-0x2606),NULL);return(0x973+7380-0x2647);}VOID zSms_initAtOk(VOID){
-T_zUfiSms_StatusInfo tStatus={(0x18c9+1118-0x1d27)};sc_cfg_set(NV_SMS_STORE,
+(0xa0d+5680-0x203d),NULL);return(0x1ba5+1116-0x2001);}VOID zSms_initAtOk(VOID){
+T_zUfiSms_StatusInfo tStatus={(0x2108+1188-0x25ac)};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={(0x13bb+1441-0x195c)};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)
+T_zUfiSms_StatusInfo tStatus={(0xcf8+5136-0x2108)};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==
-(0xc5d+2997-0x1811)){zSms_initAtOk();}else{zSms_initAtErr();}}UINT8
+(0x52b+8608-0x26ca)){zSms_initAtOk();}else{zSms_initAtErr();}}UINT8
zSms_SmsMsgCreat(VOID){g_zSms_MsqId=msgget(MODULE_ID_SMS,IPC_CREAT|
-(0x91c+3256-0x1454));if(g_zSms_MsqId==-(0xeaf+893-0x122b)){return ZUFI_FAIL;}
-g_zSms_LocalMsqId=msgget(MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x6d4+7385-0x222d));if(
-g_zSms_LocalMsqId==-(0x190a+2137-0x2162)){return ZUFI_FAIL;}sem_init(&
-g_sms_sem_id,(0x8b6+1552-0xec6),(0xb5c+6808-0x25f4));return ZUFI_SUCC;}void
+(0x170c+1354-0x1ad6));if(g_zSms_MsqId==-(0x33+3148-0xc7e)){return ZUFI_FAIL;}
+g_zSms_LocalMsqId=msgget(MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x16b3+3220-0x21c7));if(
+g_zSms_LocalMsqId==-(0x1e9+8837-0x246d)){return ZUFI_FAIL;}sem_init(&
+g_sms_sem_id,(0x157b+1845-0x1cb0),(0x9f6+2097-0x1227));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,44 +350,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,
-(0x3eb+3699-0x125e));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
- clearSms[(0xdbb+6162-0x259b)]={(0x47d+6787-0x1f00)};sc_cfg_get(
+(0x183+6065-0x1934));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
+ clearSms[(0x1b52+1054-0x1f3e)]={(0x168+4695-0x13bf)};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")==(0xf11+5857-0x25f2)){printf(
+,clearSms);if(strcmp(clearSms,"\x79\x65\x73")==(0x899+1094-0xcdf)){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,(0xa96+1442-0x1038),NULL,
-(0x1826+170-0x18d0));}void zSms_HandleMainCtrlMsg(MSG_BUF*ptMsgBuf){assert(
+MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,(0x748+4214-0x17be),NULL,
+(0x4a8+3923-0x13fb));}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=(0x19c6+3190-0x263c);MSG_BUF stMsg={
-(0xcb4+289-0xdd5)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((int*)
-arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
-(0x171d+2575-0x212c),(0x575+7541-0x22ea),(0x1ed+6667-0x1bf8));while(
-(0x596+1914-0xd0f)){iRet=(0xbb8+6071-0x236f);memset(&stMsg,(0x12c7+4080-0x22b7),
-sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0xc6+37-0xeb),
-(0x285+2635-0xcd0));if(iRet>=(0xb60+338-0xcb2)){switch(stMsg.src_id){case
+sms_msg_thread_proc(void*arg){int iRet=(0xb65+4327-0x1c4c);MSG_BUF stMsg={
+(0x129d+3517-0x205a)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((
+int*)arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
+(0xdad+382-0xf2b),(0x3d+6280-0x18c5),(0x99b+4261-0x1a40));while(
+(0x1+4738-0x1282)){iRet=(0x24c+5947-0x1987);memset(&stMsg,(0x16b1+2962-0x2243),
+sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x71b+5502-0x1c99),
+(0x1ccd+2480-0x267d));if(iRet>=(0x1a5a+1849-0x2193)){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=(0x11d7+4832-0x24b7);MSG_BUF msgBuf={(0xaa2+3022-0x1670)};CHAR
-needSMS[(0x383+6313-0x1bfa)]={(0x1016+4247-0x20ad)};prctl(PR_SET_NAME,
-"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x1da7+2330-0x26c1),(0x1198+476-0x1374),
-(0x1320+3130-0x1f5a));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
-sizeof(needSMS));if((0x6cd+3781-0x1592)!=strcmp(needSMS,"\x6e\x6f")){
+recv_thread_tid=(0x7a8+4628-0x19bc);MSG_BUF msgBuf={(0x1663+57-0x169c)};CHAR
+needSMS[(0xc83+2843-0x176c)]={(0xf8+8295-0x215f)};prctl(PR_SET_NAME,
+"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x6d0+7228-0x230c),(0x4ef+6140-0x1ceb),
+(0x14b8+2165-0x1d2d));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
+sizeof(needSMS));if((0x294+8760-0x24cc)!=strcmp(needSMS,"\x6e\x6f")){
zUfiSms_InitDb();zUfiSms_CfgSmsNvInit();zUfiMmi_SendSmsStatus();zSms_SmsMsgCreat
-();}else{return-(0x4b6+5857-0x1b96);}printf(
+();}else{return-(0xce4+4524-0x1e8f);}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))==-(0x1041+671-0x12df)){assert((0x6a7+5543-0x1c4e));}
-sms_msg_thread_proc(&g_zSms_MsqId);return(0x10d3+3998-0x2071);}
+*)(&g_zSms_LocalMsqId))==-(0x1176+4052-0x2149)){assert((0x665+4651-0x1890));}
+sms_msg_thread_proc(&g_zSms_MsqId);return(0xb29+1100-0xf75);}
diff --git a/ap/app/zte_comm/sms/src/sms_proc.c b/ap/app/zte_comm/sms/src/sms_proc.c
index b21935b..8b80906 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={(0x338+5962-0x1a82)};
-T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0x803+15-0x812)};
-T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x94c+2643-0x139f)};int
-g_zUfiSms_UnitLen=(0x1e0+7608-0x1f98);int g_zUfiSms_ConcatTotalNum=
-(0xbe0+2262-0x14b6);int g_zUfiSms_CurConcatSegNo=(0x459+203-0x524);UINT8
-g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0x6b5+878-0xa23);
-int g_zUfiSms_MsgRefer=(0x2082+774-0x2388);int g_zUfiSms_SendFailedRetry=
-(0x813+3241-0x14bc);char g_Zmena_value[(0x1926+78-0x1972)]={(0x381+1023-0x780)};
-int g_displaymode=(0x6e0+3209-0x1369);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={(0x3bb+7719-0x21e2)};
+T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0xd18+4442-0x1e72)};
+T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x4e0+6505-0x1e49)};int
+g_zUfiSms_UnitLen=(0x5b3+6487-0x1f0a);int g_zUfiSms_ConcatTotalNum=
+(0xf70+2268-0x184c);int g_zUfiSms_CurConcatSegNo=(0x972+5856-0x2052);UINT8
+g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0xc89+5304-0x2141)
+;int g_zUfiSms_MsgRefer=(0x5ff+7143-0x21e6);int g_zUfiSms_SendFailedRetry=
+(0x6bb+1452-0xc67);char g_Zmena_value[(0x8a7+7545-0x261e)]={(0x1575+2998-0x212b)
+};int g_displaymode=(0x1ea0+541-0x20bd);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[
-(0x1c0+5110-0x15aa)];}FOTA_MSG_BUF;
-#define WEBUI_NOTIFY_PUSH_MSG_ (0x8fc+7090-0x24ab)
+(0x1184+1008-0x1568)];}FOTA_MSG_BUF;
+#define WEBUI_NOTIFY_PUSH_MSG_ (0x11c3+27-0x11db)
typedef struct{unsigned int isread_record;unsigned int inbox_full;}
T_zUfiMmi_SmsRecord;void zUfiMmi_SendSmsStatus(void){int iSmsNum=
-(0x3c+4112-0x104c);T_zUfiMmi_SmsRecord tRecord={(0x85d+4891-0x1b78)};CHAR smsNum
-[(0x1e61+1299-0x2342)]={(0x42b+8825-0x26a4)};sc_cfg_get(NV_SMS_IN_NUM,smsNum,
-sizeof(smsNum));iSmsNum=atoi(smsNum);tRecord.isread_record=zUfiSms_IsUnreadSms(
+(0x1b19+901-0x1e9e);T_zUfiMmi_SmsRecord tRecord={(0x1084+4809-0x234d)};CHAR
+smsNum[(0x44d+1018-0x815)]={(0x509+3352-0x1221)};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=
-(0x1fbb+467-0x218d);}else{tRecord.inbox_full=(0x5e3+4569-0x17bc);}}VOID
+(0x898+6493-0x21f4);}else{tRecord.inbox_full=(0x14ff+4183-0x2556);}}VOID
zUfiSms_Init(VOID){zUfiSms_CfgInit();zUfiSms_ChangeMainState(SMS_STATE_INITING);
-}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0x23af+738-0x2691);
-T_zUfiSms_StatusInfo tStatus={(0xb23+3762-0x19d5)};CHAR outDate[
-(0x1a7d+92-0x1aa7)]={(0xe9c+3958-0x1e12)};zUfiSms_Init();zUfiSms_InitCmdStatus(&
-tStatus,WMS_SMS_CMD_INIT);zSms_SendSmsInitReq();at_print(LOG_DEBUG,
+}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0x191f+1613-0x1f6c);
+T_zUfiSms_StatusInfo tStatus={(0x1470+2610-0x1ea2)};CHAR outDate[
+(0xa2d+1753-0x10d4)]={(0x855+3151-0x14a4)};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(
-(0x15ac+323-0x16ef));at_print(LOG_DEBUG,
+(0x14a+6075-0x1905));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((0x343+7348-0x1ff7)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck(
-ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
-#if (0xcef+2116-0x1533)
-VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x3c7+5315-0x1858)]={
-(0x1285+4973-0x25f2)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
-g_Zmena_rsp&&((0x365+3185-0xfd6)!=strcmp(
-"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0x6d4+2892-0x1220)!=strcmp
+,outDate);if((0x1577+1202-0x1a29)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck
+(ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
+#if (0xc2f+882-0xfa1)
+VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x1229+2187-0x1a82)]={
+(0x11f8+864-0x1558)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
+g_Zmena_rsp&&((0x9f3+1935-0x1182)!=strcmp(
+"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0x89c+7753-0x26e5)!=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 (0x176b+2598-0x2191)
-CHAR ackPduStr[(0x110d+466-0x114f)]={(0x3cb+4056-0x13a3)};SMS_PARAM reportParam=
-{(0xda3+5029-0x2148)};int total_length=(0x4b2+5187-0x18f5);UINT8 TP_FCS=
-(0xd6d+2055-0x1574);CHAR strValue[(0x8e9+3132-0x1523)]={(0x13aa+535-0x15c1)};if(
-needAck){TP_FCS=(0x984+6620-0x2360);sprintf(strValue,"\x25\x64",
-(0x1010+3702-0x1e85));}else{TP_FCS=(0x1564+3013-0x2056);sprintf(strValue,
-"\x25\x64",(0x774+5891-0x1e75));}sprintf(reportParam.SCA,"\x25\x73",cfg_get(
+#if (0x12f4+2535-0x1cdb)
+CHAR ackPduStr[(0x92d+5727-0x1dfc)]={(0xb6+7132-0x1c92)};SMS_PARAM reportParam={
+(0x1d02+1553-0x2313)};int total_length=(0xec9+1088-0x1309);UINT8 TP_FCS=
+(0x121c+3569-0x200d);CHAR strValue[(0x7ab+2774-0x127f)]={(0x1165+5083-0x2540)};
+if(needAck){TP_FCS=(0xc07+1692-0x12a3);sprintf(strValue,"\x25\x64",
+(0xc09+3405-0x1955));}else{TP_FCS=(0x8e8+2455-0x11ac);sprintf(strValue,
+"\x25\x64",(0x1b1b+685-0x1dc6));}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,(0x711+2760-0x11d9),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu.
-length=String2Bytes(ackPduStr,g_zUfiSms_ackPdu.pdu,strlen(ackPduStr));memset(
-g_zUfiSms_ackPdu.pdu,(0xcf6+2002-0x14c8),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
+g_zUfiSms_ackPdu,(0x1b50+2535-0x2537),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu
+.length=String2Bytes(ackPduStr,g_zUfiSms_ackPdu.pdu,strlen(ackPduStr));memset(
+g_zUfiSms_ackPdu.pdu,(0x183+9563-0x26de),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
g_zUfiSms_ackPdu.pdu,&ackPduStr,sizeof(ackPduStr));atBase_SendMsgToSelf(
ZAT_CNMA_CMD,strValue,sizeof(strValue));
#endif
-#if (0x1e2a+969-0x21f3)
-CHAR strValue[(0x1758+27-0x1771)]={(0xf4+4426-0x123e)};if(needAck){snprintf(
-strValue,sizeof(strValue),"\x25\x64",(0x978+409-0xb10));}else{snprintf(strValue,
-sizeof(strValue),"\x25\x64",(0x13b9+4306-0x2489));}zSvr_InnerSendMsg(
+#if (0x268+8967-0x256f)
+CHAR strValue[(0xe68+3946-0x1dd0)]={(0x850+2970-0x13ea)};if(needAck){snprintf(
+strValue,sizeof(strValue),"\x25\x64",(0x300+2255-0xbce));}else{snprintf(strValue
+,sizeof(strValue),"\x25\x64",(0x122+1874-0x872));}zSvr_InnerSendMsg(
ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,MSG_CMD_AT_CNMA,strlen(strValue
),strValue);
#endif
-if(needAck){zSms_SendCnmaReq((0xa90+2838-0x15a5));}else{zSms_SendCnmaReq(
-(0x74b+1771-0xe34));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq*
-ptSendMsg){if(NULL==ptSendMsg||(0x122b+2873-0x1d64)==ptSendMsg->receiver_count){
+if(needAck){zSms_SendCnmaReq((0x4ed+3525-0x12b1));}else{zSms_SendCnmaReq(
+(0x1258+1690-0x18f0));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq
+*ptSendMsg){if(NULL==ptSendMsg||(0x3fa+4967-0x1761)==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[(0x6a1+2370-0xfe3)],ptSendMsg->
+,ptSendMsg->receiver_count,ptSendMsg->dest_num[(0x626+4123-0x1641)],ptSendMsg->
msg_len,ptSendMsg->id);
-#if (0x23d+6646-0x1c32)
+#if (0x787+3951-0x16f5)
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=(0x15dd+2080-0x1dfd)
-;if(ptSendMsg->isDelete==TRUE||-(0x1f7+4827-0x14d1)!=ptSendMsg->id){(void)
+sc_cfg_set(NV_SMS_SEND_RESULT,"");g_zUfiSms_SendFailedCount=(0x653+461-0x820);if
+(ptSendMsg->isDelete==TRUE||-(0x338+3121-0xf68)!=ptSendMsg->id){(void)
zUfiSms_DeleteDraftSms(ptSendMsg->id);}zUfiSms_SetGlobalDcsLang(ptSendMsg->dcs);
-memset(&g_zUfiSms_GroupSms,(0x558+6346-0x1e22),sizeof(g_zUfiSms_GroupSms));if(
+memset(&g_zUfiSms_GroupSms,(0xb20+5717-0x2175),sizeof(g_zUfiSms_GroupSms));if(
ZUFI_FAIL==zUfiSms_FillGroupSms(ptSendMsg,&g_zUfiSms_GroupSms)){return
-WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x119f+787-0x14b2),sizeof(
+WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x7b7+7113-0x2380),sizeof(
g_zUfiSms_ConcatSms));g_zUfiSms_UnitLen=zUfiSms_FillConcatSms(ptSendMsg,&
g_zUfiSms_ConcatSms);g_zUfiSms_IsConcatSendSuc=TRUE;g_zUfiSms_CurConcatSegNo=
-(0xc40+3342-0x194e);memset(g_zUfiSms_DbStoreData,(0xd77+2140-0x15d3),sizeof(
-g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x51+9339-0x24c2)){
-g_displaymode=(0x599+1828-0xcbc);at_print(LOG_DEBUG,
+(0x642+1925-0xdc7);memset(g_zUfiSms_DbStoreData,(0x19fb+2163-0x226e),sizeof(
+g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x25b+5070-0x161f)){
+g_displaymode=(0x125a+5297-0x270a);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=(0x1a69+454-0x1c2f);at_print(LOG_DEBUG,
+);}else{g_displaymode=(0xc23+3477-0x19b8);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=(0x8f8+3028-0x14cc);T_zUfiSms_CmdStatus result=
+ tGroupSms;int iSmsLen=(0x182c+2228-0x20e0);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,(0x496+5289-0x193f),sizeof(T_zUfiSms_ConcatInfo));memset(&
-tGroupSms,(0xdd+8482-0x21ff),sizeof(T_zUfiSms_GroupInfo));(void)
+memset(&tConcatSms,(0x108d+1348-0x15d1),sizeof(T_zUfiSms_ConcatInfo));memset(&
+tGroupSms,(0x7a2+8-0x7aa),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=
-(0x86+3004-0xc42);tGroupSms.current_receiver<tGroupSms.total_receiver;tGroupSms.
-current_receiver++){tConcatSms.current_sending=(0x1169+1779-0x185c);result=
-zUfiSms_SaveSmsToDb(pSaveBuff,&tConcatSms,&tGroupSms,iSmsLen);at_print(LOG_DEBUG
-,
+(0x1584+1222-0x1a4a);tGroupSms.current_receiver<tGroupSms.total_receiver;
+tGroupSms.current_receiver++){tConcatSms.current_sending=(0xbfb+5730-0x225d);
+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[(0xd3d+2884-0x1881)]);(void)
+,ptDelBuff->all_or_count,ptDelBuff->id[(0x5ca+5994-0x1d34)]);(void)
zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(
-SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x1999+415-0x1b38),sizeof(
+SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x209+7994-0x2143),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((0xd61+2485-0x1716)<
+,g_zUfiSms_DelMsg.nv_count,g_zUfiSms_DelMsg.sim_count);if((0xfdb+4298-0x20a5)<
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,113 +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((0x3f7+4428-0x1543));}if(memoryFullbeforeDelete&&!
+);zSms_SendZmenaReq((0x1b5+3030-0xd8b));}if(memoryFullbeforeDelete&&!
g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]||unreadBeforeDelete&&!
zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){zUfiSms_SendSmsStatusInfo(
-MSG_SMS_DEFAULT);}}if((0x2375+575-0x25b4)<g_zUfiSms_DelMsg.sim_count){result=
+MSG_SMS_DEFAULT);}}if((0x155+6977-0x1c96)<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=(0x828+2093-0x1055);
-T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0xeec+1912-0x1632)]=
-{(0xa8b+2517-0x1460)};if(NULL==ptModifyBuff){at_print(LOG_ERR,
+T_zUfiSms_ModifyFlag*ptModifyBuff){unsigned long i=(0x67c+2402-0xfde);
+T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0x6b+2634-0xa83)]={
+(0x397+1206-0x84d)};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=(0x104f+2891-0x1b9a);i<ptModifyBuff->total_id;i++){if(
-ptModifyBuff->id[i]<(0x99c+4988-0x1d17)||ZUFI_FAIL==zUfiSms_UpdateSmsTagInDb(
+WMS_CMD_FAILED;}for(i=(0x1a10+295-0x1b37);i<ptModifyBuff->total_id;i++){if(
+ptModifyBuff->id[i]<(0x9b3+233-0xa9b)||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[(0xf33+1539-0x1536)])){return ZUFI_FAIL;}if(
-(0x1191+1685-0x1826)==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){
-zUfiSms_SendSmsStatusInfo(MSG_SMS_READING);}if((0x13e0+3481-0x2179)==strcmp(
-acStorePos,ZTE_WMS_DB_SIM_TABLE)&&ptModifyBuff->total_id>(0xa06+2412-0x1372)){
-zUfiSms_ModifyModemSms(ptModifyBuff);}return result;}T_zUfiSms_CmdStatus
-zUfiSms_SetSmsPara(T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0x17e6+1870-0x1f34)
-;CHAR sca[ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x2366+119-0x23dc)]={
-(0x153f+3609-0x2358)};CHAR store[(0x573+719-0x82e)]={(0x64d+7345-0x22fe)};CHAR
-defaultStore[(0x490+1346-0x9a0)]={(0x199c+965-0x1d61)};if(ptParaBuff==ZUFI_NULL)
-{return WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x1b88+477-0x1d65)){strncpy
-(sca,ptParaBuff->sca,sizeof(sca)-(0x136+5476-0x1699));at_print(LOG_DEBUG,
+ptModifyBuff->id[(0xc01+5641-0x220a)])){return ZUFI_FAIL;}if((0x1f5+8673-0x23d6)
+==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){zUfiSms_SendSmsStatusInfo(
+MSG_SMS_READING);}if((0x695+5475-0x1bf8)==strcmp(acStorePos,ZTE_WMS_DB_SIM_TABLE
+)&&ptModifyBuff->total_id>(0xa2f+4033-0x19f0)){zUfiSms_ModifyModemSms(
+ptModifyBuff);}return result;}T_zUfiSms_CmdStatus zUfiSms_SetSmsPara(
+T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0x517+4697-0x1770);CHAR sca[
+ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x10a9+955-0x1463)]={(0x314+3857-0x1225)};CHAR
+store[(0x16e8+380-0x1850)]={(0xaa2+2184-0x132a)};CHAR defaultStore[
+(0x217b+723-0x241c)]={(0x5d9+4171-0x1624)};if(ptParaBuff==ZUFI_NULL){return
+WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x210+6588-0x1bcc)){strncpy(sca,
+ptParaBuff->sca,sizeof(sca)-(0x55b+3546-0x1334));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')&&((0xdb+3542-0xeb1)!=strcmp(defaultStore
-,ptParaBuff->default_store))){{strncpy(store,ptParaBuff->default_store,sizeof(
-store)-(0x7e4+4140-0x180f));}atRes=zSms_SendCnmiReq(store);if(atRes!=
-ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x1211+2313-0x1b19)==
+if((*(ptParaBuff->default_store)!='\0')&&((0x5b0+7641-0x2389)!=strcmp(
+defaultStore,ptParaBuff->default_store))){{strncpy(store,ptParaBuff->
+default_store,sizeof(store)-(0x1112+1632-0x1771));}atRes=zSms_SendCnmiReq(store)
+;if(atRes!=ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x2327+437-0x24db)==
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[(0xdd6+3641-0x1c0a)]={(0xffd+4070-0x1fe3)};char remind_flag[
-(0x1038+3599-0x1e42)];int sms_count=(0x4c8+8765-0x2705);int remind_count=
-(0x5d5+4348-0x16d1);memset(sms_rec_flag,(0xe66+305-0xf97),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<(0xe58+5439-0x2397)||sms_count>INT_MAX
--(0x6d5+3172-0x1338)){at_print(LOG_ERR,
+char sms_rec_flag[(0xfe2+1186-0x147f)]={(0x1a8f+531-0x1ca2)};char remind_flag[
+(0x17d7+1920-0x1f52)];int sms_count=(0x1a83+1680-0x2113);int remind_count=
+(0x1256+3163-0x1eb1);memset(sms_rec_flag,(0x138f+4654-0x25bd),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<(0x1115+1271-0x160c)||
+sms_count>INT_MAX-(0x19aa+3190-0x261f)){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,(0x1448+4487-0x25cf),sizeof(sms_rec_flag
-));snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+
-(0x1c50+480-0x1e2f));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
+,sms_count);return;}memset(sms_rec_flag,(0x7ba+1575-0xde1),sizeof(sms_rec_flag))
+;snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+
+(0x1272+4447-0x23d0));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED_LED,sms_rec_flag);memset(remind_flag,
-(0xd4d+5510-0x22d3),sizeof(remind_flag));snprintf(remind_flag,sizeof(remind_flag
-),"\x25\x64",remind_count+(0x658+7394-0x2339));sc_cfg_set(
+(0x1527+3960-0x249f),sizeof(remind_flag));snprintf(remind_flag,sizeof(
+remind_flag),"\x25\x64",remind_count+(0x89a+4086-0x188f));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]={
-(0x1f1+7287-0x1e68)};T_zUfiSms_DbStoreData tDbStoreData={(0x34+4925-0x1371)};int
- isPushSms=(0xc2+5372-0x15be);if(strcmp(ptRespData->pdu,"")==(0xf2c+5564-0x24e8)
-){CHAR srState[(0x1cba+1604-0x22cc)]={(0xf82+5704-0x25ca)};sc_cfg_get(
-NV_SR_STATE,srState,sizeof(srState));if((0x1e13+1441-0x23b4)!=strcmp(srState,
-"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
+(0xae0+3879-0x1a07)};T_zUfiSms_DbStoreData tDbStoreData={(0x206a+967-0x2431)};
+int isPushSms=(0x1450+2891-0x1f9b);if(strcmp(ptRespData->pdu,"")==
+(0xaa3+27-0xabe)){CHAR srState[(0x1206+2495-0x1b93)]={(0x1adc+2435-0x245f)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0xa5b+1775-0x114a)!=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(
-(0x50c+1740-0xbd3)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
+(0xe37+4299-0x1efd)==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!=
-(0x1a2f+1783-0x2125)){return(0x131c+2459-0x1cb7);}zUfiSms_GetCurrentRecvTotalSeq
-(data,pmsg);at_print(LOG_DEBUG,
+(0x1ad+4489-0x1335)){return(0x724+1173-0xbb9);}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[(0xe26+5367-0x231d)],data->
-concat_info[(0xa5b+629-0xccf)],data->concat_info[(0x52a+2515-0xefb)]);if(data->
-concat_info[(0x1897+323-0x19d9)]==atoi(pmsg->total_seq)){return(0x2d2+877-0x63f)
-;}return-(0x742+3053-0x132e);}void zUfiSms_TrafficChangeSmsTag(
-T_zUfiSms_DbStoreData*data){CHAR smsNumber[(0x9a5+1480-0xf3b)]={
-(0xd1+1599-0x710)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,smsNumber,sizeof(smsNumber))
-;if((0x526+7827-0x23b9)==strcmp(smsNumber,data->number)){data->tag=
-WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=(0x9a3+6373-0x2287);}}void
-zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data){int iSmsId=
-(0x1d6a+2405-0x26cf);SMS_MSG_INFO msg={(0x12f5+3894-0x222b)};CHAR smsNumber[
-(0x46+5273-0x14ad)]={(0x1127+3721-0x1fb0)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
-smsNumber,sizeof(smsNumber));at_print(LOG_DEBUG,
+,pmsg->id,atoi(pmsg->total_seq),data->concat_info[(0x21ed+1201-0x269e)],data->
+concat_info[(0x12f4+2541-0x1ce0)],data->concat_info[(0x1344+2847-0x1e61)]);if(
+data->concat_info[(0x99a+1099-0xde4)]==atoi(pmsg->total_seq)){return
+(0x17f9+112-0x1869);}return-(0x1ba5+1453-0x2151);}void
+zUfiSms_TrafficChangeSmsTag(T_zUfiSms_DbStoreData*data){CHAR smsNumber[
+(0x1c8+718-0x464)]={(0x914+6837-0x23c9)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
+smsNumber,sizeof(smsNumber));if((0x17ff+1194-0x1ca9)==strcmp(smsNumber,data->
+number)){data->tag=WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=
+(0x1b04+2146-0x2365);}}void zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data)
+{int iSmsId=(0x1747+3417-0x24a0);SMS_MSG_INFO msg={(0x7b8+7033-0x2331)};CHAR
+smsNumber[(0x1ba6+2077-0x2391)]={(0x123b+4690-0x248d)};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((0xa3f+1937-0x11d0)==strcmp(smsNumber,data->number))
-{if((0x1e0b+837-0x2150)!=zUfiSms_CheckIfWholeSms(data,&msg)){at_print(LOG_DEBUG,
+,data->number,smsNumber);if((0xaa+4850-0x139c)==strcmp(smsNumber,data->number)){
+if((0x14e2+2735-0x1f91)!=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]={
-(0x874+6960-0x23a4)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0xabc+4767-0x1d5b);SMS_PARAM one_sms={(0x132+968-0x4fa)};int
-unread_sms_before_recv_new_sms=(0x1758+1761-0x1e39);memset(&tDbStoreData,
-(0x178+6575-0x1b27),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x4da+586-0x724)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0xb52+4228-0x1bd6);SMS_PARAM one_sms={(0x3f+7682-0x1e41)};int
+unread_sms_before_recv_new_sms=(0xf1+8119-0x20a8);memset(&tDbStoreData,
+(0x23f+6733-0x1c8c),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,"")==(0x1c71+1081-0x20aa)){CHAR srState[
-(0x194+4247-0x11f9)]={(0x1fdc+1455-0x258b)};sc_cfg_get(NV_SR_STATE,srState,
-sizeof(srState));if((0xd53+4360-0x1e5b)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0x7b8+5337-0x1c91)){CHAR srState[(0x154+1716-0x7d6)
+]={(0x531+8654-0x26ff)};sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if(
+(0xf44+869-0x12a9)!=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((0xd37+6227-0x258a));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x1580+1224-0x1a48));}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,
@@ -265,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((0x356+5032-0x16f9)==ptRespData->stat){(void)
+ptRespData->pdu));if((0x1037+3059-0x1c25)==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=(0x1286+1090-0x16c7);}else{
-unread_sms_before_recv_new_sms=(0x631+3575-0x1428);}zUfiSms_TrafficChangeSmsTag(
+unread_sms_before_recv_new_sms=(0x1c46+199-0x1d0c);}else{
+unread_sms_before_recv_new_sms=(0xbf7+5264-0x2087);}zUfiSms_TrafficChangeSmsTag(
&tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,
-iStorePos,-(0x57a+3187-0x11ec))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
-(0x892+2784-0x1371));return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){
+iStorePos,-(0x217f+230-0x2264))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
+(0x1a9+5204-0x15fc));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]={
-(0x10fb+4117-0x2110)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x11f0+144-0x1280);SMS_PARAM one_sms={(0xf04+1996-0x16d0)};CHAR defaultStore[
-(0xfe9+5810-0x2669)]={(0x769+5147-0x1b84)};memset(&tDbStoreData,
-(0xaa5+6838-0x255b),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x157+7353-0x1e10)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0xf3c+1698-0x15de);SMS_PARAM one_sms={(0xf86+635-0x1201)};CHAR defaultStore[
+(0x734+3796-0x15d6)]={(0x67+937-0x410)};memset(&tDbStoreData,(0x45a+4186-0x14b4)
+,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,"")==(0x15e5+1698-0x1c87)){CHAR srState[
-(0x2063+1591-0x2668)]={(0x60c+869-0x971)};sc_cfg_get(NV_SR_STATE,srState,sizeof(
-srState));if((0x96c+227-0xa4f)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0x120+7043-0x1ca3)){CHAR srState[
+(0x1082+4265-0x20f9)]={(0xdd2+6318-0x2680)};sc_cfg_get(NV_SR_STATE,srState,
+sizeof(srState));if((0x22ff+253-0x23fc)!=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");}
@@ -299,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((0x2cd+5735-0x1934));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0xe36+3437-0x1ba3));}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,29 +311,29 @@
,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(
-(0x110d+3801-0x1fe1)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
+(0x1d57+1576-0x237a)==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(
-(0x569+2908-0x10c5)==strcmp(defaultStore,"\x73\x69\x6d")){iStorePos=
+(0x382+7051-0x1f0d)==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,-
-(0x1cad+716-0x1f78))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}
+(0x1afa+2655-0x2558))){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]={
-(0x16e7+1626-0x1d41)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x134+3751-0xfdb);SMS_PARAM one_sms={(0x65b+637-0x8d8)};int
-unread_sms_before_recv_new_sms=(0xf6+6844-0x1bb2);memset(&tDbStoreData,
-(0xdb0+4404-0x1ee4),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x176d+2398-0x20cb)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x156+232-0x23e);SMS_PARAM one_sms={(0x910+589-0xb5d)};int
+unread_sms_before_recv_new_sms=(0x1e0f+220-0x1eeb);memset(&tDbStoreData,
+(0x7b5+2144-0x1015),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,"")==
-(0x851+4525-0x19fe)){CHAR srState[(0x769+4996-0x1abb)]={(0x2031+585-0x227a)};
-sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x9f2+4175-0x1a41)!=strcmp(
+(0x1a2+4568-0x137a)){CHAR srState[(0xc6+8613-0x2239)]={(0xb2+9201-0x24a3)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0xa17+1850-0x1151)!=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");}
@@ -342,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((0x3d3+6718-0x1e11));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x1627+4078-0x2615));}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,
@@ -353,81 +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((0x14a+840-0x48d)==
-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)
+ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if((0x1a9+3289-0xe7d)
+==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=
-(0x1ba7+383-0x1d25);}else{unread_sms_before_recv_new_sms=(0xf4+7001-0x1c4d);}if(
-ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
-(0x1c72+1102-0x20bf))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}
+(0xc7f+4711-0x1ee5);}else{unread_sms_before_recv_new_sms=(0x1339+3232-0x1fd9);}
+if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
+(0x9b0+539-0xbca))){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={(0x1257+3700-0x20cb)};g_zUfiSms_DbStoreData
+){T_zUfiSms_StatusInfo tStatusInfo={(0x1c70+1403-0x21eb)};g_zUfiSms_DbStoreData
->msg_displaymode=g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=
-(0xe2c+5007-0x21ba)){if((0x16e1+323-0x1824)==zUfiSms_WriteSmsToDb(&
-g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0xd46+2732-0x17f1)],
-WMS_STORAGE_TYPE_NV_V01,-(0xa79+2-0xa7a))){g_zUfiSms_MsgRefer++;(void)
+(0x2c4+1191-0x76a)){if((0x295+3334-0xf9b)==zUfiSms_WriteSmsToDb(&
+g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x78d+4894-0x1aaa)],
+WMS_STORAGE_TYPE_NV_V01,-(0x18f4+3551-0x26d2))){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=
-(0x85c+6842-0x2316);memset((void*)&tStatusInfo,(0x1538+868-0x189c),sizeof(
+(0xb22+2753-0x15e3);memset((void*)&tStatusInfo,(0xa81+3764-0x1935),sizeof(
T_zUfiSms_StatusInfo));tStatusInfo.err_code=ZTE_SMS_CMS_NONE;tStatusInfo.
send_failed_count=g_zUfiSms_SendFailedCount;tStatusInfo.delete_failed_count=
-(0xf6f+4831-0x224e);if(g_zUfiSms_SendFailedCount==(0x1714+1537-0x1d15)){
-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,
+(0x2e5+5735-0x194c);if(g_zUfiSms_SendFailedCount==(0xa86+642-0xd08)){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={(0x80f+5258-0x1c99)};int
-errs=(0xb17+6815-0x25b6);key_t req_id=ftok(
+int zte_fota_notifyPushMsg(int cmd){FOTA_MSG_BUF msg={(0x761+7268-0x23c5)};int
+errs=(0x19d1+1620-0x2025);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"
-,(0xc32+2601-0x165a));int msgid=msgget(req_id,(0x1063+5052-0x241f));if(msgid!=-
-(0x89c+4519-0x1a42)){msg.mtype=(0x999+2805-0x148d);msg.mtext[(0x47f+8144-0x244f)
-]=WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long),
-(0x1129+2903-0x1c80));}return(errs<(0x16a6+3368-0x23ce)?(0xea0+360-0x1008):
-(0x21c2+840-0x2509));}
-#if (0x1cb6+84-0x1d0a)
+,(0xd35+3064-0x192c));int msgid=msgget(req_id,(0xf3+2815-0xbf2));if(msgid!=-
+(0x3c4+2550-0xdb9)){msg.mtype=(0x6f6+2339-0x1018);msg.mtext[(0x85+8095-0x2024)]=
+WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long),
+(0x517+5483-0x1a82));}return(errs<(0x43c+8558-0x25aa)?(0x4ea+7882-0x23b4):
+(0x900+3427-0x1662));}
+#if (0x1056+4356-0x215a)
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 (0x2103+1166-0x2591)
+#if (0x5ab+4904-0x18d3)
int atSms_SendZmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){int res
-=(0x1d3+6455-0x1b0a);pthread_mutex_lock(&smsdb_mutex);res=zSvr_SendAtSyn(
+=(0xbe8+3355-0x1903);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={(0xbef+1855-0x132e)};sc_cfg_set(NV_SMS_LOAD_RESULT
+T_zUfiSms_StatusInfo tStatus={(0x5bf+2776-0x1097)};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={
-(0xcbd+1910-0x1433)};sc_cfg_set(NV_SMS_LOAD_RESULT,"\x66\x61\x69\x6c");
+(0x10e1+3104-0x1d01)};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={
-(0x1821+2315-0x212c)};printf(
+(0x466+5874-0x1b58)};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,
-(0xed9+6166-0x26ef),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
-->resParas,sizeof(pResLine->resParas),&tSmsPara,(0x1418+2735-0x1ec6));printf(
+(0x1458+797-0x1775),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
+->resParas,sizeof(pResLine->resParas),&tSmsPara,(0xd65+4268-0x1e10));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[(0x8d+4324-0x115d)]
-={(0x124+1981-0x8e1)};iSmsIndex=atoi(pAtCmdPara);printf(
+pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[
+(0x13d9+3677-0x2222)]={(0x1ff0+1026-0x23f2)};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 (0x1bf4+2591-0x2613)
-static T_zUfiSms_SmsItem tSmsPara={(0x2229+254-0x2327)};T_zUfiSms_CmgrSetRsp
-tCmgrRsp={(0x1216+4203-0x2281)};printf(
+#if (0xaf4+5892-0x21f8)
+static T_zUfiSms_SmsItem tSmsPara={(0x1297+2314-0x1ba1)};T_zUfiSms_CmgrSetRsp
+tCmgrRsp={(0x1c75+1330-0x21a7)};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(
@@ -436,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,(0xf0f+6062-0x26bd),sizeof(T_zUfiSms_SmsItem));(void)
-zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0x5a1+3458-0x1321));tSmsPara.
+{memset(&tSmsPara,(0x1c6b+2618-0x26a5),sizeof(T_zUfiSms_SmsItem));(void)
+zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0xbaa+1047-0xfbf));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[(0xba5+1287-0x1098)]={(0xec9+5191-0x2310)};iSmsIndex=atoi(pAtCmdPara);
+pAtcmdStr[(0x15cd+1419-0x1b44)]={(0x397+2991-0xf46)};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),
@@ -456,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={(0x1530+4069-0x2515)};T_zUfiSms_CmgrSetRsp tCmgrRsp=
-{(0x4e6+3778-0x13a8)};printf(
+T_zUfiSms_SmsItem tSmsPara={(0x1e94+1077-0x22c9)};T_zUfiSms_CmgrSetRsp tCmgrRsp=
+{(0x16d4+2988-0x2280)};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(
@@ -465,56 +465,56 @@
);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,(0x782+4044-0x174e),sizeof
-(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(pResLine
-->resParas),&tSmsPara,(0x576+6988-0x20c0));tSmsPara.index=iSmsIndex;printf(
+NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,(0x5c4+1158-0xa4a),sizeof(
+T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(pResLine->
+resParas),&tSmsPara,(0x1463+309-0x1596));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[
-(0x11a9+2569-0x1b9e)]={(0xa6c+4915-0x1d9f)};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[(0x547+157-0x5d0)]=
+{(0x9fa+1011-0xded)};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[(0x12fb+4378-0x240b)]={(0xb2c+5026-0x1ece)};
-int used=(0x1451+3444-0x21c5);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+atSms_RecvCmgdOk(VOID){CHAR strUsed[(0x483+1251-0x95c)]={(0x1193+3621-0x1fb8)};
+int used=(0x20a+3414-0xf60);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)-(0x18b1+2329-0x21c9);if(used<(0x17e4+1171-0x1c77)){used=
-(0x597+1817-0xcb0);}memset(&strUsed,(0x15ac+2140-0x1e08),(0x1f6+7657-0x1fd5));
+strUsed)-(0x104+9411-0x25c6);if(used<(0x1fb2+1499-0x258d)){used=
+(0x897+6478-0x21e5);}memset(&strUsed,(0x770+6203-0x1fab),(0xfa1+2904-0x1aef));
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[(0x120+5416-0x163e)]={
-(0x1296+1141-0x170b)};CHAR strTotal[(0x409+3260-0x10bb)]={(0xb10+4542-0x1cce)};
-CHAR strUsed[(0x18bf+2074-0x20cf)]={(0x1778+3081-0x2381)};int total=
-(0x243b+721-0x270c);int used=(0x940+571-0xb7b);int remain=(0x10d7+921-0x1470);
+);}VOID atSms_RecvCmgdFinish(VOID){char StrValue[(0x198+7700-0x1fa2)]={
+(0xf15+3735-0x1dac)};CHAR strTotal[(0xef8+342-0x1044)]={(0xe47+3325-0x1b44)};
+CHAR strUsed[(0x924+6025-0x20a3)]={(0xfa7+3989-0x1f3c)};int total=
+(0x6f4+3891-0x1627);int used=(0x13db+813-0x1708);int remain=(0x4cc+7661-0x22b9);
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<(0x93f+5639-0x1f46)){remain=
-(0x1198+4877-0x24a5);}memset(&StrValue,(0xcc6+3704-0x1b3e),(0x561+1583-0xb86));
-snprintf(StrValue,sizeof(StrValue),"\x25\x64",remain);sc_cfg_set(
+total=atoi(strTotal);remain=total-used;if(remain<(0x2c5+165-0x36a)){remain=
+(0x1054+809-0x137d);}memset(&StrValue,(0x1058+1196-0x1504),(0x1c63+2444-0x25e5))
+;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=(0x1f36+1790-0x2634);CHAR pAtcmdStr[
-ZSMS_PDU_SIZE]={(0x6bd+5772-0x1d49)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+pAtRst,int atRstSize){int atRes=(0x939+3076-0x153d);CHAR pAtcmdStr[ZSMS_PDU_SIZE
+]={(0x6d7+281-0x7f0)};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,(0x328+6164-0x1b3c),ZSMS_PDU_SIZE
-);if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x8ff+328-0xa46)){memcpy(
-pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));}else{
-printf(
+ZAT_RESULT_SMS){return atRes;}memset(pAtcmdStr,(0x996+2635-0x13e1),ZSMS_PDU_SIZE
+);if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x159+8363-0x2203)){
+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-(0xa3a+1014-0xe2e));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.pdu
-))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0x6e6+2543-0x10d5),atRstSize);return
+ZSMS_PDU_SIZE-(0x6c6+7789-0x2531));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.
+pdu))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0xf73+3567-0x1d62),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-(0x25f+6890-0x1d48)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0x21d9+385-0x2359)].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");
@@ -522,16 +522,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-(0x1fa8+414-0x2145)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x1eb+2830-0xcf8)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0xfa3+3836-0x1e9e)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x605+2986-0x11ae)){
g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc(cid);}VOID
atSms_RecvCmgsRsp(T_zAt_AtRes*pResLine){return;}VOID atSms_RecvCmtRsp(
-T_zAt_AtRes*pResLine){CHAR needSMS[(0x2289+1044-0x266b)]={(0x15fc+3279-0x22cb)};
-sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x678+8211-0x268b)==
+T_zAt_AtRes*pResLine){CHAR needSMS[(0x690+3574-0x1454)]={(0x13c3+2317-0x1cd0)};
+sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x79a+6975-0x22d9)==
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={(0x554+7943-0x245b)};
-T_zUfiSms_CmtSetRsp tCmtRsp={(0x90f+7257-0x2568)};if(NULL==pResLine){return;}
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0xf08+917-0x129d)};
+T_zUfiSms_CmtSetRsp tCmtRsp={(0x66d+7262-0x22cb)};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==
@@ -541,39 +541,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,
-(0x651+3582-0x144f),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0xfa1+1642-0x160b),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[
-(0xb67+5838-0x2203)]={(0x359+579-0x59c)};sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
-sizeof(needSMS));if((0xdcb+6124-0x25b7)==strcmp(needSMS,"\x6e\x6f")){printf(
+(0x1313+996-0x16c5)]={(0xa40+3441-0x17b1)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x2f+2020-0x813)==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[(0x17d8+2594-0x21dc)]={(0x9f1+2947-0x1574)};char*
+);return;}char sms_Main_state[(0x13bf+2665-0x1e0a)]={(0x102b+3213-0x1cb8)};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")==
-(0x1cc1+1895-0x2428)){printf(
+(0x14d+6554-0x1ae7)){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(
-(0x1fd7+51-0x200a)==strncmp("\x53\x4d",memory,(0xbbf+6011-0x2338))){
+(0xd27+4460-0x1e93)==strncmp("\x53\x4d",memory,(0x651+4253-0x16ec))){
zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0xcd4+369-0xe41);printf(
+SMS_STATE_RECVING);memory+=(0x13d3+2600-0x1df7);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[(0x18f+1811-0x870)]={(0x15b0+2771-0x2083)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xab6+4143-0x1ae5)==strcmp(
+){CHAR needSMS[(0x564+8179-0x2525)]={(0xa3f+7212-0x266b)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xdb1+360-0xf19)==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={(0x165+5515-0x16f0)};
-T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x2107+315-0x2242)};if(NULL==pResLine){return;}
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0x540+3275-0x120b)};
+T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x54c+7417-0x2245)};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"
@@ -581,80 +582,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,
-(0xfd7+4591-0x21c6),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0x938+2943-0x14b7),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[
-(0x759+5919-0x1e46)]={(0x31a+7848-0x21c2)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
-needSMS,sizeof(needSMS));if((0x57+3640-0xe8f)==strcmp(needSMS,"\x6e\x6f")){
+(0x132d+4229-0x2380)]={(0x1027+863-0x1386)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x88d+7232-0x24cd)==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[(0xeb4+6122-0x2680)]={(0x6f7+6225-0x1f48)};char*
+);return;}char sms_Main_state[(0xa42+5558-0x1fda)]={(0x7b+5650-0x168d)};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")==
-(0x1db1+380-0x1f2d)){printf(
+(0xc55+2807-0x174c)){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((0xc99+4197-0x1cfe)==strncmp("\x53\x4d",memory,(0x1d7+5072-0x15a5)))
-{zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0x1b6+362-0x31c);printf(
+,memory);if((0x371+726-0x647)==strncmp("\x53\x4d",memory,(0x470+8641-0x262f))){
+zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
+SMS_STATE_RECVING);memory+=(0xecc+5365-0x23bd);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[(0x1297+2604-0x1caf)]={
-(0x1730+3508-0x24e4)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+ cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x3e5+1844-0xb05)]={
+(0x7aa+2825-0x12b3)};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=(0x9b0+4226-0x1a32);CHAR pAtcmdStr[ZSMS_PDU_SIZE
-]={(0xa35+4546-0x1bf7)};CHAR ackPduStr[(0x1554+1937-0x1cb3)]={
-(0xd7d+4091-0x1d78)};if(atoi(pAtCmdPara)==(0x746+5562-0x1cff)){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=(0x141d+475-0x15f8);CHAR pAtcmdStr[ZSMS_PDU_SIZE
+]={(0xd26+3411-0x1a79)};CHAR ackPduStr[(0x6f9+1832-0xdef)]={(0x5c6+7009-0x2127)}
+;if(atoi(pAtCmdPara)==(0x1cc1+1771-0x23ab)){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(0x1a97+2121-0x22e0);}else{zUfiSms_EncodePdu_DeliverReport(
-ackPduStr,(0x692+280-0x6d7));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+,pAtcmdStr);return(0x6d8+5473-0x1c39);}else{zUfiSms_EncodePdu_DeliverReport(
+ackPduStr,(0x836+7327-0x2402));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
"\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73\x2c\x25\x64" "\r\n",pAtCmdPara,strlen(
-ackPduStr)/(0xd2+862-0x42e));atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,
+ackPduStr)/(0x504+4331-0x15ed));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,(0x19e1+3290-0x26bb),ZSMS_PDU_SIZE);if(strlen(
-ackPduStr)<ZSMS_PDU_SIZE-(0xb16+3324-0x1811)){memcpy(pAtcmdStr,ackPduStr,strlen(
+,pAtcmdStr);memset(pAtcmdStr,(0xaa7+1020-0xea3),ZSMS_PDU_SIZE);if(strlen(
+ackPduStr)<ZSMS_PDU_SIZE-(0xecb+497-0x10bb)){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-(0x159+2033-0x948));}*(
+,ackPduStr);memcpy(pAtcmdStr,ackPduStr,ZSMS_PDU_SIZE-(0x1427+2027-0x1c10));}*(
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,(0x1150+3722-0x1fda),atRstSize);return zSvr_SendAtSyn(
+,pAtcmdStr);memset(pAtRst,(0x1795+2731-0x2240),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]={(0x10+5507-0x1593)};int atRes=
-(0xd23+597-0xf78);if(pDatabuf==NULL){return;}atRes=atSms_SendCmgdReq(pDatabuf,
+cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x1958+2011-0x2133)};int atRes=
+(0x7d3+4943-0x1b22);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]={(0x734+5154-0x1b56)}
-;if(pDatabuf==NULL){printf(
+UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0xb+2452-0x99f)};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]
-={(0x6a7+2666-0x1111)};int atRes=(0x1f6a+1275-0x2465);if(pDatabuf==NULL){printf(
+={(0x2f4+3991-0x128b)};int atRes=(0xc0f+3185-0x1880);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]=
-{(0x1ca6+1257-0x218f)};if(pDatabuf==NULL){printf(
+{(0x1b82+361-0x1ceb)};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_comm/wlan/inc/wlan-station.h b/ap/app/zte_comm/wlan/inc/wlan-station.h
index dfd477b..f0de3cb 100755
--- a/ap/app/zte_comm/wlan/inc/wlan-station.h
+++ b/ap/app/zte_comm/wlan/inc/wlan-station.h
@@ -28,6 +28,7 @@
void wlan_station_msg_handle(MSG_BUF *pMsg);
void Delete_connect_timeout_timer(void);
void wifi_station_close();
+void wifi_station_cancel_scan(void);
void wlan_statemachine_init();
void wlan_station_open();
diff --git a/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c b/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
index 7c10c50..b31c2a2 100755
--- a/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
+++ b/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
@@ -46,6 +46,9 @@
//¶¨Ê±Æ÷Ïà¹Ø
#define WIFI_WPS_PIN_TIMEOUT_TIMER_ID 130
#define WIFI_CHANNEL_FOLLOW_TIMEOUT_TIMER_ID 131 //ApstaÁ¬½ÓÍⲿÈȵ㳬ʱ¶¨Ê±Æ÷£¬ÓÃÓÚÖØÆôap
+#ifdef USE_CAP_SUPPORT
+#define WIFI_AP_ENABLED_TIMER_ID 132 //hostapdÊÇ·ñap-enabled³É¹¦
+#endif
#if defined(__SSV_6X5X_CHIP__)
#define HT_CAPAB_40 "[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]"
@@ -86,6 +89,10 @@
int g_m_hostap = 0;
#endif
+#ifdef USE_CAP_SUPPORT
+#define PATH_MAX 256
+#define INT_MAX 2147483647
+#endif
extern struct wlan_ap_server * ap_server;
int wifi_start_hostapd (struct wlan_ap_server *ap_svr);
@@ -104,7 +111,12 @@
extern void get_mac_config_ssid_key_nv();
extern void wlan_station_init(void);
extern void wifi_station_close();
-
+#ifdef __STA_FUNC__
+extern void wifi_station_cancel_scan(void);
+#endif
+#ifdef USE_CAP_SUPPORT
+extern int send_ap_status_to_cap(int idx, int status);
+#endif
struct wlan_ap_server rda5995_ap = {
.sock ={
@@ -854,6 +866,16 @@
}
#endif
+#ifdef USE_CAP_SUPPORT
+static void ap_enabled_cb(void *param)
+{
+ slog(WIFI_PRINT, SLOG_ERR, "ap_enabled_timeout!\n");
+ //2.4GµÄËùÓÐssid¶¼ÊÇͬһ״̬
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ return 0;
+}
+#endif
+
//maybe bridge not ready, max 30s
static void wait_bridge(void)
{
@@ -881,12 +903,20 @@
if(ap_svr->ap0_state == 0) {
ret = wifi_ap_enable(ap_svr);
if (ret == 0) {
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ENABLED);
+ #endif
return 0;
}
//enable fail, close hostapd
wifi_stop_hostapd(ap_svr);
}
}
+#ifdef USE_CAP_SUPPORT
+ wlan_ap_get_para(ap_svr);
+ wlan_ap_save_config(ap_svr);
+#endif
+
/* Reset sockets used for exiting from hung state */
ap_svr->sock.exit_sockets[0] = ap_svr->sock.exit_sockets[1] = -1;
ap_svr->sock_m.exit_sockets[0] = ap_svr->sock_m.exit_sockets[1] = -1;
@@ -894,12 +924,20 @@
// if(&esp8089_ap != ap_svr ) wifi_insmod(ap_svr);
ret = ap_svr->drv_proxy.drv_init(&ap_svr->drv_proxy);
- if(-1 == ret)
+ if(-1 == ret) {
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ #endif
return -1;
+ }
wait_bridge();
usleep (200000);
if(0 == startSoftap (ap_svr)){
+ #ifdef USE_CAP_SUPPORT
+ sc_timer_delete(WIFI_AP_ENABLED_TIMER_ID);
+ sc_timer_create(WIFI_AP_ENABLED_TIMER_ID, TIMER_FLAG_ONCE, 60*1000, ap_enabled_cb, NULL);
+ #endif
//usleep (200000);
if(0 == wifi_connect_to_hostapd(&ap_svr->sock)){
g_hostap = 1;
@@ -937,6 +975,9 @@
}else{
wf_log ("hostapd start failed");
wlan_set_state(WLAN_OFF,WLAN_OFF);
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ #endif
}
wf_log ("hostapd start g_wifi_state=%d", ap_svr->ap0_state);
@@ -978,6 +1019,12 @@
return 0;
}
+void *channel_follow_timer_handle(void *arg)
+{
+ ipc_send_message (MODULE_ID_WLAN_SERVER, MODULE_ID_WIFI, MSG_CMD_WIFI_STATION_CONNECTED_ENABLE_AP_CMD, 0, NULL, 0);
+ return NULL;
+}
+
static int wifi_channel_follow(struct wlan_ap_server *ap_svr)
{
char t_channel[NVIO_WIFI_LEN_8] = {0};
@@ -1008,19 +1055,34 @@
if(ap_server->ap0_wps_state == 1){
wf_msg_to_self(MSG_CMD_WIFI_WPS_DOWN, 2, "1");
}
+
+#if defined(__AIC_8800DW_CHIP__)
int ret = -1;
sc_timer_delete(WIFI_CHANNEL_FOLLOW_TIMEOUT_TIMER_ID);
- ret = sc_timer_create(WIFI_CHANNEL_FOLLOW_TIMEOUT_TIMER_ID,TIMER_FLAG_ONCE,10000,apsta_connect_enable_ap,NULL);
+ ret = sc_timer_create(WIFI_CHANNEL_FOLLOW_TIMEOUT_TIMER_ID,
+ TIMER_FLAG_ONCE, 10000, channel_follow_timer_handle, NULL);
if (ret == 0) {
need_channel_follow=1;
wf_log ("add channel follow timer success");
} else {
wf_log ("add channel follow timer failed and enable AP");
+ #ifdef __STA_FUNC__
+ wifi_station_cancel_scan();
+ #endif
ap_docmd("ENABLE", NULL);
sc_cfg_set("tmp_channel", f_channel);
wf_log ("wifi_channel_follow change %s->%s!!", t_channel, f_channel);
}
+#else
+ #ifdef __STA_FUNC__
+ wifi_station_cancel_scan();
+ #endif
+ ap_docmd("ENABLE", NULL);
+
+ sc_cfg_set("tmp_channel", f_channel);
+ wf_log ("wifi_channel_follow change %s->%s!!", t_channel, f_channel);
+#endif
}
return 0;
}
@@ -1183,6 +1245,10 @@
}
else if ((p=strstr (buf, AP_EVENT_ENABLED)) != NULL) {
g_ap_enabled = 1;
+ #ifdef USE_CAP_SUPPORT
+ sc_timer_delete(WIFI_AP_ENABLED_TIMER_ID);
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ENABLED);
+ #endif
}
}
else {
@@ -1867,6 +1933,9 @@
sc_cfg_get ("tmp_channel", t_channel, NVIO_WIFI_LEN_8-1);
sc_cfg_get ("flower_channel", f_channel, NVIO_WIFI_LEN_8-1);
+#ifdef __STA_FUNC__
+ wifi_station_cancel_scan();
+#endif
ap_docmd("ENABLE", NULL);
sc_cfg_set("tmp_channel", f_channel);
wf_log ("wifi_channel_follow change %s->%s!!", t_channel, f_channel);
diff --git a/ap/app/zte_comm/wlan/src/wifi_hal.c b/ap/app/zte_comm/wlan/src/wifi_hal.c
index dc2b515..88eb8c3 100755
--- a/ap/app/zte_comm/wlan/src/wifi_hal.c
+++ b/ap/app/zte_comm/wlan/src/wifi_hal.c
@@ -45,6 +45,10 @@
extern char g_wps_sta_mac[32];//wpsÁ¬½ÓµÄsta mac
+#ifdef USE_CAP_SUPPORT
+extern int send_ap_status_to_cap(int idx, int status);
+#endif
+
static char old_accesspolicy[2] = {0};//¼Ç¼ºÚor°×Ãûµ¥
static CHAR g_old_acl_black_mac[MAX_STA_NUM][13] = {{0}};//ÒÑÉèÖõĺÚÃûµ¥macÁбí
@@ -1939,10 +1943,17 @@
if (wlan_system(WLAN_DEAL, "open_va0") < 0) {
wlan_set_state(WLAN_OFF,WLAN_OFF);
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ #endif
return;
}
wlan_set_state(WLAN_ON,WLAN_OFF);
+#ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ENABLED);
+#endif
+
#ifdef __STA_FUNC__
if (strcmp (wifi_sta_connection, "1") == 0) {
wlan_set_vxd_on();
@@ -1958,10 +1969,16 @@
if (wlan_system(WLAN_DEAL,"open_va0_va1") < 0) {
wlan_set_state(WLAN_OFF,WLAN_OFF);
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ #endif
return;
}
wlan_set_state(WLAN_ON,WLAN_ON);
+#ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ENABLED);
+#endif
// Ö»ÐèÒªÉèÖø±SSIDµÄºÚ°×Ãûµ¥ --- TODO: Ö÷¸±siidµÄºÚ°×Ãûµ¥°´ÀíÓ¦¸Ã·Ö¿ª¹ÜÀí£¬ºóÐøÓÅ»¯
acl_set_mac ("wlan0-va1");
@@ -2795,6 +2812,9 @@
if (! (-1 != ret && WIFEXITED (ret) && 0 == WEXITSTATUS (ret))) {
wlan_set_state(WLAN_OFF,WLAN_OFF);
+ #ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ERROR);
+ #endif
wf_log ("Open Error");
return;
}
@@ -2820,6 +2840,11 @@
}
#endif
#endif
+
+#ifdef USE_CAP_SUPPORT
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_ENABLED);
+#endif
+
wf_log ("Open Success ");
}
void acl_set_process()
diff --git a/ap/app/zte_comm/wlan/src/wlan-station.c b/ap/app/zte_comm/wlan/src/wlan-station.c
index a235195..ad5f986 100755
--- a/ap/app/zte_comm/wlan/src/wlan-station.c
+++ b/ap/app/zte_comm/wlan/src/wlan-station.c
@@ -189,6 +189,12 @@
int g_disable_other_network = 0; //ÊÇ·ñ½ûÓÃÆäËûµÄÈȵã
int g_connecting_time_out_timer = 0;//È«¾Ö¼Ç¼ÊÇ·ñÒÑ´´½¨Á¬½Ó³¬Ê±¶¨Ê±Æ÷
+
+#ifdef USE_CAP_SUPPORT
+int g_cap_scan = 0; //½öcap·¢Æðscanʱ,²ÅÉϱ¨½á¹û,ºǫִ́Ðнá¹û²»±¨
+static int send_sta_status_to_cap(int status, int reason);
+#endif
+
static int wifi_station_connect (int from_where);
static void wifi_station_scan (void);
static void *wifi_station_query_sim_card_status(void *arg);
@@ -2028,6 +2034,11 @@
sc_cfg_set ("EX_WPAPSK1", g_spot_list_p[i]->password);
sc_cfg_set ("EX_WEPKEY", g_spot_list_p[i]->password);
sc_cfg_set ("EX_mac", mac);
+#ifdef USE_CAP_SUPPORT
+ memset(buf, 0, sizeof(buf));
+ snprintf(buf, sizeof(buf), "%d", g_spot_list_p[i]->signal);
+ sc_cfg_set ("EX_signal", buf);
+#endif
break;
}
}
@@ -2220,17 +2231,27 @@
g_wpa_supplicant = 1;
} else {
wlan_station_deinit();
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_NONE);
+ #endif
return;
}
}else {
wf_log ("wpa_supplicant start failed");
wlan_station_deinit();
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_NONE);
+ #endif
return;
}
wifi_station_nv_init();
sta_docmd ("SCAN_INTERVAL 15");
+
+#ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_IDLE, IN_WIFI_REASON_CODE_NONE);
+#endif
//Èç¹ûÓÐEAP-SIMÈȵ㣬ÔòÐèÒªÏÈ×߸òéѯSIM¿¨ÐÅÏ¢Á÷³Ì
@@ -2429,6 +2450,255 @@
}
}
+#ifdef USE_CAP_SUPPORT
+static void cap_update_spot_param(wlan_sta_param_t *param)
+{
+ updateinfo_t info = {0};
+ int spot_num = 0;
+ char spot_tmp[WIFI_STATION_SPOT_LEN] = {0};
+ char wifi_profile_num[WIFI_STATION_PROFILE_NV_NAME_LEN] = {0};
+
+ snprintf(spot_tmp, sizeof(spot_tmp), "123456789123456789,0,0,0,%s,%s,%s,%s,0,0F:00:00:00:00:00",
+ param->ssid, param->authmode, param->encrypt, param->pwd);
+ if (g_wpa_supplicant == 1) {
+ /*request disconnection from the currently connected
+ * network. This will stop any ongoing scans and initiate deauthentication.
+ */
+ sta_docmd("DISCONNECT");
+
+ sc_cfg_get("wifi_profile_num", wifi_profile_num, sizeof(wifi_profile_num));
+ spot_num = atoi(wifi_profile_num);
+ if (spot_num > 0) {
+ strncpy(info.action, "delete", sizeof(info.action)-1);
+ //strncpy(info.spot, wifi_update_profile, sizeof(info.spot)-1);
+ sc_cfg_get("wifi_profile", info.spot, sizeof(info.spot));
+ webui_update_spot_list(&info);
+ //usleep(100);
+ sc_cfg_set("sta_ip_status", "disconnect");
+ }
+
+
+ sc_cfg_set("wifi_profile_num", "1");
+ sc_cfg_set("wifi_profile", spot_tmp);
+ memset(&info, 0, sizeof(info));
+ strncpy(info.action, "add", sizeof(info.action)-1);
+ strncpy(info.spot, spot_tmp, sizeof(info.spot)-1);
+ webui_update_spot_list(&info);
+ }
+ else {
+ //ûÓгõʼ»¯µÄʱºò
+ sc_cfg_set("wifi_profile_num", "1");
+ sc_cfg_set("wifi_profile", spot_tmp);
+ //wpa_suplicantµÄÅäÖÿ´ÊÇ·ñÐèÒª¸Ä£¬Èç¹ûÒѳõʼ»¯ÁË£¬Ó¦¸ÃÒª¸Ä
+ }
+
+}
+
+static void cap_station_enable(wlan_sta_enable_t *sta_ena)
+{
+ if (sta_ena->enable == 1) {
+ if (1 == g_wpa_supplicant) {
+ wf_log("station has opened");
+ return;
+ }
+ //MSG_CMD_WIFI_STATION_OPEN;
+#if defined(__REALTEK_8192_CHIP__) || defined(__AIC_8800DW_CHIP__)
+ wifi_station_open_apsta();
+ //wifi_station_connect(MODULE_ID_WEB_CGI);//´ò¿ªµÄʱºòÒѾÁ¬ÁËÒ»´Î£¬Ã»ÓбØÒªÔÙ´ÎÁ¬½Ó
+#else
+ wf_log("-MSG_CMD_WIFI_STATION_OPEN-");
+ wlan_station_init();
+#endif
+ }
+ else {
+#ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_NONE, IN_WIFI_REASON_CODE_NONE);
+#endif
+ if (0 == g_wpa_supplicant) {
+ wf_log("station has closed");
+ return;
+ }
+ //MSG_CMD_WIFI_STATION_CLOSE;
+ sta_disconnected();
+ wlan_station_deinit();
+#if defined(__REALTEK_8192_CHIP__)|| defined(__AIC_8800DW_CHIP__)
+ basic_deal_all (WIFI_CFG_RESTART_AP);
+#endif
+ }
+
+}
+
+static int send_sta_status_to_cap(int status, int reason)
+{
+ int ret = 0;
+ wlan_sta_status_t sta_stat = {0};
+
+ sta_stat.status = status;
+ //2.4 5G¶ÀÁ¢Íø¿ÚʱÐèÐÞ¸Ä
+ strncpy(sta_stat.ifname, sta_manager->drv_proxy.iface_name, sizeof(sta_stat.ifname) - 1);
+
+ if (sta_stat.status == IN_WIFI_STA_STATUS_CONNECTING
+ || sta_stat.status == IN_WIFI_STA_STATUS_ASSOCIATED
+ || sta_stat.status == IN_WIFI_STA_STATUS_CONNECTED) {
+ char wifi_mac[20] = {0};
+ char wifi_signal[20] = {0};
+ sc_cfg_get("EX_mac", wifi_mac, sizeof(wifi_mac));
+ sc_cfg_get("EX_signal", wifi_signal, sizeof(wifi_signal));
+
+ strncpy(sta_stat.ap_bssid, wifi_mac, sizeof(sta_stat.ap_bssid) - 1);
+ sta_stat.signal_level = atoi(wifi_signal);
+ }
+
+ if (sta_stat.status == IN_WIFI_STA_STATUS_ERROR) {
+ sta_stat.reason_code = reason;
+ }
+
+ if (sta_stat.status == IN_WIFI_STA_STATUS_CONNECTED) {
+ char wbwanv6_enable[20] = {0};
+ char wifiwan_ip[64] = {0};
+ char wifiwan_ipv6[64] = {0};
+ char nv_wifiwan[20] = {0};
+ char nv_wifiwan_ip[32] = {0};
+ char nv_wifiwan_ipv6[32] = {0};
+
+ //wlan
+ sc_cfg_get("wifiwan", nv_wifiwan, sizeof(nv_wifiwan));
+ //ipv4
+ snprintf(nv_wifiwan_ip, sizeof(nv_wifiwan_ip), "%s_ip", nv_wifiwan);
+ sc_cfg_get(nv_wifiwan_ip, wifiwan_ip, sizeof(wifiwan_ip));
+ sta_stat.has_addr = 1;
+ strncpy(sta_stat.str_addr, wifiwan_ip, sizeof(sta_stat.str_addr) - 1);
+
+ //ipv6
+ snprintf(nv_wifiwan_ipv6, sizeof(nv_wifiwan_ipv6), "%s_ipv6_ip", nv_wifiwan);
+ sc_cfg_get(nv_wifiwan_ipv6, wifiwan_ipv6, sizeof(wifiwan_ipv6));
+ sc_cfg_get("wbwanv6_enable", wbwanv6_enable, sizeof(wbwanv6_enable));
+ if (atoi(wbwanv6_enable) == 1) {
+ sta_stat.has_addr6 = 1;
+ strncpy(sta_stat.str_addr6, wifiwan_ipv6, sizeof(sta_stat.str_addr6) - 1);
+ }
+ }
+
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_STA_STATUS, sizeof(sta_stat), &sta_stat);
+ if (ret != 0) {
+ wf_log("send_soc_msg fail, ret:%d\n", ret);
+ }
+
+ return ret;
+}
+
+static void cap_station_scan(void)
+{
+ char wifi_sta_connection[WIFI_CONNECTION_LEN] = {0};
+ char sta_ip_status[WIFI_STATION_IP_STATUS_LEN] = {0};
+
+ sc_cfg_get("wifi_sta_connection", wifi_sta_connection, sizeof (wifi_sta_connection));
+
+ wf_log("cap_station_scan");
+ //¹¦ÄܹرÕÔòÖ±½ÓÍ˳ö
+ if (strcmp(wifi_sta_connection, "1") != 0) {
+ wf_log("station close: %s", wifi_sta_connection);
+ return;
+ }
+
+ //wpa_supplicant½ø³ÌûÆô¶¯ÔòÆô¶¯£¬ÊôÓÚÒì³£±£»¤
+ if (check_supplicant_alive() == 0) {
+ wf_log("wpa supplicant is not running!xx");
+ //Õânv¿ÉÒÔ¿¼ÂÇcap¸´ÓÃ
+ sc_cfg_set("scan_finish", "2"); //Ä¿µÄÊǸæËßwebui£¬´Ëʱµ×²ã³öÎÊÌâÁË
+ return;
+ }
+
+ //ÕýÔÚÁ¬½Ó״̬ÔòÍ˳ö Á¬½ÓʱÄÚ²¿ÓÐɨÃè ½á¹û²»Ò»¶¨ÊÇÉϲãÏëÒªµÄ
+ sc_cfg_get("sta_ip_status", sta_ip_status, sizeof (sta_ip_status));
+ if (strcmp(sta_ip_status, WIFI_STATION_IP_STATUS_CONNECTING) == 0) {
+ wf_log("sta_ip_status=connecting,set scan_finish=2========");
+ //sc_cfg_set ("scan_finish", "2"); //Ä¿µÄÊǸæËßwebui£¬´Ëʱµ×²ãÔÚconnecting
+ //return;
+ }
+
+ if (strcmp (sta_ip_status, WIFI_STATION_IP_STATUS_DHCPING) == 0) {
+ wf_log ("sta_ip_status=dhcping,set scan_finish=2========");
+ //¼ÌÐøÉ¨Ãè¿´¿´
+ //sc_cfg_set ("scan_finish", "2"); //Ä¿µÄÊǸæËßwebui£¬´Ëʱµ×²ãÔÚconnecting
+ //return;
+ }
+
+ //ɨÃè
+ g_cap_scan = 1;
+ wpa_supplicant_scan();
+
+
+}
+
+static int transe_sta_auth_mode(char *authmode)
+{
+ int sc_auth = CAP_WIFI_AUTH_UNSUP;
+
+ if (strcmp(authmode, "OPEN") == 0) {
+ sc_auth = CAP_WIFI_AUTH_OPEN;
+ }
+ else if (strcmp(authmode, "WPA2PSK") == 0) {
+ sc_auth = CAP_WIFI_AUTH_WPA2;
+ }
+ else if (strcmp(authmode, "WPA3Personal") == 0) {
+ sc_auth = CAP_WIFI_AUTH_WPA3;
+ }
+ else if (strcmp(authmode, "WPAPSKWPA2PSK") == 0) {
+ sc_auth = CAP_WIFI_AUTH_WPA12;
+ }
+ else if (strcmp(authmode, "WPA2WPA3") == 0) {
+ sc_auth = CAP_WIFI_AUTH_WPA23;
+ }
+ else {
+ wf_log("unsuport authmode:%s\n", authmode);
+ }
+ return sc_auth;
+}
+
+//ÅÅÐòÁË È¡ÐźźõÄǰ30
+static int send_scan_result_to_cap(void)
+{
+ wlan_sta_scan_list_t scan_list = {0};
+ int ret = 0;
+
+ int i = 0;
+ for (i = 0; i < WIFI_STATION_SCAN_RESULT_LIST_NUM && i < CAP_WIFI_MAX_SCAN_CNT; i++) {
+ if (g_scan_result_list_p[i] == NULL) {
+ break;
+ }
+
+ scan_list.info[i].auth = transe_sta_auth_mode(g_scan_result_list_p[i]->auth_mode);
+ scan_list.info[i].channel = g_scan_result_list_p[i]->channel;
+ scan_list.info[i].signal_level = g_scan_result_list_p[i]->signal;
+ strncpy(scan_list.info[i].essid, g_scan_result_list_p[i]->ssid, sizeof(scan_list.info[i].essid)-1);
+ strncpy(scan_list.info[i].bssid, g_scan_result_list_p[i]->mac, sizeof(scan_list.info[i].bssid)-1);
+ scan_list.cnt++;
+ }
+ //Ŀǰ30¸ö,¶àÁ˺˼äat´«²»¹ýÈ¡,×î´ó´«3500/2B,Òòhex2str
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_STA_SCAN_RES, sizeof(scan_list), &scan_list);
+ if (ret != 0) {
+ wf_log("send_soc_msg fail, ret:%d\n", ret);
+ }
+
+ return ret;
+}
+
+static void scan_result_to_cap(void)
+{
+ int ret = 0;
+
+ if (g_cap_scan == 1) {
+ ret = send_scan_result_to_cap();
+ if (ret == 0) {
+ g_cap_scan = 0;
+ }
+ }
+
+}
+
+#endif
+
//wifi station´¦Àíº¯Êý
int wlan_sta_parse_msg (MSG_BUF *pMsg)
{
@@ -2480,6 +2750,9 @@
}
case MSG_CMD_WIFI_STATION_GET_SCAN_RESULTS: {
wifi_station_get_scan_results();
+#ifdef USE_CAP_SUPPORT
+ scan_result_to_cap();
+#endif
break;
}
case MSG_CMD_WIFI_STATION_SIM_INIT_TIMER_PROCESS: {
@@ -2490,6 +2763,9 @@
wf_log ("[wifi event connected , goto dhcp]");
sc_cfg_set ("sta_ip_status", "dhcping");
do_dhcp();
+#ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ASSOCIATED, IN_WIFI_REASON_CODE_NONE);
+#endif
break;
}
case MSG_CMD_WIFI_STATION_EVENT_DISCONNECTED: {
@@ -2498,6 +2774,9 @@
if (strcmp (sta_ip_status, "connect") == 0 || strcmp (sta_ip_status, "dhcping") == 0) {
sta_disconnected();
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_IDLE, IN_WIFI_REASON_CODE_NONE);
+ #endif
}
else{
wf_log ("The Spot connect failed, just set sta_ip_status disconnect");
@@ -2507,6 +2786,9 @@
}
case MSG_CMD_WIFI_STATION_EVENT_CONNECTING: {
sc_cfg_set("sta_ip_status", WIFI_STATION_IP_STATUS_CONNECTING);
+#ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_CONNECTING, IN_WIFI_REASON_CODE_NONE);
+#endif
break;
}
@@ -2546,6 +2828,9 @@
if (strcmp (sta_ip_status, WIFI_STATION_IP_STATUS_DHCPING) == 0) {
wf_log ("[wlan-station] wlan0-vxd get ip success");
sta_connected();
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_CONNECTED, IN_WIFI_REASON_CODE_NONE);
+ #endif
}
else{
wf_log (" DO not deal , sta_ip_status=%s", sta_ip_status);
@@ -2556,6 +2841,9 @@
case MSG_CMD_NET_WAN_DIAL_FAIL: {
wf_log ("wlan0-vxd dhcp ip failed");
ipfail_disconnect_ap();
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_DHCP_FAILED);
+ #endif
break;
}
case MSG_CMD_CARD_MODE_RSP: {
@@ -2610,10 +2898,28 @@
// sta_docmd ("ENABLE_NETWORK all");// the connecting status will be set by assocating event, if no assoc , just be disconnect
// g_disable_other_network = 0;
//}
+ #ifdef USE_CAP_SUPPORT
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_SET_FAILED);
+ #endif
}
break;
}
+#ifdef USE_CAP_SUPPORT
+ case MSG_CMD_CAP_STA_SET_PARAM: {
+ cap_update_spot_param((wlan_sta_param_t *)(pMsg->aucDataBuf));
+ break;
+ }
+ case MSG_CMD_CAP_STA_ENABLE: {
+ //ûÓе¥¶À¿ª¹ØstaµÄ¹¦ÄÜ,ÏÈÊÊÅä³Éap´æÔÚµÄÇé¿öÏ¿ª¹Østa
+ cap_station_enable((wlan_sta_enable_t *)(pMsg->aucDataBuf));
+ break;
+ }
+ case MSG_CMD_CAP_STA_SCAN: {
+ cap_station_scan();
+ break;
+ }
+#endif
default: {
ret = -1;
break;
@@ -2754,8 +3060,8 @@
static void process_tmp_disabled (char *buf)
{
char *p_WRONG_KEY = NULL;
-// char *p_AUTH_FAILED = NULL;
-// char *p_CONN_FAILED = NULL;
+ char *p_AUTH_FAILED = NULL;
+ char *p_CONN_FAILED = NULL;
char wifi_profile_num[8] = {0};
char cmd[WIFI_STATION_CMD_LEN] = {0};
int network_id = -1;
@@ -2763,9 +3069,10 @@
sc_cfg_get ("wifi_profile_num", wifi_profile_num, sizeof (wifi_profile_num));
p_WRONG_KEY = strstr (buf, "WRONG_KEY");
-// p_AUTH_FAILED = strstr(buf, "AUTH_FAILED");
-// p_CONN_FAILED = strstr(buf, "CONN_FAILED");
-
+#ifdef USE_CAP_SUPPORT
+ p_AUTH_FAILED = strstr(buf, "AUTH_FAILED");
+ p_CONN_FAILED = strstr(buf, "CONN_FAILED");
+#endif
/*
¿ÉÒÔÓиüÓÅ»¯µÄËã·¨£¬Ìá¸ßÁ´½ÓЧÂÊ
*/
@@ -2789,6 +3096,18 @@
sta_docmd ("SAVE_CONFIG");
}
}
+
+#ifdef USE_CAP_SUPPORT
+ if (p_WRONG_KEY) {
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_WRONG_KEY);
+ }
+ else if (p_AUTH_FAILED) {
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_AUTH_FAILED);
+ }
+ else if (p_CONN_FAILED) {
+ send_sta_status_to_cap(IN_WIFI_STA_STATUS_ERROR, IN_WIFI_REASON_CODE_CONN_FAILED);
+ }
+#endif
}
@@ -2834,6 +3153,9 @@
ipc_send_message (MODULE_ID_WIFI, MODULE_ID_WIFI, MSG_CMD_WIFI_STATION_NO_AVAILABLE_AP, 0, NULL, 0);
scan_times = 0;
}
+ #ifdef USE_CAP_SUPPORT
+ ipc_send_message (MODULE_ID_WIFI, MODULE_ID_WIFI, MSG_CMD_WIFI_STATION_GET_SCAN_RESULTS, 0, NULL, 0);
+ #endif
}
}
//STA: CTRL-EVENT-CONNECTED - Connection to a6:44:d1:86:c5:d9 completed [id=0 id_str=]
@@ -2870,7 +3192,7 @@
scan_times = 0; // when begin to assoc , it indicate there is available AP, so set it 0
// CTRL-EVENT-SSID-REENABLED maybe lost
ipc_send_message (MODULE_ID_WIFI, MODULE_ID_WIFI, MSG_CMD_WIFI_STATION_EVENT_CONNECTING, 0, NULL, 0);
- process_trying_to_assoc (buf);
+ process_trying_to_assoc (buf); //·Åipc_send_messageÇ°Ãæ
}
//SME: Trying to authenticate with 90:1d:27:78:2c:1e (SSID='Ufi_782111' freq=2412 MHz)
else if (strstr (buf, "Trying to authenticate with")) {
@@ -2904,6 +3226,11 @@
return NULL;
}
+void wifi_station_cancel_scan(void)
+{
+ sta_docmd("ABORT_SCAN"); //cancel current scan, and remove scan works
+ sta_docmd("SCAN_INTERVAL 15"); //eloop scan timer reset
+}
void wlan_station_open()
{
diff --git a/ap/app/zte_comm/wlan/src/wlan_config_ssid.c b/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
index 355a0b7..8a45aed 100755
--- a/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
+++ b/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
@@ -277,6 +277,8 @@
}
#ifdef __AP_FUNC__
#ifdef __USE_AES__
+ //efuse changed...
+ wifi_aes_init_key();
wifi_encrypt_code();
#endif
#endif
diff --git a/ap/app/zte_comm/wlan/src/wlan_main.c b/ap/app/zte_comm/wlan/src/wlan_main.c
index 8aadff9..77fcf48 100755
--- a/ap/app/zte_comm/wlan/src/wlan_main.c
+++ b/ap/app/zte_comm/wlan/src/wlan_main.c
@@ -33,7 +33,11 @@
#define CHARGER "/sys/class/power_supply/charger/status"
#define WIFI_DIR "/etc_rw/wifi"
-
+#ifdef USE_CAP_SUPPORT
+#define FROM_CAP 0
+int send_ap_status_to_cap(int idx, int status);
+int send_sta_change_to_cap(int idx, int status, char *mac);
+#endif
/*************************±äÁ¿ÉùÃ÷**************************************/
static int g_pre_is_charging = 0;
@@ -57,6 +61,7 @@
extern int wifi_app_msg_parse(const char *msg, int msglen, struct hotplug_event *event);
void check_wifi_mac();
+
#ifdef __AP_FUNC__
extern struct wlan_ap_server esp8089_ap;
extern struct wlan_ap_server rda5995_ap;
@@ -92,6 +97,7 @@
/*************************¾²Ì¬º¯ÊýÉùÃ÷***********************************/
static int chargingcheckstates();
+static int cap_check_wifi(void);
static void sleep_wifi();
void basic_deal_all (int cmd);
extern void zte_get_wifi_sta_list(RT_802_11_MAC_TABLE *staList);
@@ -763,6 +769,62 @@
free_dhcp_list(&dhcp_info_list);
}
+
+#ifdef USE_CAP_SUPPORT
+static void chekc_sta_change(int idx, char *check_list, char *mac_list, int status)
+{
+ char tmp_string[32*18] = {0};
+
+ char *splited_string = NULL;
+ char *save = NULL;
+ const char *delimiter = ";";
+
+ if (strlen(check_list) == 0) {
+ wf_log("not need ckeck list");
+ return;
+ }
+
+ strncpy(tmp_string, check_list, sizeof(tmp_string)-1);
+ //·Ö¸î×Ö·û´®£¬´æ´¢µ½½á¹¹Ìå
+ splited_string = strtok_r(tmp_string, delimiter, &save);
+ while (splited_string) {
+ if (strlen(splited_string) == strlen("FF:FF:FF:FF:FF:FF")
+ && NULL == strstr(mac_list, splited_string)) {
+ send_sta_change_to_cap(idx, status, splited_string);
+ wf_log("connect_status[%d]: %d, %s", idx, status, splited_string);
+ }
+
+ splited_string = strtok_r(NULL, delimiter, &save);
+ }
+
+}
+
+static void sta_change_to_cap()
+{
+ RT_802_11_MAC_TABLE staList = {0};
+ char sta_mac_new[32*18] = {0};
+ char sta_mac_old[32*18] = {0};
+
+ //Èç¹û¸±ssidÒ²Òª,»»nv·Ö±ðȡֵ,zte_get_wifi_sta_listÄÚ²¿¸ÄÔìÏÂ,»òÕßÐÂÔöÒ»¸öcapרÓú¯Êý
+ sc_cfg_get("station_mac", sta_mac_old, sizeof(sta_mac_old));
+ zte_get_wifi_sta_list(&staList);
+
+ sc_cfg_get("station_mac", sta_mac_new, sizeof(sta_mac_new));
+
+ wf_log("staList old:%s", sta_mac_old);
+ wf_log("staList new:%s", sta_mac_new);
+
+ //if (va0) station_mac0
+ //old²»ÔÚnewÖÐ ¶Ï¿ª
+ chekc_sta_change(IN_WIFI_AP_INDEX_AP0, sta_mac_old, sta_mac_new, 0);
+ //new²»ÔÚoldÖÐ ½ÓÈë
+ chekc_sta_change(IN_WIFI_AP_INDEX_AP0, sta_mac_new, sta_mac_old, 1);
+
+ //if (va1) station_mac1
+
+}
+#endif
+
#endif
@@ -786,6 +848,403 @@
wf_log ("usb charging is %s", g_pre_is_charging ? "YES" : "NO");
}
+#ifdef USE_CAP_SUPPORT
+//wifi ap status
+int send_ap_status_to_cap(int idx, int status)
+{
+ wlan_ap_status_t w_stat = {0};
+ int ret = 0;
+
+ if (idx <= IN_WIFI_AP_INDEX_MIN || idx >= IN_WIFI_AP_INDEX_MAX) {
+ wf_log("idx:%d not support\n", idx);
+ return -1;
+ }
+
+ w_stat.idx = idx;
+ w_stat.status = status;
+
+ if (idx == IN_WIFI_AP_INDEX_AP0) {
+#if defined(__REALTEK_8192_CHIP__)
+ snprintf(w_stat.ifname, sizeof(w_stat.ifname), "%s", "wlan0-va0");
+#else
+ snprintf(w_stat.ifname, sizeof(w_stat.ifname), "%s", ap_server->drv_proxy.iface_name);
+#endif
+ }
+ else {
+ wf_log("idx:%d not support\n", idx);
+ return -1;
+
+ }
+
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_AP_STATUS, sizeof(w_stat), &w_stat);
+ if (ret != 0) {
+ wf_log("send_soc_msg fail, ret:%d\n", ret);
+ }
+ return ret;
+}
+
+//wifi ap access sta connect or disconnect status
+int send_sta_change_to_cap(int idx, int status, char *mac)
+{
+ wlan_sta_connect_status_t w_stat = {0};
+ int ret = 0;
+
+ if (idx <= IN_WIFI_AP_INDEX_MIN || idx >= IN_WIFI_AP_INDEX_MAX) {
+ wf_log("idx:%d not support\n", idx);
+ return -1;
+ }
+
+ w_stat.idx = idx;
+ w_stat.is_connected = status;
+ snprintf(w_stat.macaddr, sizeof(w_stat.macaddr), "%s", mac);
+
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_AP_STA_CHANGE, sizeof(w_stat), &w_stat);
+ if (ret != 0) {
+ wf_log("send_soc_msg fail, ret:%d\n", ret);
+ }
+ return ret;
+}
+
+static int cap_check_wifi(void)
+{
+ char wifi_mac[20] = {0};
+ char wifi_chip[20] = {0};
+ int ret = 0;
+ wlan_status_t w_stat = {0};
+#if 0 //wifi_chip==0, return
+ sc_cfg_get("wifi_chip", wifi_chip, sizeof(wifi_chip));
+ if (strcmp(wifi_chip, "0") == 0){
+ wf_log ("wifi dev init fail!");
+ w_stat.wifi_status = IN_WIFI_STATUS_DEV_INIT_FAIL;
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_WIFI_STATUS, sizeof(w_stat), &w_stat);
+ if (ret != 0) {
+ wf_log("cap_check_wifi chip ipc_send_message fail, ret:%d\n", ret);
+ }
+ return -1;
+ }
+#endif
+
+ sc_cfg_get("wifi_mac", wifi_mac, sizeof(wifi_mac));
+ if(strlen(wifi_mac) == 0){
+ wf_log ("wifi mac invalid!");
+ w_stat.wifi_status = IN_WIFI_STATUS_INVALID_MAC;
+ ret = send_soc_msg(FAR_PS, MODULE_ID_WIFI, MSG_CMD_CAP_WIFI_STATUS, sizeof(w_stat), &w_stat);
+ if (ret != 0) {
+ wf_log("cap_check_wifi mac ipc_send_message fail, ret:%d\n", ret);
+ }
+ return -1;
+ }
+
+ return 0;
+}
+
+//ÄÚ²¿ÓÐÖØÈë±£»¤
+static void cap_wifi_enable(MSG_BUF *pstMsg)
+{
+ ap_server->drv_proxy.drv_init(&ap_server->drv_proxy);
+}
+
+static void cap_wifi_disable(MSG_BUF *pstMsg)
+{
+ ap_server->drv_proxy.drv_deinit(&ap_server->drv_proxy);
+}
+
+static void cap_wifi_mode_set(MSG_BUF *pstMsg)
+{
+ ;
+}
+
+static void cap_ssid_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_ssid_t *data_buf = (wlan_ap_ssid_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ char psk[100]={0}, psk_encode[100]={0}, psk_aes[200]={0};
+ sc_cfg_get("WPAPSK1", psk, sizeof(psk));
+ sc_cfg_get("WPAPSK1_encode", psk_encode, sizeof(psk_encode));
+ sc_cfg_get("WPAPSK1_aes", psk_aes, sizeof(psk_aes));
+ wf_log("cap_ssid_set1 WPAPSK1 : %s WPAPSK1_encode : %s WPAPSK1_sae : %s\n", psk, psk_encode, psk_aes);
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ if(strlen(data_buf->ssid) > 0 && strlen(data_buf->ssid) < WIFI_SSID_LEN) {
+ sc_cfg_set("SSID1", data_buf->ssid); //ke fang cap
+ if (ap_server->ap0_state) {
+ unsigned int wifi_set_flags = ZTE_WLAN_SSID_SET|ZTE_WLAN_BASIC_SECURITY_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_AP);//MSG_CMD_WIFI_CFG_AP
+ }
+ wf_log("ap0_state: %d, ssid: %s", ap_server->ap0_state, data_buf->ssid);
+ }
+ break;
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ wf_log("not support: %d", idx);
+ break;
+ }
+
+}
+
+static void cap_hidessid_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_ssid_hide_t *data_buf = (wlan_ap_ssid_hide_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->ssid_hide);
+ sc_cfg_set("HideSSID", hide_str);
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_BROADCAST_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_AP);//MSG_CMD_WIFI_CFG_AP
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_wirelessmode_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_wl_mode_t *data_buf = (wlan_ap_wl_mode_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->wl_mode);
+ sc_cfg_set("WirelessMode", hide_str);
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_WIRELESS_MODE_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_RF);//MSG_CMD_WIFI_ADVANCED-WIFI_ADVANCED_RF
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_bandwidth_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_bandwidth_t *data_buf = (wlan_ap_bandwidth_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->htMode);
+ sc_cfg_set("wifi_11n_cap", hide_str);
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_WIRELESS_MODE_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_RF);//MSG_CMD_WIFI_ADVANCED-WIFI_ADVANCED_RF
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_country_channel_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_cc_ch_t *data_buf = (wlan_ap_cc_ch_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ sc_cfg_set("CountryCode", data_buf->countrycode);
+
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->channel);
+ sc_cfg_set("Channel", hide_str);
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_CHANNEL_SET | ZTE_WLAN_COUNTRY_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_RF);//MSG_CMD_WIFI_ADVANCED-WIFI_ADVANCED_RF
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+//×î´ó½ÓÈëÊý
+static void cap_max_sta_num_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_max_sta_t *data_buf = (wlan_ap_max_sta_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->max_sta_num);
+ sc_cfg_set("MAX_Access_num", hide_str);
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_MAX_ACCESS_NUM_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_AP);//MSG_CMD_WIFI_CFG_AP
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_acl_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_acl_t *data_buf = (wlan_ap_acl_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char hide_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(hide_str, sizeof(hide_str), "%d", data_buf->acl_rule);
+ sc_cfg_set("ACL_mode", hide_str);
+
+ if (data_buf->acl_rule == 1) {
+ sc_cfg_set("wifi_mac_white_list", data_buf->acl_list);
+ }
+ else if (data_buf->acl_rule == 2) {
+ sc_cfg_set("wifi_mac_black_list", data_buf->acl_list);
+ }
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_ACL_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ set_mac_access();//MSG_CMD_WIFI_MAC
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_auth_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_auth_t *data_buf = (wlan_ap_auth_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ {
+ char *encode = NULL;
+ sc_cfg_set("AuthMode", data_buf->authmode);
+ sc_cfg_set("EncrypType", data_buf->encrypt);
+ sc_cfg_set("WPAPSK1", data_buf->pwd);
+
+ encode = wlan_base64_encode(data_buf->pwd, strlen(data_buf->pwd));
+ sc_cfg_set("WPAPSK1_encode", encode);
+ free(encode);
+
+ //WPAPSK1_enaes
+#ifdef __USE_AES__
+ //efuse changed...
+ wifi_aes_init_key();
+ wifi_encrypt_code();
+#endif
+
+ if (ap_server->ap0_state) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ unsigned int wifi_set_flags = ZTE_WLAN_BASIC_SECURITY_SET;
+ char wifi_set_flags_str[NVIO_WIFI_LEN_32] = {0};
+ snprintf(wifi_set_flags_str, sizeof(wifi_set_flags_str), "%u", wifi_set_flags);
+ sc_cfg_set("wifi_set_flags", wifi_set_flags_str);
+ basic_deal_all(WIFI_CFG_AP);//MSG_CMD_WIFI_CFG_AP
+ }
+ break;
+ }
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+static void cap_enable_set(MSG_BUF *pstMsg)
+{
+ wlan_ap_enable_t *data_buf = (wlan_ap_enable_t *)pstMsg->aucDataBuf;
+ int idx = data_buf->idx;
+
+ switch(idx) {
+ case IN_WIFI_AP_INDEX_AP0:
+ if (data_buf->enable) {//jia yi ge nv ,zai cap sc_wifi_ap_start hou,zhi xing zhe xie
+ wf_log("cap open wifi");
+ if (!ap_server->ap0_state) {
+ char m_ssid_enable[8] = {0};
+
+ send_ap_status_to_cap(idx, IN_WIFI_AP_STATUS_ENABLING);
+
+
+ sc_cfg_get ("m_ssid_enable", m_ssid_enable, sizeof (m_ssid_enable));
+ if (1 == atoi (m_ssid_enable)) {
+ basic_deal_all(WIFI_CFG_OPEN_VA0_VA1);
+ } else {
+ basic_deal_all(WIFI_CFG_OPEN);
+ }
+ }
+ }
+ else {
+ wf_log("cap close wifi");
+ if (ap_server->ap0_state) {
+ send_ap_status_to_cap(idx, IN_WIFI_AP_STATUS_DISABLING);
+ basic_deal_all(WIFI_CFG_CLOSE);
+ send_ap_status_to_cap(idx, IN_WIFI_AP_STATUS_IDLE);
+ }
+ }
+ break;
+ //case SC_WIFI_AP_INDEX_AP1: ...
+ default:
+ break;
+ }
+
+}
+
+#endif
+
void wlan_ap_msg_handle (MSG_BUF *pMsg)
{
char wifi_cur_state[8] = {0};
@@ -885,10 +1344,18 @@
#endif
case MSG_CMD_AP_STA_CONNECTED:
add_sta_mac(pMsg->aucDataBuf);
+#ifdef USE_CAP_SUPPORT
+ //Èç¹û¸±ssidÒ²Òª,¸±ssidµÄMSG_CMD_AP_STA_CONNECTED»»Ò»¸öÏûÏ¢Ãû
+ send_sta_change_to_cap(IN_WIFI_AP_INDEX_AP0, 1, pMsg->aucDataBuf);
+#endif
break;
case MSG_CMD_AP_STA_DISCONNECTED:
remove_sta_mac(pMsg->aucDataBuf);
//wlan_prepare_sleep();
+#ifdef USE_CAP_SUPPORT
+ //Èç¹û¸±ssidÒ²Òª,¸±ssidµÄMSG_CMD_AP_STA_CONNECTED»»Ò»¸öÏûÏ¢Ãû
+ send_sta_change_to_cap(IN_WIFI_AP_INDEX_AP0, 0, pMsg->aucDataBuf);
+#endif
break;
/*¹Ì¶¨Ì¨ÏûÏ¢´¦Àí½áÊø*/
@@ -928,6 +1395,9 @@
case MSG_CMD_STA_COUNT_CHANGE:
#ifdef __REALTEK_8192_CHIP__
captureWlanStaInfo();
+#ifdef USE_CAP_SUPPORT
+ sta_change_to_cap();
+#endif
#endif
wf_msg_to_mmi(MSG_CMD_STA_COUNT_CHANGE, 0, NULL);
wlan_prepare_sleep();
@@ -938,6 +1408,46 @@
case MSG_CMD_WIFI_STATION_CONNECTED_ENABLE_AP_CMD:
basic_deal_all (WIFI_CFG_APSTA_OPEN_AP);
break;
+#ifdef USE_CAP_SUPPORT
+ case MSG_CMD_CAP_WIFI_ENABLE:
+ cap_wifi_enable(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_DISABLE:
+ cap_wifi_disable(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_WORK_MODE:
+ //to do, when enable, send mode to cap
+ //cap_wifi_mode_set
+ break;
+
+ case MSG_CMD_CAP_WIFI_SET_SSID:
+ cap_ssid_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_HIDESSID:
+ cap_hidessid_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_MODE:
+ cap_wirelessmode_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_BANDWIDTH:
+ cap_bandwidth_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_CC_CH:
+ cap_country_channel_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_MAXSTANUM:
+ cap_max_sta_num_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_ACL:
+ cap_acl_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_SET_AUTH:
+ cap_auth_set(pMsg);
+ break;
+ case MSG_CMD_CAP_WIFI_AP_ENABLE:
+ cap_enable_set(pMsg);
+ break;
+#endif
default:
break;
}
@@ -1052,6 +1562,24 @@
CASE_RETURN_STR (MSG_CMD_AP_STA_DISCONNECTED);
CASE_RETURN_STR (MSG_CMD_WIFI_STATION_CONNECTED_ENABLE_AP_CMD);
+ //cap
+ //sat
+ CASE_RETURN_STR (MSG_CMD_CAP_STA_SET_PARAM);
+ CASE_RETURN_STR (MSG_CMD_CAP_STA_ENABLE);
+ CASE_RETURN_STR (MSG_CMD_CAP_STA_SCAN);
+ //ap
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_ENABLE);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_DISABLE);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_WORK_MODE);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_SSID);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_HIDESSID);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_MODE);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_BANDWIDTH);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_MAXSTANUM);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_CC_CH);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_ACL);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_SET_AUTH);
+ CASE_RETURN_STR (MSG_CMD_CAP_WIFI_AP_ENABLE);
};
return "UNKNOWN CMD ID";
@@ -1071,6 +1599,9 @@
CASE_RETURN_STR (MODULE_ID_WPA_SUPPLICANT); //0x102D
CASE_RETURN_STR (MODULE_ID_ZCORE); //0x2003
CASE_RETURN_STR (MODULE_ID_MMI_SVR); //0x2003
+ #ifdef USE_CAP_SUPPORT
+ CASE_RETURN_STR (FROM_CAP);
+ #endif
}
return "UNKNOWN Module ID";
}
@@ -1095,6 +1626,13 @@
return -1;
}
+#ifdef USE_CAP_SUPPORT
+ if (cap_check_wifi() != 0) {
+ wf_log ("wifi dev init fail or mac invalid!");
+ return -1;
+ }
+#else
+
#if (PRODUCT_TYPE == PRODUCT_PHONE)//kw3
if(pMsg->usMsgCmd != MSG_CMD_WIFI_RESET_TIMER &&
pMsg->usMsgCmd != MSG_CMD_USB_CHARGING_CHANGED &&
@@ -1104,7 +1642,7 @@
if(pMsg->usMsgCmd != MSG_CMD_WIFI_RESET_TIMER &&
pMsg->usMsgCmd != MSG_CMD_USB_CHARGING_CHANGED)
check_wifi_mac();
-
+#endif
#endif
#ifdef __STA_FUNC__
@@ -1118,6 +1656,7 @@
wlan_ap_msg_handle (pMsg);
#endif
+#ifndef USE_CAP_SUPPORT
if(pMsg->usMsgCmd != MSG_CMD_WIFI_RESET_TIMER &&
pMsg->usMsgCmd != MSG_CMD_USB_CHARGING_CHANGED &&
pMsg->usMsgCmd != MSG_CMD_AP_STA_CONNECTED &&
@@ -1137,6 +1676,8 @@
pMsg->usMsgCmd != MSG_CMD_BLC_CLOSE_WIFISTATION_ACCESS &&
pMsg->usMsgCmd != MSG_CMD_BLC_OPEN_WIFISTATION_ACCESS)
sc_cfg_save();
+#endif
+
return 0;
}
@@ -1199,7 +1740,7 @@
int i = 0;
sc_cfg_get("wifi_mac", wifi_mac, sizeof(wifi_mac));
-
+
if(strlen(wifi_mac)==0){
for(i=0; i < 50; i++){
wf_log ("############################################################");
@@ -1248,6 +1789,10 @@
sc_cfg_set ("wifiEnabled", "0");
#endif
+#ifdef USE_CAP_SUPPORT
+ sc_cfg_set ("wifiEnabled", "0");
+#endif
+
ensure_config_dir_exist(WIFI_DIR);
}
@@ -1332,7 +1877,10 @@
if (check_wlan() == -1) {
wf_log (" wlan0 interface is not exist ,please contact wlan driver engineer");
sc_cfg_set("wifi_chip", "0");
+ #if !(defined(USE_CAP_SUPPORT))
sc_cfg_save();
+ #endif
+
return -1;
}
@@ -1363,9 +1911,15 @@
#endif
}
else{
+ wf_log ("wifiEnabled is close");
+#if defined( __RDA_5995_CHIP__)
wf_log ("rda5995 to rmmod");
-#if defined( __RDA_5995_CHIP__)
sta_manager->drv_proxy.drv_deinit(&sta_manager->drv_proxy);
+#endif
+#if defined(USE_CAP_SUPPORT)
+ wf_log ("has cap to rmmod");
+ sta_manager->drv_proxy.drv_deinit(&sta_manager->drv_proxy);
+ ap_server->drv_proxy.drv_deinit(&ap_server->drv_proxy);
#endif
}
diff --git a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
index 02a0902..0dc3aef 100755
--- a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
+++ b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
@@ -470,8 +470,8 @@
{
char buf[1024] = {0};
int buf_len;
- int MinRtrAdvInterval = DEFAULT_MINRTRADVINTERVAL;
- int MaxRtrAdvInterval = DEFAULT_MAXRTRADVINTERVAL;
+ int MinRtrAdvInterval;
+ int MaxRtrAdvInterval;
char nv[16] = {0};
if (path == NULL || info == NULL){
@@ -484,6 +484,9 @@
if(MaxRtrAdvInterval > 1800)
MaxRtrAdvInterval = 1800;
MinRtrAdvInterval = 0.75 * MaxRtrAdvInterval;
+ } else {
+ MinRtrAdvInterval = DEFAULT_MINRTRADVINTERVAL;
+ MaxRtrAdvInterval = DEFAULT_MAXRTRADVINTERVAL;
}
if((M_O_flag & IPV6_RA_FLAG_MANAGED) || (M_O_flag & IPV6_RA_FLAG_PD)){
buf_len = snprintf(buf, sizeof(buf), g_radvd_state_conf, info->interface);
@@ -613,7 +616,7 @@
pclose(fpv4);
if(fpv6 != NULL)
pclose(fpv6);
-#ifdef USE_CAP_SUPPORT
+#if 0
{
char nv_name[16] = {0};
char ps_ext[16] = {0};
@@ -1016,7 +1019,7 @@
}
}
zte_unpn_set();
- net_sendmsg_2_atctl(actinfo->c_id, actinfo->act_info.ip46flag, MSG_CMD_LINKUP_END);
+ net_sendmsg_2_atctl(actinfo->c_id, actinfo->act_info.ip46flag, MSG_CMD_LINKUP_END);
}
}
@@ -1099,13 +1102,14 @@
snprintf(cmd, sizeof(cmd), "ip route del default dev %s table %d", wan_name, rt_num);
system_cmd_ex(cmd);
if(strcmp(default_wan_name, wan_name) == 0){
- net_write_file("/proc/sys/net/ipv4/ip_forward", "0", 1);
- snprintf(cmd, sizeof(cmd),"route del default dev %s", wan_name);
- system_cmd_ex(cmd);
#ifdef USE_CAP_SUPPORT
snprintf(cmd, sizeof(cmd), "iptables -t nat -D POSTROUTING -o %s -j MASQUERADE", wan_name);
system_cmd_ex(cmd);
+#else
+ net_write_file("/proc/sys/net/ipv4/ip_forward", "0", 1);
#endif
+ snprintf(cmd, sizeof(cmd),"route del default dev %s", wan_name);
+ system_cmd_ex(cmd);
sc_cfg_set("wan_ipaddr", "");
sc_cfg_set("default_cid", "");
sc_cfg_set("default_wan_name", "");
@@ -1130,8 +1134,10 @@
char br_ip6[IPV6ADDLEN_MAX] = {0};
sc_cfg_get("ipv6_br0_addr", br_ip6, sizeof(br_ip6));
+#ifndef USE_CAP_SUPPORT
net_write_file("/proc/sys/net/ipv6/conf/all/forwarding", "0", 1);
net_write_file("/proc/sys/net/ipv6/conf/all/proxy_ndp", "0", 1);
+#endif
system_cmd_ex("ip -6 route del default");
snprintf(cmd, sizeof(cmd),"ip -6 addr del %s/64 dev br0", br_ip6);
system_cmd_ex(cmd);
diff --git a/ap/app/zte_cpe/Makefile b/ap/app/zte_cpe/Makefile
index 816aaf8..55b1777 100755
--- a/ap/app/zte_cpe/Makefile
+++ b/ap/app/zte_cpe/Makefile
@@ -75,13 +75,16 @@
ifeq ($(WLAN_STA_FUNC),yes)
CFLAGS += -D__STA_FUNC__
-CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.6/wpa_supplicant
+CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common
+LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant
endif
+
ifeq ($(WLAN_AP_FUNC),yes)
CFLAGS += -D__AP_FUNC__
-CFLAGS += -I$(zte_app_path)/hostapd-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.6/hostapd
+ifneq ($(WLAN_STA_FUNC),yes)
+CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common
+LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd
+endif
endif
OBJS += ../zte_comm/wlan/src/wlan_main.o ../zte_comm/wlan/src/wifi_socket.o ../zte_comm/wlan/src/wlan_rtc_sleep.o ../zte_comm/wlan/src/wifi_drv_ko.o \
diff --git a/ap/app/zte_mdl/Makefile b/ap/app/zte_mdl/Makefile
index 9d99db3..00654ef 100755
--- a/ap/app/zte_mdl/Makefile
+++ b/ap/app/zte_mdl/Makefile
@@ -25,6 +25,127 @@
OBJS += ../zte_comm/nvserver/nvserver.o ../zte_comm/nvserver/nvupdate.o
endif
+ifeq ($(USE_VEHICLE_DC_REF),yes)
+#wifi
+ifeq ($(CONFIG_WIFI_MODULE),realtek)
+CFLAGS += -D__REALTEK_8192_CHIP__
+ifeq ($(CONFIG_WIFI_RTL_WPA2),yes)
+tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/auth ../zte_comm/wlan/realtek_tools_wpa2/mini_upnp ../zte_comm/wlan/realtek_tools_wpa2/utility
+tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/wsc ../zte_comm/wlan/realtek_tools_wpa2/wireless_tools.25
+else
+tools_dir += ../zte_comm/wlan/realtek_tools/auth ../zte_comm/wlan/realtek_tools/mini_upnp ../zte_comm/wlan/realtek_tools/utility
+tools_dir += ../zte_comm/wlan/realtek_tools/wsc ../zte_comm/wlan/realtek_tools/wireless_tools.25
+endif
+else ifeq ($(CONFIG_WIFI_MODULE),rda5995)
+CFLAGS += -D__RDA_5995_CHIP__
+tools_dir += ../zte_comm/wlan/rda_tools
+else ifeq ($(CONFIG_WIFI_MODULE),esp8089)
+CFLAGS += -D__ESP_8089_CHIP__
+tools_dir += ../zte_comm/wlan/esp_tools/eagle_test ../zte_comm/wlan/esp_tools/fcctest
+else ifeq ($(CONFIG_WIFI_MODULE),xr819)
+CFLAGS += -D__XR_819_CHIP__
+#tools_dir +=
+else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x)
+CFLAGS += -D__SSV_6X5X_CHIP__
+#tools_dir +=
+else ifeq ($(CONFIG_WIFI_MODULE),aic8800)
+CFLAGS += -D__AIC_8800DW_CHIP__
+tools_dir += ../zte_comm/wlan/aic_tools/rftest
+ifeq ($(CONFIG_WIFI_SINGLEAP), no)
+CFLAGS += -D__MULTI_AP__
+endif
+endif
+
+$(warning CONFIG_WIFI_FUNCTION=$(CONFIG_WIFI_FUNCTION))
+
+ifeq ($(findstring sta,$(CONFIG_WIFI_FUNCTION)), sta)
+WLAN_STA_FUNC=yes
+endif
+
+ifeq ($(findstring ap,$(CONFIG_WIFI_FUNCTION)), ap)
+WLAN_AP_FUNC=yes
+endif
+
+CFLAGS += -D__QRCODE_WIFI__
+CFLAGS += -D__USE_AES__
+
+ifeq ($(WLAN_STA_FUNC),yes)
+CFLAGS += -D__STA_FUNC__
+CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common
+LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant
+endif
+
+ifeq ($(WLAN_AP_FUNC),yes)
+CFLAGS += -D__AP_FUNC__
+ifneq ($(WLAN_STA_FUNC),yes)
+CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common
+LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd
+endif
+endif
+
+OBJS += ../zte_comm/wlan/src/wlan_main.o ../zte_comm/wlan/src/wifi_socket.o ../zte_comm/wlan/src/wlan_rtc_sleep.o ../zte_comm/wlan/src/wifi_drv_ko.o \
+ ../zte_comm/wlan/src/wifi_sta_ctrl.o ../zte_comm/wlan/src/wifi_util.o ../zte_comm/wlan/src/wlan_config_ssid.o ../zte_comm/wlan/src/wlan_netlink.o ../zte_comm/wlan/src/Vector.o
+ifeq ($(CONFIG_WIFI_MODULE),realtek)
+OBJS += ../zte_comm/wlan/src/wifi_hal.o
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan-station.o
+ endif
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+else ifeq ($(CONFIG_WIFI_MODULE),rda5995)
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
+ endif
+
+ ifeq ($(WLAN_AP_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+ endif
+else ifeq ($(CONFIG_WIFI_MODULE),esp8089)
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
+ endif
+
+ ifeq ($(WLAN_AP_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+ endif
+else ifeq ($(CONFIG_WIFI_MODULE),xr819)
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
+ endif
+
+ ifeq ($(WLAN_AP_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+ endif
+else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x)
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan-station.o
+ endif
+
+ ifeq ($(WLAN_AP_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+ endif
+else ifeq ($(CONFIG_WIFI_MODULE),aic8800)
+ ifeq ($(WLAN_STA_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wlan-station.o
+ endif
+
+ ifeq ($(WLAN_AP_FUNC),yes)
+ OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
+LDLIBS += -lwlan_interface
+LDLIBS += -L$(zte_lib_path)/libwlan_interface
+ endif
+endif
+CFLAGS += -I../zte_comm/wlan/inc
+endif
+
OBJS1 = ../zte_comm/rtc-service/zte-rtc-clock.o
OBJS2 = ../zte_comm/zte_mainctrl/router_msg_proxy.o
#aes
@@ -74,7 +195,7 @@
CFLAGS += -I$(zte_lib_path)/libzte_dmapp/inc
ifeq ($(USE_FOTA_AB),yes)
-CFLAGS += -I$(LIB_DIR)/libupi_ab/inc
+CFLAGS += -I$(LIB_DIR)/libflags
endif
#*******************************************************************************
@@ -115,13 +236,15 @@
LDLIBS1 += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
ifeq ($(USE_FOTA_AB),yes)
-LDLIBS += -lupi_ab -L$(LIB_DIR)/libupi_ab
-LDLIBS += -lcrypto -L$(LIB_DIR)/libssl/install/lib
+LDLIBS += -lflags -L$(zte_lib_path)/libflags
endif
##############USER COMIZE END##################
all: $(EXEC) $(EXEC1) $(EXEC2)
+ifneq ($(tools_dir), )
+ for i in $(tools_dir) ; do $(MAKE) -C $$i || exit $?; done
+endif
(cd ../zte_comm/fota_dm/gs_lib;rm libdmgr.so;ln -s libdmgr.so.1 libdmgr.so; cd ../../../zte_comm)
$(EXEC): $(OBJS)
@@ -141,6 +264,9 @@
$(ROMFSINST) /sbin/$(EXEC1)
$(ROMFSINST) /sbin/$(EXEC2)
$(ROMFSINST) $(LIBSHARE_GS) /lib/
+ifneq ($(tools_dir), )
+ for i in $(tools_dir) ; do $(MAKE) -C $$i romfs || exit $?; done
+endif
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
@@ -148,5 +274,8 @@
-rm -f $(EXEC2) *.elf *.gdb *.o
-find ../zte_comm/ -name \*.o -exec rm -rf {} \;
-find . -name \*.o -exec rm -rf {} \;
+ifneq ($(tools_dir), )
+ for i in $(tools_dir) ; do $(MAKE) -C $$i clean || exit $?; done
+endif
diff --git a/ap/app/zte_mdl/zte_mdl.c b/ap/app/zte_mdl/zte_mdl.c
index 2beb93f..1142fb0 100755
--- a/ap/app/zte_mdl/zte_mdl.c
+++ b/ap/app/zte_mdl/zte_mdl.c
@@ -86,6 +86,11 @@
sntp_main(0,NULL);
return;
}
+void wlan_entry(char *arg)
+{
+ wlan_main(0,NULL);
+ return;
+}
void fota_dm_entry(char *arg)
{
fota_dm_main(0,NULL);
@@ -122,6 +127,12 @@
pthread_create(&zte_mainctrl_thread_tid, NULL, (void *)zte_mainctrl_entry, NULL);
#endif
+#ifdef _USE_VEHICLE_DC_REF
+ /* wifi_manager */
+ pthread_t wlan_thread_tid;
+ pthread_create(&wlan_thread_tid, NULL, (void *)wlan_entry, NULL);
+#endif
+
/* zte_audio_res_ctrl */
pthread_t zte_audio_res_ctrl_thread_tid;
pthread_create(&zte_audio_res_ctrl_thread_tid, NULL, (void *)zte_audio_res_ctrl_entry, NULL);
diff --git a/ap/app/zte_mdl/zte_mdl.h b/ap/app/zte_mdl/zte_mdl.h
index db52330..6357432 100755
--- a/ap/app/zte_mdl/zte_mdl.h
+++ b/ap/app/zte_mdl/zte_mdl.h
@@ -43,6 +43,7 @@
int zte_drv_serial_ctrl_main();
int zte_drv_usb_ctrl_main(int argc, char* argv[]);
int sntp_main(int argc, char * argv[]);
+int wlan_main (int argc, char *argv[]);
int fota_dm_main(int argc, char**argv);
#endif
diff --git a/ap/app/zte_mifi/Makefile b/ap/app/zte_mifi/Makefile
index ae69812..1d7011b 100755
--- a/ap/app/zte_mifi/Makefile
+++ b/ap/app/zte_mifi/Makefile
@@ -84,24 +84,15 @@
ifeq ($(WLAN_STA_FUNC),yes)
CFLAGS += -D__STA_FUNC__
-ifneq ($(WLAN_AP_FUNC),yes)
-ifeq ($(CONFIG_WIFI_MODULE),aic8800)
CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common
LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant
-else
-CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.6/wpa_supplicant
endif
-endif
-endif
+
ifeq ($(WLAN_AP_FUNC),yes)
CFLAGS += -D__AP_FUNC__
-ifeq ($(CONFIG_WIFI_MODULE),aic8800)
+ifneq ($(WLAN_STA_FUNC),yes)
CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common
LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd
-else
-CFLAGS += -I$(zte_app_path)/hostapd-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.6/hostapd
endif
endif
diff --git a/ap/app/zte_ufi/Makefile b/ap/app/zte_ufi/Makefile
index 81bce27..f159123 100755
--- a/ap/app/zte_ufi/Makefile
+++ b/ap/app/zte_ufi/Makefile
@@ -84,24 +84,15 @@
ifeq ($(WLAN_STA_FUNC),yes)
CFLAGS += -D__STA_FUNC__
-ifneq ($(WLAN_AP_FUNC),yes)
-ifeq ($(CONFIG_WIFI_MODULE),aic8800)
CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common
LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant
-else
-CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.6/wpa_supplicant
endif
-endif
-endif
+
ifeq ($(WLAN_AP_FUNC),yes)
CFLAGS += -D__AP_FUNC__
-ifeq ($(CONFIG_WIFI_MODULE),aic8800)
+ifneq ($(WLAN_STA_FUNC),yes)
CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common
LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd
-else
-CFLAGS += -I$(zte_app_path)/hostapd-2.6/src/common
-LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.6/hostapd
endif
endif