[Feature][ZXW-241]merge P56U01 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/ap/app/Script/scripts/internet.sh b/ap/app/Script/scripts/internet.sh
index 0726956..71bb90c 100755
--- a/ap/app/Script/scripts/internet.sh
+++ b/ap/app/Script/scripts/internet.sh
@@ -96,6 +96,11 @@
echo "Info: set nofast_port: $nofast_port" >> $test_log
echo $nofast_port > /proc/net/nofast_port
+#½«ÊÇ·ñ¸ù¾ÝRA±¨ÎÄÅäÖÃÍø¿ÚµÄmtu´«¸øÄÚºË
+ra_mtu_enable=`nv get ra_mtu_enable`
+echo "Info: set ra_mtu_enable£º$ra_mtu_enable" >> $test_log
+echo $ra_mtu_enable > /sys/module/psnet_io/parameters/ra_mtu_enable
+
#SKB debug¿ª¹Ø
skb_debug=`nv get skb_debug`
echo "Info: set skb_debug: $skb_debug" >> $test_log
diff --git a/ap/app/Script/scripts/psext_up.sh b/ap/app/Script/scripts/psext_up.sh
index c67e4fe..580ce71 100755
--- a/ap/app/Script/scripts/psext_up.sh
+++ b/ap/app/Script/scripts/psext_up.sh
@@ -88,8 +88,11 @@
fi
}
-mtu=`nv get mtu`
-ifconfig $ps_if mtu $mtu
+ra_mtu_enable=`nv get ra_mtu_enable`
+if [ "$ra_mtu_enable" != "1" ]; then
+ mtu=`nv get mtu`
+ ifconfig $ps_if mtu $mtu
+fi
brctl addbr $ext_br
brctl setfd $ext_br 0.1
brctl addif $ext_br $eth_if
diff --git a/ap/app/Script/scripts/psext_up_ipv6.sh b/ap/app/Script/scripts/psext_up_ipv6.sh
index 5861350..bea9640 100755
--- a/ap/app/Script/scripts/psext_up_ipv6.sh
+++ b/ap/app/Script/scripts/psext_up_ipv6.sh
@@ -120,8 +120,11 @@
fi
}
-mtu=`nv get mtu`
-ifconfig $ps_if mtu $mtu
+ra_mtu_enable=`nv get ra_mtu_enable`
+if [ "$ra_mtu_enable" != "1" ]; then
+ mtu=`nv get mtu`
+ ifconfig $ps_if mtu $mtu
+fi
linkup_get_addr
linkup_route_set
linkup_dhcpv6_set
diff --git a/ap/app/Script/scripts/psext_updown.sh b/ap/app/Script/scripts/psext_updown.sh
index 56f4103..9f74350 100755
--- a/ap/app/Script/scripts/psext_updown.sh
+++ b/ap/app/Script/scripts/psext_updown.sh
@@ -438,8 +438,11 @@
}
if [ "-$1" == "-linkup" ]; then
- mtu=`nv get mtu`
- ifconfig $ps_if mtu $mtu
+ ra_mtu_enable=`nv get ra_mtu_enable`
+ if [ "$ra_mtu_enable" != "1" ]; then
+ mtu=`nv get mtu`
+ ifconfig $ps_if mtu $mtu
+ fi
if [ "-$ps_ext_mode" == "-1" ]; then
brctl addbr $ext_br
brctl setfd $ext_br 0.1
diff --git a/ap/app/Script/scripts/psext_updown_ipv6.sh b/ap/app/Script/scripts/psext_updown_ipv6.sh
index 81be275..83d471c 100755
--- a/ap/app/Script/scripts/psext_updown_ipv6.sh
+++ b/ap/app/Script/scripts/psext_updown_ipv6.sh
@@ -422,8 +422,11 @@
}
if [ "$1" == "linkup" ]; then
- mtu=`nv get mtu`
- ifconfig $ps_if mtu $mtu
+ ra_mtu_enable=`nv get ra_mtu_enable`
+ if [ "$ra_mtu_enable" != "1" ]; then
+ mtu=`nv get mtu`
+ ifconfig $ps_if mtu $mtu
+ fi
if [ "-$ps_ext_mode" == "-1" ]; then
linkup_get_addr
linkup_route_set
diff --git a/ap/app/Script/scripts/wan_ipv4.sh b/ap/app/Script/scripts/wan_ipv4.sh
index 687e65a..e4463a2 100755
--- a/ap/app/Script/scripts/wan_ipv4.sh
+++ b/ap/app/Script/scripts/wan_ipv4.sh
@@ -24,8 +24,11 @@
wan_if=$wifiwan_if ;;
esac
- mtu=`nv get mtu`
- ifconfig $wan_if mtu $mtu
+ ra_mtu_enable=`nv get ra_mtu_enable`
+ if ["$ra_mtu_enable" != "1" -o $1 != "pswan"]; then
+ mtu=`nv get mtu`
+ ifconfig $wan_if mtu $mtu
+ fi
}
#ÉèÖù¤×÷״̬ ÕýÔÚÁ¬½Ó£ºconnect ÒÑÁ¬½Ó£ºworking ÒѶϿª£ºdead
state_set()
@@ -116,11 +119,13 @@
pswan_secdns=`nv get $wan_if"_secdns"`
pswan_nm=`nv get $wan_if"_nm"`
+#xf.li@20240306 modify for [Bugfix][T106BUG-469]Fix the bug of probability datacall fail start
# #ifconfig $wan_if down 2>>$test_log
# ifconfig $wan_if $pswan_ip netmask 255.255.255.0 up 2>>$test_log
# if [ $? -ne 0 ];then
# echo "Error: ifconfig $wan_if $pswan_ip up failed." >> $test_log
# fi
+#xf.li@20240306 modify for [Bugfix][T106BUG-469]Fix the bug of probability datacall fail end
pswan_pri=`nv get pswan_priority`
rt_num=`expr $pswan_pri \* 10 + $c_id`
diff --git a/ap/app/Script/scripts/wan_ipv6.sh b/ap/app/Script/scripts/wan_ipv6.sh
index e1e60d1..3fdcf43 100755
--- a/ap/app/Script/scripts/wan_ipv6.sh
+++ b/ap/app/Script/scripts/wan_ipv6.sh
@@ -41,8 +41,12 @@
"wifiwan")
wan_if=$wifiwan_if ;;
esac
- mtu=`nv get mtu`
- ifconfig $wan_if mtu $mtu
+
+ ra_mtu_enable=`nv get ra_mtu_enable`
+ if ["$ra_mtu_enable" != "1" -o $1 != "pswan"]; then
+ mtu=`nv get mtu`
+ ifconfig $wan_if mtu $mtu
+ fi
#ÐèÒªÓõ½Ïà¹ØÅäÖÃÎļþ
dhcp6s_conf=$path_conf/dhcp6s_$wan_if.conf
diff --git a/ap/app/busybox/src/editors/Config.src b/ap/app/busybox/src/editors/Config.src
old mode 100644
new mode 100755
index af1e1de..53f2838
--- a/ap/app/busybox/src/editors/Config.src
+++ b/ap/app/busybox/src/editors/Config.src
@@ -22,6 +22,13 @@
Enable math functions of the Awk programming language.
NOTE: This will require libm to be present for linking.
+config FEATURE_AWK_GNU_EXTENSIONS
+ bool "Enable a few GNU extensions"
+ default y
+ depends on AWK
+ help
+ Enable a few features from gawk:
+
config CMP
bool "cmp"
default y
diff --git a/ap/app/busybox/src/editors/awk.c b/ap/app/busybox/src/editors/awk.c
old mode 100644
new mode 100755
index 3224788..3d446ae
--- a/ap/app/busybox/src/editors/awk.c
+++ b/ap/app/busybox/src/editors/awk.c
@@ -13,6 +13,9 @@
//usage: " -v VAR=VAL Set variable"
//usage: "\n -F SEP Use SEP as field separator"
//usage: "\n -f FILE Read program from FILE"
+//usage: IF_FEATURE_AWK_GNU_EXTENSIONS(
+//usage: "\n -e AWK_PROGRAM"
+//usage: )
#include "libbb.h"
#include "xregex.h"
@@ -35,12 +38,33 @@
#endif
#ifndef debug_printf_parse
# define debug_printf_parse(...) (fprintf(stderr, __VA_ARGS__))
+#else
+# define debug_parse_print_tc(...) ((void)0)
#endif
+/* "+": stop on first non-option:
+ * $ awk 'BEGIN { for(i=1; i<ARGC; ++i) { print i ": " ARGV[i] }}' -argz
+ * 1: -argz
+ */
+#define OPTSTR_AWK "+" \
+ "F:v:*f:*" \
+ IF_FEATURE_AWK_GNU_EXTENSIONS("e:*") \
+ "W:"
+enum {
+ OPTBIT_F, /* define field separator */
+ OPTBIT_v, /* define variable */
+ OPTBIT_f, /* pull in awk program from file */
+ IF_FEATURE_AWK_GNU_EXTENSIONS(OPTBIT_e,) /* -e AWK_PROGRAM */
+ OPTBIT_W, /* -W ignored */
+ OPT_F = 1 << OPTBIT_F,
+ OPT_v = 1 << OPTBIT_v,
+ OPT_f = 1 << OPTBIT_f,
+ OPT_e = IF_FEATURE_AWK_GNU_EXTENSIONS((1 << OPTBIT_e)) + 0,
+ OPT_W = 1 << OPTBIT_W
+};
#define MAXVARFMT 240
-#define MINNVBLOCK 64
/* variable flags */
#define VF_NUMBER 0x0001 /* 1 = primary type is number */
@@ -50,7 +74,7 @@
#define VF_USER 0x0200 /* 1 = user input (may be numeric string) */
#define VF_SPECIAL 0x0400 /* 1 = requires extra handling when changed */
#define VF_WALK 0x0800 /* 1 = variable has alloc'd x.walker list */
-#define VF_FSTR 0x1000 /* 1 = var::string points to fstring buffer */
+#define VF_FSTR 0x1000 /* 1 = don't free() var::string (not malloced, or is owned by something else) */
#define VF_CHILD 0x2000 /* 1 = function arg; x.parent points to source */
#define VF_DIRTY 0x4000 /* 1 = variable was set explicitly */
@@ -67,8 +91,8 @@
/* Variable */
typedef struct var_s {
unsigned type; /* flags */
- double number;
char *string;
+ double number;
union {
int aidx; /* func arg idx (for compilation stage) */
struct xhash_s *array; /* array ptr */
@@ -87,6 +111,7 @@
/* Function */
typedef struct func_s {
unsigned nargs;
+ smallint defined;
struct chain_s body;
} func;
@@ -126,7 +151,7 @@
struct node_s *n;
var *v;
int aidx;
- char *new_progname;
+ const char *new_progname;
regex_t *re;
} l;
union {
@@ -139,95 +164,135 @@
} a;
} node;
-/* Block of temporary variables */
-typedef struct nvblock_s {
- int size;
- var *pos;
- struct nvblock_s *prev;
- struct nvblock_s *next;
- var nv[];
-} nvblock;
-
typedef struct tsplitter_s {
node n;
regex_t re[2];
} tsplitter;
/* simple token classes */
-/* Order and hex values are very important!!! See next_token() */
-#define TC_SEQSTART 1 /* ( */
-#define TC_SEQTERM (1 << 1) /* ) */
-#define TC_REGEXP (1 << 2) /* /.../ */
-#define TC_OUTRDR (1 << 3) /* | > >> */
-#define TC_UOPPOST (1 << 4) /* unary postfix operator */
-#define TC_UOPPRE1 (1 << 5) /* unary prefix operator */
-#define TC_BINOPX (1 << 6) /* two-opnd operator */
-#define TC_IN (1 << 7)
-#define TC_COMMA (1 << 8)
-#define TC_PIPE (1 << 9) /* input redirection pipe */
-#define TC_UOPPRE2 (1 << 10) /* unary prefix operator */
-#define TC_ARRTERM (1 << 11) /* ] */
-#define TC_GRPSTART (1 << 12) /* { */
-#define TC_GRPTERM (1 << 13) /* } */
-#define TC_SEMICOL (1 << 14)
-#define TC_NEWLINE (1 << 15)
-#define TC_STATX (1 << 16) /* ctl statement (for, next...) */
-#define TC_WHILE (1 << 17)
-#define TC_ELSE (1 << 18)
-#define TC_BUILTIN (1 << 19)
-#define TC_GETLINE (1 << 20)
-#define TC_FUNCDECL (1 << 21) /* `function' `func' */
-#define TC_BEGIN (1 << 22)
-#define TC_END (1 << 23)
-#define TC_EOF (1 << 24)
-#define TC_VARIABLE (1 << 25)
-#define TC_ARRAY (1 << 26)
-#define TC_FUNCTION (1 << 27)
-#define TC_STRING (1 << 28)
-#define TC_NUMBER (1 << 29)
+/* order and hex values are very important!!! See next_token() */
+#define TC_LPAREN (1 << 0) /* ( */
+#define TC_RPAREN (1 << 1) /* ) */
+#define TC_REGEXP (1 << 2) /* /.../ */
+#define TC_OUTRDR (1 << 3) /* | > >> */
+#define TC_UOPPOST (1 << 4) /* unary postfix operator ++ -- */
+#define TC_UOPPRE1 (1 << 5) /* unary prefix operator ++ -- $ */
+#define TC_BINOPX (1 << 6) /* two-opnd operator */
+#define TC_IN (1 << 7) /* 'in' */
+#define TC_COMMA (1 << 8) /* , */
+#define TC_PIPE (1 << 9) /* input redirection pipe | */
+#define TC_UOPPRE2 (1 << 10) /* unary prefix operator + - ! */
+#define TC_ARRTERM (1 << 11) /* ] */
+#define TC_LBRACE (1 << 12) /* { */
+#define TC_RBRACE (1 << 13) /* } */
+#define TC_SEMICOL (1 << 14) /* ; */
+#define TC_NEWLINE (1 << 15)
+#define TC_STATX (1 << 16) /* ctl statement (for, next...) */
+#define TC_WHILE (1 << 17) /* 'while' */
+#define TC_ELSE (1 << 18) /* 'else' */
+#define TC_BUILTIN (1 << 19)
+/* This costs ~50 bytes of code.
+ * A separate class to support deprecated "length" form. If we don't need that
+ * (i.e. if we demand that only "length()" with () is valid), then TC_LENGTH
+ * can be merged with TC_BUILTIN:
+ */
+#define TC_LENGTH (1 << 20) /* 'length' */
+#define TC_GETLINE (1 << 21) /* 'getline' */
+#define TC_FUNCDECL (1 << 22) /* 'function' 'func' */
+#define TC_BEGIN (1 << 23) /* 'BEGIN' */
+#define TC_END (1 << 24) /* 'END' */
+#define TC_EOF (1 << 25)
+#define TC_VARIABLE (1 << 26) /* name */
+#define TC_ARRAY (1 << 27) /* name[ */
+#define TC_FUNCTION (1 << 28) /* name( */
+#define TC_STRING (1 << 29) /* "..." */
+#define TC_NUMBER (1 << 30)
-#define TC_UOPPRE (TC_UOPPRE1 | TC_UOPPRE2)
+#ifndef debug_parse_print_tc
+static void debug_parse_print_tc(uint32_t n)
+{
+ if (n & TC_LPAREN ) debug_printf_parse(" LPAREN" );
+ if (n & TC_RPAREN ) debug_printf_parse(" RPAREN" );
+ if (n & TC_REGEXP ) debug_printf_parse(" REGEXP" );
+ if (n & TC_OUTRDR ) debug_printf_parse(" OUTRDR" );
+ if (n & TC_UOPPOST ) debug_printf_parse(" UOPPOST" );
+ if (n & TC_UOPPRE1 ) debug_printf_parse(" UOPPRE1" );
+ if (n & TC_BINOPX ) debug_printf_parse(" BINOPX" );
+ if (n & TC_IN ) debug_printf_parse(" IN" );
+ if (n & TC_COMMA ) debug_printf_parse(" COMMA" );
+ if (n & TC_PIPE ) debug_printf_parse(" PIPE" );
+ if (n & TC_UOPPRE2 ) debug_printf_parse(" UOPPRE2" );
+ if (n & TC_ARRTERM ) debug_printf_parse(" ARRTERM" );
+ if (n & TC_LBRACE ) debug_printf_parse(" LBRACE" );
+ if (n & TC_RBRACE ) debug_printf_parse(" RBRACE" );
+ if (n & TC_SEMICOL ) debug_printf_parse(" SEMICOL" );
+ if (n & TC_NEWLINE ) debug_printf_parse(" NEWLINE" );
+ if (n & TC_STATX ) debug_printf_parse(" STATX" );
+ if (n & TC_WHILE ) debug_printf_parse(" WHILE" );
+ if (n & TC_ELSE ) debug_printf_parse(" ELSE" );
+ if (n & TC_BUILTIN ) debug_printf_parse(" BUILTIN" );
+ if (n & TC_LENGTH ) debug_printf_parse(" LENGTH" );
+ if (n & TC_GETLINE ) debug_printf_parse(" GETLINE" );
+ if (n & TC_FUNCDECL) debug_printf_parse(" FUNCDECL");
+ if (n & TC_BEGIN ) debug_printf_parse(" BEGIN" );
+ if (n & TC_END ) debug_printf_parse(" END" );
+ if (n & TC_EOF ) debug_printf_parse(" EOF" );
+ if (n & TC_VARIABLE) debug_printf_parse(" VARIABLE");
+ if (n & TC_ARRAY ) debug_printf_parse(" ARRAY" );
+ if (n & TC_FUNCTION) debug_printf_parse(" FUNCTION");
+ if (n & TC_STRING ) debug_printf_parse(" STRING" );
+ if (n & TC_NUMBER ) debug_printf_parse(" NUMBER" );
+}
+#endif
-/* combined token classes */
-#define TC_BINOP (TC_BINOPX | TC_COMMA | TC_PIPE | TC_IN)
-#define TC_UNARYOP (TC_UOPPRE | TC_UOPPOST)
-#define TC_OPERAND (TC_VARIABLE | TC_ARRAY | TC_FUNCTION \
- | TC_BUILTIN | TC_GETLINE | TC_SEQSTART | TC_STRING | TC_NUMBER)
+/* combined token classes ("token [class] sets") */
+#define TS_UOPPRE (TC_UOPPRE1 | TC_UOPPRE2)
-#define TC_STATEMNT (TC_STATX | TC_WHILE)
-#define TC_OPTERM (TC_SEMICOL | TC_NEWLINE)
+#define TS_BINOP (TC_BINOPX | TC_COMMA | TC_PIPE | TC_IN)
+//#define TS_UNARYOP (TS_UOPPRE | TC_UOPPOST)
+#define TS_OPERAND (TC_VARIABLE | TC_ARRAY | TC_FUNCTION \
+ | TC_BUILTIN | TC_LENGTH | TC_GETLINE \
+ | TC_LPAREN | TC_STRING | TC_NUMBER)
+
+#define TS_LVALUE (TC_VARIABLE | TC_ARRAY)
+#define TS_STATEMNT (TC_STATX | TC_WHILE)
/* word tokens, cannot mean something else if not expected */
-#define TC_WORD (TC_IN | TC_STATEMNT | TC_ELSE | TC_BUILTIN \
- | TC_GETLINE | TC_FUNCDECL | TC_BEGIN | TC_END)
+#define TS_WORD (TC_IN | TS_STATEMNT | TC_ELSE \
+ | TC_BUILTIN | TC_LENGTH | TC_GETLINE \
+ | TC_FUNCDECL | TC_BEGIN | TC_END)
/* discard newlines after these */
-#define TC_NOTERM (TC_COMMA | TC_GRPSTART | TC_GRPTERM \
- | TC_BINOP | TC_OPTERM)
+#define TS_NOTERM (TS_BINOP | TC_COMMA | TC_LBRACE | TC_RBRACE \
+ | TC_SEMICOL | TC_NEWLINE)
/* what can expression begin with */
-#define TC_OPSEQ (TC_OPERAND | TC_UOPPRE | TC_REGEXP)
+#define TS_OPSEQ (TS_OPERAND | TS_UOPPRE | TC_REGEXP)
/* what can group begin with */
-#define TC_GRPSEQ (TC_OPSEQ | TC_OPTERM | TC_STATEMNT | TC_GRPSTART)
+#define TS_GRPSEQ (TS_OPSEQ | TS_STATEMNT \
+ | TC_SEMICOL | TC_NEWLINE | TC_LBRACE)
-/* if previous token class is CONCAT1 and next is CONCAT2, concatenation */
+/* if previous token class is CONCAT_L and next is CONCAT_R, concatenation */
/* operator is inserted between them */
-#define TC_CONCAT1 (TC_VARIABLE | TC_ARRTERM | TC_SEQTERM \
- | TC_STRING | TC_NUMBER | TC_UOPPOST)
-#define TC_CONCAT2 (TC_OPERAND | TC_UOPPRE)
+#define TS_CONCAT_L (TC_VARIABLE | TC_ARRTERM | TC_RPAREN \
+ | TC_STRING | TC_NUMBER | TC_UOPPOST \
+ | TC_LENGTH)
+#define TS_CONCAT_R (TS_OPERAND | TS_UOPPRE)
-#define OF_RES1 0x010000
-#define OF_RES2 0x020000
-#define OF_STR1 0x040000
-#define OF_STR2 0x080000
-#define OF_NUM1 0x100000
-#define OF_CHECKED 0x200000
+#define OF_RES1 0x010000
+#define OF_RES2 0x020000
+#define OF_STR1 0x040000
+#define OF_STR2 0x080000
+#define OF_NUM1 0x100000
+#define OF_CHECKED 0x200000
+#define OF_REQUIRED 0x400000
/* combined operator flags */
#define xx 0
#define xV OF_RES2
#define xS (OF_RES2 | OF_STR2)
#define Vx OF_RES1
+#define Rx OF_REQUIRED
#define VV (OF_RES1 | OF_RES2)
#define Nx (OF_RES1 | OF_NUM1)
#define NV (OF_RES1 | OF_NUM1 | OF_RES2)
@@ -239,8 +304,7 @@
#define OPNMASK 0x007F
/* operator priority is a highest byte (even: r->l, odd: l->r grouping)
- * For builtins it has different meaning: n n s3 s2 s1 v3 v2 v1,
- * n - min. number of args, vN - resolve Nth arg to var, sN - resolve to string
+ * (for builtins it has different meaning)
*/
#undef P
#undef PRIMASK
@@ -250,10 +314,8 @@
#define PRIMASK2 0x7E000000
/* Operation classes */
-
#define SHIFT_TIL_THIS 0x0600
#define RECUR_FROM_THIS 0x1000
-
enum {
OC_DELETE = 0x0100, OC_EXEC = 0x0200, OC_NEWSOURCE = 0x0300,
OC_PRINT = 0x0400, OC_PRINTF = 0x0500, OC_WALKINIT = 0x0600,
@@ -294,71 +356,78 @@
#define NTC "\377" /* switch to next token class (tc<<1) */
#define NTCC '\377'
-#define OC_B OC_BUILTIN
-
static const char tokenlist[] ALIGN1 =
- "\1(" NTC
- "\1)" NTC
- "\1/" NTC /* REGEXP */
- "\2>>" "\1>" "\1|" NTC /* OUTRDR */
- "\2++" "\2--" NTC /* UOPPOST */
- "\2++" "\2--" "\1$" NTC /* UOPPRE1 */
- "\2==" "\1=" "\2+=" "\2-=" /* BINOPX */
+ "\1(" NTC /* TC_LPAREN */
+ "\1)" NTC /* TC_RPAREN */
+ "\1/" NTC /* TC_REGEXP */
+ "\2>>" "\1>" "\1|" NTC /* TC_OUTRDR */
+ "\2++" "\2--" NTC /* TC_UOPPOST */
+ "\2++" "\2--" "\1$" NTC /* TC_UOPPRE1 */
+ "\2==" "\1=" "\2+=" "\2-=" /* TC_BINOPX */
"\2*=" "\2/=" "\2%=" "\2^="
"\1+" "\1-" "\3**=" "\2**"
"\1/" "\1%" "\1^" "\1*"
"\2!=" "\2>=" "\2<=" "\1>"
"\1<" "\2!~" "\1~" "\2&&"
"\2||" "\1?" "\1:" NTC
- "\2in" NTC
- "\1," NTC
- "\1|" NTC
- "\1+" "\1-" "\1!" NTC /* UOPPRE2 */
- "\1]" NTC
- "\1{" NTC
- "\1}" NTC
- "\1;" NTC
- "\1\n" NTC
- "\2if" "\2do" "\3for" "\5break" /* STATX */
+ "\2in" NTC /* TC_IN */
+ "\1," NTC /* TC_COMMA */
+ "\1|" NTC /* TC_PIPE */
+ "\1+" "\1-" "\1!" NTC /* TC_UOPPRE2 */
+ "\1]" NTC /* TC_ARRTERM */
+ "\1{" NTC /* TC_LBRACE */
+ "\1}" NTC /* TC_RBRACE */
+ "\1;" NTC /* TC_SEMICOL */
+ "\1\n" NTC /* TC_NEWLINE */
+ "\2if" "\2do" "\3for" "\5break" /* TC_STATX */
"\10continue" "\6delete" "\5print"
"\6printf" "\4next" "\10nextfile"
"\6return" "\4exit" NTC
- "\5while" NTC
- "\4else" NTC
-
- "\3and" "\5compl" "\6lshift" "\2or"
+ "\5while" NTC /* TC_WHILE */
+ "\4else" NTC /* TC_ELSE */
+ "\3and" "\5compl" "\6lshift" "\2or" /* TC_BUILTIN */
"\6rshift" "\3xor"
- "\5close" "\6system" "\6fflush" "\5atan2" /* BUILTIN */
+ "\5close" "\6system" "\6fflush" "\5atan2"
"\3cos" "\3exp" "\3int" "\3log"
"\4rand" "\3sin" "\4sqrt" "\5srand"
- "\6gensub" "\4gsub" "\5index" "\6length"
+ "\6gensub" "\4gsub" "\5index" /* "\6length" was here */
"\5match" "\5split" "\7sprintf" "\3sub"
"\6substr" "\7systime" "\10strftime" "\6mktime"
"\7tolower" "\7toupper" NTC
- "\7getline" NTC
- "\4func" "\10function" NTC
- "\5BEGIN" NTC
- "\3END"
+ "\6length" NTC /* TC_LENGTH */
+ "\7getline" NTC /* TC_GETLINE */
+ "\4func" "\10function" NTC /* TC_FUNCDECL */
+ "\5BEGIN" NTC /* TC_BEGIN */
+ "\3END" /* TC_END */
/* compiler adds trailing "\0" */
;
-static const uint32_t tokeninfo[] = {
+static const uint32_t tokeninfo[] ALIGN4 = {
0,
0,
- OC_REGEXP,
+#define TI_REGEXP OC_REGEXP
+ TI_REGEXP,
xS|'a', xS|'w', xS|'|',
OC_UNARY|xV|P(9)|'p', OC_UNARY|xV|P(9)|'m',
- OC_UNARY|xV|P(9)|'P', OC_UNARY|xV|P(9)|'M', OC_FIELD|xV|P(5),
+#define TI_PREINC (OC_UNARY|xV|P(9)|'P')
+#define TI_PREDEC (OC_UNARY|xV|P(9)|'M')
+ TI_PREINC, TI_PREDEC, OC_FIELD|xV|P(5),
OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(74), OC_REPLACE|NV|P(74)|'+', OC_REPLACE|NV|P(74)|'-',
OC_REPLACE|NV|P(74)|'*', OC_REPLACE|NV|P(74)|'/', OC_REPLACE|NV|P(74)|'%', OC_REPLACE|NV|P(74)|'&',
OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(74)|'&', OC_BINARY|NV|P(15)|'&',
OC_BINARY|NV|P(25)|'/', OC_BINARY|NV|P(25)|'%', OC_BINARY|NV|P(15)|'&', OC_BINARY|NV|P(25)|'*',
OC_COMPARE|VV|P(39)|4, OC_COMPARE|VV|P(39)|3, OC_COMPARE|VV|P(39)|0, OC_COMPARE|VV|P(39)|1,
- OC_COMPARE|VV|P(39)|2, OC_MATCH|Sx|P(45)|'!', OC_MATCH|Sx|P(45)|'~', OC_LAND|Vx|P(55),
- OC_LOR|Vx|P(59), OC_TERNARY|Vx|P(64)|'?', OC_COLON|xx|P(67)|':',
- OC_IN|SV|P(49), /* in */
- OC_COMMA|SS|P(80),
- OC_PGETLINE|SV|P(37),
+#define TI_LESS (OC_COMPARE|VV|P(39)|2)
+ TI_LESS, OC_MATCH|Sx|P(45)|'!', OC_MATCH|Sx|P(45)|'~', OC_LAND|Vx|P(55),
+#define TI_TERNARY (OC_TERNARY|Vx|P(64)|'?')
+#define TI_COLON (OC_COLON|xx|P(67)|':')
+ OC_LOR|Vx|P(59), TI_TERNARY, TI_COLON,
+#define TI_IN (OC_IN|SV|P(49))
+ TI_IN,
+#define TI_COMMA (OC_COMMA|SS|P(80))
+ TI_COMMA,
+#define TI_PGETLINE (OC_PGETLINE|SV|P(37))
+ TI_PGETLINE,
OC_UNARY|xV|P(19)|'+', OC_UNARY|xV|P(19)|'-', OC_UNARY|xV|P(19)|'!',
0, /* ] */
0,
@@ -366,25 +435,50 @@
0,
0, /* \n */
ST_IF, ST_DO, ST_FOR, OC_BREAK,
- OC_CONTINUE, OC_DELETE|Vx, OC_PRINT,
+ OC_CONTINUE, OC_DELETE|Rx, OC_PRINT,
OC_PRINTF, OC_NEXT, OC_NEXTFILE,
OC_RETURN|Vx, OC_EXIT|Nx,
ST_WHILE,
0, /* else */
-
- OC_B|B_an|P(0x83), OC_B|B_co|P(0x41), OC_B|B_ls|P(0x83), OC_B|B_or|P(0x83),
- OC_B|B_rs|P(0x83), OC_B|B_xo|P(0x83),
- OC_FBLTIN|Sx|F_cl, OC_FBLTIN|Sx|F_sy, OC_FBLTIN|Sx|F_ff, OC_B|B_a2|P(0x83),
- OC_FBLTIN|Nx|F_co, OC_FBLTIN|Nx|F_ex, OC_FBLTIN|Nx|F_in, OC_FBLTIN|Nx|F_lg,
- OC_FBLTIN|F_rn, OC_FBLTIN|Nx|F_si, OC_FBLTIN|Nx|F_sq, OC_FBLTIN|Nx|F_sr,
- OC_B|B_ge|P(0xd6), OC_B|B_gs|P(0xb6), OC_B|B_ix|P(0x9b), OC_FBLTIN|Sx|F_le,
- OC_B|B_ma|P(0x89), OC_B|B_sp|P(0x8b), OC_SPRINTF, OC_B|B_su|P(0xb6),
- OC_B|B_ss|P(0x8f), OC_FBLTIN|F_ti, OC_B|B_ti|P(0x0b), OC_B|B_mt|P(0x0b),
- OC_B|B_lo|P(0x49), OC_B|B_up|P(0x49),
- OC_GETLINE|SV|P(0),
- 0, 0,
- 0,
- 0 /* END */
+// OC_B's are builtins with enforced minimum number of arguments (two upper bits).
+// Highest byte bit pattern: nn s3s2s1 v3v2v1
+// nn - min. number of args, sN - resolve Nth arg to string, vN - resolve to var
+// OC_F's are builtins with zero or one argument.
+// |Rx| enforces that arg is present for: system, close, cos, sin, exp, int, log, sqrt
+// Check for no args is present in builtins' code (not in this table): rand, systime
+// Have one _optional_ arg: fflush, srand, length
+#define OC_B OC_BUILTIN
+#define OC_F OC_FBLTIN
+#define A1 P(0x40) /*one arg*/
+#define A2 P(0x80) /*two args*/
+#define A3 P(0xc0) /*three args*/
+#define __v P(1)
+#define _vv P(3)
+#define __s__v P(9)
+#define __s_vv P(0x0b)
+#define __svvv P(0x0f)
+#define _ss_vv P(0x1b)
+#define _s_vv_ P(0x16)
+#define ss_vv_ P(0x36)
+ OC_B|B_an|_vv|A2, OC_B|B_co|__v|A1, OC_B|B_ls|_vv|A2, OC_B|B_or|_vv|A2, // and compl lshift or
+ OC_B|B_rs|_vv|A2, OC_B|B_xo|_vv|A2, // rshift xor
+ OC_F|F_cl|Sx|Rx, OC_F|F_sy|Sx|Rx, OC_F|F_ff|Sx, OC_B|B_a2|_vv|A2, // close system fflush atan2
+ OC_F|F_co|Nx|Rx, OC_F|F_ex|Nx|Rx, OC_F|F_in|Nx|Rx, OC_F|F_lg|Nx|Rx, // cos exp int log
+ OC_F|F_rn, OC_F|F_si|Nx|Rx, OC_F|F_sq|Nx|Rx, OC_F|F_sr|Nx, // rand sin sqrt srand
+ OC_B|B_ge|_s_vv_|A3,OC_B|B_gs|ss_vv_|A2,OC_B|B_ix|_ss_vv|A2, // gensub gsub index /*length was here*/
+ OC_B|B_ma|__s__v|A2,OC_B|B_sp|__s_vv|A2,OC_SPRINTF, OC_B|B_su|ss_vv_|A2,// match split sprintf sub
+ OC_B|B_ss|__svvv|A2,OC_F|F_ti, OC_B|B_ti|__s_vv, OC_B|B_mt|__s_vv, // substr systime strftime mktime
+ OC_B|B_lo|__s__v|A1,OC_B|B_up|__s__v|A1, // tolower toupper
+ OC_F|F_le|Sx, // length
+ OC_GETLINE|SV, // getline
+ 0, 0, // func function
+ 0, // BEGIN
+ 0 // END
+#undef A1
+#undef A2
+#undef A3
+#undef OC_B
+#undef OC_F
};
/* internal variable names and their initial values */
@@ -425,21 +519,29 @@
chain *seq;
node *break_ptr, *continue_ptr;
rstream *iF;
- xhash *vhash, *ahash, *fdhash, *fnhash;
+ xhash *ahash; /* argument names, used only while parsing function bodies */
+ xhash *fnhash; /* function names, used only in parsing stage */
+ xhash *vhash; /* variables and arrays */
+ //xhash *fdhash; /* file objects, used only in execution stage */
+ //we are reusing ahash as fdhash, via define (see later)
const char *g_progname;
int g_lineno;
int nfields;
int maxfields; /* used in fsrealloc() only */
var *Fields;
- nvblock *g_cb;
char *g_pos;
- char *g_buf;
+ char g_saved_ch;
smallint icase;
smallint exiting;
smallint nextrec;
smallint nextfile;
smallint is_f0_split;
smallint t_rollback;
+
+ /* former statics from various functions */
+ smallint next_token__concat_inserted;
+ uint32_t next_token__save_tclass;
+ uint32_t next_token__save_info;
};
struct globals2 {
uint32_t t_info; /* often used */
@@ -452,32 +554,35 @@
/* former statics from various functions */
char *split_f0__fstrings;
- uint32_t next_token__save_tclass;
- uint32_t next_token__save_info;
- uint32_t next_token__ltclass;
- smallint next_token__concat_inserted;
-
- smallint next_input_file__files_happen;
rstream next_input_file__rsm;
+ smallint next_input_file__files_happen;
- var *evaluate__fnargs;
+ smalluint exitcode;
+
unsigned evaluate__seed;
+ var *evaluate__fnargs;
regex_t evaluate__sreg;
- var ptest__v;
+ var ptest__tmpvar;
+ var awk_printf__tmpvar;
+ var as_regex__tmpvar;
+ var exit__tmpvar;
+ var main__tmpvar;
tsplitter exec_builtin__tspl;
/* biggest and least used members go last */
tsplitter fsplitter, rsplitter;
+
+ char g_buf[MAXVARFMT + 1];
};
#define G1 (ptr_to_globals[-1])
#define G (*(struct globals2 *)ptr_to_globals)
/* For debug. nm --size-sort awk.o | grep -vi ' [tr] ' */
-/*char G1size[sizeof(G1)]; - 0x74 */
-/*char Gsize[sizeof(G)]; - 0x1c4 */
+//char G1size[sizeof(G1)]; // 0x70
+//char Gsize[sizeof(G)]; // 0x2f8
/* Trying to keep most of members accessible with short offsets: */
-/*char Gofs_seed[offsetof(struct globals2, evaluate__seed)]; - 0x90 */
+//char Gofs_seed[offsetof(struct globals2, evaluate__seed)]; // 0x7c
#define t_double (G1.t_double )
#define beginseq (G1.beginseq )
#define mainseq (G1.mainseq )
@@ -486,18 +591,20 @@
#define break_ptr (G1.break_ptr )
#define continue_ptr (G1.continue_ptr)
#define iF (G1.iF )
-#define vhash (G1.vhash )
#define ahash (G1.ahash )
-#define fdhash (G1.fdhash )
#define fnhash (G1.fnhash )
+#define vhash (G1.vhash )
+#define fdhash ahash
+//^^^^^^^^^^^^^^^^^^ ahash is cleared after every function parsing,
+// and ends up empty after parsing phase. Thus, we can simply reuse it
+// for fdhash in execution stage.
#define g_progname (G1.g_progname )
#define g_lineno (G1.g_lineno )
#define nfields (G1.nfields )
#define maxfields (G1.maxfields )
#define Fields (G1.Fields )
-#define g_cb (G1.g_cb )
#define g_pos (G1.g_pos )
-#define g_buf (G1.g_buf )
+#define g_saved_ch (G1.g_saved_ch )
#define icase (G1.icase )
#define exiting (G1.exiting )
#define nextrec (G1.nextrec )
@@ -511,39 +618,25 @@
#define intvar (G.intvar )
#define fsplitter (G.fsplitter )
#define rsplitter (G.rsplitter )
+#define g_buf (G.g_buf )
#define INIT_G() do { \
SET_PTR_TO_GLOBALS((char*)xzalloc(sizeof(G1)+sizeof(G)) + sizeof(G1)); \
- G.next_token__ltclass = TC_OPTERM; \
+ t_tclass = TC_NEWLINE; \
G.evaluate__seed = 1; \
} while (0)
-
-/* function prototypes */
-static void handle_special(var *);
-static node *parse_expr(uint32_t);
-static void chain_group(void);
-static var *evaluate(node *, var *);
-static rstream *next_input_file(void);
-static int fmt_num(char *, int, const char *, double, int);
-static int awk_exit(int) NORETURN;
-
-/* ---- error handling ---- */
-
-static const char EMSG_INTERNAL_ERROR[] ALIGN1 = "Internal error";
static const char EMSG_UNEXP_EOS[] ALIGN1 = "Unexpected end of string";
static const char EMSG_UNEXP_TOKEN[] ALIGN1 = "Unexpected token";
static const char EMSG_DIV_BY_ZERO[] ALIGN1 = "Division by zero";
static const char EMSG_INV_FMT[] ALIGN1 = "Invalid format specifier";
-static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments for builtin";
+static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments";
static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array";
static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error";
static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function";
static const char EMSG_NO_MATH[] ALIGN1 = "Math support is not compiled in";
+static const char EMSG_NEGATIVE_FIELD[] ALIGN1 = "Access to negative field";
-static void zero_out_var(var *vp)
-{
- memset(vp, 0, sizeof(*vp));
-}
+static int awk_exit(void) NORETURN;
static void syntax_error(const char *message) NORETURN;
static void syntax_error(const char *message)
@@ -574,12 +667,40 @@
return newhash;
}
+static void hash_clear(xhash *hash)
+{
+ unsigned i;
+ hash_item *hi, *thi;
+
+ for (i = 0; i < hash->csize; i++) {
+ hi = hash->items[i];
+ while (hi) {
+ thi = hi;
+ hi = hi->next;
+//FIXME: this assumes that it's a hash of *variables*:
+ free(thi->data.v.string);
+ free(thi);
+ }
+ hash->items[i] = NULL;
+ }
+ hash->glen = hash->nel = 0;
+}
+
+#if 0 //UNUSED
+static void hash_free(xhash *hash)
+{
+ hash_clear(hash);
+ free(hash->items);
+ free(hash);
+}
+#endif
+
/* find item in hash, return ptr to data, NULL if not found */
-static void *hash_search(xhash *hash, const char *name)
+static NOINLINE void *hash_search3(xhash *hash, const char *name, unsigned idx)
{
hash_item *hi;
- hi = hash->items[hashidx(name) % hash->csize];
+ hi = hash->items[idx % hash->csize];
while (hi) {
if (strcmp(hi->name, name) == 0)
return &hi->data;
@@ -588,6 +709,11 @@
return NULL;
}
+static void *hash_search(xhash *hash, const char *name)
+{
+ return hash_search3(hash, name, hashidx(name));
+}
+
/* grow hash if it becomes too big */
static void hash_rebuild(xhash *hash)
{
@@ -623,16 +749,17 @@
unsigned idx;
int l;
- hi = hash_search(hash, name);
+ idx = hashidx(name);
+ hi = hash_search3(hash, name, idx);
if (!hi) {
- if (++hash->nel / hash->csize > 10)
+ if (++hash->nel > hash->csize * 8)
hash_rebuild(hash);
l = strlen(name) + 1;
hi = xzalloc(sizeof(*hi) + l);
strcpy(hi->name, name);
- idx = hashidx(name) % hash->csize;
+ idx = idx % hash->csize;
hi->next = hash->items[idx];
hash->items[idx] = hi;
hash->glen += l;
@@ -667,7 +794,7 @@
static char *skip_spaces(char *p)
{
- while (1) {
+ for (;;) {
if (*p == '\\' && p[1] == '\n') {
p++;
t_lineno++;
@@ -683,8 +810,10 @@
static char *nextword(char **s)
{
char *p = *s;
- while (*(*s)++ != '\0')
+ char *q = p;
+ while (*q++ != '\0')
continue;
+ *s = q;
return p;
}
@@ -747,10 +876,27 @@
/* -------- working with variables (set/get/copy/etc) -------- */
-static xhash *iamarray(var *v)
+static void fmt_num(const char *format, double n)
{
- var *a = v;
+ if (n == (long long)n) {
+ snprintf(g_buf, MAXVARFMT, "%lld", (long long)n);
+ } else {
+ const char *s = format;
+ char c;
+ do { c = *s; } while (c && *++s);
+ if (strchr("diouxX", c)) {
+ snprintf(g_buf, MAXVARFMT, format, (int)n);
+ } else if (strchr("eEfFgGaA", c)) {
+ snprintf(g_buf, MAXVARFMT, format, n);
+ } else {
+ syntax_error(EMSG_INV_FMT);
+ }
+ }
+}
+
+static xhash *iamarray(var *a)
+{
while (a->type & VF_CHILD)
a = a->x.parent;
@@ -761,23 +907,7 @@
return a->x.array;
}
-static void clear_array(xhash *array)
-{
- unsigned i;
- hash_item *hi, *thi;
-
- for (i = 0; i < array->csize; i++) {
- hi = array->items[i];
- while (hi) {
- thi = hi;
- hi = hi->next;
- free(thi->data.v.string);
- free(thi);
- }
- array->items[i] = NULL;
- }
- array->glen = array->nel = 0;
-}
+#define clear_array(array) hash_clear(array)
/* clear a variable */
static var *clrvar(var *v)
@@ -791,6 +921,8 @@
return v;
}
+static void handle_special(var *);
+
/* assign string value to variable */
static var *setvar_p(var *v, char *value)
{
@@ -837,7 +969,7 @@
{
/* if v is numeric and has no cached string, convert it to string */
if ((v->type & (VF_NUMBER | VF_CACHED)) == VF_NUMBER) {
- fmt_num(g_buf, MAXVARFMT, getvar_s(intvar[CONVFMT]), v->number, TRUE);
+ fmt_num(getvar_s(intvar[CONVFMT]), v->number);
v->string = xstrdup(g_buf);
v->type |= VF_CACHED;
}
@@ -856,6 +988,7 @@
v->number = my_strtod(&s);
debug_printf_eval("%f (s:'%s')\n", v->number, s);
if (v->type & VF_USER) {
+//TODO: skip_spaces() also skips backslash+newline, is it intended here?
s = skip_spaces(s);
if (*s != '\0')
v->type &= ~VF_USER;
@@ -917,105 +1050,43 @@
return (v->string && v->string[0]);
}
-/* temporary variables allocator. Last allocated should be first freed */
-static var *nvalloc(int n)
-{
- nvblock *pb = NULL;
- var *v, *r;
- int size;
-
- while (g_cb) {
- pb = g_cb;
- if ((g_cb->pos - g_cb->nv) + n <= g_cb->size)
- break;
- g_cb = g_cb->next;
- }
-
- if (!g_cb) {
- size = (n <= MINNVBLOCK) ? MINNVBLOCK : n;
- g_cb = xzalloc(sizeof(nvblock) + size * sizeof(var));
- g_cb->size = size;
- g_cb->pos = g_cb->nv;
- g_cb->prev = pb;
- /*g_cb->next = NULL; - xzalloc did it */
- if (pb)
- pb->next = g_cb;
- }
-
- v = r = g_cb->pos;
- g_cb->pos += n;
-
- while (v < g_cb->pos) {
- v->type = 0;
- v->string = NULL;
- v++;
- }
-
- return r;
-}
-
-static void nvfree(var *v)
-{
- var *p;
-
- if (v < g_cb->nv || v >= g_cb->pos)
- syntax_error(EMSG_INTERNAL_ERROR);
-
- for (p = v; p < g_cb->pos; p++) {
- if ((p->type & (VF_ARRAY | VF_CHILD)) == VF_ARRAY) {
- clear_array(iamarray(p));
- free(p->x.array->items);
- free(p->x.array);
- }
- if (p->type & VF_WALK) {
- walker_list *n;
- walker_list *w = p->x.walker;
- debug_printf_walker("nvfree: freeing walker @%p\n", &p->x.walker);
- p->x.walker = NULL;
- while (w) {
- n = w->prev;
- debug_printf_walker(" free(%p)\n", w);
- free(w);
- w = n;
- }
- }
- clrvar(p);
- }
-
- g_cb->pos = v;
- while (g_cb->prev && g_cb->pos == g_cb->nv) {
- g_cb = g_cb->prev;
- }
-}
-
/* ------- awk program text parsing ------- */
-/* Parse next token pointed by global pos, place results into global ttt.
- * If token isn't expected, give away. Return token class
+/* Parse next token pointed by global pos, place results into global t_XYZ variables.
+ * If token isn't expected, print error message and die.
+ * Return token class (also store it in t_tclass).
*/
static uint32_t next_token(uint32_t expected)
{
-#define concat_inserted (G.next_token__concat_inserted)
-#define save_tclass (G.next_token__save_tclass)
-#define save_info (G.next_token__save_info)
-/* Initialized to TC_OPTERM: */
-#define ltclass (G.next_token__ltclass)
+#define concat_inserted (G1.next_token__concat_inserted)
+#define save_tclass (G1.next_token__save_tclass)
+#define save_info (G1.next_token__save_info)
- char *p, *s;
+ char *p;
const char *tl;
- uint32_t tc;
const uint32_t *ti;
+ uint32_t tc, last_token_class;
+
+ last_token_class = t_tclass; /* t_tclass is initialized to TC_NEWLINE */
+
+ debug_printf_parse("%s() expected(%x):", __func__, expected);
+ debug_parse_print_tc(expected);
+ debug_printf_parse("\n");
if (t_rollback) {
+ debug_printf_parse("%s: using rolled-back token\n", __func__);
t_rollback = FALSE;
-
} else if (concat_inserted) {
+ debug_printf_parse("%s: using concat-inserted token\n", __func__);
concat_inserted = FALSE;
t_tclass = save_tclass;
t_info = save_info;
-
} else {
p = g_pos;
+ if (g_saved_ch != '\0') {
+ *p = g_saved_ch;
+ g_saved_ch = '\0';
+ }
readnext:
p = skip_spaces(p);
g_lineno = t_lineno;
@@ -1023,16 +1094,12 @@
while (*p != '\n' && *p != '\0')
p++;
- if (*p == '\n')
- t_lineno++;
-
if (*p == '\0') {
tc = TC_EOF;
debug_printf_parse("%s: token found: TC_EOF\n", __func__);
-
} else if (*p == '\"') {
/* it's a string */
- t_string = s = ++p;
+ char *s = t_string = ++p;
while (*p != '\"') {
char *pp;
if (*p == '\0' || *p == '\n')
@@ -1045,10 +1112,9 @@
*s = '\0';
tc = TC_STRING;
debug_printf_parse("%s: token found:'%s' TC_STRING\n", __func__, t_string);
-
} else if ((expected & TC_REGEXP) && *p == '/') {
/* it's regexp */
- t_string = s = ++p;
+ char *s = t_string = ++p;
while (*p != '/') {
if (*p == '\0' || *p == '\n')
syntax_error(EMSG_UNEXP_EOS);
@@ -1078,8 +1144,12 @@
syntax_error(EMSG_UNEXP_TOKEN);
tc = TC_NUMBER;
debug_printf_parse("%s: token found:%f TC_NUMBER\n", __func__, t_double);
-
} else {
+ char *end_of_name;
+
+ if (*p == '\n')
+ t_lineno++;
+
/* search for something known */
tl = tokenlist;
tc = 0x00000001;
@@ -1094,9 +1164,9 @@
* token matches,
* and it's not a longer word,
*/
- if ((tc & (expected | TC_WORD | TC_NEWLINE))
+ if ((tc & (expected | TS_WORD | TC_NEWLINE))
&& strncmp(p, tl, l) == 0
- && !((tc & TC_WORD) && isalnum_(p[l]))
+ && !((tc & TS_WORD) && isalnum_(p[l]))
) {
/* then this is what we are looking for */
t_info = *ti;
@@ -1113,60 +1183,94 @@
if (!isalnum_(*p))
syntax_error(EMSG_UNEXP_TOKEN); /* no */
/* yes */
- t_string = --p;
- while (isalnum_(*++p)) {
- p[-1] = *p;
- }
- p[-1] = '\0';
- tc = TC_VARIABLE;
- /* also consume whitespace between functionname and bracket */
- if (!(expected & TC_VARIABLE) || (expected & TC_ARRAY))
+ t_string = p;
+ while (isalnum_(*p))
+ p++;
+ end_of_name = p;
+
+ if (last_token_class == TC_FUNCDECL)
+ /* eat space in "function FUNC (...) {...}" declaration */
p = skip_spaces(p);
+ else if (expected & TC_ARRAY) {
+ /* eat space between array name and [ */
+ char *s = skip_spaces(p);
+ if (*s == '[') /* array ref, not just a name? */
+ p = s;
+ }
+ /* else: do NOT consume whitespace after variable name!
+ * gawk allows definition "function FUNC (p) {...}" - note space,
+ * but disallows the call "FUNC (p)" because it isn't one -
+ * expression "v (a)" should NOT be parsed as TC_FUNCTION:
+ * it is a valid concatenation if "v" is a variable,
+ * not a function name (and type of name is not known at parse time).
+ */
+
if (*p == '(') {
+ p++;
tc = TC_FUNCTION;
debug_printf_parse("%s: token found:'%s' TC_FUNCTION\n", __func__, t_string);
+ } else if (*p == '[') {
+ p++;
+ tc = TC_ARRAY;
+ debug_printf_parse("%s: token found:'%s' TC_ARRAY\n", __func__, t_string);
} else {
- if (*p == '[') {
- p++;
- tc = TC_ARRAY;
- debug_printf_parse("%s: token found:'%s' TC_ARRAY\n", __func__, t_string);
- } else
- debug_printf_parse("%s: token found:'%s' TC_VARIABLE\n", __func__, t_string);
+ tc = TC_VARIABLE;
+ debug_printf_parse("%s: token found:'%s' TC_VARIABLE\n", __func__, t_string);
+ if (end_of_name == p) {
+ /* there is no space for trailing NUL in t_string!
+ * We need to save the char we are going to NUL.
+ * (we'll use it in future call to next_token())
+ */
+ g_saved_ch = *end_of_name;
+// especially pathological example is V="abc"; V.2 - it's V concatenated to .2
+// (it evaluates to "abc0.2"). Because of this case, we can't simply cache
+// '.' and analyze it later: we also have to *store it back* in next
+// next_token(), in order to give my_strtod() the undamaged ".2" string.
+ }
}
+ *end_of_name = '\0'; /* terminate t_string */
}
token_found:
g_pos = p;
/* skipping newlines in some cases */
- if ((ltclass & TC_NOTERM) && (tc & TC_NEWLINE))
+ if ((last_token_class & TS_NOTERM) && (tc & TC_NEWLINE))
goto readnext;
/* insert concatenation operator when needed */
- if ((ltclass & TC_CONCAT1) && (tc & TC_CONCAT2) && (expected & TC_BINOP)) {
+ debug_printf_parse("%s: concat_inserted if all nonzero: %x %x %x %x\n", __func__,
+ (last_token_class & TS_CONCAT_L), (tc & TS_CONCAT_R), (expected & TS_BINOP),
+ !(last_token_class == TC_LENGTH && tc == TC_LPAREN));
+ if ((last_token_class & TS_CONCAT_L) && (tc & TS_CONCAT_R) && (expected & TS_BINOP)
+ && !(last_token_class == TC_LENGTH && tc == TC_LPAREN) /* but not for "length(..." */
+ ) {
concat_inserted = TRUE;
save_tclass = tc;
save_info = t_info;
- tc = TC_BINOP;
+ tc = TC_BINOPX;
t_info = OC_CONCAT | SS | P(35);
}
t_tclass = tc;
+ debug_printf_parse("%s: t_tclass=tc=%x\n", __func__, tc);
}
- ltclass = t_tclass;
-
/* Are we ready for this? */
- if (!(ltclass & expected))
- syntax_error((ltclass & (TC_NEWLINE | TC_EOF)) ?
+ if (!(t_tclass & expected)) {
+ syntax_error((last_token_class & (TC_NEWLINE | TC_EOF)) ?
EMSG_UNEXP_EOS : EMSG_UNEXP_TOKEN);
+ }
- return ltclass;
+ debug_printf_parse("%s: returning, t_double:%f t_tclass:", __func__, t_double);
+ debug_parse_print_tc(t_tclass);
+ debug_printf_parse("\n");
+
+ return t_tclass;
#undef concat_inserted
#undef save_tclass
#undef save_info
-#undef ltclass
}
-static void rollback_token(void)
+static ALWAYS_INLINE void rollback_token(void)
{
t_rollback = TRUE;
}
@@ -1183,151 +1287,188 @@
static void mk_re_node(const char *s, node *n, regex_t *re)
{
- n->info = OC_REGEXP;
+ n->info = TI_REGEXP;
n->l.re = re;
n->r.ire = re + 1;
xregcomp(re, s, REG_EXTENDED);
xregcomp(re + 1, s, REG_EXTENDED | REG_ICASE);
}
-static node *condition(void)
+static node *parse_expr(uint32_t);
+
+static node *parse_lrparen_list(void)
{
- next_token(TC_SEQSTART);
- return parse_expr(TC_SEQTERM);
+ next_token(TC_LPAREN);
+ return parse_expr(TC_RPAREN);
}
/* parse expression terminated by given argument, return ptr
* to built subtree. Terminator is eaten by parse_expr */
-static node *parse_expr(uint32_t iexp)
+static node *parse_expr(uint32_t term_tc)
{
node sn;
node *cn = &sn;
node *vn, *glptr;
- uint32_t tc, xtc;
+ uint32_t tc, expected_tc;
var *v;
- debug_printf_parse("%s(%x)\n", __func__, iexp);
+ debug_printf_parse("%s() term_tc(%x):", __func__, term_tc);
+ debug_parse_print_tc(term_tc);
+ debug_printf_parse("\n");
sn.info = PRIMASK;
- sn.r.n = glptr = NULL;
- xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP | iexp;
+ sn.r.n = sn.a.n = glptr = NULL;
+ expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP | term_tc;
- while (!((tc = next_token(xtc)) & iexp)) {
+ while (!((tc = next_token(expected_tc)) & term_tc)) {
- if (glptr && (t_info == (OC_COMPARE | VV | P(39) | 2))) {
+ if (glptr && (t_info == TI_LESS)) {
/* input redirection (<) attached to glptr node */
debug_printf_parse("%s: input redir\n", __func__);
cn = glptr->l.n = new_node(OC_CONCAT | SS | P(37));
cn->a.n = glptr;
- xtc = TC_OPERAND | TC_UOPPRE;
+ expected_tc = TS_OPERAND | TS_UOPPRE;
glptr = NULL;
-
- } else if (tc & (TC_BINOP | TC_UOPPOST)) {
- debug_printf_parse("%s: TC_BINOP | TC_UOPPOST\n", __func__);
+ continue;
+ }
+ if (tc & (TS_BINOP | TC_UOPPOST)) {
+ debug_printf_parse("%s: TS_BINOP | TC_UOPPOST tc:%x\n", __func__, tc);
/* for binary and postfix-unary operators, jump back over
* previous operators with higher priority */
vn = cn;
while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2))
- || ((t_info == vn->info) && ((t_info & OPCLSMASK) == OC_COLON))
+ || ((t_info == vn->info) && t_info == TI_COLON)
) {
vn = vn->a.n;
+ if (!vn->a.n) syntax_error(EMSG_UNEXP_TOKEN);
}
- if ((t_info & OPCLSMASK) == OC_TERNARY)
+ if (t_info == TI_TERNARY)
+//TODO: why?
t_info += P(6);
cn = vn->a.n->r.n = new_node(t_info);
cn->a.n = vn->a.n;
- if (tc & TC_BINOP) {
+ if (tc & TS_BINOP) {
cn->l.n = vn;
- xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP;
- if ((t_info & OPCLSMASK) == OC_PGETLINE) {
+//FIXME: this is the place to detect and reject assignments to non-lvalues.
+//Currently we allow "assignments" to consts and temporaries, nonsense like this:
+// awk 'BEGIN { "qwe" = 1 }'
+// awk 'BEGIN { 7 *= 7 }'
+// awk 'BEGIN { length("qwe") = 1 }'
+// awk 'BEGIN { (1+1) += 3 }'
+ expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP;
+ if (t_info == TI_PGETLINE) {
/* it's a pipe */
next_token(TC_GETLINE);
/* give maximum priority to this pipe */
cn->info &= ~PRIMASK;
- xtc = TC_OPERAND | TC_UOPPRE | TC_BINOP | iexp;
+ expected_tc = TS_OPERAND | TS_UOPPRE | TS_BINOP | term_tc;
}
} else {
cn->r.n = vn;
- xtc = TC_OPERAND | TC_UOPPRE | TC_BINOP | iexp;
+ expected_tc = TS_OPERAND | TS_UOPPRE | TS_BINOP | term_tc;
}
vn->a.n = cn;
-
- } else {
- debug_printf_parse("%s: other\n", __func__);
- /* for operands and prefix-unary operators, attach them
- * to last node */
- vn = cn;
- cn = vn->r.n = new_node(t_info);
- cn->a.n = vn;
- xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP;
- if (tc & (TC_OPERAND | TC_REGEXP)) {
- debug_printf_parse("%s: TC_OPERAND | TC_REGEXP\n", __func__);
- xtc = TC_UOPPRE | TC_UOPPOST | TC_BINOP | TC_OPERAND | iexp;
- /* one should be very careful with switch on tclass -
- * only simple tclasses should be used! */
- switch (tc) {
- case TC_VARIABLE:
- case TC_ARRAY:
- debug_printf_parse("%s: TC_VARIABLE | TC_ARRAY\n", __func__);
- cn->info = OC_VAR;
- v = hash_search(ahash, t_string);
- if (v != NULL) {
- cn->info = OC_FNARG;
- cn->l.aidx = v->x.aidx;
- } else {
- cn->l.v = newvar(t_string);
- }
- if (tc & TC_ARRAY) {
- cn->info |= xS;
- cn->r.n = parse_expr(TC_ARRTERM);
- }
- break;
-
- case TC_NUMBER:
- case TC_STRING:
- debug_printf_parse("%s: TC_NUMBER | TC_STRING\n", __func__);
- cn->info = OC_VAR;
- v = cn->l.v = xzalloc(sizeof(var));
- if (tc & TC_NUMBER)
- setvar_i(v, t_double);
- else
- setvar_s(v, t_string);
- break;
-
- case TC_REGEXP:
- debug_printf_parse("%s: TC_REGEXP\n", __func__);
- mk_re_node(t_string, cn, xzalloc(sizeof(regex_t)*2));
- break;
-
- case TC_FUNCTION:
- debug_printf_parse("%s: TC_FUNCTION\n", __func__);
- cn->info = OC_FUNC;
- cn->r.f = newfunc(t_string);
- cn->l.n = condition();
- break;
-
- case TC_SEQSTART:
- debug_printf_parse("%s: TC_SEQSTART\n", __func__);
- cn = vn->r.n = parse_expr(TC_SEQTERM);
- if (!cn)
- syntax_error("Empty sequence");
- cn->a.n = vn;
- break;
-
- case TC_GETLINE:
- debug_printf_parse("%s: TC_GETLINE\n", __func__);
- glptr = cn;
- xtc = TC_OPERAND | TC_UOPPRE | TC_BINOP | iexp;
- break;
-
- case TC_BUILTIN:
- debug_printf_parse("%s: TC_BUILTIN\n", __func__);
- cn->l.n = condition();
- break;
- }
- }
+ continue;
}
- }
+
+ debug_printf_parse("%s: other, t_info:%x\n", __func__, t_info);
+ /* for operands and prefix-unary operators, attach them
+ * to last node */
+ vn = cn;
+ cn = vn->r.n = new_node(t_info);
+ cn->a.n = vn;
+
+ expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP;
+ if (t_info == TI_PREINC || t_info == TI_PREDEC)
+ expected_tc = TS_LVALUE | TC_UOPPRE1;
+
+ if (!(tc & (TS_OPERAND | TC_REGEXP)))
+ continue;
+
+ debug_printf_parse("%s: TS_OPERAND | TC_REGEXP\n", __func__);
+ expected_tc = TS_UOPPRE | TC_UOPPOST | TS_BINOP | TS_OPERAND | term_tc;
+ /* one should be very careful with switch on tclass -
+ * only simple tclasses should be used (TC_xyz, not TS_xyz) */
+ switch (tc) {
+ case TC_VARIABLE:
+ case TC_ARRAY:
+ debug_printf_parse("%s: TC_VARIABLE | TC_ARRAY\n", __func__);
+ cn->info = OC_VAR;
+ v = hash_search(ahash, t_string);
+ if (v != NULL) {
+ cn->info = OC_FNARG;
+ cn->l.aidx = v->x.aidx;
+ } else {
+ cn->l.v = newvar(t_string);
+ }
+ if (tc & TC_ARRAY) {
+ cn->info |= xS;
+ cn->r.n = parse_expr(TC_ARRTERM);
+ }
+ break;
+
+ case TC_NUMBER:
+ case TC_STRING:
+ debug_printf_parse("%s: TC_NUMBER | TC_STRING\n", __func__);
+ cn->info = OC_VAR;
+ v = cn->l.v = xzalloc(sizeof(var));
+ if (tc & TC_NUMBER)
+ setvar_i(v, t_double);
+ else {
+ setvar_s(v, t_string);
+ expected_tc &= ~TC_UOPPOST; /* "str"++ is not allowed */
+ }
+ break;
+
+ case TC_REGEXP:
+ debug_printf_parse("%s: TC_REGEXP\n", __func__);
+ mk_re_node(t_string, cn, xzalloc(sizeof(regex_t)*2));
+ break;
+
+ case TC_FUNCTION:
+ debug_printf_parse("%s: TC_FUNCTION\n", __func__);
+ cn->info = OC_FUNC;
+ cn->r.f = newfunc(t_string);
+ cn->l.n = parse_expr(TC_RPAREN);
+ break;
+
+ case TC_LPAREN:
+ debug_printf_parse("%s: TC_LPAREN\n", __func__);
+ cn = vn->r.n = parse_expr(TC_RPAREN);
+ if (!cn)
+ syntax_error("Empty sequence");
+ cn->a.n = vn;
+ break;
+
+ case TC_GETLINE:
+ debug_printf_parse("%s: TC_GETLINE\n", __func__);
+ glptr = cn;
+ expected_tc = TS_OPERAND | TS_UOPPRE | TS_BINOP | term_tc;
+ break;
+
+ case TC_BUILTIN:
+ debug_printf_parse("%s: TC_BUILTIN\n", __func__);
+ cn->l.n = parse_lrparen_list();
+ break;
+
+ case TC_LENGTH:
+ debug_printf_parse("%s: TC_LENGTH\n", __func__);
+ tc = next_token(TC_LPAREN /* length(...) */
+ | TC_SEMICOL /* length; */
+ | TC_NEWLINE /* length<newline> */
+ | TC_RBRACE /* length } */
+ | TC_BINOPX /* length <op> NUM */
+ | TC_COMMA /* print length, 1 */
+ );
+ if (tc != TC_LPAREN)
+ rollback_token();
+ else {
+ /* It was a "(" token. Handle just like TC_BUILTIN */
+ cn->l.n = parse_expr(TC_RPAREN);
+ }
+ break;
+ }
+ } /* while() */
debug_printf_parse("%s() returns %p\n", __func__, sn.r.n);
return sn.r.n;
@@ -1344,7 +1485,7 @@
if (seq->programname != g_progname) {
seq->programname = g_progname;
n = chain_node(OC_NEWSOURCE);
- n->l.new_progname = xstrdup(g_progname);
+ n->l.new_progname = g_progname;
}
n = seq->last;
@@ -1359,11 +1500,17 @@
node *n;
n = chain_node(info);
- n->l.n = parse_expr(TC_OPTERM | TC_GRPTERM);
- if (t_tclass & TC_GRPTERM)
+
+ n->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_RBRACE);
+ if ((info & OF_REQUIRED) && !n->l.n)
+ syntax_error(EMSG_TOO_FEW_ARGS);
+
+ if (t_tclass & TC_RBRACE)
rollback_token();
}
+static void chain_group(void);
+
static node *chain_loop(node *nn)
{
node *n, *n2, *save_brk, *save_cont;
@@ -1387,196 +1534,284 @@
return n;
}
+static void chain_until_rbrace(void)
+{
+ uint32_t tc;
+ while ((tc = next_token(TS_GRPSEQ | TC_RBRACE)) != TC_RBRACE) {
+ debug_printf_parse("%s: !TC_RBRACE\n", __func__);
+ if (tc == TC_NEWLINE)
+ continue;
+ rollback_token();
+ chain_group();
+ }
+ debug_printf_parse("%s: TC_RBRACE\n", __func__);
+}
+
/* parse group and attach it to chain */
static void chain_group(void)
{
- uint32_t c;
+ uint32_t tc;
node *n, *n2, *n3;
do {
- c = next_token(TC_GRPSEQ);
- } while (c & TC_NEWLINE);
+ tc = next_token(TS_GRPSEQ);
+ } while (tc == TC_NEWLINE);
- if (c & TC_GRPSTART) {
- debug_printf_parse("%s: TC_GRPSTART\n", __func__);
- while (next_token(TC_GRPSEQ | TC_GRPTERM) != TC_GRPTERM) {
- debug_printf_parse("%s: !TC_GRPTERM\n", __func__);
- if (t_tclass & TC_NEWLINE)
- continue;
- rollback_token();
- chain_group();
- }
- debug_printf_parse("%s: TC_GRPTERM\n", __func__);
- } else if (c & (TC_OPSEQ | TC_OPTERM)) {
- debug_printf_parse("%s: TC_OPSEQ | TC_OPTERM\n", __func__);
+ if (tc == TC_LBRACE) {
+ debug_printf_parse("%s: TC_LBRACE\n", __func__);
+ chain_until_rbrace();
+ return;
+ }
+ if (tc & (TS_OPSEQ | TC_SEMICOL)) {
+ debug_printf_parse("%s: TS_OPSEQ | TC_SEMICOL\n", __func__);
rollback_token();
chain_expr(OC_EXEC | Vx);
- } else {
- /* TC_STATEMNT */
- debug_printf_parse("%s: TC_STATEMNT(?)\n", __func__);
- switch (t_info & OPCLSMASK) {
- case ST_IF:
- debug_printf_parse("%s: ST_IF\n", __func__);
- n = chain_node(OC_BR | Vx);
- n->l.n = condition();
+ return;
+ }
+
+ /* TS_STATEMNT */
+ debug_printf_parse("%s: TS_STATEMNT(?)\n", __func__);
+ switch (t_info & OPCLSMASK) {
+ case ST_IF:
+ debug_printf_parse("%s: ST_IF\n", __func__);
+ n = chain_node(OC_BR | Vx);
+ n->l.n = parse_lrparen_list();
+ chain_group();
+ n2 = chain_node(OC_EXEC);
+ n->r.n = seq->last;
+ if (next_token(TS_GRPSEQ | TC_RBRACE | TC_ELSE) == TC_ELSE) {
chain_group();
- n2 = chain_node(OC_EXEC);
- n->r.n = seq->last;
- if (next_token(TC_GRPSEQ | TC_GRPTERM | TC_ELSE) == TC_ELSE) {
- chain_group();
- n2->a.n = seq->last;
- } else {
- rollback_token();
- }
- break;
-
- case ST_WHILE:
- debug_printf_parse("%s: ST_WHILE\n", __func__);
- n2 = condition();
- n = chain_loop(NULL);
- n->l.n = n2;
- break;
-
- case ST_DO:
- debug_printf_parse("%s: ST_DO\n", __func__);
- n2 = chain_node(OC_EXEC);
- n = chain_loop(NULL);
- n2->a.n = n->a.n;
- next_token(TC_WHILE);
- n->l.n = condition();
- break;
-
- case ST_FOR:
- debug_printf_parse("%s: ST_FOR\n", __func__);
- next_token(TC_SEQSTART);
- n2 = parse_expr(TC_SEMICOL | TC_SEQTERM);
- if (t_tclass & TC_SEQTERM) { /* for-in */
- if ((n2->info & OPCLSMASK) != OC_IN)
- syntax_error(EMSG_UNEXP_TOKEN);
- n = chain_node(OC_WALKINIT | VV);
- n->l.n = n2->l.n;
- n->r.n = n2->r.n;
- n = chain_loop(NULL);
- n->info = OC_WALKNEXT | Vx;
- n->l.n = n2->l.n;
- } else { /* for (;;) */
- n = chain_node(OC_EXEC | Vx);
- n->l.n = n2;
- n2 = parse_expr(TC_SEMICOL);
- n3 = parse_expr(TC_SEQTERM);
- n = chain_loop(n3);
- n->l.n = n2;
- if (!n2)
- n->info = OC_EXEC;
- }
- break;
-
- case OC_PRINT:
- case OC_PRINTF:
- debug_printf_parse("%s: OC_PRINT[F]\n", __func__);
- n = chain_node(t_info);
- n->l.n = parse_expr(TC_OPTERM | TC_OUTRDR | TC_GRPTERM);
- if (t_tclass & TC_OUTRDR) {
- n->info |= t_info;
- n->r.n = parse_expr(TC_OPTERM | TC_GRPTERM);
- }
- if (t_tclass & TC_GRPTERM)
- rollback_token();
- break;
-
- case OC_BREAK:
- debug_printf_parse("%s: OC_BREAK\n", __func__);
- n = chain_node(OC_EXEC);
- n->a.n = break_ptr;
- break;
-
- case OC_CONTINUE:
- debug_printf_parse("%s: OC_CONTINUE\n", __func__);
- n = chain_node(OC_EXEC);
- n->a.n = continue_ptr;
- break;
-
- /* delete, next, nextfile, return, exit */
- default:
- debug_printf_parse("%s: default\n", __func__);
- chain_expr(t_info);
+ n2->a.n = seq->last;
+ } else {
+ rollback_token();
}
+ break;
+
+ case ST_WHILE:
+ debug_printf_parse("%s: ST_WHILE\n", __func__);
+ n2 = parse_lrparen_list();
+ n = chain_loop(NULL);
+ n->l.n = n2;
+ break;
+
+ case ST_DO:
+ debug_printf_parse("%s: ST_DO\n", __func__);
+ n2 = chain_node(OC_EXEC);
+ n = chain_loop(NULL);
+ n2->a.n = n->a.n;
+ next_token(TC_WHILE);
+ n->l.n = parse_lrparen_list();
+ break;
+
+ case ST_FOR:
+ debug_printf_parse("%s: ST_FOR\n", __func__);
+ next_token(TC_LPAREN);
+ n2 = parse_expr(TC_SEMICOL | TC_RPAREN);
+ if (t_tclass & TC_RPAREN) { /* for (I in ARRAY) */
+ if (!n2 || n2->info != TI_IN)
+ syntax_error(EMSG_UNEXP_TOKEN);
+ n = chain_node(OC_WALKINIT | VV);
+ n->l.n = n2->l.n;
+ n->r.n = n2->r.n;
+ n = chain_loop(NULL);
+ n->info = OC_WALKNEXT | Vx;
+ n->l.n = n2->l.n;
+ } else { /* for (;;) */
+ n = chain_node(OC_EXEC | Vx);
+ n->l.n = n2;
+ n2 = parse_expr(TC_SEMICOL);
+ n3 = parse_expr(TC_RPAREN);
+ n = chain_loop(n3);
+ n->l.n = n2;
+ if (!n2)
+ n->info = OC_EXEC;
+ }
+ break;
+
+ case OC_PRINT:
+ case OC_PRINTF:
+ debug_printf_parse("%s: OC_PRINT[F]\n", __func__);
+ n = chain_node(t_info);
+ n->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_OUTRDR | TC_RBRACE);
+ if (t_tclass & TC_OUTRDR) {
+ n->info |= t_info;
+ n->r.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_RBRACE);
+ }
+ if (t_tclass & TC_RBRACE)
+ rollback_token();
+ break;
+
+ case OC_BREAK:
+ debug_printf_parse("%s: OC_BREAK\n", __func__);
+ n = chain_node(OC_EXEC);
+ if (!break_ptr)
+ syntax_error("'break' not in a loop");
+ n->a.n = break_ptr;
+ chain_expr(t_info);
+ break;
+
+ case OC_CONTINUE:
+ debug_printf_parse("%s: OC_CONTINUE\n", __func__);
+ n = chain_node(OC_EXEC);
+ if (!continue_ptr)
+ syntax_error("'continue' not in a loop");
+ n->a.n = continue_ptr;
+ chain_expr(t_info);
+ break;
+
+ /* delete, next, nextfile, return, exit */
+ default:
+ debug_printf_parse("%s: default\n", __func__);
+ chain_expr(t_info);
}
}
static void parse_program(char *p)
{
- uint32_t tclass;
- node *cn;
- func *f;
- var *v;
+ debug_printf_parse("%s()\n", __func__);
g_pos = p;
t_lineno = 1;
- while ((tclass = next_token(TC_EOF | TC_OPSEQ | TC_GRPSTART |
- TC_OPTERM | TC_BEGIN | TC_END | TC_FUNCDECL)) != TC_EOF) {
+ for (;;) {
+ uint32_t tclass;
- if (tclass & TC_OPTERM) {
- debug_printf_parse("%s: TC_OPTERM\n", __func__);
+ tclass = next_token(TS_OPSEQ | TC_LBRACE | TC_BEGIN | TC_END | TC_FUNCDECL
+ | TC_EOF | TC_NEWLINE /* but not TC_SEMICOL */);
+ got_tok:
+ if (tclass == TC_EOF) {
+ debug_printf_parse("%s: TC_EOF\n", __func__);
+ break;
+ }
+ if (tclass == TC_NEWLINE) {
+ debug_printf_parse("%s: TC_NEWLINE\n", __func__);
continue;
}
-
- seq = &mainseq;
- if (tclass & TC_BEGIN) {
+ if (tclass == TC_BEGIN) {
debug_printf_parse("%s: TC_BEGIN\n", __func__);
seq = &beginseq;
- chain_group();
-
- } else if (tclass & TC_END) {
+ /* ensure there is no newline between BEGIN and { */
+ next_token(TC_LBRACE);
+ chain_until_rbrace();
+ goto next_tok;
+ }
+ if (tclass == TC_END) {
debug_printf_parse("%s: TC_END\n", __func__);
seq = &endseq;
- chain_group();
+ /* ensure there is no newline between END and { */
+ next_token(TC_LBRACE);
+ chain_until_rbrace();
+ goto next_tok;
+ }
+ if (tclass == TC_FUNCDECL) {
+ func *f;
- } else if (tclass & TC_FUNCDECL) {
debug_printf_parse("%s: TC_FUNCDECL\n", __func__);
next_token(TC_FUNCTION);
- g_pos++;
f = newfunc(t_string);
- f->body.first = NULL;
- f->nargs = 0;
- while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
+ if (f->defined)
+ syntax_error("Duplicate function");
+ f->defined = 1;
+ //f->body.first = NULL; - already is
+ //f->nargs = 0; - already is
+ /* func arg list: comma sep list of args, and a close paren */
+ for (;;) {
+ var *v;
+ if (next_token(TC_VARIABLE | TC_RPAREN) == TC_RPAREN) {
+ if (f->nargs == 0)
+ break; /* func() is ok */
+ /* func(a,) is not ok */
+ syntax_error(EMSG_UNEXP_TOKEN);
+ }
v = findvar(ahash, t_string);
v->x.aidx = f->nargs++;
-
- if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
+ /* Arg followed either by end of arg list or 1 comma */
+ if (next_token(TC_COMMA | TC_RPAREN) == TC_RPAREN)
break;
+ /* it was a comma, we ate it */
}
seq = &f->body;
- chain_group();
- clear_array(ahash);
+ /* ensure there is { after "func F(...)" - but newlines are allowed */
+ while (next_token(TC_LBRACE | TC_NEWLINE) == TC_NEWLINE)
+ continue;
+ chain_until_rbrace();
+ hash_clear(ahash);
+ goto next_tok;
+ }
+ seq = &mainseq;
+ if (tclass & TS_OPSEQ) {
+ node *cn;
- } else if (tclass & TC_OPSEQ) {
- debug_printf_parse("%s: TC_OPSEQ\n", __func__);
+ debug_printf_parse("%s: TS_OPSEQ\n", __func__);
rollback_token();
cn = chain_node(OC_TEST);
- cn->l.n = parse_expr(TC_OPTERM | TC_EOF | TC_GRPSTART);
- if (t_tclass & TC_GRPSTART) {
- debug_printf_parse("%s: TC_GRPSTART\n", __func__);
- rollback_token();
- chain_group();
+ cn->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_EOF | TC_LBRACE);
+ if (t_tclass == TC_LBRACE) {
+ debug_printf_parse("%s: TC_LBRACE\n", __func__);
+ chain_until_rbrace();
} else {
- debug_printf_parse("%s: !TC_GRPSTART\n", __func__);
+ /* no action, assume default "{ print }" */
+ debug_printf_parse("%s: !TC_LBRACE\n", __func__);
chain_node(OC_PRINT);
}
cn->r.n = mainseq.last;
-
- } else /* if (tclass & TC_GRPSTART) */ {
- debug_printf_parse("%s: TC_GRPSTART(?)\n", __func__);
- rollback_token();
- chain_group();
+ goto next_tok;
}
- }
- debug_printf_parse("%s: TC_EOF\n", __func__);
+ /* tclass == TC_LBRACE */
+ debug_printf_parse("%s: TC_LBRACE(?)\n", __func__);
+ chain_until_rbrace();
+ next_tok:
+ /* Same as next_token() at the top of the loop, + TC_SEMICOL */
+ tclass = next_token(TS_OPSEQ | TC_LBRACE | TC_BEGIN | TC_END | TC_FUNCDECL
+ | TC_EOF | TC_NEWLINE | TC_SEMICOL);
+ /* gawk allows many newlines, but does not allow more than one semicolon:
+ * BEGIN {...}<newline>;<newline>;
+ * would complain "each rule must have a pattern or an action part".
+ * Same message for
+ * ; BEGIN {...}
+ */
+ if (tclass != TC_SEMICOL)
+ goto got_tok; /* use this token */
+ /* else: loop back - ate the semicolon, get and use _next_ token */
+ } /* for (;;) */
}
-
/* -------- program execution part -------- */
+/* temporary variables allocator */
+static var *nvalloc(int sz)
+{
+ return xzalloc(sz * sizeof(var));
+}
+
+static void nvfree(var *v, int sz)
+{
+ var *p = v;
+
+ while (--sz >= 0) {
+ if ((p->type & (VF_ARRAY | VF_CHILD)) == VF_ARRAY) {
+ clear_array(iamarray(p));
+ free(p->x.array->items);
+ free(p->x.array);
+ }
+ if (p->type & VF_WALK) {
+ walker_list *n;
+ walker_list *w = p->x.walker;
+ debug_printf_walker("nvfree: freeing walker @%p\n", &p->x.walker);
+ p->x.walker = NULL;
+ while (w) {
+ n = w->prev;
+ debug_printf_walker(" free(%p)\n", w);
+ free(w);
+ w = n;
+ }
+ }
+ clrvar(p);
+ p++;
+ }
+
+ free(v);
+}
+
static node *mk_splitter(const char *s, tsplitter *spl)
{
regex_t *re, *ire;
@@ -1585,7 +1820,7 @@
re = &spl->re[0];
ire = &spl->re[1];
n = &spl->n;
- if ((n->info & OPCLSMASK) == OC_REGEXP) {
+ if (n->info == TI_REGEXP) {
regfree(re);
regfree(ire); // TODO: nuke ire, use re+1?
}
@@ -1598,21 +1833,28 @@
return n;
}
-/* use node as a regular expression. Supplied with node ptr and regex_t
+static var *evaluate(node *, var *);
+
+/* Use node as a regular expression. Supplied with node ptr and regex_t
* storage space. Return ptr to regex (if result points to preg, it should
- * be later regfree'd manually
+ * be later regfree'd manually).
*/
static regex_t *as_regex(node *op, regex_t *preg)
{
int cflags;
- var *v;
const char *s;
- if ((op->info & OPCLSMASK) == OC_REGEXP) {
+ if (op->info == TI_REGEXP) {
return icase ? op->r.ire : op->l.re;
}
- v = nvalloc(1);
- s = getvar_s(evaluate(op, v));
+
+ //tmpvar = nvalloc(1);
+#define TMPVAR (&G.as_regex__tmpvar)
+ // We use a single "static" tmpvar (instead of on-stack or malloced one)
+ // to decrease memory consumption in deeply-recursive awk programs.
+ // The rule to work safely is to never call evaluate() while our static
+ // TMPVAR's value is still needed.
+ s = getvar_s(evaluate(op, TMPVAR));
cflags = icase ? REG_EXTENDED | REG_ICASE : REG_EXTENDED;
/* Testcase where REG_EXTENDED fails (unpaired '{'):
@@ -1624,7 +1866,8 @@
cflags &= ~REG_EXTENDED;
xregcomp(preg, s, cflags);
}
- nvfree(v);
+ //nvfree(tmpvar, 1);
+#undef TMPVAR
return preg;
}
@@ -1644,12 +1887,22 @@
/* resize field storage space */
static void fsrealloc(int size)
{
- int i;
+ int i, newsize;
if (size >= maxfields) {
+ /* Sanity cap, easier than catering for overflows */
+ if (size > 0xffffff)
+ bb_die_memory_exhausted();
+
i = maxfields;
maxfields = size + 16;
- Fields = xrealloc(Fields, maxfields * sizeof(Fields[0]));
+
+ newsize = maxfields * sizeof(Fields[0]);
+ debug_printf_eval("fsrealloc: xrealloc(%p, %u)\n", Fields, newsize);
+ Fields = xrealloc(Fields, newsize);
+ debug_printf_eval("fsrealloc: Fields=%p..%p\n", Fields, (char*)Fields + newsize - 1);
+ /* ^^^ did Fields[] move? debug aid for L.v getting "upstaged" by R.v in evaluate() */
+
for (; i < maxfields; i++) {
Fields[i].type = VF_SPECIAL;
Fields[i].string = NULL;
@@ -1662,12 +1915,34 @@
nfields = size;
}
+static int regexec1_nonempty(const regex_t *preg, const char *s, regmatch_t pmatch[])
+{
+ int r = regexec(preg, s, 1, pmatch, 0);
+ if (r == 0 && pmatch[0].rm_eo == 0) {
+ /* For example, happens when FS can match
+ * an empty string (awk -F ' *'). Logically,
+ * this should split into one-char fields.
+ * However, gawk 5.0.1 searches for first
+ * _non-empty_ separator string match:
+ */
+ size_t ofs = 0;
+ do {
+ ofs++;
+ if (!s[ofs])
+ return REG_NOMATCH;
+ regexec(preg, s + ofs, 1, pmatch, 0);
+ } while (pmatch[0].rm_eo == 0);
+ pmatch[0].rm_so += ofs;
+ pmatch[0].rm_eo += ofs;
+ }
+ return r;
+}
+
static int awk_split(const char *s, node *spl, char **slist)
{
- int l, n;
+ int n;
char c[4];
char *s1;
- regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough...
/* in worst case, each char would be a separate field */
*slist = s1 = xzalloc(strlen(s) * 2 + 3);
@@ -1679,34 +1954,36 @@
c[2] = '\n';
n = 0;
- if ((spl->info & OPCLSMASK) == OC_REGEXP) { /* regex split */
+ if (spl->info == TI_REGEXP) { /* regex split */
if (!*s)
return n; /* "": zero fields */
n++; /* at least one field will be there */
do {
+ int l;
+ regmatch_t pmatch[1];
+
l = strcspn(s, c+2); /* len till next NUL or \n */
- if (regexec(icase ? spl->r.ire : spl->l.re, s, 1, pmatch, 0) == 0
+ if (regexec1_nonempty(icase ? spl->r.ire : spl->l.re, s, pmatch) == 0
&& pmatch[0].rm_so <= l
) {
+ /* if (pmatch[0].rm_eo == 0) ... - impossible */
l = pmatch[0].rm_so;
- if (pmatch[0].rm_eo == 0) {
- l++;
- pmatch[0].rm_eo++;
- }
n++; /* we saw yet another delimiter */
} else {
pmatch[0].rm_eo = l;
if (s[l])
pmatch[0].rm_eo++;
}
- memcpy(s1, s, l);
- /* make sure we remove *all* of the separator chars */
- do {
- s1[l] = '\0';
- } while (++l < pmatch[0].rm_eo);
- nextword(&s1);
+ s1 = mempcpy(s1, s, l);
+ *s1++ = '\0';
s += pmatch[0].rm_eo;
} while (*s);
+
+ /* echo a-- | awk -F-- '{ print NF, length($NF), $NF }'
+ * should print "2 0 ":
+ */
+ *s1 = '\0';
+
return n;
}
if (c[0] == '\0') { /* null split */
@@ -1785,6 +2062,8 @@
if (v == intvar[NF]) {
n = (int)getvar_i(v);
+ if (n < 0)
+ syntax_error("NF set to negative value");
fsrealloc(n);
/* recalculate $0 */
@@ -1825,13 +2104,10 @@
split_f0();
mk_splitter(getvar_s(v), &fsplitter);
-
} else if (v == intvar[RS]) {
mk_splitter(getvar_s(v), &rsplitter);
-
} else if (v == intvar[IGNORECASE]) {
icase = istrue(v);
-
} else { /* $n */
n = getvar_i(intvar[NF]);
setvar_i(intvar[NF], n > v-Fields ? n : v-Fields+1);
@@ -1845,7 +2121,7 @@
node *n;
n = *pn;
- if (n && (n->info & OPCLSMASK) == OC_COMMA) {
+ if (n && n->info == TI_COMMA) {
*pn = n->r.n;
n = n->l.n;
} else {
@@ -1876,8 +2152,7 @@
for (i = 0; i < array->csize; i++) {
hi = array->items[i];
while (hi) {
- strcpy(w->end, hi->name);
- nextword(&w->end);
+ w->end = stpcpy(w->end, hi->name) + 1;
hi = hi->next;
}
}
@@ -1903,15 +2178,18 @@
/* evaluate node, return 1 when result is true, 0 otherwise */
static int ptest(node *pattern)
{
- /* ptest__v is "static": to save stack space? */
- return istrue(evaluate(pattern, &G.ptest__v));
+ // We use a single "static" tmpvar (instead of on-stack or malloced one)
+ // to decrease memory consumption in deeply-recursive awk programs.
+ // The rule to work safely is to never call evaluate() while our static
+ // TMPVAR's value is still needed.
+ return istrue(evaluate(pattern, &G.ptest__tmpvar));
}
/* read next record from stream rsm into a variable v */
static int awk_getline(rstream *rsm, var *v)
{
char *b;
- regmatch_t pmatch[2];
+ regmatch_t pmatch[1];
int size, a, p, pp = 0;
int fd, so, eo, r, rp;
char c, *m, *s;
@@ -1937,7 +2215,7 @@
so = eo = p;
r = 1;
if (p > 0) {
- if ((rsplitter.n.info & OPCLSMASK) == OC_REGEXP) {
+ if (rsplitter.n.info == TI_REGEXP) {
if (regexec(icase ? rsplitter.n.r.ire : rsplitter.n.l.re,
b, 1, pmatch, 0) == 0) {
so = pmatch[0].rm_so;
@@ -2009,42 +2287,36 @@
return r;
}
-static int fmt_num(char *b, int size, const char *format, double n, int int_as_int)
-{
- int r = 0;
- char c;
- const char *s = format;
-
- if (int_as_int && n == (int)n) {
- r = snprintf(b, size, "%d", (int)n);
- } else {
- do { c = *s; } while (c && *++s);
- if (strchr("diouxX", c)) {
- r = snprintf(b, size, format, (int)n);
- } else if (strchr("eEfgG", c)) {
- r = snprintf(b, size, format, n);
- } else {
- syntax_error(EMSG_INV_FMT);
- }
- }
- return r;
-}
-
/* formatted output into an allocated buffer, return ptr to buffer */
-static char *awk_printf(node *n)
+#if !ENABLE_FEATURE_AWK_GNU_EXTENSIONS
+# define awk_printf(a, b) awk_printf(a)
+#endif
+static char *awk_printf(node *n, size_t *len)
{
- char *b = NULL;
- char *fmt, *s, *f;
- const char *s1;
- int i, j, incr, bsize;
- char c, c1;
- var *v, *arg;
+ char *b;
+ char *fmt, *f;
+ size_t i;
- v = nvalloc(1);
- fmt = f = xstrdup(getvar_s(evaluate(nextarg(&n), v)));
+ //tmpvar = nvalloc(1);
+#define TMPVAR (&G.awk_printf__tmpvar)
+ // We use a single "static" tmpvar (instead of on-stack or malloced one)
+ // to decrease memory consumption in deeply-recursive awk programs.
+ // The rule to work safely is to never call evaluate() while our static
+ // TMPVAR's value is still needed.
+ fmt = f = xstrdup(getvar_s(evaluate(nextarg(&n), TMPVAR)));
+ // ^^^^^^^^^ here we immediately strdup() the value, so the later call
+ // to evaluate() potentially recursing into another awk_printf() can't
+ // mangle the value.
+ b = NULL;
i = 0;
- while (*f) {
+ while (*f) { /* "print one format spec" loop */
+ char *s;
+ char c;
+ char sv;
+ var *arg;
+ size_t slen;
+
s = f;
while (*f && (*f != '%' || *++f == '%'))
f++;
@@ -2053,38 +2325,68 @@
syntax_error("%*x formats are not supported");
f++;
}
-
- incr = (f - s) + MAXVARFMT;
- b = qrealloc(b, incr + i, &bsize);
c = *f;
- if (c != '\0')
- f++;
- c1 = *f;
- *f = '\0';
- arg = evaluate(nextarg(&n), v);
-
- j = i;
- if (c == 'c' || !c) {
- i += sprintf(b+i, s, is_numeric(arg) ?
- (char)getvar_i(arg) : *getvar_s(arg));
- } else if (c == 's') {
- s1 = getvar_s(arg);
- b = qrealloc(b, incr+i+strlen(s1), &bsize);
- i += sprintf(b+i, s, s1);
- } else {
- i += fmt_num(b+i, incr, s, getvar_i(arg), FALSE);
+ if (!c) {
+ /* Tail of fmt with no percent chars,
+ * or "....%" (percent seen, but no format specifier char found)
+ */
+ slen = strlen(s);
+ goto tail;
}
- *f = c1;
+ sv = *++f;
+ *f = '\0';
+ arg = evaluate(nextarg(&n), TMPVAR);
- /* if there was an error while sprintf, return value is negative */
- if (i < j)
- i = j;
+ /* Result can be arbitrarily long. Example:
+ * printf "%99999s", "BOOM"
+ */
+ if (c == 'c') {
+ char cc = is_numeric(arg) ? getvar_i(arg) : *getvar_s(arg);
+ char *r = xasprintf(s, cc ? cc : '^' /* else strlen will be wrong */);
+ slen = strlen(r);
+ if (cc == '\0') /* if cc is NUL, re-format the string with it */
+ sprintf(r, s, cc);
+ s = r;
+ } else {
+ if (c == 's') {
+ s = xasprintf(s, getvar_s(arg));
+ } else {
+ double d = getvar_i(arg);
+ if (strchr("diouxX", c)) {
+//TODO: make it wider here (%x -> %llx etc)?
+ s = xasprintf(s, (int)d);
+ } else if (strchr("eEfFgGaA", c)) {
+ s = xasprintf(s, d);
+ } else {
+ syntax_error(EMSG_INV_FMT);
+ }
+ }
+ slen = strlen(s);
+ }
+ *f = sv;
+
+ if (i == 0) {
+ b = s;
+ i = slen;
+ continue;
+ }
+ tail:
+ b = xrealloc(b, i + slen + 1);
+ strcpy(b + i, s);
+ i += slen;
+ if (!c) /* tail? */
+ break;
+ free(s);
}
free(fmt);
- nvfree(v);
- b = xrealloc(b, i + 1);
- b[i] = '\0';
+ //nvfree(tmpvar, 1);
+#undef TMPVAR
+
+#if ENABLE_FEATURE_AWK_GNU_EXTENSIONS
+ if (len)
+ *len = i;
+#endif
return b;
}
@@ -2214,33 +2516,59 @@
return mktime(&then);
}
+/* Reduce stack usage in exec_builtin() by keeping match() code separate */
+static NOINLINE var *do_match(node *an1, const char *as0)
+{
+ regmatch_t pmatch[1];
+ regex_t sreg, *re;
+ int n, start, len;
+
+ re = as_regex(an1, &sreg);
+ n = regexec(re, as0, 1, pmatch, 0);
+ if (re == &sreg)
+ regfree(re);
+ start = 0;
+ len = -1;
+ if (n == 0) {
+ start = pmatch[0].rm_so + 1;
+ len = pmatch[0].rm_eo - pmatch[0].rm_so;
+ }
+ setvar_i(newvar("RLENGTH"), len);
+ return setvar_i(newvar("RSTART"), start);
+}
+
+/* Reduce stack usage in evaluate() by keeping builtins' code separate */
static NOINLINE var *exec_builtin(node *op, var *res)
{
#define tspl (G.exec_builtin__tspl)
- var *tv;
+ var *tmpvars;
node *an[4];
var *av[4];
const char *as[4];
- regmatch_t pmatch[2];
- regex_t sreg, *re;
node *spl;
uint32_t isr, info;
int nargs;
time_t tt;
int i, l, ll, n;
- tv = nvalloc(4);
+ tmpvars = nvalloc(4);
+#define TMPVAR0 (tmpvars)
+#define TMPVAR1 (tmpvars + 1)
+#define TMPVAR2 (tmpvars + 2)
+#define TMPVAR3 (tmpvars + 3)
+#define TMPVAR(i) (tmpvars + (i))
isr = info = op->info;
op = op->l.n;
av[2] = av[3] = NULL;
for (i = 0; i < 4 && op; i++) {
an[i] = nextarg(&op);
- if (isr & 0x09000000)
- av[i] = evaluate(an[i], &tv[i]);
- if (isr & 0x08000000)
- as[i] = getvar_s(av[i]);
+ if (isr & 0x09000000) {
+ av[i] = evaluate(an[i], TMPVAR(i));
+ if (isr & 0x08000000)
+ as[i] = getvar_s(av[i]);
+ }
isr >>= 1;
}
@@ -2262,8 +2590,8 @@
char *s, *s1;
if (nargs > 2) {
- spl = (an[2]->info & OPCLSMASK) == OC_REGEXP ?
- an[2] : mk_splitter(getvar_s(evaluate(an[2], &tv[2])), &tspl);
+ spl = (an[2]->info == TI_REGEXP) ? an[2]
+ : mk_splitter(getvar_s(evaluate(an[2], TMPVAR2)), &tspl);
} else {
spl = &fsplitter.n;
}
@@ -2377,20 +2705,7 @@
break;
case B_ma:
- re = as_regex(an[1], &sreg);
- n = regexec(re, as[0], 1, pmatch, 0);
- if (n == 0) {
- pmatch[0].rm_so++;
- pmatch[0].rm_eo++;
- } else {
- pmatch[0].rm_so = 0;
- pmatch[0].rm_eo = -1;
- }
- setvar_i(newvar("RSTART"), pmatch[0].rm_so);
- setvar_i(newvar("RLENGTH"), pmatch[0].rm_eo - pmatch[0].rm_so);
- setvar_i(res, pmatch[0].rm_so);
- if (re == &sreg)
- regfree(re);
+ res = do_match(an[1], as[0]);
break;
case B_ge:
@@ -2406,14 +2721,79 @@
break;
}
- nvfree(tv);
+ nvfree(tmpvars, 4);
+#undef TMPVAR0
+#undef TMPVAR1
+#undef TMPVAR2
+#undef TMPVAR3
+#undef TMPVAR
+
return res;
#undef tspl
}
+/* if expr looks like "var=value", perform assignment and return 1,
+ * otherwise return 0 */
+static int is_assignment(const char *expr)
+{
+ char *exprc, *val;
+
+ val = (char*)endofname(expr);
+ if (val == (char*)expr || *val != '=') {
+ return FALSE;
+ }
+
+ exprc = xstrdup(expr);
+ val = exprc + (val - expr);
+ *val++ = '\0';
+
+ unescape_string_in_place(val);
+ setvar_u(newvar(exprc), val);
+ free(exprc);
+ return TRUE;
+}
+
+/* switch to next input file */
+static rstream *next_input_file(void)
+{
+#define rsm (G.next_input_file__rsm)
+#define files_happen (G.next_input_file__files_happen)
+
+ const char *fname, *ind;
+
+ if (rsm.F)
+ fclose(rsm.F);
+ rsm.F = NULL;
+ rsm.pos = rsm.adv = 0;
+
+ for (;;) {
+ if (getvar_i(intvar[ARGIND])+1 >= getvar_i(intvar[ARGC])) {
+ if (files_happen)
+ return NULL;
+ fname = "-";
+ rsm.F = stdin;
+ break;
+ }
+ ind = getvar_s(incvar(intvar[ARGIND]));
+ fname = getvar_s(findvar(iamarray(intvar[ARGV]), ind));
+ if (fname && *fname && !is_assignment(fname)) {
+ rsm.F = xfopen_stdin(fname);
+ break;
+ }
+ }
+
+ files_happen = TRUE;
+ setvar_s(intvar[FILENAME], fname);
+ return &rsm;
+#undef rsm
+#undef files_happen
+}
+
/*
* Evaluate node - the heart of the program. Supplied with subtree
- * and place where to store result. returns ptr to result.
+ * and "res" variable to assign the result to if we evaluate an expression.
+ * If node refers to e.g. a variable or a field, no assignment happens.
+ * Return ptr to the result (which may or may not be the "res" variable!)
*/
#define XC(n) ((n) >> 8)
@@ -2425,14 +2805,16 @@
#define seed (G.evaluate__seed)
#define sreg (G.evaluate__sreg)
- var *v1;
+ var *tmpvars;
if (!op)
return setvar_s(res, NULL);
debug_printf_eval("entered %s()\n", __func__);
- v1 = nvalloc(2);
+ tmpvars = nvalloc(2);
+#define TMPVAR0 (tmpvars)
+#define TMPVAR1 (tmpvars + 1)
while (op) {
struct {
@@ -2455,21 +2837,34 @@
debug_printf_eval("opinfo:%08x opn:%08x\n", opinfo, opn);
/* execute inevitable things */
- if (opinfo & OF_RES1)
- L.v = evaluate(op1, v1);
- if (opinfo & OF_RES2)
- R.v = evaluate(op->r.n, v1+1);
- if (opinfo & OF_STR1) {
- L.s = getvar_s(L.v);
- debug_printf_eval("L.s:'%s'\n", L.s);
+ if (opinfo & OF_RES1) {
+ if ((opinfo & OF_REQUIRED) && !op1)
+ syntax_error(EMSG_TOO_FEW_ARGS);
+ L.v = evaluate(op1, TMPVAR0);
+ if (opinfo & OF_STR1) {
+ L.s = getvar_s(L.v);
+ debug_printf_eval("L.s:'%s'\n", L.s);
+ }
+ if (opinfo & OF_NUM1) {
+ L_d = getvar_i(L.v);
+ debug_printf_eval("L_d:%f\n", L_d);
+ }
}
- if (opinfo & OF_STR2) {
- R.s = getvar_s(R.v);
- debug_printf_eval("R.s:'%s'\n", R.s);
- }
- if (opinfo & OF_NUM1) {
- L_d = getvar_i(L.v);
- debug_printf_eval("L_d:%f\n", L_d);
+ /* NB: Must get string/numeric values of L (done above)
+ * _before_ evaluate()'ing R.v: if both L and R are $NNNs,
+ * and right one is large, then L.v points to Fields[NNN1],
+ * second evaluate() reallocates and moves (!) Fields[],
+ * R.v points to Fields[NNN2] but L.v now points to freed mem!
+ * (Seen trying to evaluate "$444 $44444")
+ */
+ if (opinfo & OF_RES2) {
+ R.v = evaluate(op->r.n, TMPVAR1);
+ //TODO: L.v may be invalid now, set L.v to NULL to catch bugs?
+ //L.v = NULL;
+ if (opinfo & OF_STR2) {
+ R.s = getvar_s(R.v);
+ debug_printf_eval("R.s:'%s'\n", R.s);
+ }
}
debug_printf_eval("switch(0x%x)\n", XC(opinfo & OPCLSMASK));
@@ -2479,7 +2874,8 @@
/* test pattern */
case XC( OC_TEST ):
- if ((op1->info & OPCLSMASK) == OC_COMMA) {
+ debug_printf_eval("TEST\n");
+ if (op1->info == TI_COMMA) {
/* it's range pattern */
if ((opinfo & OF_CHECKED) || ptest(op1->l.n)) {
op->info |= OF_CHECKED;
@@ -2496,25 +2892,32 @@
/* just evaluate an expression, also used as unconditional jump */
case XC( OC_EXEC ):
+ debug_printf_eval("EXEC\n");
break;
/* branch, used in if-else and various loops */
case XC( OC_BR ):
+ debug_printf_eval("BR\n");
op = istrue(L.v) ? op->a.n : op->r.n;
break;
/* initialize for-in loop */
case XC( OC_WALKINIT ):
+ debug_printf_eval("WALKINIT\n");
hashwalk_init(L.v, iamarray(R.v));
break;
/* get next array item */
case XC( OC_WALKNEXT ):
+ debug_printf_eval("WALKNEXT\n");
op = hashwalk_next(L.v) ? op->a.n : op->r.n;
break;
case XC( OC_PRINT ):
- case XC( OC_PRINTF ): {
+ debug_printf_eval("PRINT /\n");
+ case XC( OC_PRINTF ):
+ debug_printf_eval("PRINTF\n");
+ {
FILE *F = stdout;
if (op->r.n) {
@@ -2523,7 +2926,7 @@
if (opn == '|') {
rsm->F = popen(R.s, "w");
if (rsm->F == NULL)
- bb_perror_msg_and_die("popen");
+ bb_simple_perror_msg_and_die("popen");
rsm->is_pipe = 1;
} else {
rsm->F = xfopen(R.s, opn=='w' ? "w" : "a");
@@ -2532,36 +2935,48 @@
F = rsm->F;
}
+ /* Can't just check 'opinfo == OC_PRINT' here, parser ORs
+ * additional bits to opinfos of print/printf with redirects
+ */
if ((opinfo & OPCLSMASK) == OC_PRINT) {
if (!op1) {
fputs(getvar_s(intvar[F0]), F);
} else {
- while (op1) {
- var *v = evaluate(nextarg(&op1), v1);
+ for (;;) {
+ var *v = evaluate(nextarg(&op1), TMPVAR0);
if (v->type & VF_NUMBER) {
- fmt_num(g_buf, MAXVARFMT, getvar_s(intvar[OFMT]),
- getvar_i(v), TRUE);
+ fmt_num(getvar_s(intvar[OFMT]),
+ getvar_i(v));
fputs(g_buf, F);
} else {
fputs(getvar_s(v), F);
}
-
- if (op1)
- fputs(getvar_s(intvar[OFS]), F);
+ if (!op1)
+ break;
+ fputs(getvar_s(intvar[OFS]), F);
}
}
fputs(getvar_s(intvar[ORS]), F);
-
- } else { /* OC_PRINTF */
- char *s = awk_printf(op1);
+ } else { /* PRINTF */
+ IF_FEATURE_AWK_GNU_EXTENSIONS(size_t len;)
+ char *s = awk_printf(op1, &len);
+#if ENABLE_FEATURE_AWK_GNU_EXTENSIONS
+ fwrite(s, len, 1, F);
+#else
fputs(s, F);
+#endif
free(s);
}
fflush(F);
break;
}
- case XC( OC_DELETE ): {
+ case XC( OC_DELETE ):
+ debug_printf_eval("DELETE\n");
+ {
+ /* "delete" is special:
+ * "delete array[var--]" must evaluate index expr only once.
+ */
uint32_t info = op1->info & OPCLSMASK;
var *v;
@@ -2572,11 +2987,9 @@
} else {
syntax_error(EMSG_NOT_ARRAY);
}
-
- if (op1->r.n) {
+ if (op1->r.n) { /* array ref? */
const char *s;
- clrvar(L.v);
- s = getvar_s(evaluate(op1->r.n, v1));
+ s = getvar_s(evaluate(op1->r.n, TMPVAR0));
hash_remove(iamarray(v), s);
} else {
clear_array(iamarray(v));
@@ -2585,48 +2998,61 @@
}
case XC( OC_NEWSOURCE ):
+ debug_printf_eval("NEWSOURCE\n");
g_progname = op->l.new_progname;
break;
case XC( OC_RETURN ):
+ debug_printf_eval("RETURN\n");
copyvar(res, L.v);
break;
case XC( OC_NEXTFILE ):
+ debug_printf_eval("NEXTFILE\n");
nextfile = TRUE;
case XC( OC_NEXT ):
+ debug_printf_eval("NEXT\n");
nextrec = TRUE;
case XC( OC_DONE ):
+ debug_printf_eval("DONE\n");
clrvar(res);
break;
case XC( OC_EXIT ):
- awk_exit(L_d);
+ debug_printf_eval("EXIT\n");
+ if (op1)
+ G.exitcode = (int)L_d;
+ awk_exit();
/* -- recursive node type -- */
case XC( OC_VAR ):
+ debug_printf_eval("VAR\n");
L.v = op->l.v;
if (L.v == intvar[NF])
split_f0();
goto v_cont;
case XC( OC_FNARG ):
+ debug_printf_eval("FNARG[%d]\n", op->l.aidx);
L.v = &fnargs[op->l.aidx];
v_cont:
res = op->r.n ? findvar(iamarray(L.v), R.s) : L.v;
break;
case XC( OC_IN ):
+ debug_printf_eval("IN\n");
setvar_i(res, hash_search(iamarray(R.v), L.s) ? 1 : 0);
break;
case XC( OC_REGEXP ):
+ debug_printf_eval("REGEXP\n");
op1 = op;
L.s = getvar_s(intvar[F0]);
goto re_cont;
case XC( OC_MATCH ):
+ debug_printf_eval("MATCH\n");
op1 = op->r.n;
re_cont:
{
@@ -2641,60 +3067,80 @@
case XC( OC_MOVE ):
debug_printf_eval("MOVE\n");
/* if source is a temporary string, jusk relink it to dest */
-//Disabled: if R.v is numeric but happens to have cached R.v->string,
-//then L.v ends up being a string, which is wrong
-// if (R.v == v1+1 && R.v->string) {
-// res = setvar_p(L.v, R.v->string);
-// R.v->string = NULL;
-// } else {
+ if (R.v == TMPVAR1
+ && !(R.v->type & VF_NUMBER)
+ /* Why check !NUMBER? if R.v is a number but has cached R.v->string,
+ * L.v ends up a string, which is wrong */
+ /*&& R.v->string - always not NULL (right?) */
+ ) {
+ res = setvar_p(L.v, R.v->string); /* avoids strdup */
+ R.v->string = NULL;
+ } else {
res = copyvar(L.v, R.v);
-// }
+ }
break;
case XC( OC_TERNARY ):
- if ((op->r.n->info & OPCLSMASK) != OC_COLON)
+ debug_printf_eval("TERNARY\n");
+ if (op->r.n->info != TI_COLON)
syntax_error(EMSG_POSSIBLE_ERROR);
res = evaluate(istrue(L.v) ? op->r.n->l.n : op->r.n->r.n, res);
break;
case XC( OC_FUNC ): {
- var *vbeg, *v;
+ var *argvars, *sv_fnargs;
const char *sv_progname;
+ int nargs, i;
- if (!op->r.f->body.first)
+ debug_printf_eval("FUNC\n");
+
+ if (!op->r.f->defined)
syntax_error(EMSG_UNDEF_FUNC);
- vbeg = v = nvalloc(op->r.f->nargs + 1);
+ /* The body might be empty, still has to eval the args */
+ nargs = op->r.f->nargs;
+ argvars = nvalloc(nargs);
+ i = 0;
while (op1) {
- var *arg = evaluate(nextarg(&op1), v1);
- copyvar(v, arg);
- v->type |= VF_CHILD;
- v->x.parent = arg;
- if (++v - vbeg >= op->r.f->nargs)
- break;
+ var *arg = evaluate(nextarg(&op1), TMPVAR0);
+ if (i == nargs) {
+ /* call with more arguments than function takes.
+ * (gawk warns: "warning: function 'f' called with more arguments than declared").
+ * They are still evaluated, but discarded: */
+ clrvar(arg);
+ continue;
+ }
+ copyvar(&argvars[i], arg);
+ argvars[i].type |= VF_CHILD;
+ argvars[i].x.parent = arg;
+ i++;
}
- v = fnargs;
- fnargs = vbeg;
+ sv_fnargs = fnargs;
sv_progname = g_progname;
+ fnargs = argvars;
res = evaluate(op->r.f->body.first, res);
+ nvfree(argvars, nargs);
g_progname = sv_progname;
- nvfree(fnargs);
- fnargs = v;
+ fnargs = sv_fnargs;
break;
}
case XC( OC_GETLINE ):
- case XC( OC_PGETLINE ): {
+ debug_printf_eval("GETLINE /\n");
+ case XC( OC_PGETLINE ):
+ debug_printf_eval("PGETLINE\n");
+ {
rstream *rsm;
int i;
if (op1) {
rsm = newfile(L.s);
if (!rsm->F) {
+ /* NB: can't use "opinfo == TI_PGETLINE", would break "cmd" | getline */
if ((opinfo & OPCLSMASK) == OC_PGETLINE) {
rsm->F = popen(L.s, "r");
rsm->is_pipe = TRUE;
@@ -2729,16 +3175,34 @@
/* simple builtins */
case XC( OC_FBLTIN ): {
double R_d = R_d; /* for compiler */
+ debug_printf_eval("FBLTIN\n");
+
+ if (op1 && op1->info == TI_COMMA)
+ /* Simple builtins take one arg maximum */
+ syntax_error("Too many arguments");
switch (opn) {
case F_in:
- R_d = (int)L_d;
+ R_d = (long long)L_d;
break;
- case F_rn:
- R_d = (double)rand() / (double)RAND_MAX;
+ case F_rn: /*rand*/
+ if (op1)
+ syntax_error("Too many arguments");
+ {
+#if RAND_MAX >= 0x7fffffff
+ uint32_t u = ((uint32_t)rand() << 16) ^ rand();
+ uint64_t v = ((uint64_t)rand() << 32) | u;
+ /* the above shift+or is optimized out on 32-bit arches */
+# if RAND_MAX > 0x7fffffff
+ v &= 0x7fffffffffffffffULL;
+# endif
+ R_d = (double)v / 0x8000000000000000ULL;
+#else
+# error Not implemented for this value of RAND_MAX
+#endif
break;
-
+ }
case F_co:
if (ENABLE_FEATURE_AWK_LIBM) {
R_d = cos(L_d);
@@ -2778,13 +3242,23 @@
srand(seed);
break;
- case F_ti:
+ case F_ti: /*systime*/
+ if (op1)
+ syntax_error("Too many arguments");
R_d = time(NULL);
break;
case F_le:
- if (!op1)
+ debug_printf_eval("length: L.s:'%s'\n", L.s);
+ if (!op1) {
L.s = getvar_s(intvar[F0]);
+ debug_printf_eval("length: L.s='%s'\n", L.s);
+ }
+ else if (L.v->type & VF_ARRAY) {
+ R_d = L.v->x.array->nel;
+ debug_printf_eval("length: array_len:%d\n", L.v->x.array->nel);
+ break;
+ }
R_d = strlen(L.s);
break;
@@ -2809,7 +3283,7 @@
rstream *rsm;
int err = 0;
rsm = (rstream *)hash_search(fdhash, L.s);
- debug_printf_eval("OC_FBLTIN F_cl rsm:%p\n", rsm);
+ debug_printf_eval("OC_FBLTIN close: op1:%p s:'%s' rsm:%p\n", op1, L.s, rsm);
if (rsm) {
debug_printf_eval("OC_FBLTIN F_cl "
"rsm->is_pipe:%d, ->F:%p\n",
@@ -2820,6 +3294,11 @@
*/
if (rsm->F)
err = rsm->is_pipe ? pclose(rsm->F) : fclose(rsm->F);
+//TODO: fix this case:
+// $ awk 'BEGIN { print close(""); print ERRNO }'
+// -1
+// close of redirection that was never opened
+// (we print 0, 0)
free(rsm->buffer);
hash_remove(fdhash, L.s);
}
@@ -2834,14 +3313,18 @@
}
case XC( OC_BUILTIN ):
+ debug_printf_eval("BUILTIN\n");
res = exec_builtin(op, res);
break;
case XC( OC_SPRINTF ):
- setvar_p(res, awk_printf(op1));
+ debug_printf_eval("SPRINTF\n");
+ setvar_p(res, awk_printf(op1, NULL));
break;
- case XC( OC_UNARY ): {
+ case XC( OC_UNARY ):
+ debug_printf_eval("UNARY\n");
+ {
double Ld, R_d;
Ld = R_d = getvar_i(R.v);
@@ -2871,8 +3354,12 @@
break;
}
- case XC( OC_FIELD ): {
+ case XC( OC_FIELD ):
+ debug_printf_eval("FIELD\n");
+ {
int i = (int)getvar_i(R.v);
+ if (i < 0)
+ syntax_error(EMSG_NEGATIVE_FIELD);
if (i == 0) {
res = intvar[F0];
} else {
@@ -2886,26 +3373,33 @@
/* concatenation (" ") and index joining (",") */
case XC( OC_CONCAT ):
+ debug_printf_eval("CONCAT /\n");
case XC( OC_COMMA ): {
const char *sep = "";
- if ((opinfo & OPCLSMASK) == OC_COMMA)
+ debug_printf_eval("COMMA\n");
+ if (opinfo == TI_COMMA)
sep = getvar_s(intvar[SUBSEP]);
setvar_p(res, xasprintf("%s%s%s", L.s, sep, R.s));
break;
}
case XC( OC_LAND ):
+ debug_printf_eval("LAND\n");
setvar_i(res, istrue(L.v) ? ptest(op->r.n) : 0);
break;
case XC( OC_LOR ):
+ debug_printf_eval("LOR\n");
setvar_i(res, istrue(L.v) ? 1 : ptest(op->r.n));
break;
case XC( OC_BINARY ):
- case XC( OC_REPLACE ): {
+ debug_printf_eval("BINARY /\n");
+ case XC( OC_REPLACE ):
+ debug_printf_eval("REPLACE\n");
+ {
double R_d = getvar_i(R.v);
- debug_printf_eval("BINARY/REPLACE: R_d:%f opn:%c\n", R_d, opn);
+ debug_printf_eval("R_d:%f opn:%c\n", R_d, opn);
switch (opn) {
case '+':
L_d += R_d;
@@ -2930,7 +3424,7 @@
case '%':
if (R_d == 0)
syntax_error(EMSG_DIV_BY_ZERO);
- L_d -= (int)(L_d / R_d) * R_d;
+ L_d -= (long long)(L_d / R_d) * R_d;
break;
}
debug_printf_eval("BINARY/REPLACE result:%f\n", L_d);
@@ -2941,6 +3435,7 @@
case XC( OC_COMPARE ): {
int i = i; /* for compiler */
double Ld;
+ debug_printf_eval("COMPARE\n");
if (is_numeric(L.v) && is_numeric(R.v)) {
Ld = getvar_i(L.v) - getvar_i(R.v);
@@ -2966,7 +3461,8 @@
default:
syntax_error(EMSG_POSSIBLE_ERROR);
- }
+ } /* switch */
+
if ((opinfo & OPCLSMASK) <= SHIFT_TIL_THIS)
op = op->a.n;
if ((opinfo & OPCLSMASK) >= RECUR_FROM_THIS)
@@ -2975,7 +3471,10 @@
break;
} /* while (op) */
- nvfree(v1);
+ nvfree(tmpvars, 2);
+#undef TMPVAR0
+#undef TMPVAR1
+
debug_printf_eval("returning from %s(): %p\n", __func__, res);
return res;
#undef fnargs
@@ -2983,25 +3482,21 @@
#undef sreg
}
-
/* -------- main & co. -------- */
-static int awk_exit(int r)
+static int awk_exit(void)
{
- var tv;
unsigned i;
- hash_item *hi;
-
- zero_out_var(&tv);
if (!exiting) {
exiting = TRUE;
nextrec = FALSE;
- evaluate(endseq.first, &tv);
+ evaluate(endseq.first, &G.exit__tmpvar);
}
/* waiting for children */
for (i = 0; i < fdhash->csize; i++) {
+ hash_item *hi;
hi = fdhash->items[i];
while (hi) {
if (hi->data.rs.F && hi->data.rs.is_pipe)
@@ -3010,80 +3505,20 @@
}
}
- exit(r);
-}
-
-/* if expr looks like "var=value", perform assignment and return 1,
- * otherwise return 0 */
-static int is_assignment(const char *expr)
-{
- char *exprc, *val;
-
- if (!isalnum_(*expr) || (val = strchr(expr, '=')) == NULL) {
- return FALSE;
- }
-
- exprc = xstrdup(expr);
- val = exprc + (val - expr);
- *val++ = '\0';
-
- unescape_string_in_place(val);
- setvar_u(newvar(exprc), val);
- free(exprc);
- return TRUE;
-}
-
-/* switch to next input file */
-static rstream *next_input_file(void)
-{
-#define rsm (G.next_input_file__rsm)
-#define files_happen (G.next_input_file__files_happen)
-
- FILE *F;
- const char *fname, *ind;
-
- if (rsm.F)
- fclose(rsm.F);
- rsm.F = NULL;
- rsm.pos = rsm.adv = 0;
-
- for (;;) {
- if (getvar_i(intvar[ARGIND])+1 >= getvar_i(intvar[ARGC])) {
- if (files_happen)
- return NULL;
- fname = "-";
- F = stdin;
- break;
- }
- ind = getvar_s(incvar(intvar[ARGIND]));
- fname = getvar_s(findvar(iamarray(intvar[ARGV]), ind));
- if (fname && *fname && !is_assignment(fname)) {
- F = xfopen_stdin(fname);
- break;
- }
- }
-
- files_happen = TRUE;
- setvar_s(intvar[FILENAME], fname);
- rsm.F = F;
- return &rsm;
-#undef rsm
-#undef files_happen
+ exit(G.exitcode);
}
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int awk_main(int argc, char **argv)
+int awk_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
char *opt_F;
llist_t *list_v = NULL;
llist_t *list_f = NULL;
- int i, j;
- var *v;
- var tv;
- char **envp;
- char *vnames = (char *)vNames; /* cheat */
- char *vvalues = (char *)vValues;
+#if ENABLE_FEATURE_AWK_GNU_EXTENSIONS
+ llist_t *list_e = NULL;
+#endif
+ int i;
INIT_G();
@@ -3092,99 +3527,112 @@
if (ENABLE_LOCALE_SUPPORT)
setlocale(LC_NUMERIC, "C");
- zero_out_var(&tv);
-
- /* allocate global buffer */
- g_buf = xmalloc(MAXVARFMT + 1);
-
- vhash = hash_init();
- ahash = hash_init();
- fdhash = hash_init();
- fnhash = hash_init();
-
/* initialize variables */
- for (i = 0; *vnames; i++) {
- intvar[i] = v = newvar(nextword(&vnames));
- if (*vvalues != '\377')
- setvar_s(v, nextword(&vvalues));
- else
- setvar_i(v, 0);
+ vhash = hash_init();
+ {
+ char *vnames = (char *)vNames; /* cheat */
+ char *vvalues = (char *)vValues;
+ for (i = 0; *vnames; i++) {
+ var *v;
+ intvar[i] = v = newvar(nextword(&vnames));
+ if (*vvalues != '\377')
+ setvar_s(v, nextword(&vvalues));
+ else
+ setvar_i(v, 0);
- if (*vnames == '*') {
- v->type |= VF_SPECIAL;
- vnames++;
+ if (*vnames == '*') {
+ v->type |= VF_SPECIAL;
+ vnames++;
+ }
}
}
handle_special(intvar[FS]);
handle_special(intvar[RS]);
- newfile("/dev/stdin")->F = stdin;
- newfile("/dev/stdout")->F = stdout;
- newfile("/dev/stderr")->F = stderr;
-
/* Huh, people report that sometimes environ is NULL. Oh well. */
- if (environ) for (envp = environ; *envp; envp++) {
- /* environ is writable, thus we don't strdup it needlessly */
- char *s = *envp;
- char *s1 = strchr(s, '=');
- if (s1) {
- *s1 = '\0';
- /* Both findvar and setvar_u take const char*
- * as 2nd arg -> environment is not trashed */
- setvar_u(findvar(iamarray(intvar[ENVIRON]), s), s1 + 1);
- *s1 = '=';
+ if (environ) {
+ char **envp;
+ for (envp = environ; *envp; envp++) {
+ /* environ is writable, thus we don't strdup it needlessly */
+ char *s = *envp;
+ char *s1 = strchr(s, '=');
+ if (s1) {
+ *s1 = '\0';
+ /* Both findvar and setvar_u take const char*
+ * as 2nd arg -> environment is not trashed */
+ setvar_u(findvar(iamarray(intvar[ENVIRON]), s), s1 + 1);
+ *s1 = '=';
+ }
}
}
- opt_complementary = "v::f::"; /* -v and -f can occur multiple times */
- opt = getopt32(argv, "F:v:f:W:", &opt_F, &list_v, &list_f, NULL);
+ opt = getopt32(argv, OPTSTR_AWK, &opt_F, &list_v, &list_f, IF_FEATURE_AWK_GNU_EXTENSIONS(&list_e,) NULL);
argv += optind;
- argc -= optind;
- if (opt & 0x1) { /* -F */
+ //argc -= optind;
+ if (opt & OPT_W)
+ bb_simple_error_msg("warning: option -W is ignored");
+ if (opt & OPT_F) {
unescape_string_in_place(opt_F);
setvar_s(intvar[FS], opt_F);
}
- while (list_v) { /* -v */
+ while (list_v) {
if (!is_assignment(llist_pop(&list_v)))
bb_show_usage();
}
- if (list_f) { /* -f */
- do {
- char *s = NULL;
- FILE *from_file;
- g_progname = llist_pop(&list_f);
- from_file = xfopen_stdin(g_progname);
- /* one byte is reserved for some trick in next_token */
- for (i = j = 1; j > 0; i += j) {
- s = xrealloc(s, i + 4096);
- j = fread(s + i, 1, 4094, from_file);
- }
- s[i] = '\0';
- fclose(from_file);
- parse_program(s + 1);
- free(s);
- } while (list_f);
- argc++;
- } else { // no -f: take program from 1st parameter
- if (!argc)
+ /* Parse all supplied programs */
+ fnhash = hash_init();
+ ahash = hash_init();
+ while (list_f) {
+ int fd;
+ char *s;
+
+ g_progname = llist_pop(&list_f);
+ fd = xopen_stdin(g_progname);
+ s = xmalloc_read(fd, NULL); /* it's NUL-terminated */
+ close(fd);
+ parse_program(s);
+ free(s);
+ }
+ g_progname = "cmd. line";
+#if ENABLE_FEATURE_AWK_GNU_EXTENSIONS
+ while (list_e) {
+ parse_program(llist_pop(&list_e));
+ }
+#endif
+//FIXME: preserve order of -e and -f
+//TODO: implement -i LIBRARY and -E FILE too, they are easy-ish
+ if (!(opt & (OPT_f | OPT_e))) {
+ if (!*argv)
bb_show_usage();
- g_progname = "cmd. line";
parse_program(*argv++);
}
- if (opt & 0x8) // -W
- bb_error_msg("warning: option -W is ignored");
+ /* Free unused parse structures */
+ //hash_free(fnhash); // ~250 bytes when empty, used only for function names
+ //^^^^^^^^^^^^^^^^^ does not work, hash_clear() inside SEGVs
+ // (IOW: hash_clear() assumes it's a hash of variables. fnhash is not).
+ free(fnhash->items);
+ free(fnhash);
+ fnhash = NULL; // debug
+ //hash_free(ahash); // empty after parsing, will reuse as fdhash instead of freeing
+
+ /* Parsing done, on to executing */
/* fill in ARGV array */
- setvar_i(intvar[ARGC], argc);
setari_u(intvar[ARGV], 0, "awk");
i = 0;
while (*argv)
setari_u(intvar[ARGV], ++i, *argv++);
+ setvar_i(intvar[ARGC], i + 1);
- evaluate(beginseq.first, &tv);
+ //fdhash = ahash; // done via define
+ newfile("/dev/stdin")->F = stdin;
+ newfile("/dev/stdout")->F = stdout;
+ newfile("/dev/stderr")->F = stderr;
+
+ evaluate(beginseq.first, &G.main__tmpvar);
if (!mainseq.first && !endseq.first)
- awk_exit(EXIT_SUCCESS);
+ awk_exit();
/* input file could already be opened in BEGIN block */
if (!iF)
@@ -3199,7 +3647,7 @@
nextrec = FALSE;
incvar(intvar[NR]);
incvar(intvar[FNR]);
- evaluate(mainseq.first, &tv);
+ evaluate(mainseq.first, &G.main__tmpvar);
if (nextfile)
break;
@@ -3211,6 +3659,6 @@
iF = next_input_file();
}
- awk_exit(EXIT_SUCCESS);
+ awk_exit();
/*return 0;*/
}
diff --git a/ap/app/busybox/src/init/init.c b/ap/app/busybox/src/init/init.c
old mode 100644
new mode 100755
index ddb0a95..3a28afb
--- a/ap/app/busybox/src/init/init.c
+++ b/ap/app/busybox/src/init/init.c
@@ -356,7 +356,7 @@
/* input modes */
tty.c_iflag = ICRNL | IXON | IXOFF;
-
+ tty.c_iflag &= ~(IXON | IXOFF);
/* output modes */
tty.c_oflag = OPOST | ONLCR;
diff --git a/ap/app/busybox/src/libbb/endofname.c b/ap/app/busybox/src/libbb/endofname.c
new file mode 100755
index 0000000..305f093
--- /dev/null
+++ b/ap/app/busybox/src/libbb/endofname.c
@@ -0,0 +1,26 @@
+/*
+ * Utility routines.
+ *
+ * Copyright (C) 2013 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+//kbuild:lib-y += endofname.o
+
+#include "libbb.h"
+
+#define is_name(c) ((c) == '_' || isalpha((unsigned char)(c)))
+#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
+
+const char* FAST_FUNC
+endofname(const char *name)
+{
+ if (!is_name(*name))
+ return name;
+ while (*++name) {
+ if (!is_in_name(*name))
+ break;
+ }
+ return name;
+}
diff --git a/ap/app/busybox/src/libbb/verror_msg.c b/ap/app/busybox/src/libbb/verror_msg.c
old mode 100644
new mode 100755
index ee95be3..8c793a4
--- a/ap/app/busybox/src/libbb/verror_msg.c
+++ b/ap/app/busybox/src/libbb/verror_msg.c
@@ -156,3 +156,13 @@
bb_verror_msg(s, p, NULL);
va_end(p);
}
+
+void FAST_FUNC bb_simple_error_msg(const char *s)
+{
+ bb_error_msg("%s", s);
+}
+
+void FAST_FUNC bb_simple_error_msg_and_die(const char *s)
+{
+ bb_error_msg_and_die("%s", s);
+}
diff --git a/ap/app/busybox/src/libbb/xfuncs_printf.c b/ap/app/busybox/src/libbb/xfuncs_printf.c
old mode 100644
new mode 100755
index 05aa07c..d3bdd07
--- a/ap/app/busybox/src/libbb/xfuncs_printf.c
+++ b/ap/app/busybox/src/libbb/xfuncs_printf.c
@@ -27,6 +27,11 @@
* fail, so callers never need to check for errors. If it returned, it
* succeeded. */
+void FAST_FUNC bb_die_memory_exhausted(void)
+{
+ bb_simple_error_msg_and_die(bb_msg_memory_exhausted);
+}
+
#ifndef DMALLOC
/* dmalloc provides variants of these that do abort() on failure.
* Since dmalloc's prototypes overwrite the impls here as they are
diff --git a/ap/app/clatd/clatd.c b/ap/app/clatd/clatd.c
index a1552d2..a5cd0a9 100755
--- a/ap/app/clatd/clatd.c
+++ b/ap/app/clatd/clatd.c
@@ -403,7 +403,10 @@
// If any other bit is set, assume it's due to an error (i.e. POLLERR).
if (wait_fd[0].revents & ~POLLIN) {
// ring_read doesn't clear the error indication on the socket.
- recv(tunnel->read_fd6, NULL, 0, MSG_PEEK);
+ if(recv(tunnel->read_fd6, NULL, 0, MSG_PEEK) == -1)
+ {
+ logmsg_dbg(ANDROID_LOG_ERROR,"recv fd6 failed");
+ }
logmsg(ANDROID_LOG_WARN, "event_loop: clearing error on read_fd6: %s",
strerror(errno));
}
diff --git a/ap/app/clatd/dns64.c b/ap/app/clatd/dns64.c
index 3a287cf..cd92134 100755
--- a/ap/app/clatd/dns64.c
+++ b/ap/app/clatd/dns64.c
@@ -67,7 +67,8 @@
// that could be done with them at this time anyway).
if (result->ai_family != AF_INET6) {
- logmsg(ANDROID_LOG_WARN, "plat_prefix/unexpected address family: %d", result->ai_family);
+ logmsg(ANDROID_LOG_WARN, "plat_prefix/unexpected address family: %d", result->ai_family);
+ freeaddrinfo(result);
return 0;
}
plat_addr = ((struct sockaddr_in6 *)result->ai_addr)->sin6_addr;
diff --git a/ap/app/clatd/ring.c b/ap/app/clatd/ring.c
index 5e99fd5..113c8ec 100755
--- a/ap/app/clatd/ring.c
+++ b/ap/app/clatd/ring.c
@@ -39,6 +39,7 @@
int ver = TPACKET_V2;
if (setsockopt(packetsock, SOL_PACKET, PACKET_VERSION, (void *) &ver, sizeof(ver))) {
logmsg(ANDROID_LOG_FATAL, "setsockopt(PACKET_VERSION, %d) failed: %s", ver, strerror(errno));
+ close(packetsock);
return -1;
}
@@ -61,6 +62,7 @@
if (setsockopt(packetsock, SOL_PACKET, PACKET_RX_RING, &req, sizeof(req)) < 0) {
logmsg(ANDROID_LOG_FATAL, "PACKET_RX_RING failed: %s", strerror(errno));
+ close(packetsock);
return -1;
}
@@ -69,6 +71,7 @@
packetsock, 0);
if (ring->base == MAP_FAILED) {
logmsg(ANDROID_LOG_FATAL, "mmap %lu failed: %s", buflen, strerror(errno));
+ close(packetsock);
return -1;
}
diff --git a/ap/app/clatd/translate.c b/ap/app/clatd/translate.c
index 1541cea..905f69c 100755
--- a/ap/app/clatd/translate.c
+++ b/ap/app/clatd/translate.c
@@ -556,7 +556,10 @@
msg.msg_iov = out,
msg.msg_iovlen = iov_len,
sin6.sin6_addr = ((struct ip6_hdr *) out[CLAT_POS_IPHDR].iov_base)->ip6_dst;
- sendmsg(fd, &msg, 0);
+ if(sendmsg(fd, &msg, 0) == -1)
+ {
+ logmsg_dbg(ANDROID_LOG_ERROR,"send_rawv6 failed");
+ }
}
/* function: translate_packet
diff --git a/ap/app/hostapd-2.10/hostapd/libwpa_client.a b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
index d8e124f..536272b 100755
--- a/ap/app/hostapd-2.10/hostapd/libwpa_client.a
+++ b/ap/app/hostapd-2.10/hostapd/libwpa_client.a
Binary files differ
diff --git a/ap/app/hostapd-2.10/src/utils/common.h b/ap/app/hostapd-2.10/src/utils/common.h
index 45f72bb..8fdd89c 100755
--- a/ap/app/hostapd-2.10/src/utils/common.h
+++ b/ap/app/hostapd-2.10/src/utils/common.h
@@ -576,6 +576,8 @@
void forced_memzero(void *ptr, size_t len);
+int set_socket_tx_timeout(int sock, int second);
+
/*
* gcc 4.4 ends up generating strict-aliasing warnings about some very common
* networking socket uses that do not really result in a real problem and
diff --git a/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a b/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
index 65054c5..04c4c0e 100755
--- a/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
+++ b/ap/app/wpa_supplicant-2.10/wpa_supplicant/libwpa_client.a
Binary files differ
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c b/ap/app/zte_comm/at_ctl/src/atconfig/mnet_whitelist.c
index 2438963..bf5cca7 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
@@ -70,6 +70,9 @@
int mnet_whitelist_add(char* cmd)
{
+ char* ptr=NULL;
+ int pos_start=0;
+
if(0 == strlen(PsmIndAtCmdPrefix)){
if(strlen(cmd) > sizeof(PsmIndAtCmdPrefix)){
at_print(AT_ERR,"mnet_whitelist_add cmd too long\n");
@@ -78,42 +81,62 @@
sprintf(PsmIndAtCmdPrefix, "%s", cmd);
return MNET_WHITELIST_OPER_SUCC;
}else if(NULL != at_strstr(PsmIndAtCmdPrefix, cmd)){
- at_print(AT_ERR,"mnet_whitelist_add cmd already in\n");
- return MNET_WHITELIST_OPER_ALREADY_IN;
- }else{
- if((strlen(PsmIndAtCmdPrefix) + strlen(cmd)) < sizeof(PsmIndAtCmdPrefix)){
- sprintf(PsmIndAtCmdPrefix, "%s%s", PsmIndAtCmdPrefix, cmd);
- return MNET_WHITELIST_OPER_SUCC;
- }else{
- at_print(AT_ERR,"no space left\n");
- return MNET_WHITELIST_OPER_NOMORESPACE;
+ ptr = at_strstr(PsmIndAtCmdPrefix, cmd);
+ while(NULL !=at_strstr(ptr, cmd)){
+ ptr=at_strstr(ptr, cmd);
+ pos_start = ptr-PsmIndAtCmdPrefix;
+ if(0 == pos_start || (0 < pos_start && !isdigit(PsmIndAtCmdPrefix[pos_start-1]) && !isalpha(PsmIndAtCmdPrefix[pos_start-1]))){
+ at_print(AT_ERR,"mnet_whitelist_add cmd already in\n");
+ return MNET_WHITELIST_OPER_ALREADY_IN;
+ }
+ ptr+=strlen(cmd);
}
- }
+ }
+
+ if((strlen(PsmIndAtCmdPrefix) + strlen(cmd)) < sizeof(PsmIndAtCmdPrefix)){
+ snprintf(PsmIndAtCmdPrefix, AT_CMD_MAX, "%s%s", PsmIndAtCmdPrefix, cmd);
+ return MNET_WHITELIST_OPER_SUCC;
+ }else{
+ at_print(AT_ERR,"no space left\n");
+ return MNET_WHITELIST_OPER_NOMORESPACE;
+ }
}
int mnet_whitelist_del(char* cmd)
{
- int i=0, j=0, len = strlen(PsmIndAtCmdPrefix);
+ char* ptr=NULL;
+ int pos_start=0;
+ int i=0, j=0, len=strlen(PsmIndAtCmdPrefix);
+
if(0 == strlen(PsmIndAtCmdPrefix)){
return MNET_WHITELIST_DEL_TARGET_EMPTY;
}else{
char* pos = NULL;
char str[AT_CMD_MAX] = {0};
- pos = (at_strstr(PsmIndAtCmdPrefix, cmd));
- if(NULL != pos){
- while(i<strlen(cmd)){
- pos[i++]='\0';
- }
- i=0;
- strcpy(str, "");
- while(i<len){
- if(PsmIndAtCmdPrefix[i] != '\0') {
- str[j++] = PsmIndAtCmdPrefix[i];
+ ptr = PsmIndAtCmdPrefix;
+ if(NULL != at_strstr(PsmIndAtCmdPrefix, cmd)){
+ while(NULL != at_strstr(ptr, cmd)){
+ ptr=at_strstr(ptr, cmd);
+ pos_start = (int)(ptr-PsmIndAtCmdPrefix);
+ if(0 == pos_start || (pos_start>0 && ';' == PsmIndAtCmdPrefix[pos_start-1])){
+ while(i<strlen(cmd)){
+ ptr[i++]='\0';
+ }
+ i=0;
+ strcpy(str, "");
+ while(i<len){
+ if(PsmIndAtCmdPrefix[i] != '\0') {
+ str[j++] = PsmIndAtCmdPrefix[i];
+ }
+ i++;
+ }
+ strcpy(PsmIndAtCmdPrefix, "");
+ strcpy(PsmIndAtCmdPrefix, str);
+ break;
+ }else{
+ ptr+=strlen(cmd);
}
- i++;
}
- strcpy(PsmIndAtCmdPrefix, "");
- strcpy(PsmIndAtCmdPrefix, str);
}
}
if(strlen(PsmIndAtCmdPrefix) <2){
@@ -133,7 +156,7 @@
return;
}
ptr=cmd;
- at_print(AT_ERR,"mnet_whitelist_insert lower cmd : %s %d\n", cmd);
+ at_print(AT_ERR,"mnet_whitelist_insert lower cmd : %s\n", cmd);
while(NULL != (tmp = strchr(ptr, ';'))){
char single_cmd[200]={0};
int len = (int)(tmp-ptr)+1;
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_netdog.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_netdog.c
index f9e6b86..caaf169 100755
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_netdog.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_netdog.c
@@ -235,9 +235,11 @@
#endif
memset(ch_info->netdog_log[temp_count].partial_cmd, 0, AT_NETDOG_AT_CMD_MAX+1);
- snprintf(ch_info->netdog_log[temp_count].partial_cmd, strlen(at_prefix)+3, "[%s]", at_prefix);
+ snprintf(ch_info->netdog_log[temp_count].partial_cmd, AT_NETDOG_AT_CMD_MAX, "[%s]", at_prefix);
int buf_size = (AT_NETDOG_AT_CMD_MAX-strlen(at_prefix)-2)>len?len:(AT_NETDOG_AT_CMD_MAX-strlen(at_prefix)-2);
- memcpy(ch_info->netdog_log[temp_count].partial_cmd+strlen(ch_info->netdog_log[temp_count].partial_cmd), data, buf_size);
+ if(buf_size>0){
+ memcpy(ch_info->netdog_log[temp_count].partial_cmd+strlen(ch_info->netdog_log[temp_count].partial_cmd), data, buf_size);
+ }
(ch_info->at_netdog_count_num)++;
if(ch_info->at_netdog_count_num == AT_NETDOG_ARRAY_MAX)
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
index 94c081f..c5b86ed 100755
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
@@ -867,7 +867,6 @@
int tempPrefixlen = 0;
int ismatch = 0;
char* ptr = NULL;
- char* ptr1 = NULL;
int len_start = 0, len_end = 0;
tempPrefixlen = (prefix_len>20)? 20: prefix_len;
@@ -896,9 +895,10 @@
if(strlen(PsmIndAtCmdPrefix) != 0)
{
ptr = PsmIndAtCmdPrefix;
- while(NULL != (ptr1 = at_strstr(ptr, temp_prefix)))
+ while(NULL != at_strstr(ptr, temp_prefix))
{
- len_start = (int)(ptr1-PsmIndAtCmdPrefix);//jb.qi change for while list SMS cant resume on 20240223
+ ptr=at_strstr(ptr, temp_prefix);
+ len_start = (int)(ptr-PsmIndAtCmdPrefix);
len_end = len_start+strlen(temp_prefix);
if(0 == len_start){
if(!isdigit(PsmIndAtCmdPrefix[len_end]) && !isalpha(PsmIndAtCmdPrefix[len_end])){
@@ -912,7 +912,7 @@
break;
}
}
- ptr+=len_end;
+ ptr+=strlen(temp_prefix);
}
if(ismatch){
@@ -947,13 +947,31 @@
{
if(strlen(PsmIndAtCmdPrefix) != 0)
{
- if(at_strstr(PsmIndAtCmdPrefix, temp_prefix))
+ ptr = PsmIndAtCmdPrefix;
+ while(NULL != at_strstr(ptr, temp_prefix))
{
+ ptr=at_strstr(ptr, temp_prefix);
+ len_start = (int)(ptr-PsmIndAtCmdPrefix);
+ len_end = len_start+strlen(temp_prefix);
+ if(0 == len_start){
+ if(!isdigit(PsmIndAtCmdPrefix[len_end]) && !isalpha(PsmIndAtCmdPrefix[len_end])){
+ ismatch=1;
+ break;
+ }
+ }else{
+ if(!isdigit(PsmIndAtCmdPrefix[len_end]) && !isalpha(PsmIndAtCmdPrefix[len_end])
+ && !isdigit(PsmIndAtCmdPrefix[len_start-1]) && !isalpha(PsmIndAtCmdPrefix[len_start-1])){
+ ismatch=1;
+ break;
+ }
+ }
+ ptr+=strlen(temp_prefix);
+
+ }
+ if(ismatch){
set_fwd_fd(BROADCAST_FARPS);
at_print(AT_ERR,"[XXX]set_fwd_fd 666\n");
- }
- else
- {
+ }else{
set_fwd_fd(0);
at_print(AT_ERR,"[XXX]set_fwd_fd 777\n");
}
diff --git a/ap/app/zte_comm/nvserver/nvserver.c b/ap/app/zte_comm/nvserver/nvserver.c
index eb0e6d4..b412799 100755
--- a/ap/app/zte_comm/nvserver/nvserver.c
+++ b/ap/app/zte_comm/nvserver/nvserver.c
@@ -31,75 +31,73 @@
file,char*key,char*value);static int nvunset(char*file,char*key);static int
nvclear(char*file);static int nvreset(char*file);static int nvcommit(char*file);
T_NV_NODE*nv_list;int nvserver_main(int argc,char*argv[]){int msgId=
-(0x168b+107-0x16f6);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",
-(0x136b+1572-0x198f),(0x48d+6462-0x1dcb),(0xdb2+3219-0x1a45));memset(&rcvBuf,
-(0x831+7846-0x26d7),sizeof(rcvBuf));memset(&sndBuf,(0xfea+4708-0x224e),sizeof(
-sndBuf));memset(&msgInfo,(0x715+3909-0x165a),sizeof(msgInfo));msgId=msgget(
-MODULE_ID_NV,IPC_CREAT|(0x6d7+5925-0x1c7c));if(-(0x1148+4886-0x245d)==msgId){
-printf(
+(0x19b+1027-0x59e);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",(0x33c+3222-0xfd2),
+(0x2e2+6744-0x1d3a),(0x1418+1152-0x1898));memset(&rcvBuf,(0x11ed+2790-0x1cd3),
+sizeof(rcvBuf));memset(&sndBuf,(0x1f43+1667-0x25c6),sizeof(sndBuf));memset(&
+msgInfo,(0x125c+79-0x12ab),sizeof(msgInfo));msgId=msgget(MODULE_ID_NV,IPC_CREAT|
+(0x1908+1341-0x1cc5));if(-(0x9d6+1345-0xf16)==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-(0x44d+3091-0x105f);}if(-(0x1651+4142-0x267e)!=msgctl(msgId,
-IPC_STAT,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0xc46+6228-0x2499)==msgctl(
-msgId,IPC_SET,&msgInfo))printf(
+,errno);return-(0x2277+571-0x24b1);}if(-(0x5bb+488-0x7a2)!=msgctl(msgId,IPC_STAT
+,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0x2d9+8813-0x2545)==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()!=(0xcfa+6617-0x26d3)){printf(
+,errno);}if(nvDirInit()!=(0x238+6738-0x1c8a)){printf(
"\x6e\x76\x44\x69\x72\x49\x6e\x69\x74\x20\x66\x61\x69\x6c\x65\x21" "\n");return-
-(0x245+6777-0x1cbd);}nvConfig();nvInit();while((0x1e44+1924-0x25c7)){if(-
-(0x91f+1796-0x1022)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
-MSG_TYPE_NV,(0x120f+1370-0x1769))){printf(
+(0x4ca+5864-0x1bb1);}nvConfig();nvInit();while((0x20e2+894-0x245f)){if(-
+(0x1790+885-0x1b04)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
+MSG_TYPE_NV,(0x2fd+3597-0x110a))){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(-(0x13fc+1227-0x18c6)==msgsnd(
-msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x220f+1085-0x264c))){printf
-(
+,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0x1033+2951-0x1bb9)==msgsnd(
+msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x59d+8029-0x24fa))){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((0xa4f+3064-0x1647));}static void configdir(char*dir){
-DIR*dp;int ret;struct dirent*entry;struct stat statbuf;if((dp=opendir(dir))==
+,errno);continue;}}return((0x13d9+4251-0x2474));}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<(0x78d+6564-0x2131)){fprintf(stderr,
+d_name,&statbuf);if(ret<(0xf03+681-0x11ac)){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)==(0x10d6+165-0x117b)||strcmp("\x2e\x2e",entry->
-d_name)==(0x1e86+1040-0x2296))continue;if(!isNvConfiged(entry->d_name)){if(
+strcmp("\x2e",entry->d_name)==(0x10e3+5248-0x2563)||strcmp("\x2e\x2e",entry->
+d_name)==(0x1eda+849-0x222b))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]={(0x4a9+2613-0xede)};fp=fopen(
+val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x1b4f+31-0x1b6e)};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[
-(0x21d7+1286-0x26dd)]=='\n'||buf[(0x3e1+5008-0x1771)]==
-((char)(0x1aa+3373-0xeb4)))continue;val=strchr(buf,((char)(0x7bd+601-0x9d9)));if
-(!val){printf(
+(0x1e1a+2046-0x2618)]=='\n'||buf[(0x432+5709-0x1a7f)]==
+((char)(0xbdc+5966-0x2307)))continue;val=strchr(buf,((char)(0x53+1678-0x6a4)));
+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)-(0xe7+8054-0x205c)]='\0';*val++=
+,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0x1576+348-0x16d1)]='\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)!=(0x69a+6955-0x21c5)){if(mkdir(NV_FS_PATH,(0x116d+658-0x1212))
-!=(0xc5b+2260-0x152f)){printf(
+NV_FS_PATH,F_OK)!=(0x1156+227-0x1239)){if(mkdir(NV_FS_PATH,(0x696+534-0x6bf))!=
+(0x480+7802-0x22fa)){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-(0xbfb+1309-0x1117);}if(mkdir(NV_FS_MAIN_PATH,
-(0x564+8610-0x2519))!=(0x17e5+1992-0x1fad)){printf(
+,NV_FS_PATH,errno);return-(0xa17+7295-0x2695);}if(mkdir(NV_FS_MAIN_PATH,
+(0x7f4+1760-0xce7))!=(0x1591+1974-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-(0x13fb+1266-0x18ec);}if(mkdir(NV_FS_BACKUP_PATH,
-(0x7b5+4152-0x1600))!=(0x7df+956-0xb9b)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0xd66+2657-0x17c6);}if(mkdir(NV_FS_BACKUP_PATH,
+(0x91f+967-0xaf9))!=(0x14d+5668-0x1771)){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-(0x1d38+1078-0x216d);}}else{if(access(
-NV_FS_MAIN_PATH,F_OK)!=(0x161b+1213-0x1ad8)){if(mkdir(NV_FS_MAIN_PATH,
-(0xeb3+77-0xd13))!=(0x110f+4883-0x2422)){printf(
+,NV_FS_BACKUP_PATH,errno);return-(0x9f9+3433-0x1761);}}else{if(access(
+NV_FS_MAIN_PATH,F_OK)!=(0x134c+423-0x14f3)){if(mkdir(NV_FS_MAIN_PATH,
+(0x2514+5-0x232c))!=(0x175+7655-0x1f5c)){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-(0x125c+989-0x1638);}}if(access(NV_FS_BACKUP_PATH
-,F_OK)!=(0x317+8741-0x253c)){if(mkdir(NV_FS_BACKUP_PATH,(0x828+6476-0x1f87))!=
-(0x466+2309-0xd6b)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0xd27+5868-0x2412);}}if(access(NV_FS_BACKUP_PATH
+,F_OK)!=(0x13b7+3985-0x2348)){if(mkdir(NV_FS_BACKUP_PATH,(0xbaa+5689-0x1ff6))!=
+(0x1573+1805-0x1c80)){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-(0x4e7+2518-0xebc);}}}return(0x25b9+122-0x2633)
-;}static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
-(0x20ab+1529-0x26a4)};char nvBackupFile[NV_PATH_LEN]={(0x13d5+2526-0x1db3)};
+,NV_FS_BACKUP_PATH,errno);return-(0x6e1+2050-0xee2);}}}return(0xb8d+491-0xd78);}
+static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
+(0x8bd+7048-0x2445)};char nvBackupFile[NV_PATH_LEN]={(0xfe3+4840-0x22cb)};
#ifdef FOTA_AB
-T_FLAGS_INFO flags_info={(0x1c53+23-0x1c6a)};int ret=(0x32f+7884-0x21fb);
+T_FLAGS_INFO flags_info={(0x7ac+3792-0x167c)};int ret=(0x51f+46-0x54d);
#endif
for(list=nv_list;list;list=list->next){snprintf(nvMainFile,NV_PATH_LEN,
"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,list->nvFile);snprintf(nvBackupFile,
@@ -107,73 +105,73 @@
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()==(0xa6d+5708-0x20b7)){
+if(!strcmp(list->nvFile,NV_CFG)&&get_update_status()==(0x10c+4463-0x1279)){
reloadFactroyParam(list);delete_not_needed(list);nvcommit(list->nvFile);
#ifdef FOTA_AB
ret=flags_get(&flags_info);flags_info.boot_fota_flag.fota_status=
-(0xbfb+1777-0x12ec);ret=flags_set(&flags_info);
+(0x1f09+1628-0x2565);ret=flags_set(&flags_info);
#endif
-}}}uint hash(const char*s){uint hash=(0x3ac+3524-0x1170);while(*s){hash=
+}}}uint hash(const char*s){uint hash=(0x4e8+1196-0x994);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]={
-(0x484+2097-0xcb5)};for(config=list->fileList;config;config=config->next){fp=
+(0x7ca+6531-0x214d)};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[(0x94a+127-0x9c9)]=='\n'||buf[(0x16c3+2596-0x20e7)]
-==((char)(0xbd3+5756-0x222c)))continue;val=strchr(buf,
-((char)(0x14f2+3643-0x22f0)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x1c6b+147-0x1cfe)]=='\n'||buf[(0x89a+6841-0x2353)]
+==((char)(0xe9c+5504-0x23f9)))continue;val=strchr(buf,
+((char)(0x1ba1+1225-0x202d)));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)-(0x1ce0+2146-0x2541)]==
-'\n')buf[strlen(buf)-(0xcc8+811-0xff2)]='\0';*val++='\0';nvset(list->nvFile,buf,
-val,(0x550+460-0x71b));}printf(
+,config->configFile,buf);continue;}if(buf[strlen(buf)-(0x14f+5205-0x15a3)]=='\n'
+)buf[strlen(buf)-(0xe2b+6073-0x25e3)]='\0';*val++='\0';nvset(list->nvFile,buf,
+val,(0x7cf+5713-0x1e1f));}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=(0xc5b+5377-0x215c);int cnt=(0x1107+3957-0x207c);FILE*fp=NULL
-;char*buf=NULL;struct stat statbuff={(0x94c+4223-0x19cb)};if(stat(file,&statbuff
-)<(0x49d+2653-0xefa))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
+char*file){int len=(0x994+480-0xb74);int cnt=(0xad4+3715-0x1957);FILE*fp=NULL;
+char*buf=NULL;struct stat statbuff={(0x4b9+5506-0x1a3b)};if(stat(file,&statbuff)
+<(0x4f9+8331-0x2584))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=(0x1b4+6081-0x1975);while(cnt<len){cnt=
-cnt+fread(buf+cnt,(0xd00+2097-0x1530),len-cnt,fp);if(ferror(fp)){clearerr(fp);
+);if(!buf){fclose(fp);return false;}cnt=(0x24b+3316-0xf3f);while(cnt<len){cnt=
+cnt+fread(buf+cnt,(0x753+2474-0x10fc),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[(0x146b+3404-0x11b7)];ssize_t nread;int ret=-(0x1722+499-0x1914);
-fd_from=open(from,O_RDONLY);if(fd_from<(0x211d+480-0x22fd))return-
-(0x1a14+2092-0x223e);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
-(0x1b25+3271-0x264c));if(fd_to<(0x46c+1389-0x9d9)){ret=-(0x1976+3366-0x2699);
-goto out_error;}while((0x573+1183-0xa11)){char*out_ptr;ssize_t nwritten;nread=
-read(fd_from,buf,sizeof(buf));if(nread==(0xd83+3039-0x1962)){break;}else{if(
-nread<(0x1aef+1520-0x20df)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
-(0x1ab6+25-0x1acb);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,out_ptr
-,nread);if(nwritten>(0xcdf+3923-0x1c32)){nread-=nwritten;out_ptr+=nwritten;}else
-{if(nwritten<(0x10df+3459-0x1e62)){if(errno==EINTR||errno==EAGAIN){continue;}
-else{ret=-(0xe6b+3762-0x1d18);goto out_error;}}}}while(nread>(0x1aa5+150-0x1b3b)
-);}ret=fsync(fd_to);if(ret<(0xd91+5772-0x241d)){printf(
+char buf[(0x1cfd+5586-0x22cf)];ssize_t nread;int ret=-(0x14e4+1342-0x1a21);
+fd_from=open(from,O_RDONLY);if(fd_from<(0x80a+1267-0xcfd))return-
+(0xd49+6342-0x260d);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
+(0x11b9+1014-0x140f));if(fd_to<(0x5a4+5838-0x1c72)){ret=-(0x78f+5005-0x1b19);
+goto out_error;}while((0x1805+1563-0x1e1f)){char*out_ptr;ssize_t nwritten;nread=
+read(fd_from,buf,sizeof(buf));if(nread==(0x185d+165-0x1902)){break;}else{if(
+nread<(0x77c+3842-0x167e)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
+(0x86f+7027-0x23de);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
+out_ptr,nread);if(nwritten>(0x1447+1652-0x1abb)){nread-=nwritten;out_ptr+=
+nwritten;}else{if(nwritten<(0x8e1+3335-0x15e8)){if(errno==EINTR||errno==EAGAIN){
+continue;}else{ret=-(0x1c55+1217-0x2111);goto out_error;}}}}while(nread>
+(0x383+5266-0x1815));}ret=fsync(fd_to);if(ret<(0x845+1310-0xd63)){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)<(0x92f+4689-0x1b80)){fd_to=
--(0x165+405-0x2f9);ret=-(0xcad+2821-0x17ac);goto out_error;}close(fd_from);
-return(0x165c+3755-0x2507);out_error:printf(
+,strerror(errno),to);goto out_error;}if(close(fd_to)<(0xd07+2168-0x157f)){fd_to=
+-(0xb90+3308-0x187b);ret=-(0x7f+5964-0x17c5);goto out_error;}close(fd_from);
+return(0xf04+228-0xfe8);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>=(0x485+209-0x556))close(fd_to);return ret
-;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,dstFile)
-!=(0xc56+3583-0x1a55))return RESULT_FAIL;return RESULT_SUCCESS;}static int
-loadNvFs(char*file){int len=(0x1da+2584-0xbf2);int cnt=(0x2e4+6559-0x1c83);FILE*
-fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct stat
-statbuff={(0xd39+5310-0x21f7)};char nvFile[NV_PATH_LEN]={(0x1113+410-0x12ad)};
-sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);if(stat(nvFile,&
-statbuff)<(0xf89+4763-0x2224))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+
-(0x1e1d+1264-0x230c));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
-(0x85d+2864-0x138d),len+(0x239c+101-0x2400));cnt=(0x1e63+1874-0x25b5);while(cnt<
-len){cnt=cnt+fread(buf+cnt,(0x11e5+3948-0x2150),len-cnt,fp);if(ferror(fp)){
+,from,to,ret);close(fd_from);if(fd_to>=(0x1229+3095-0x1e40))close(fd_to);return
+ret;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,
+dstFile)!=(0xe85+5500-0x2401))return RESULT_FAIL;return RESULT_SUCCESS;}static
+int loadNvFs(char*file){int len=(0x39a+5632-0x199a);int cnt=(0xfcb+3355-0x1ce6);
+FILE*fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct
+stat statbuff={(0x439+8009-0x2382)};char nvFile[NV_PATH_LEN]={
+(0x15e9+1690-0x1c83)};sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file
+);if(stat(nvFile,&statbuff)<(0xb3f+2843-0x165a))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+
+(0x126d+230-0x1352));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
+(0x10a+6361-0x19e3),len+(0x17a1+3278-0x246e));cnt=(0x8f+4690-0x12e1);while(cnt<
+len){cnt=cnt+fread(buf+cnt,(0xa7d+3693-0x18e9),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)(0x1425+3660-0x2234))))){break;}*eq='\0';value
-=eq+(0xa69+249-0xb61);nvset(file,name,value,(0xfa8+5632-0x25a7));*eq=
-((char)(0x1997+3144-0x25a2));name=value+strlen(value)+(0x1404+219-0x14de);}free(
+*name){if(!(eq=strchr(name,((char)(0x1a41+2496-0x23c4))))){break;}*eq='\0';value
+=eq+(0xf+4560-0x11de);nvset(file,name,value,(0xf40+4852-0x2233));*eq=
+((char)(0xe2+8910-0x2373));name=value+strlen(value)+(0x1de0+2069-0x25f4);}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
@@ -189,14 +187,14 @@
"\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-(0x792+737-0xa72));newConfig->configFile[
-NV_PATH_LEN-(0x336+4895-0x1654)]='\0';newConfig->next=NULL;}for(list=nv_list;
-list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x12cf+4172-0x231b))break
-;}if(!list){newList=(T_NV_NODE*)malloc(sizeof(T_NV_NODE));if(!newList){if(
+configFile,configFile,NV_PATH_LEN-(0x1e39+1636-0x249c));newConfig->configFile[
+NV_PATH_LEN-(0x5c8+7085-0x2174)]='\0';newConfig->next=NULL;}for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x6e9+6638-0x20d7))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-(0x1e37+1194-0x22e0));newList->nvFile[
-NV_PATH_LEN-(0x5ef+1460-0xba2)]='\0';memset(newList->nvTable,(0x35+4658-0x1267),
-NV_HASH_LEN*(0xdb6+6023-0x2539));newList->fileList=newConfig;if(!nv_list)nv_list
+newList->nvFile,nvFile,NV_PATH_LEN-(0x3d5+3633-0x1205));newList->nvFile[
+NV_PATH_LEN-(0xe8+1092-0x52b)]='\0';memset(newList->nvTable,(0x1f8+616-0x460),
+NV_HASH_LEN*(0xba4+3437-0x190d));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
@@ -206,87 +204,86 @@
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=
-(0xfc+7232-0x1d3c);char*data=(char*)s;while(len-- >(0x1f3c+1003-0x2327)){sum+=(*
+(0x165+6562-0x1b07);char*data=(char*)s;while(len-- >(0x13a+7369-0x1e03)){sum+=(*
data++);}return sum;}static int saveNvFs(char*nvName,char*nvFile){int i=
-(0x6f5+5849-0x1dce);int sum=(0x6e3+6413-0x1ff0);int bufSize=(0x6ad+5914-0x1dc7);
-int itemSize=(0x1402+763-0x16fd);int ret=(0x9b6+5119-0x1db5);int fp=
-(0x6d+300-0x199);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,(0x1ea2+261-0x1e07));if(fp==-
-(0x1b18+1300-0x202b)){printf(
+(0x50f+5021-0x18ac);int sum=(0x225+3552-0x1005);int bufSize=(0xd6c+6179-0x258f);
+int itemSize=(0x715+5925-0x1e3a);int ret=(0xf6+8335-0x2185);int fp=
+(0x529+1968-0xcd9);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,(0xf5d+1815-0x14d4));if(fp==-
+(0x99b+3934-0x18f8)){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=(0x441+8786-0x2693);i<
+(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0x22a+7316-0x1ebe);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)+(0x112b+4812-0x23f5);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp
-,buf,bufSize)<(0x515+5807-0x1bc4)){printf(
+item->value)+(0x42c+5383-0x1931);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp,
+buf,bufSize)<(0x455+2058-0xc5f)){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=(0x7b1+4312-0x1889);}sprintf(buf+bufSize,
++=getSum(buf,bufSize);bufSize=(0x15cd+3700-0x2441);}sprintf(buf+bufSize,
"\x25\x73\x3d\x25\x73",item->key,item->value);bufSize+=itemSize;}}if(bufSize!=
-(0x750+7750-0x2596)){if(write(fp,buf,bufSize)<(0xc24+3179-0x188f)){printf(
+(0x17c3+3734-0x2659)){if(write(fp,buf,bufSize)<(0x5a9+1704-0xc51)){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)<(0xe2d+5002-0x21b7))
+bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0x1c3c+259-0x1d3f))
{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<(0x13b9+637-0x1636)){printf(
+buf);close(fp);if(ret<(0x368+3154-0xfba)){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=
-(0x8a4+3409-0x15f5);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
+(0x1774+191-0x1833);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-(0x40a+3474-0x119b));
-value[NV_MAX_VAL_LEN-(0x112f+976-0x14fe)]='\0';return RESULT_SUCCESS;}}return
+key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0x2034+731-0x230e));
+value[NV_MAX_VAL_LEN-(0x60b+4377-0x1723)]='\0';return RESULT_SUCCESS;}}return
RESULT_NO_ITEM;}static int nvset(char*file,const char*key,const char*value,int
-saveFlag){int index=(0x93c+3629-0x1769);int ret=(0x846+3321-0x153f);int
-key_buf_len=(0x12fc+2401-0x1c5d);int value_buf_len=(0x15e8+2955-0x2173);
-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)+(0x18e8+421-0x1a8c);
-value_buf_len=strlen(value)+(0x1064+1325-0x1590);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-(0x1152+2977-0x1cf2));item->value[value_buf_len-
-(0x244+5698-0x1885)]='\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-(0xb27+5653-0x213b));newItem->key[key_buf_len-(0x8fa+6926-0x2407)]=
-'\0';strncpy(newItem->value,value,value_buf_len-(0x9e9+4249-0x1a81));newItem->
-value[value_buf_len-(0xecb+4669-0x2107)]='\0';newItem->next=NULL;newItem->
-saveFlag=saveFlag;newItem->update_flag=(0x13f+8511-0x227e);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=
-(0x32+6702-0x1a60);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=(0xbf2+4389-0x1d17);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=(0x20a3+533-0x22b8);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=(0x110a+3085-0x1d17);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=(0xc94+3452-0x1a10);char nvMainFile[
-NV_PATH_LEN]={(0x2a6+6844-0x1d62)};char nvBackupFile[NV_PATH_LEN]={
-(0x5a1+3217-0x1232)};sprintf(nvMainFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,
-file);sprintf(nvBackupFile,"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=
-saveNvFs(file,nvMainFile);if(ret!=RESULT_SUCCESS)return ret;return restoreNvFs(
-nvBackupFile,nvMainFile);}
+saveFlag){int index=(0x2ec+952-0x6a4);int ret=(0x34c+3613-0x1169);int
+key_buf_len=(0x6+576-0x246);int value_buf_len=(0xbfb+5526-0x2191);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)+(0xdec+2218-0x1695);value_buf_len=
+strlen(value)+(0x1cbb+947-0x206d);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-
+(0xcca+2556-0x16c5));item->value[value_buf_len-(0x16e3+3168-0x2342)]='\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-(0x677+2186-0xf00));
+newItem->key[key_buf_len-(0xc67+6276-0x24ea)]='\0';strncpy(newItem->value,value,
+value_buf_len-(0x19af+2829-0x24bb));newItem->value[value_buf_len-
+(0x59+2690-0xada)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem->
+update_flag=(0x216+3937-0x1177);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=(0x209c+1544-0x26a4);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=(0x5a2+6070-0x1d58);
+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=(0x2c2+3286-0xf98);
+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=(0x11+8410-0x20eb)
+;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=
+(0x514+7252-0x2168);char nvMainFile[NV_PATH_LEN]={(0x20f9+1461-0x26ae)};char
+nvBackupFile[NV_PATH_LEN]={(0x1cca+1765-0x23af)};sprintf(nvMainFile,
+"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);sprintf(nvBackupFile,
+"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=saveNvFs(file,nvMainFile);if(
+ret!=RESULT_SUCCESS)return ret;return restoreNvFs(nvBackupFile,nvMainFile);}
#ifdef __cplusplus
}
#endif
diff --git a/ap/app/zte_comm/nvserver/nvupdate.c b/ap/app/zte_comm/nvserver/nvupdate.c
index 6873d11..5fe0b94 100755
--- a/ap/app/zte_comm/nvserver/nvupdate.c
+++ b/ap/app/zte_comm/nvserver/nvupdate.c
@@ -23,84 +23,83 @@
#endif
extern T_NV_NODE*nv_list;
#ifdef FOTA_AB
-int get_update_status(void){T_FLAGS_INFO flags_info={(0x7c6+5329-0x1c97)};
-unsigned int status=(0x3db+6933-0x1ef0);int ret=(0x1398+54-0x13ce);ret=flags_get
-(&flags_info);status=flags_info.boot_fota_flag.fota_status;if(status==
-(0x4bd+7488-0x21fc))return(0xfdf+5344-0x24bd);else return(0x368+7058-0x1efa);}
+int get_update_status(void){T_FLAGS_INFO flags_info={(0x1a94+3094-0x26aa)};
+unsigned int status=(0x6c2+7209-0x22eb);int ret=(0xb89+2157-0x13f6);ret=
+flags_get(&flags_info);status=flags_info.boot_fota_flag.fota_status;if(status==
+(0x9c1+2066-0x11d2))return(0xcd0+8-0xcd6);else return(0x626+1119-0xa85);}
#else
-int get_update_status(void){int update_status;FILE*fd=(0x666+4681-0x18af);int
-ret;char*filename=NULL;if(access(FOTA_UPDATE_STATUS_FILE_OLD,R_OK)==
-(0x15ba+671-0x1859)){filename=FOTA_UPDATE_STATUS_FILE_OLD;}else{filename=
+int get_update_status(void){int update_status;FILE*fd=(0xa0+2051-0x8a3);int ret;
+char*filename=NULL;if(access(FOTA_UPDATE_STATUS_FILE_OLD,R_OK)==
+(0x60b+4451-0x176e)){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<(0x2350+862-0x26ae)){printf(
+(ret<(0x1998+2711-0x242f)){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-(0x1ef4+122-0x1f6d)
-;}
+update_status);fclose(fd);return update_status;error0:return-(0xc87+639-0xf05);}
#endif
int nvupdate(char*nv_file,char*config_file,const char*key,const char*value,int
-saveFlag){int index=(0x1642+2936-0x21ba);int key_buf_len=(0xb70+597-0xdc5);int
-value_buf_len=(0xa26+333-0xb73);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;
+saveFlag){int index=(0x113+3235-0xdb6);int key_buf_len=(0x1937+64-0x1977);int
+value_buf_len=(0xed0+5723-0x252b);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)+(0x926+4405-0x1a5a);value_buf_len=
-strlen(value)+(0x166b+2115-0x1ead);for(list=nv_list;list;list=list->next){if(
+,nv_file,key,value);key_buf_len=strlen(key)+(0x329+1386-0x892);value_buf_len=
+strlen(value)+(0xb8a+6298-0x2423);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=(0xe5f+2443-0x17e9);printf(
+update_flag=(0xf5+2879-0xc33);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((0x987+4915-0x1cb9)==item->update_flag){
+config_file,"\x75\x73\x65\x72")){if((0x6a7+2622-0x10e4)==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=
-(0x422+7732-0x2255);printf(
+(0x1136+3845-0x203a);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-(0x148d+4721-0x26fd));item->value[value_buf_len-
-(0x1cf+4652-0x13fa)]='\0';item->update_flag=(0x92+7434-0x1d9b);return
+value,value_buf_len-(0x73+5674-0x169c));item->value[value_buf_len-
+(0xa71+1652-0x10e4)]='\0';item->update_flag=(0x1e48+5-0x1e4c);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)+
-(0x14+5538-0x15b5));if(!newItem->key){free(newItem);printf(
+(0xa71+4160-0x1ab0));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-
-(0x1381+3330-0x2082));newItem->key[key_buf_len-(0x1165+4520-0x230c)]='\0';
-strncpy(newItem->value,value,value_buf_len-(0x69b+1136-0xb0a));newItem->value[
-value_buf_len-(0x720+2023-0xf06)]='\0';newItem->next=NULL;newItem->saveFlag=
-saveFlag;newItem->update_flag=(0x435+8105-0x23dd);printf(
+(0x18da+1942-0x206f));newItem->key[key_buf_len-(0xee1+4604-0x20dc)]='\0';strncpy
+(newItem->value,value,value_buf_len-(0x1af+9285-0x25f3));newItem->value[
+value_buf_len-(0x6fd+3859-0x160f)]='\0';newItem->next=NULL;newItem->saveFlag=
+saveFlag;newItem->update_flag=(0x1014+4535-0x21ca);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]={(0xbd2+4375-0x1ce9)};printf(
+NV_MAX_ITEM_LEN]={(0xe4c+4998-0x21d2)};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[(0x1173+2974-0x1d11)]=='\n'||buf[(0x36f+7242-0x1fb9)
-]==((char)(0x1a14+1717-0x20a6)))continue;val=strchr(buf,
-((char)(0x6b0+7867-0x252e)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x1d4+4538-0x138e)]=='\n'||buf[(0x1245+4780-0x24f1)
+]==((char)(0x1a2+777-0x488)))continue;val=strchr(buf,((char)(0x1805+998-0x1bae))
+);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)-(0x1143+2434-0x1ac4)]='\0';*
-val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0x1446+2881-0x1f86)
-);}printf(
+,config->configFile,buf);continue;}buf[strlen(buf)-(0x1107+5028-0x24aa)]='\0';*
+val++='\0';nvupdate(list->nvFile,config->configFile,buf,val,(0x6d4+1373-0xc30));
+}printf(
"\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x72\x65\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x63\x6f\x6e\x66\x69\x67\x46\x69\x6c\x65\x20\x65\x6e\x64\x3a\x25\x73\x21" "\n"
,config->configFile);fclose(fp);}return RESULT_SUCCESS;}void dump_list(T_NV_ITEM
*list){if(list==NULL){printf(
@@ -108,11 +107,11 @@
list->next;while(p!=NULL){printf(
"\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x64\x75\x6d\x70\x20\x6b\x65\x79\x3d\x25\x73\x2c\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x2c\x20\x70\x3d\x30\x78\x25\x78" "\n"
,p->key,p->value,((unsigned int)p));p=p->next;}}int delete_not_needed(T_NV_NODE*
-list){int index=(0x210b+1495-0x26e2);T_NV_ITEM*item=NULL;T_NV_ITEM head={
-(0x6a0+5136-0x1ab0)};T_NV_ITEM*prev=&head;printf(
+list){int index=(0x14d+9027-0x2490);T_NV_ITEM*item=NULL;T_NV_ITEM head={
+(0x162a+629-0x189f)};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=(0x17f2+2607-0x2221);index<NV_HASH_LEN;index++){head.next=list->
-nvTable[index];prev=&head;for(item=prev->next;item;){if((0xc20+3494-0x19c5)==
+);for(index=(0x12ff+331-0x144a);index<NV_HASH_LEN;index++){head.next=list->
+nvTable[index];prev=&head;for(item=prev->next;item;){if((0x9ca+5387-0x1ed4)==
item->update_flag){prev=item;item=item->next;}else{printf(
"\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x64\x65\x6c\x65\x74\x65\x20\x6b\x65\x79\x3d\x25\x73\x2c\x20\x76\x61\x6c\x75\x65\x3d\x25\x73\x20" "\n"
,item->key,item->value);prev->next=item->next;free(item->key);free(item->value);
diff --git a/ap/app/zte_comm/phonebook/src/pb_db.c b/ap/app/zte_comm/phonebook/src/pb_db.c
index 7ffbfa4..612832f 100755
--- a/ap/app/zte_comm/phonebook/src/pb_db.c
+++ b/ap/app/zte_comm/phonebook/src/pb_db.c
@@ -1,8 +1,8 @@
#include "pb_com.h"
T_zPb_DbResult atPb_CreatDb(){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0x1e98+1267-0x238b)};UINT32 count=(0xc91+6265-0x250a);result
-=atPb_ExecDbSql(ZPB_CREATE_PBM_TABLE,NULL,NULL);if(ZPB_DB_OK!=result){slog(
+ZPB_MAX_BYTES_DB]={(0xa18+1459-0xfcb)};UINT32 count=(0xcf4+121-0xd6d);result=
+atPb_ExecDbSql(ZPB_CREATE_PBM_TABLE,NULL,NULL);if(ZPB_DB_OK!=result){slog(
PB_PRINT,SLOG_ERR,
"\x70\x62\x3a\x70\x62\x6d\x3a\x63\x72\x65\x61\x74\x65\x20\x70\x62\x6d\x20\x74\x61\x62\x6c\x65\x20\x72\x65\x73\x75\x6c\x74\x20\x69\x73\x20\x25\x64" "\n"
,result);return result;}result=atPb_ExecDbSql(
@@ -18,18 +18,18 @@
,ZPB_DB_PBM_TABLE,ZPB_LOCATION_USIM);result=atPb_ExecDbSql(sql,NULL,NULL);if(
ZPB_DB_OK!=result){slog(PB_PRINT,SLOG_ERR,
"\x70\x62\x3a\x70\x62\x6d\x3a\x63\x72\x65\x61\x74\x65\x20\x70\x62\x6d\x5f\x64\x65\x76\x69\x63\x65\x5f\x63\x61\x70\x61\x62\x69\x6c\x69\x74\x79\x20\x74\x61\x62\x6c\x65\x20\x72\x65\x73\x75\x6c\x74\x20\x69\x73\x20\x25\x64" "\n"
-,result);return result;}memset(sql,(0xdab+4942-0x20f9),sizeof(sql));snprintf(sql
-,sizeof(sql)-(0x65a+3682-0x14bb),
+,result);return result;}memset(sql,(0x7c5+5991-0x1f2c),sizeof(sql));snprintf(sql
+,sizeof(sql)-(0x1432+499-0x1624),
"\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((0xfbc+5649-0x25cd)<count){memset(sql,(0x802+3233-0x14a3),sizeof(sql))
-;snprintf(sql,sizeof(sql)-(0x1c6+5912-0x18dd),
+count);if((0x909+2722-0x13ab)<count){memset(sql,(0xac0+1332-0xff4),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0xf9+4197-0x115d),
"\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]={(0x18d4+1920-0x2054)};result=
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xdc5+5487-0x2334)};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 (0xe03+6250-0x266d)
+#if (0xf3c+599-0x1193)
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)==(0xbf7+3288-0x18cf)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZPB_TMP_PATH,F_OK)==(0xc25+780-0xf31)){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)!=(0x1e15+1693-0x24b2)){slog(PB_PRINT,SLOG_ERR,
+remove(ZPB_TMP_PATH)!=(0x1112+1820-0x182e)){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)!=(0xd2d+1757-0x140a)){slog(PB_PRINT,
+);}}if(rename(ZPB_SEC_PATH,ZPB_TMP_PATH)!=(0x2086+594-0x22d8)){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[(0xa32+783-0xd29)]={(0x57+7462-0x1d7d)};char cmd[
-(0x10c5+3406-0x1d93)]={(0xe02+4685-0x204f)};sc_cfg_get(
+);}{char rnum_buf[(0x45c+262-0x54a)]={(0x9fb+441-0xbb4)};char cmd[
+(0x18cd+3766-0x2703)]={(0x1848+476-0x1a24)};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
-)==(0x796+6072-0x1f4e)){if(remove(ZPB_TMP_PATH)!=(0x9db+4656-0x1c0b)){slog(
+)==(0xe62+5813-0x2517)){if(remove(ZPB_TMP_PATH)!=(0x773+832-0xab3)){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(0x1329+1998-0x1af7);}return
-(0x1443+1704-0x1aea);}return(0x491+5125-0x1896);}T_zPb_DbResult atPb_ExecDbSql(
+(pSql,"\x3b")||strstr(pSql,"\x2d\x2d")){return(0xc3a+5669-0x225f);}return
+(0x120a+1638-0x186f);}return(0x260+5672-0x1888);}T_zPb_DbResult atPb_ExecDbSql(
const char*pSql,sqlite3_callback callback,VOID*pFvarg){sqlite3*pDb=NULL;CHAR
-dbErrMsg[(0x19f9+1349-0x1ebe)]={(0x5b0+8040-0x2518)};if(NULL==pSql){return
+dbErrMsg[(0x1060+1739-0x16ab)]={(0x861+1805-0xf6e)};if(NULL==pSql){return
ZPB_DB_ERROR_INVALIDPTR;}
#ifdef WEBS_SECURITY
-if(check_sql_cmd(pSql)==(0x1497+2828-0x1fa3)){slog(PB_PRINT,SLOG_ERR,
+if(check_sql_cmd(pSql)==(0x1812+2302-0x2110)){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,33 @@
);return ZPB_DB_ERROR_NOTOPENDB;}slog(PB_PRINT,SLOG_DEBUG,
"\x70\x62\x3a\x61\x74\x50\x62\x5f\x45\x78\x65\x63\x44\x62\x53\x71\x6c\x3a\x25\x73" "\n"
,pSql);if(sqlite3_exec(pDb,pSql,callback,pFvarg,NULL)){strncpy(dbErrMsg,
-sqlite3_errmsg(pDb),sizeof(dbErrMsg)-(0x177+4657-0x13a7));slog(PB_PRINT,SLOG_ERR
-,
+sqlite3_errmsg(pDb),sizeof(dbErrMsg)-(0x79+7975-0x1f9f));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=(0x1158+3696-0x1fc8);if((0x1d0d+21-0x1d21)>line){slog(
+char**lname){SINT32 index=(0x337+6884-0x1e1b);if((0x5bb+8294-0x2620)>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-(0x73+7933-0x1f6f);}index=atoi(zresult[(0x19c6+724-0x1c9a)]);if(index>
+);return-(0x75d+2101-0xf91);}index=atoi(zresult[(0x1672+946-0x1a24)]);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-(0x14a5+2820-0x1fa8);}slog(PB_PRINT,SLOG_DEBUG,
+);return-(0x7b+5675-0x16a5);}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(0x9f1+5375-0x1ef0);}
-T_zPb_DbResult atPb_InitApIndex(){CHAR sql[ZPB_MAX_BYTES_DB]={(0x196+1441-0x737)
-};SINT32 i=(0x1253+1766-0x1938);g_zPb_ApIndex[(0x13a2+2946-0x1f24)]=
-ZPB_AP_MAX_RECORD;for(i=(0xcaa+681-0xf52);i<=g_zPb_ApIndex[(0x7ec+1435-0xd87)];i
-++){g_zPb_ApIndex[i]=PBM_ERROR_NOT_FOUND;}snprintf(sql,sizeof(sql),
+,index);g_zPb_ApIndex[index]=PBM_SUCCESS;return(0x1390+4084-0x2384);}
+T_zPb_DbResult atPb_InitApIndex(){CHAR sql[ZPB_MAX_BYTES_DB]={
+(0x144c+2337-0x1d6d)};SINT32 i=(0xf0c+3746-0x1dad);g_zPb_ApIndex[
+(0x2bb+2963-0xe4e)]=ZPB_AP_MAX_RECORD;for(i=(0x5f1+7666-0x23e2);i<=g_zPb_ApIndex
+[(0xc4f+3066-0x1849)];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(-(0xbd5+6207-0x2413)==
-access(path,(0x1f39+167-0x1fe0))){slog(PB_PRINT,SLOG_DEBUG,
+ZUFI_NULL);}INT zte_pbm_check_and_creat_dir(char*path){if(-(0x1754+2896-0x22a3)
+==access(path,(0xe5a+3660-0x1ca6))){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(-(0x27+5544-0x15ce)==mkdir(path,(0x1129+5186-0x236c))){slog(
+,ZPB_DB_DIR);if(-(0xa9f+1675-0x1129)==mkdir(path,(0x19b9+943-0x1b69))){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-(0x160+4591-0x134e);}}return(0x862+2229-0x1117);}UINT8
+);return-(0xfef+5195-0x2439);}}return(0x1ad7+1793-0x21d8);}UINT8
zte_pbm_check_web_pbm_dir(VOID){
#ifdef _MBB_OS_UCLINUX
(VOID)zte_pbm_check_and_creat_dir(
@@ -142,21 +142,21 @@
"\x2f\x65\x74\x63\x5f\x72\x77\x2f\x63\x6f\x6e\x66\x69\x67");
#endif
return ZUFI_SUCC;}T_zPb_DbResult atPb_DelSimRecFromPbTable(SINT32 index){
-T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0xa01+1-0xa02)};
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x941+1512-0xf29)};
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]={(0x62d+3202-0x12af)};if(NULL==
+result=ZPB_DB_ERROR;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1bf3+1732-0x22b7)};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[(0xad0+3129-0x16d7)]={(0xa30+5326-0x1efe)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,
-pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x2140+226-0x2221))&&(pbPara->pbIndex
+pbMax[(0xbf0+2331-0x14d9)]={(0x899+6383-0x2188)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,
+pbMax,sizeof(pbMax));if((pbPara->pbIndex>=(0x1ac+5421-0x16d8))&&(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 +173,17 @@
pbmPara->pbType,pbmPara->name,pbmPara->homeNumber,pbmPara->officeNumber,pbmPara
->email,pbmPara->sne,pbmPara->group,pbmPara->pbId);}}T_zPb_DbResult
atPb_DbGetParamCb(VOID*fvarg,int line,char**zresult,char**lname){T_zPb_Header
-para={(0xa4d+4765-0x1cea)};if((0x1b83+1695-0x2221)>line){slog(PB_PRINT,SLOG_ERR,
+para={(0x72d+5619-0x1d20)};if((0xb11+1079-0xf47)>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[(0x10a4+5554-0x2656)]);para.
-pbLocation=atoi(zresult[(0x1c7b+34-0x1c9c)]);slog(PB_PRINT,SLOG_DEBUG,
+);return ZPB_DB_ERROR;}para.pbIndex=atoi(zresult[(0x3c2+4006-0x1368)]);para.
+pbLocation=atoi(zresult[(0xa28+7263-0x2686)]);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]={(0x228c+847-0x25db)};snprintf(sql,sizeof(sql)-
-(0xfd3+4378-0x20ec),
+ZPB_MAX_BYTES_DB]={(0xc64+4367-0x1d73)};snprintf(sql,sizeof(sql)-
+(0x18b+2566-0xb90),
"\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,(0x1f44+1556-0x2558),sizeof(
+,ZPB_DB_PBM_TABLE,pbPara->pbId);memset(pbPara,(0x425+6085-0x1bea),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 +195,8 @@
pbmPara->pbType,pbmPara->name,pbmPara->homeNumber,pbmPara->officeNumber,pbmPara
->email,pbmPara->sne,pbmPara->group);}}T_zPb_DbResult
atPb_WriteContactToPbmTable(T_zPb_WebContact*pPbRecord,BOOL pbNewFlag){
-T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x4a6+5909-0x1bbb)}
-;if(NULL==pPbRecord){slog(PB_PRINT,SLOG_ERR,
+T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1ae1+2405-0x2446)
+};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 +206,75 @@
ZPB_LOCATION_USIM==pPbRecord->pbLocation){g_zPb_SimIndex[(pPbRecord->pbIndex)]=
PBM_SUCCESS;}else if(ZPB_LOCATION_AP==pPbRecord->pbLocation){g_zPb_ApIndex[(
pPbRecord->pbIndex)]=PBM_SUCCESS;}}return result;}SINT32 atPb_DbCountTableLineCb
-(VOID*fvarg,int line,char**zresult,char**lname){if((0x4c3+3-0x4c5)>line){slog(
-PB_PRINT,SLOG_ERR,
+(VOID*fvarg,int line,char**zresult,char**lname){if((0x1138+5064-0x24ff)>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-(0x1a2d+429-0x1bd9);}*(int*)fvarg=atoi(zresult[(0xf54+4285-0x2011)]);
-return(0x2bb+2780-0xd97);}T_zPb_DbResult atPb_SetSimCapacityTable(
+);return-(0x266+3657-0x10ae);}*(int*)fvarg=atoi(zresult[(0x72d+6770-0x219f)]);
+return(0x13e6+3883-0x2311);}T_zPb_DbResult atPb_SetSimCapacityTable(
T_zPb_UsimCapacity pbPara){T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[
-ZPB_MAX_BYTES_DB]={(0x170c+952-0x1ac4)};UINT32 count=(0x43c+3857-0x134d);
-snprintf(sql,sizeof(sql)-(0x1b4c+2234-0x2405),
+ZPB_MAX_BYTES_DB]={(0x1404+694-0x16ba)};UINT32 count=(0xea4+2305-0x17a5);
+snprintf(sql,sizeof(sql)-(0xea2+682-0x114b),
"\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((0x2e6+7806-0x2164)<count){memset(sql,(0x1bb+5551-0x176a),sizeof(sql))
-;snprintf(sql,sizeof(sql)-(0x1546+3387-0x2280),
+count);if((0x77f+4469-0x18f4)<count){memset(sql,(0x850+47-0x87f),sizeof(sql));
+snprintf(sql,sizeof(sql)-(0x1c56+2255-0x2524),
"\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,(0x1634+3725-0x24c1),sizeof(sql));snprintf(sql,
-sizeof(sql)-(0x4d0+2655-0xf2e),"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,(0x10c6+4444-0x2222),sizeof(sql));snprintf(sql,
+sizeof(sql)-(0x1038+3929-0x1f90),"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]={
-(0x16aa+2339-0x1fcd)};SINT32 count=(0xc2a+3088-0x183a);T_zPb_ApCapacity pbPara={
-(0x1601+1288-0x1b09)};snprintf(sql,sizeof(sql)-(0x19+90-0x72),
+{T_zPb_DbResult result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x371+8251-0x23ac)
+};SINT32 count=(0x3db+5157-0x1800);T_zPb_ApCapacity pbPara={(0xfe3+1031-0x13ea)}
+;snprintf(sql,sizeof(sql)-(0x1f4c+1894-0x26b1),
"\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((0x162b+3846-0x2531)<count){memset(sql,
-(0x1436+1304-0x194e),sizeof(sql));snprintf(sql,sizeof(sql)-(0x7cf+6732-0x221a),
+atPb_DbCountTableLineCb,&count);if((0x5f4+7865-0x24ad)<count){memset(sql,
+(0xa6c+762-0xd66),sizeof(sql));snprintf(sql,sizeof(sql)-(0x102a+5071-0x23f8),
"\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,(0xcdc+3588-0x1ae0),sizeof(sql));snprintf(sql,
-sizeof(sql)-(0x4dd+8729-0x26f5),
+);return result;}}memset(sql,(0x10f4+299-0x121f),sizeof(sql));snprintf(sql,
+sizeof(sql)-(0x84b+2248-0x1112),
"\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,(0x70+7042-0x1bf2),sizeof(
-sql));snprintf(sql,sizeof(sql)-(0x4a2+3874-0x13c3),
+,pbPara.maxRecordNum,pbPara.usedRecordNum);memset(sql,(0x305+449-0x4c6),sizeof(
+sql));snprintf(sql,sizeof(sql)-(0x84c+5612-0x1e37),
"\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=
-(0x140+8775-0x2387);if((0x91d+4182-0x1972)>line){return ZPB_DB_ERROR;}pbIndex=(
+(0x57+1728-0x717);if((0xca5+3672-0x1afc)>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+(0xa1a+5405-0x1f36)]=atoi(zresult[(0x13f5+2173-0x1c72)]);
+,i);pbIndex->apIndex[i+(0xfc7+2696-0x1a4e)]=atoi(zresult[(0x1a25+1858-0x2167)]);
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+(0xc47+3134-0x1884)]);pbIndex->count=i+(0x638+5351-0x1b1e);
+,pbIndex->apIndex[i+(0x1281+5055-0x263f)]);pbIndex->count=i+(0x266c+24-0x2683);
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]
-={(0xa7f+4342-0x1b75)};SINT32 countByGroup=(0x16a6+2903-0x21fd);CHAR pbGroup[
-ZPB_PARAM_SIZE20]={(0xd44+850-0x1096)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
-pbGroup));snprintf(sql,sizeof(sql)-(0x16c2+1052-0x1add),
+={(0xd45+5157-0x216a)};SINT32 countByGroup=(0x1e52+2159-0x26c1);CHAR pbGroup[
+ZPB_PARAM_SIZE20]={(0x189f+3398-0x25e5)};sc_cfg_get(ZPB_NV_GROUP,pbGroup,sizeof(
+pbGroup));snprintf(sql,sizeof(sql)-(0x28f+2909-0xdeb),
"\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,(0xc79+5505-0x21fa),sizeof(sql
-));snprintf(sql,sizeof(sql)-(0xd57+3765-0x1c0b),
+atPb_DbCountTableLineCb,&countByGroup);memset(sql,(0xbe9+2962-0x177b),sizeof(sql
+));snprintf(sql,sizeof(sql)-(0x2d5+1739-0x99f),
"\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,
-(0x1c74+1487-0x2243),sizeof(sql));snprintf(sql,sizeof(sql)-(0x1d2f+188-0x1dea),
+(0xb6b+5916-0x2287),sizeof(sql));snprintf(sql,sizeof(sql)-(0x7bf+12-0x7ca),
"\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 +282,7 @@
"\x70\x62\x3a\x70\x62\x6d\x3a\x65\x78\x65\x63\x20\x74\x61\x62\x6c\x65\x20\x25\x73\x20\x72\x65\x73\x75\x6c\x74\x20\x25\x64" "\n"
,ZPB_DB_PBM_TABLE,result);}else{return ZPB_DB_ERROR;}(VOID)sc_cfg_set(
ZPB_NV_GROUP,"");return result;}VOID atPb_GetLocationIndexForDel(T_zPb_DelInfo*
-recData,SINT32 delTime){T_zPb_Header pbHeader={(0xdf1+4246-0x1e87)};if(NULL==
+recData,SINT32 delTime){T_zPb_Header pbHeader={(0xd1+9326-0x253f)};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 +293,30 @@
"\x70\x62\x3a\x70\x62\x6d\x3a\x64\x65\x6c\x20\x69\x6e\x64\x65\x78\x3d\x25\x64\x2c\x6c\x6f\x63\x61\x74\x69\x6f\x6e\x3d\x25\x64\x2c\x64\x65\x6c\x5f\x70\x62\x6d\x5f\x74\x69\x6d\x65\x3d\x25\x64"
,recData->delIndex[delTime],recData->delLocation,delTime);}T_zPb_DbResult
atPb_DelARecFromPbmTable(T_zPb_DelInfo*pbPara,SINT32 delTime){T_zPb_DbResult
-result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x404+1518-0x9f2)};if(NULL==pbPara
+result=ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x1c93+65-0x1cd4)};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)-(0x2453+196-0x2516),
+,delTime,pbPara->delId[delTime]);snprintf(sql,sizeof(sql)-(0x1b63+83-0x1bb5),
"\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=(0x78+5574-0x163d);for(i=(0x939+2383-0x1287);(i<=g_zPb_SimIndex[
-(0x773+1971-0xf26)])&&(i<(ZPB_SIM_MAX_RECORD+(0xc7+722-0x398)));i++){
+SINT32 i=(0x237+4835-0x1519);for(i=(0xea2+413-0x103e);(i<=g_zPb_SimIndex[
+(0x10b4+3813-0x1f99)])&&(i<(ZPB_SIM_MAX_RECORD+(0x1535+986-0x190e)));i++){
g_zPb_SimIndex[i]=PBM_ERROR_NOT_FOUND;}}VOID atPb_ClearApPbmIndexArray(VOID){
-SINT32 i=(0x172c+689-0x19dc);for(i=(0x1bd5+207-0x1ca3);(i<=g_zPb_ApIndex[
-(0x1519+21-0x152e)])&&(i<(ZPB_AP_MAX_RECORD+(0x225+8844-0x24b0)));i++){
+SINT32 i=(0xaba+3868-0x19d5);for(i=(0x847+6383-0x2135);(i<=g_zPb_ApIndex[
+(0x754+3395-0x1497)])&&(i<(ZPB_AP_MAX_RECORD+(0x738+4572-0x1913)));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]={(0x7b4+5486-0x1d22)};if(NULL==pbPara){slog
-(PB_PRINT,SLOG_ERR,
+ZPB_DB_OK;CHAR sql[ZPB_MAX_BYTES_DB]={(0x17e7+2799-0x22d6)};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)-(0x121+3291-0xdfb),
+);return ZPB_DB_ERROR_INVALIDPTR;}snprintf(sql,sizeof(sql)-(0x1b03+2122-0x234c),
"\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 a4b8985..81c88b4 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={(0x15a1+4253-0x263e)};sem_t g_Pb_sem_id={
-(0x988+6052-0x212c)};int g_zPb_MsqId=-(0x21d3+1179-0x266d);int g_zPb_LocalMsqId=
--(0x260+3055-0xe4e);VOID atWeb_AddOneContact(UINT8*pDatabuf){T_zPb_WebContact*
+pDatabuf);T_zPb_optRsp g_PbOptRsp={(0xebd+1264-0x13ad)};sem_t g_Pb_sem_id={
+(0x9b7+7108-0x257b)};int g_zPb_MsqId=-(0x950+6665-0x2358);int g_zPb_LocalMsqId=-
+(0x76a+1180-0xc05);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(((0xabf+109-0xb2b)==ptPara->result)&&(
-(0x13ba+3519-0x2178)==ptPara->opertype)){CHAR needPb[(0x799+7461-0x248c)]={
-(0x15c4+3716-0x2448)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
-(0x528+8275-0x257b)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
-MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0xa73+1736-0x113b),NULL,
-(0x10f3+3112-0x1d1b));}}}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(((0xe9b+5761-0x251b)==ptPara->result)&&(
+(0x4d1+4179-0x1523)==ptPara->opertype)){CHAR needPb[(0x162d+2003-0x1dce)]={
+(0x161a+1997-0x1de7)};sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if(
+(0x1390+376-0x1508)!=strcmp(needPb,"\x6e\x6f")){ipc_send_message(MODULE_ID_PB,
+MODULE_ID_AT_CTL,MSG_CMD_PBINIT_REQ,(0x3e1+8248-0x2419),NULL,(0x16ac+57-0x16e5))
+;}}}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==(0x422+3109-0x1047)){
-CHAR needPb[(0x41a+3758-0x1296)]={(0x5d9+4112-0x15e9)};sc_cfg_get(
-NV_NEED_SUPPORT_PB,needPb,sizeof(needPb));if((0x315+5507-0x1898)!=strcmp(needPb,
-"\x6e\x6f")){atPb_CfgPbNvInit();atPb_DelAllRecsSimDb();}}}VOID zPb_RecvPbInitRst
-(UINT8*pDatabuf){int pbReadRet=-(0x297+8828-0x2512);memcpy(&g_PbOptRsp,pDatabuf,
-sizeof(T_zPb_optRsp));if(g_PbOptRsp.result==-(0x1d4d+2007-0x2523)){
-atPb_IintPbErr(NULL);return;}pbReadRet=atPb_SendScpbrSet_repeat(g_Pb_sem_id);
-printf(
+,ptPara->slot,ptPara->slot_state);if(ptPara->slot_state==(0x0+9714-0x25f2)){CHAR
+ needPb[(0xd78+3491-0x1ae9)]={(0x3+2578-0xa15)};sc_cfg_get(NV_NEED_SUPPORT_PB,
+needPb,sizeof(needPb));if((0x1920+805-0x1c45)!=strcmp(needPb,"\x6e\x6f")){
+atPb_CfgPbNvInit();atPb_DelAllRecsSimDb();}}}VOID zPb_RecvPbInitRst(UINT8*
+pDatabuf){int pbReadRet=-(0xf85+5516-0x2510);memcpy(&g_PbOptRsp,pDatabuf,sizeof(
+T_zPb_optRsp));if(g_PbOptRsp.result==-(0x1894+1877-0x1fe8)){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,(0x2c6+4490-0x1450));break;
+usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,(0xbd3+4730-0x1e4d));break;
default:break;}}UINT8 zPbMsgCreat(VOID){g_zPb_MsqId=msgget(MODULE_ID_PB,
-IPC_CREAT|(0x49d+2150-0xb83));if(g_zPb_MsqId==-(0x4eb+5450-0x1a34)){return
+IPC_CREAT|(0x1216+969-0x145f));if(g_zPb_MsqId==-(0x1848+545-0x1a68)){return
ZUFI_FAIL;}g_zPb_LocalMsqId=msgget(MODULE_ID_PB_LOCAL,IPC_CREAT|
-(0x1e0b+2194-0x251d));if(g_zPb_LocalMsqId==-(0x143+2893-0xc8f)){return ZUFI_FAIL
-;}sem_init(&g_Pb_sem_id,(0xb4b+5472-0x20ab),(0x21cb+1331-0x26fe));return
-ZUFI_SUCC;}void detect_modem_state(void){CHAR state[(0x10e8+3591-0x1ebd)]={
-(0x1d9+5100-0x15c5)};sc_cfg_get(
+(0x379+7848-0x20a1));if(g_zPb_LocalMsqId==-(0xc11+2347-0x153b)){return ZUFI_FAIL
+;}sem_init(&g_Pb_sem_id,(0x7b6+2781-0x1293),(0x728+7443-0x243b));return
+ZUFI_SUCC;}void detect_modem_state(void){CHAR state[(0x9e6+6113-0x2195)]={
+(0xf65+5025-0x2306)};sc_cfg_get(
"\x6d\x6f\x64\x65\x6d\x5f\x6d\x61\x69\x6e\x5f\x73\x74\x61\x74\x65",state,sizeof(
-state));if((0xef2+3290-0x1bcc)==strcmp(state,
+state));if((0x1bb4+2580-0x25c8)==strcmp(state,
"\x6d\x6f\x64\x65\x6d\x5f\x73\x69\x6d\x5f\x75\x6e\x64\x65\x74\x65\x63\x74\x65\x64"
-)||(0x154+2016-0x934)==strcmp(state,
+)||(0x1288+1360-0x17d8)==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,
-(0x4a7+6501-0x1e0c));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR
-clearPb[(0x18ca+2648-0x22f0)]={(0xab6+6840-0x256e)};sc_cfg_get(
+(0x117b+1884-0x18d7));break;default:break;}}VOID zPbHandleResetToFactory(){CHAR
+clearPb[(0x10dc+905-0x1433)]={(0xc9d+3170-0x18ff)};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")==(0xb04+5312-0x1fc4)){atPb_DropDb();
-}ipc_send_message(MODULE_ID_PB,MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,
-(0x12f+4214-0x11a5),NULL,(0x15fc+2846-0x211a));}void zPbHandleMainCtrlMsg(
-MSG_BUF*ptMsgBuf){assert(ptMsgBuf!=NULL);printf(
+,clearPb);if(strcmp(clearPb,"\x79\x65\x73")==(0x741+1233-0xc12)){atPb_DropDb();}
+ipc_send_message(MODULE_ID_PB,MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,
+(0x2d5+2278-0xbbb),NULL,(0x5f8+4026-0x15b2));}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=(0x429+1385-0x992);MSG_BUF stMsg={
-(0x6a1+4406-0x17d7)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
+pb_msg_thread_proc(void*arg){int iRet=(0xf1c+4496-0x20ac);MSG_BUF stMsg={
+(0x1c88+2294-0x257e)};int msgSize=sizeof(MSG_BUF)-sizeof(SINT32);int queueId=*((
int*)arg);prctl(PR_SET_NAME,"\x70\x62\x5f\x6c\x6f\x63\x61\x6c",
-(0x7d3+4957-0x1b30),(0xa45+4747-0x1cd0),(0x5c5+7338-0x226f));while(
-(0x1a4a+2651-0x24a4)){iRet=(0x640+1617-0xc91);memset(&stMsg,(0x18f2+405-0x1a87),
-sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0xe56+4516-0x1ffa),
-(0x10bb+2054-0x18c1));printf(
+(0x23a+6428-0x1b56),(0xb33+5634-0x2135),(0x561+8058-0x24db));while(
+(0x1e80+2077-0x269c)){iRet=(0xf36+3354-0x1c50);memset(&stMsg,(0x56+7662-0x1e44),
+sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x1703+4009-0x26ac),
+(0x1ca1+1852-0x23dd));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>=(0x15db+3611-0x23f6)){
+,stMsg.src_id,stMsg.usMsgCmd,MODULE_ID_AT_CTL);if(iRet>=(0x1567+643-0x17ea)){
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=(0x12ec+4961-0x264d);MSG_BUF msgBuf={(0x531+6513-0x1ea2)};CHAR
-needPb[(0x341+7530-0x2079)]={(0x528+2145-0xd89)};prctl(PR_SET_NAME,
-"\x70\x62\x5f\x6d\x61\x69\x6e",(0x118+403-0x2ab),(0x6aa+6298-0x1f44),
-(0xcea+435-0xe9d));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof(
-needPb));if((0x191+5730-0x17f3)!=strcmp(needPb,"\x6e\x6f")){
+recv_thread_tid=(0x5e9+8108-0x2595);MSG_BUF msgBuf={(0x303+3553-0x10e4)};CHAR
+needPb[(0x1971+1160-0x1dc7)]={(0x13ef+1861-0x1b34)};prctl(PR_SET_NAME,
+"\x70\x62\x5f\x6d\x61\x69\x6e",(0x933+751-0xc22),(0x23ef+93-0x244c),
+(0x668+2961-0x11f9));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_PB,needPb,sizeof
+(needPb));if((0x6fb+6935-0x2212)!=strcmp(needPb,"\x6e\x6f")){
#ifdef WEBS_SECURITY
-if(access(ZPB_DB_PATH,F_OK)!=(0xf2f+51-0xf62)){if(access(ZPB_TMP_PATH,F_OK)==
-(0x1cd1+2386-0x2623)){if(remove(ZPB_SEC_PATH)!=(0x669+6746-0x20c3)){slog(
-PB_PRINT,SLOG_ERR,
+if(access(ZPB_DB_PATH,F_OK)!=(0x1f0+6117-0x19d5)){if(access(ZPB_TMP_PATH,F_OK)==
+(0x23b9+738-0x269b)){if(remove(ZPB_SEC_PATH)!=(0x1dc+2576-0xbec)){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)!=(0x11d5+2458-0x1b6f)){slog(PB_PRINT,
+);}if(rename(ZPB_TMP_PATH,ZPB_SEC_PATH)!=(0x1621+2782-0x20ff)){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)==(0x95f+6866-0x2431)){char rnum_buf[
-(0x831+1957-0xfbe)]={(0x21e9+518-0x23ef)};char cmd[(0xe2c+5608-0x2394)]={
-(0x313+5119-0x1712)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZPB_SEC_PATH,F_OK)==(0x9b1+7133-0x258e)){char rnum_buf[
+(0x159a+4420-0x26c6)]={(0x413+5734-0x1a79)};char cmd[(0xdcd+5666-0x236f)]={
+(0x489+265-0x592)};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-(0x17b+6498-0x1adc);}printf(
+zPbMsgCreat();atPb_Init();}else{return-(0x146+6041-0x18de);}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))==-(0xe55+324-0xf98)){assert((0x58c+2781-0x1069));}
-detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x88a+6712-0x22c2);
-}
+(&g_zPb_LocalMsqId))==-(0xf21+1000-0x1308)){assert((0xb8b+6152-0x2393));}
+detect_modem_state();pb_msg_thread_proc(&g_zPb_MsqId);return(0x13db+3850-0x22e5)
+;}
diff --git a/ap/app/zte_comm/phonebook/src/pb_proc.c b/ap/app/zte_comm/phonebook/src/pb_proc.c
index ee11a9f..0b0a3f9 100755
--- a/ap/app/zte_comm/phonebook/src/pb_proc.c
+++ b/ap/app/zte_comm/phonebook/src/pb_proc.c
@@ -3,185 +3,184 @@
#include <semaphore.h>
#include <limits.h>
#include "pb_com.h"
-#define ZPB_UCS2 (0x37a+8739-0x259c)
-#define ZPB_UCS2_PREFIX (0x1523+1612-0x1aef)
-#define ZPB_UCS2_PREFIX_LEN (0x1e1c+2157-0x2687)
-#define ZPB_NON_GSM (0x1512+581-0x1737)
-#define ZPB_GSM_CHARACTER_SET_SIZE (0x13c2+2542-0x1d30)
-#define ZPB_INIT_LOAD_RECORD_NUM (0x1662+271-0x173f)
+#define ZPB_UCS2 (0xf98+2135-0x17ee)
+#define ZPB_UCS2_PREFIX (0x1891+2854-0x2337)
+#define ZPB_UCS2_PREFIX_LEN (0x12cb+2428-0x1c45)
+#define ZPB_NON_GSM (0x21+5548-0x15ad)
+#define ZPB_GSM_CHARACTER_SET_SIZE (0x423+5211-0x17fe)
+#define ZPB_INIT_LOAD_RECORD_NUM (0x16c6+1836-0x1dc0)
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=
-(0x13c4+72-0x140c);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+(0x3bc+6487-0x1d12)]
-={(0xd0f+2844-0x182b)};SINT32 g_zPb_ApIndex[ZPB_AP_MAX_RECORD+(0x216+2079-0xa34)
-]={(0x802+6892-0x22ee)};T_zPb_DelStatusMultiOrAll g_zPb_DelStatusUsim={
-(0x1846+1829-0x1f6b)};const unsigned char G_ZPB_NEWUCS2TOGSM[
-ZPB_GSM_CHARACTER_SET_SIZE*(0xc06+4557-0x1dd1)]={ZPB_NON_GSM,ZPB_NON_GSM,
+(0x630+6497-0x1f91);SINT32 g_zPb_SimIndex[ZPB_SIM_MAX_RECORD+(0xa07+5937-0x2137)
+]={(0x1261+5105-0x2652)};SINT32 g_zPb_ApIndex[ZPB_AP_MAX_RECORD+
+(0x316+2025-0xafe)]={(0x726+244-0x81a)};T_zPb_DelStatusMultiOrAll
+g_zPb_DelStatusUsim={(0xbc2+815-0xef1)};const unsigned char G_ZPB_NEWUCS2TOGSM[
+ZPB_GSM_CHARACTER_SET_SIZE*(0x1769+956-0x1b23)]={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,(0x34a+1829-0xa65),ZPB_NON_GSM,ZPB_NON_GSM,
-(0xf1c+4967-0x2276),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,(0x35+7294-0x1ca9),ZPB_NON_GSM,ZPB_NON_GSM,
+(0x20d9+227-0x21af),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,(0x12d7+1895-0x1a1e),(0xfb2+2284-0x187d),(0x920+1930-0x1088),
-(0x5d7+7911-0x249b),(0x1297+3784-0x215d),(0xdb7+3321-0x1a8b),(0xcaa+5656-0x229c)
-,(0x521+5558-0x1ab0),(0x3b7+4719-0x15fe),(0x12fa+2954-0x1e5b),
-(0xaef+4572-0x1ca1),(0x323+2950-0xe7e),(0xd5+5270-0x153f),(0x1793+2383-0x20b5),
-(0x3a1+8606-0x2511),(0x9dc+4173-0x19fa),(0x639+861-0x966),(0xa57+3847-0x192d),
-(0x193a+2730-0x23b2),(0x13dc+2051-0x1bac),(0x21e8+118-0x222a),
-(0x1837+2124-0x204e),(0xf69+316-0x106f),(0x1b56+1389-0x208c),(0x391+8937-0x2642)
-,(0x1574+1408-0x1abb),(0x17a8+74-0x17b8),(0xbf3+3553-0x1999),(0x458+1676-0xaa8),
-(0x1524+166-0x158d),(0x18ad+2238-0x212d),(0xdd9+3331-0x1a9d),(0x1c3d+591-0x1e8c)
-,(0x10f1+4987-0x242b),(0x184d+932-0x1baf),(0x1481+2217-0x1ce7),
-(0x5c+8819-0x228b),(0x11e4+278-0x12b5),(0xcc1+4882-0x1f8d),(0xec2+1619-0x14ce),
-(0x12a4+1792-0x195c),(0x2b8+3643-0x10aa),(0x1363+4063-0x22f8),
-(0x1511+2079-0x1ce5),(0x6db+3541-0x1464),(0x457+5364-0x18fe),(0x709+360-0x823),
-(0x19c7+2380-0x22c4),(0x9d7+5683-0x1fba),(0x12ff+4275-0x2361),
-(0x16f2+2467-0x2043),(0x612+2131-0xe12),(0x6ef+881-0xa0c),(0x1b9a+1322-0x206f),
-(0xfba+4319-0x2043),(0x6b8+5815-0x1d18),(0x7bf+2186-0xff1),(0x819+3442-0x1532),
-(0x119d+256-0x1243),(0x1936+1400-0x1e53),ZPB_NON_GSM,(0x13c1+99-0x13c7),
-ZPB_NON_GSM,(0xce6+675-0xf78),ZPB_NON_GSM,(0x76d+557-0x939),(0x139b+2346-0x1c63)
-,(0x424+4574-0x159f),(0x10a0+4168-0x2084),(0x52a+6875-0x1fa0),
-(0x1173+1907-0x1880),(0xed7+1270-0x1366),(0x1b49+1007-0x1ed0),
-(0x143b+2714-0x1e6c),(0xf4+1016-0x482),(0x9df+4470-0x1aea),(0x16b8+1175-0x1ae3),
-(0x936+6957-0x23f6),(0xdf9+6344-0x2653),(0x6a6+2770-0x1109),(0x35a+6496-0x1c4a),
-(0xc0+1520-0x63f),(0xba0+1618-0x1180),(0xeaa+1515-0x1422),(0x1410+1671-0x1a23),
-(0x545+8375-0x2587),(0x2da+134-0x2ea),(0xa74+3547-0x17d8),(0x37f+6936-0x1e1f),
-(0xaf+7304-0x1cbe),(0x8d1+727-0xb2e),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,(0x10dd+3463-0x1e44),(0x18c4+1949-0x2040),(0xe0f+4416-0x1f2d),
+(0x11f3+872-0x1538),(0xd57+2866-0x1887),(0x520+122-0x575),(0x23ac+138-0x2410),
+(0xae2+3325-0x17b8),(0x80d+3568-0x15d5),(0x1d29+1538-0x2302),
+(0x130a+5024-0x2680),(0x63c+6833-0x20c2),(0x9d9+3734-0x1843),(0x974+6417-0x2258)
+,(0x7b+5997-0x17ba),(0xcf0+237-0xdae),(0x10f2+3243-0x1d6d),(0x6c6+2812-0x1191),
+(0x1e18+1928-0x256e),(0x89+759-0x34d),(0x1702+2586-0x20e8),(0xbe3+5798-0x2254),
+(0x6b2+2543-0x106b),(0xcbc+3596-0x1a91),(0x3f8+5420-0x18ec),(0x13df+723-0x1679),
+(0x513+2150-0xd3f),(0xfc+9172-0x2495),(0x13b4+3992-0x2310),(0x80f+2779-0x12ad),
+(0xefa+1067-0x12e7),(0x1e5a+1412-0x239f),(0x104f+2477-0x19fc),(0xcb+1380-0x5ee),
+(0x141+8492-0x222b),(0x695+7350-0x2308),(0x65d+6445-0x1f46),(0xca3+3917-0x1bab),
+(0xfbd+3721-0x1e00),(0x92d+1900-0x1052),(0xfe3+1810-0x16ad),(0x70b+6091-0x1e8d),
+(0x47f+3909-0x137a),(0x16fc+3181-0x231e),(0x9ad+7431-0x2668),(0x352+8093-0x22a2)
+,(0x10bf+5246-0x24ef),(0x219f+397-0x22dd),(0x23d+9229-0x25fa),
+(0x3ab+9029-0x269f),(0x1c37+498-0x1dd7),(0x5ec+288-0x6b9),(0x35f+7945-0x2214),
+(0x5dc+2514-0xf59),(0x143f+2283-0x1cd4),(0x1a6a+1576-0x203b),
+(0x17a0+2297-0x2041),(0xa8b+6082-0x21f4),(0x1028+2033-0x17bf),
+(0x3bf+4505-0x14fd),ZPB_NON_GSM,(0x161c+1580-0x1beb),ZPB_NON_GSM,
+(0x1674+3099-0x227e),ZPB_NON_GSM,(0x1d4+6496-0x1ad3),(0x12af+495-0x143c),
+(0x22d+6552-0x1b62),(0xe29+2923-0x1930),(0x405+1440-0x940),(0x242+8448-0x22dc),
+(0x123f+1105-0x1629),(0x966+7537-0x266f),(0x1e6+4989-0x14fa),(0xbe4+45-0xba7),
+(0x32d+5076-0x1696),(0x7a8+7211-0x2367),(0x1680+3200-0x2293),
+(0x168d+1004-0x1a0b),(0x32b+1743-0x98b),(0xf82+3381-0x1c47),(0x1793+713-0x19eb),
+(0x17d4+745-0x1a4b),(0x120f+2539-0x1b87),(0x971+2180-0x1181),(0x1a3a+10-0x19cf),
+(0xeb3+4121-0x1e56),(0x186f+1163-0x1c83),(0x79b+6633-0x210c),(0x1622+929-0x194a)
+,(0x14b9+2165-0x1cb4),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,(0x4ab+1945-0xc04),
-ZPB_NON_GSM,(0x4ff+4005-0x14a3),(0x7d4+2922-0x131a),(0x56a+7712-0x2387),
-ZPB_NON_GSM,(0xada+6669-0x2488),ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,
+ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,ZPB_NON_GSM,(0x17ab+3480-0x2503),ZPB_NON_GSM
+,(0x1e9c+29-0x1eb8),(0xb27+3834-0x19fd),(0xa6b+3929-0x19c1),ZPB_NON_GSM,
+(0x11c4+4544-0x2325),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,(0xae8+1517-0x1075),(0x136c+1985-0x1aec),(0x9e6+597-0xbfa),
-(0x226c+518-0x2431),(0x483+2036-0xc36),(0x70+4636-0x1231),(0x189a+1296-0x1d9c),
-(0xfa4+3096-0x1ba0),(0xb8d+3136-0x17c4),(0x9f2+7396-0x2691),(0xee5+5217-0x2327),
-(0xc6a+1018-0x101f),(0x1378+1757-0x1a10),(0xef8+3753-0x1d58),(0x12a7+579-0x14a1)
-,(0x108c+4456-0x21ab),(0x349+5947-0x1a3b),ZPB_NON_GSM,(0x51f+1241-0x99b),
-(0x1ff2+410-0x213d),(0x191b+1233-0x1d9d),(0x7a7+2427-0x10d3),
-(0x1bbc+1452-0x2119),(0x1959+2105-0x2136),ZPB_NON_GSM,(0x554+308-0x67d),
-(0xe9+2218-0x93e),(0x2264+289-0x2330),(0x3a4+3680-0x11af),(0xea1+6121-0x262c),
-(0x796+609-0x99e),ZPB_NON_GSM,(0x1350+2716-0x1dce),(0x116d+2247-0x19b5),
-(0x876+6467-0x2158),(0x746+4817-0x19b6),(0x73+2552-0xa0a),(0x11c1+2918-0x1cac),
-(0xea5+2954-0x1a20),(0x927+601-0xb63),(0x1945+1236-0x1e10),(0xc3b+6785-0x26b8),
-(0x814+603-0xa6a),(0x3f0+3110-0xfb1),(0xeef+121-0xf03),(0x1503+3862-0x2412),
-(0xa30+1459-0xf7a),(0x7ba+1484-0xd1d),(0x6c+8338-0x2095),ZPB_NON_GSM,
-(0x222+7813-0x202a),(0xb66+5629-0x215b),(0x546+8484-0x25fb),(0x655+3424-0x1346),
-(0x9f4+2002-0x1157),(0x15b+6698-0x1b09),ZPB_NON_GSM,(0x91d+2246-0x11d7),
-(0xf4a+299-0x106f),(0x653+7259-0x2239),(0xb8c+6291-0x23aa),(0x1243+1032-0x15cd),
-(0x1558+2481-0x1e90),ZPB_NON_GSM,(0x6a1+85-0x67d)};VOID atPb_Init(VOID){UINT32
-pbCount=(0x122+3622-0xf48);g_zPb_SimIndex[(0x13ff+334-0x154d)]=
-(0x1a81+2063-0x2290);sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);(VOID)sc_cfg_set(
-ZPB_NV_WRITE_FLAG,ZPB_OPERATE_SUC);for(pbCount=(0x672+4848-0x1961);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,
+(0x71c+2458-0x1056),(0x65a+354-0x77b),(0x664+3772-0x14df),(0x2418+484-0x25bb),
+(0x469+871-0x78f),(0x1016+3404-0x1d07),(0xb7c+5694-0x21ac),(0x12d9+4428-0x2409),
+(0xd1+78-0x116),(0xc25+5802-0x228a),(0x183+6748-0x1bc0),(0x13f5+3670-0x2206),
+(0x1917+2095-0x2101),(0x254+9330-0x267d),(0x1c5+6761-0x1be5),(0xfb9+2718-0x1a0e)
+,(0xfaf+936-0x130e),ZPB_NON_GSM,(0xf69+2490-0x18c6),(0x13a+1996-0x8b7),
+(0xe1c+2540-0x17b9),(0x2d0+6960-0x1db1),(0xa67+2175-0x1297),(0x1baa+1566-0x216c)
+,ZPB_NON_GSM,(0x18b4+3319-0x25a0),(0x123c+3732-0x207b),(0x1079+5725-0x2681),
+(0x1c57+1083-0x203d),(0x2eb+3032-0xe65),(0xf6c+4648-0x213b),ZPB_NON_GSM,
+(0x175+6446-0x1a85),(0x18a3+1107-0x1c77),(0xc04+6777-0x261c),(0xa06+4977-0x1d16)
+,(0x1cd+6482-0x1abe),(0x371+6949-0x1e1b),(0xdf6+4552-0x1faf),(0xed+4580-0x12b4),
+(0x1e42+1848-0x2571),(0xd51+3913-0x1c96),(0x2034+898-0x23b1),(0xec+7271-0x1cee),
+(0x1885+1734-0x1ee6),(0xa88+3159-0x16d8),(0x12ac+3402-0x1f8d),
+(0x7c8+5989-0x1ec4),(0x516+8255-0x24ec),ZPB_NON_GSM,(0x1266+2930-0x1d5b),
+(0x8ac+5659-0x1ebf),(0x15f0+2366-0x1ebf),(0x34b+3742-0x117a),(0x6fa+5738-0x1cf5)
+,(0x1909+1260-0x1d79),ZPB_NON_GSM,(0x2fb+3897-0x1228),(0x2f5+4354-0x13f1),
+(0xb42+2564-0x14d1),(0x510+5346-0x197d),(0x6ff+1730-0xd43),(0x239+9064-0x2528),
+ZPB_NON_GSM,(0x13a2+4192-0x2389)};VOID atPb_Init(VOID){UINT32 pbCount=
+(0x64b+2642-0x109d);g_zPb_SimIndex[(0x11c4+1281-0x16c5)]=(0x684+3820-0x1570);
+sc_cfg_set(ZPB_NV_INIT,ZPB_LOADING);(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
+ZPB_OPERATE_SUC);for(pbCount=(0x6b6+8043-0x2620);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=
-(0x74a+6426-0x2064);int min=32767;int max=(0xaa4+6134-0x229a);int temp=
-(0x6a2+968-0xa6a);int outOff=(0x1415+2977-0x1fb6);printf(
+(0x1118+4623-0x2327);int min=32767;int max=(0x535+1917-0xcb2);int temp=
+(0x1145+4539-0x2300);int outOff=(0x1ed3+1517-0x24c0);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<=(0x260+219-0x33b)||src==NULL||dest==NULL){return-
-(0x6d+4390-0x1192);}if(srcLen<=(0x4b2+2483-0xe63)){dest[(0xf1c+5824-0x25dc)]=
-(0x1dc2+2053-0x2547);memcpy(dest+(0x16b8+3149-0x2304),src,srcLen);printf(
+,srcLen);if(srcLen<=(0x5d9+2591-0xff8)||src==NULL||dest==NULL){return-
+(0xef9+5441-0x2439);}if(srcLen<=(0x2fb+1482-0x8c3)){dest[(0x1911+2857-0x243a)]=
+(0x200c+118-0x2002);memcpy(dest+(0x7d3+6988-0x231e),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+(0x1946+2056-0x214d));return srcLen+(0x2a2+3366-0xfc7);}for(i=
-(0x18d2+3279-0x25a1);i<srcLen;i+=(0x1eb+9405-0x26a6)){if(src[i]!=
-(0x1832+3441-0x25a3)){temp=(int)(((src[i]<<(0x521+1424-0xaa9))&65280)|(src[i+
-(0x144+2672-0xbb3)]&(0x115c+4405-0x2192)));
-#if (0xec+2378-0xa36)
-if(temp<(0x41c+6528-0x1d9c)){max=min+(0xd18+3094-0x18ac);break;}
+,srcLen+(0x16f8+2213-0x1f9c));return srcLen+(0x3c4+3042-0xfa5);}for(i=
+(0x73b+6484-0x208f);i<srcLen;i+=(0x2f6+948-0x6a8)){if(src[i]!=
+(0x6dd+2499-0x10a0)){temp=(int)(((src[i]<<(0xc54+2471-0x15f3))&65280)|(src[i+
+(0x1775+1818-0x1e8e)]&(0xf83+1623-0x14db)));
+#if (0x772+2320-0x1082)
+if(temp<(0xdb8+752-0x10a8)){max=min+(0x1109+3881-0x1fb0);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)<(0x1dc6+1431-0x22dc)){if((unsigned char)(min&
-(0x339+710-0x57f))==(unsigned char)(max&(0x531+3580-0x12ad))){dest[
-(0x12f+1574-0x754)]=(unsigned char)(srcLen/(0x1170+5137-0x257f));dest[
-(0x15b1+1214-0x1a6f)]=(unsigned char)(0xbf1+839-0xeb7);min=(int)(min&32640);dest
-[(0xb85+2542-0x1571)]=(unsigned char)((min>>(0x604+356-0x761))&
-(0x1165+5520-0x25f6));outOff=(0x1c13+2700-0x269c);printf(
+,min,max);if((max-min)<(0x5f7+7050-0x2100)){if((unsigned char)(min&
+(0xf96+5917-0x2633))==(unsigned char)(max&(0x837+558-0x9e5))){dest[
+(0x9ff+288-0xb1e)]=(unsigned char)(srcLen/(0x11ac+1736-0x1872));dest[
+(0x4fb+190-0x5b9)]=(unsigned char)(0xe92+263-0xf18);min=(int)(min&32640);dest[
+(0x12cb+381-0x1446)]=(unsigned char)((min>>(0xd02+6400-0x25fb))&
+(0x11c4+1085-0x1502));outOff=(0x1dbb+912-0x2148);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[(0x170+814-0x49d)]=(unsigned char)(srcLen/(0x1d2+8239-0x21ff));dest
-[(0x12df+661-0x1574)]=(unsigned char)(0x103f+2029-0x17aa);dest[
-(0x282+6226-0x1ad2)]=(unsigned char)((min>>(0x636+365-0x79b))&
-(0xf0f+2400-0x1770));dest[(0xaad+2479-0x1459)]=(unsigned char)(min&
-(0x10b4+3846-0x1ebb));outOff=(0x54d+2644-0xf9d);printf(
+);}else{dest[(0x6b5+3460-0x1438)]=(unsigned char)(srcLen/(0x1290+2889-0x1dd7));
+dest[(0x16b7+3279-0x2386)]=(unsigned char)(0xa78+4087-0x19ed);dest[
+(0x539+3765-0x13ec)]=(unsigned char)((min>>(0x1f1+3231-0xe88))&
+(0x7d1+6126-0x1ec0));dest[(0x368+5782-0x19fb)]=(unsigned char)(min&
+(0x101a+5613-0x2508));outOff=(0x5a9+6095-0x1d74);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=(0x7d0+2873-0x1309);i<srcLen;i+=(0x1985+3240-0x262b)){if(src[i]==
-(0x1c6+861-0x523)){dest[outOff]=(unsigned char)(src[i+(0x210+3860-0x1123)]&
-(0x1c33+1211-0x206f));}else{temp=(int)((((src[i]<<(0x897+4053-0x1864))&65280)|(
-src[i+(0xe55+2838-0x196a)]&(0xc36+3748-0x19db)))-min);dest[outOff]=(unsigned
-char)(temp|(0x1907+669-0x1b24));}outOff++;}printf(
+);}for(i=(0x1dbb+1885-0x2518);i<srcLen;i+=(0x160d+1373-0x1b68)){if(src[i]==
+(0x144f+668-0x16eb)){dest[outOff]=(unsigned char)(src[i+(0x1ab5+2777-0x258d)]&
+(0x7b0+5557-0x1ce6));}else{temp=(int)((((src[i]<<(0x110+4425-0x1251))&65280)|(
+src[i+(0x13e7+4558-0x25b4)]&(0x1772+3736-0x250b)))-min);dest[outOff]=(unsigned
+char)(temp|(0x12c1+62-0x127f));}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[(0x21f+284-0x33b)]=
-(0xba9+2607-0x1558);memcpy(dest+(0xd8a+2398-0x16e7),src,srcLen);printf(
+,outOff,outOff,dest[outOff]);return outOff;}dest[(0x133b+4844-0x2627)]=
+(0xaad+4459-0x1b98);memcpy(dest+(0x132c+1949-0x1ac8),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+(0x672+8330-0x26fb));return srcLen+(0xdef+3505-0x1b9f);}int
+,srcLen+(0x172+8848-0x2401));return srcLen+(0x15ac+3058-0x219d);}int
atPb_GetU80Code(const UINT8*srcCode,UINT32 srcCodeLen,UINT8*destCode,UINT32
destCodeLen){assert(destCode!=NULL&&srcCode!=NULL);if(srcCodeLen==
-(0x1493+1042-0x18a5)||destCodeLen==(0x14aa+370-0x161c)||destCodeLen<srcCodeLen){
-return-(0xce8+343-0xe3e);}memset(destCode,(0x979+1596-0xfb5),destCodeLen);
-destCode[(0x573+3885-0x14a0)]=(0x524+4495-0x1633);printf(
+(0x1c75+1153-0x20f6)||destCodeLen==(0xbc0+4169-0x1c09)||destCodeLen<srcCodeLen){
+return-(0x6f5+3209-0x137d);}memset(destCode,(0x1bad+1611-0x21f8),destCodeLen);
+destCode[(0x229d+341-0x23f2)]=(0x1811+1040-0x1ba1);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[(0x1a+6526-0x1998)]);switch(srcCode[(0x1971+2473-0x231a)]){case
-(0x2296+70-0x225c):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}case
-(0xc5b+2788-0x16be):{atPb_CvtU81ToU80(srcCode+(0x5df+4170-0x1628),srcCodeLen-
-(0x13e5+417-0x1585),destCode+(0x176+2465-0xb16),destCodeLen-(0xc18+4066-0x1bf9))
-;return srcCode[(0x4c5+2103-0xcfb)]*(0xa2d+3793-0x18fc)+(0x941+2819-0x1443);}
-case(0x111d+1186-0x153d):{atPb_CvtU82ToU80(srcCode+(0x2aa+2490-0xc63),srcCodeLen
--(0x481+3249-0x1131),destCode+(0x1d16+99-0x1d78),destCodeLen-(0x800+858-0xb59));
-return srcCode[(0x1461+1637-0x1ac5)]*(0xf04+843-0x124d)+(0x13cf+3732-0x2262);}
-default:{return-(0x556+4563-0x1728);}}}BOOL atPb_CvtU82ToU80(const UINT8*srcData
-,UINT32 srcLen,UINT8*destData,UINT32 destLen){UINT8 chNum=(0x1666+767-0x1965);
-UINT16 basePointer=(0x8+7845-0x1ead);UINT8 iCurChar=(0x83+265-0x18c);UINT32
-iCurSrc=(0x12f6+2487-0x1cad);chNum=(UINT32)srcData[(0x180+6135-0x1977)];
-basePointer=(UINT16)srcData[(0x1771+1418-0x1cfa)];basePointer=basePointer<<
-(0x1991+130-0x1a0b);basePointer=basePointer+srcData[(0xeaa+5772-0x2534)];if(
-chNum*(0xf54+3668-0x1da6)>destLen){return FALSE;}for(iCurSrc=(0x22d+7366-0x1ef0)
-;iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+
-(0xaef+6665-0x24f6)*iCurChar;atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest
-,curDest+(0xf22+1139-0x1394));}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*
+,srcCode[(0x384+5433-0x18bd)]);switch(srcCode[(0x163+5083-0x153e)]){case
+(0x823+7830-0x2639):{memcpy(destCode,srcCode,srcCodeLen);return srcCodeLen;}case
+(0x1176+2300-0x19f1):{atPb_CvtU81ToU80(srcCode+(0x6c0+394-0x849),srcCodeLen-
+(0xe22+598-0x1077),destCode+(0x39f+5248-0x181e),destCodeLen-(0x1136+5194-0x257f)
+);return srcCode[(0x5b5+3868-0x14d0)]*(0x21aa+759-0x249f)+(0x1731+1541-0x1d35);}
+case(0x120+6050-0x1840):{atPb_CvtU82ToU80(srcCode+(0x1f90+610-0x21f1),srcCodeLen
+-(0x10f+365-0x27b),destCode+(0xab2+54-0xae7),destCodeLen-(0x126f+4442-0x23c8));
+return srcCode[(0xf79+2263-0x184f)]*(0xc82+5244-0x20fc)+(0x1c12+192-0x1cd1);}
+default:{return-(0xab2+4717-0x1d1e);}}}BOOL atPb_CvtU82ToU80(const UINT8*srcData
+,UINT32 srcLen,UINT8*destData,UINT32 destLen){UINT8 chNum=(0x190+3220-0xe24);
+UINT16 basePointer=(0x1800+3853-0x270d);UINT8 iCurChar=(0xc90+4766-0x1f2e);
+UINT32 iCurSrc=(0x9da+1846-0x1110);chNum=(UINT32)srcData[(0x1474+746-0x175e)];
+basePointer=(UINT16)srcData[(0x97+2100-0x8ca)];basePointer=basePointer<<
+(0xf39+4672-0x2171);basePointer=basePointer+srcData[(0x10ef+3377-0x1e1e)];if(
+chNum*(0x1b4b+7-0x1b50)>destLen){return FALSE;}for(iCurSrc=(0xeef+2752-0x19ac);
+iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++){UINT8*curDest=destData+
+(0x4bf+1574-0xae3)*iCurChar;atPb_CvtChCode(basePointer,srcData[iCurSrc],curDest,
+curDest+(0x1357+5021-0x26f3));}return TRUE;}BOOL atPb_CvtU81ToU80(const UINT8*
srcData,UINT32 srcLen,UINT8*destData,UINT32 destLen){UINT8 chNum=
-(0xef8+555-0x1123);UINT16 basePointer=(0x402+8096-0x23a2);UINT8 iCurChar=
-(0x677+395-0x802);UINT32 iCurSrc=(0xc63+2102-0x1499);chNum=srcData[
-(0x838+3281-0x1509)];basePointer=((UINT16)srcData[(0x1821+1262-0x1d0e)])<<
-(0x14d+2027-0x931);if(chNum*(0x975+4595-0x1b66)>destLen){return FALSE;}for(
-iCurSrc=(0x1148+2729-0x1bef);iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++
-){UINT8*curDest=destData+(0x996+6008-0x210c)*iCurChar;atPb_CvtChCode(basePointer
-,srcData[iCurSrc],curDest,curDest+(0x9e4+5749-0x2058));}return TRUE;}VOID
+(0xb49+2668-0x15b5);UINT16 basePointer=(0x67d+1711-0xd2c);UINT8 iCurChar=
+(0x1818+686-0x1ac6);UINT32 iCurSrc=(0x239+1897-0x9a2);chNum=srcData[
+(0xab7+2742-0x156d)];basePointer=((UINT16)srcData[(0xeac+62-0xee9)])<<
+(0x481+1211-0x935);if(chNum*(0x3f8+4943-0x1745)>destLen){return FALSE;}for(
+iCurSrc=(0xe26+1614-0x1472);iCurSrc<srcLen&&iCurChar<chNum;iCurSrc++,iCurChar++)
+{UINT8*curDest=destData+(0x1db8+747-0x20a1)*iCurChar;atPb_CvtChCode(basePointer,
+srcData[iCurSrc],curDest,curDest+(0x1173+4237-0x21ff));}return TRUE;}VOID
atPb_CvtChCode(UINT16 basePointer,UINT8 srcData,UINT8*chMsb,UINT8*chLsb){UINT16
-curChar=(0x42d+969-0x7f6);assert(chMsb!=NULL&&chLsb!=NULL);if((srcData&
-(0x1245+1239-0x169c))==(0x389+430-0x537)){curChar=srcData;}else{curChar=
-basePointer+(srcData&(0x968+3169-0x154a));}*chMsb=(UINT8)(curChar>>
-(0x930+2469-0x12cd));*chLsb=(UINT8)((curChar<<(0x1465+3181-0x20ca))>>
-(0xf37+423-0x10d6));return;}int atPb_String2Bytes(const char*pSrc,unsigned char*
-pDst,int nSrcLength){int i=(0x1c1b+699-0x1ed6);if(pSrc==NULL||pDst==NULL||
-nSrcLength<(0x1d4+1055-0x5f3)){return-(0x5b0+6845-0x206c);}for(i=
-(0xa18+5042-0x1dca);i<nSrcLength;i+=(0x1d0a+1834-0x2432)){if(*pSrc>=
-((char)(0x1b3c+879-0x1e7b))&&*pSrc<=((char)(0x177c+3744-0x25e3))){*pDst=(*pSrc-
-((char)(0x78c+3322-0x1456)))<<(0x7fa+5652-0x1e0a);}else{*pDst=((toupper(*pSrc)-
-((char)(0x1445+1112-0x185c)))+(0x2b5+8758-0x24e1))<<(0x344+2457-0xcd9);}pSrc++;
-if(*pSrc>=((char)(0x922+4645-0x1b17))&&*pSrc<=((char)(0x3e5+6221-0x1bf9))){*pDst
-|=*pSrc-((char)(0x423+7056-0x1f83));}else{*pDst|=(toupper(*pSrc)-
-((char)(0x70+1030-0x435)))+(0x1b32+570-0x1d62);}pSrc++;pDst++;}return nSrcLength
-/(0xd8d+5421-0x22b8);}int atPb_Bytes2String(const unsigned char*pSrc,char*pDst,
-int nSrcLength){const char tab[]=
+curChar=(0x11ba+2140-0x1a16);assert(chMsb!=NULL&&chLsb!=NULL);if((srcData&
+(0x1352+326-0x1418))==(0x148b+3624-0x22b3)){curChar=srcData;}else{curChar=
+basePointer+(srcData&(0x5ad+7988-0x2462));}*chMsb=(UINT8)(curChar>>
+(0x1b1c+2652-0x2570));*chLsb=(UINT8)((curChar<<(0x29a+1317-0x7b7))>>
+(0x10b7+315-0x11ea));return;}int atPb_String2Bytes(const char*pSrc,unsigned char
+*pDst,int nSrcLength){int i=(0x24f+854-0x5a5);if(pSrc==NULL||pDst==NULL||
+nSrcLength<(0x97a+329-0xac3)){return-(0xcf0+1333-0x1224);}for(i=
+(0xd02+3819-0x1bed);i<nSrcLength;i+=(0x3fb+6036-0x1b8d)){if(*pSrc>=
+((char)(0x117+7638-0x1ebd))&&*pSrc<=((char)(0x131b+2488-0x1c9a))){*pDst=(*pSrc-
+((char)(0x86a+1409-0xdbb)))<<(0x1282+3943-0x21e5);}else{*pDst=((toupper(*pSrc)-
+((char)(0xa83+1653-0x10b7)))+(0x1e71+325-0x1fac))<<(0x11a+2777-0xbef);}pSrc++;if
+(*pSrc>=((char)(0xa80+3213-0x16dd))&&*pSrc<=((char)(0x7d+2729-0xaed))){*pDst|=*
+pSrc-((char)(0x19d6+1509-0x1f8b));}else{*pDst|=(toupper(*pSrc)-
+((char)(0x79f+2261-0x1033)))+(0x16ac+2010-0x1e7c);}pSrc++;pDst++;}return
+nSrcLength/(0x132f+1385-0x1896);}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=
-(0x9e3+1690-0x107d);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x13a6+534-0x15bc)){
-return-(0x11b2+4507-0x234c);}for(i=(0x7ac+1401-0xd25);i<nSrcLength;i++){*pDst++=
-tab[*pSrc>>(0x10f7+634-0x136d)];*pDst++=tab[*pSrc&(0xb2d+4262-0x1bc4)];pSrc++;}*
-pDst='\0';return nSrcLength*(0x1bcd+477-0x1da8);}static VOID atPb_WebRecodeShow(
+(0x2e6+2033-0xad7);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x1e47+1744-0x2517)){
+return-(0xdb2+6149-0x25b6);}for(i=(0x135+7187-0x1d48);i<nSrcLength;i++){*pDst++=
+tab[*pSrc>>(0x1f73+996-0x2353)];*pDst++=tab[*pSrc&(0x62b+5528-0x1bb4)];pSrc++;}*
+pDst='\0';return nSrcLength*(0xb9c+2585-0x15b3);}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 +200,20 @@
){sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);printf(
"\x5b\x50\x42\x5d\x20\x61\x74\x50\x62\x5f\x53\x65\x6e\x64\x53\x63\x70\x62\x72\x53\x65\x74\x20\x61\x74\x42\x61\x73\x65\x5f\x49\x69\x6e\x74\x50\x62\x4f\x6b\x20" "\n"
);}VOID atPb_RecvCpbsReadRsp(T_zPb_AtCpbsReadRes*cpbsInd){CHAR resInfo[
-(0xfa0+2423-0x1903)]={(0xada+7082-0x2684)};if(strncmp(cpbsInd->locType,
-"\x53\x4d",(0xf63+1603-0x15a4))==(0x15e5+3179-0x2250)){(VOID)snprintf(resInfo,
-(0x11e1+4336-0x22bd),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
-NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x77+531-0x28a),(0x1ab2+2353-0x23cf))
-;(VOID)snprintf(resInfo,(0x365+9094-0x26d7),"\x25\x64",cpbsInd->totalEntries);(
-VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);g_zPb_SimIndex[(0x3c4+976-0x794)]=(
-UINT32)(cpbsInd->totalEntries);}else{printf(
+(0x147a+995-0x1849)]={(0x15c5+3238-0x226b)};if(strncmp(cpbsInd->locType,
+"\x53\x4d",(0x1889+491-0x1a72))==(0x1811+2828-0x231d)){(VOID)snprintf(resInfo,
+(0x25dd+269-0x26d6),"\x25\x64",cpbsInd->usedEntries);(VOID)sc_cfg_set(
+NV_PB_USEDENTRIES,resInfo);memset(resInfo,(0x73d+811-0xa68),(0x2464+525-0x265d))
+;(VOID)snprintf(resInfo,(0xf73+5069-0x232c),"\x25\x64",cpbsInd->totalEntries);(
+VOID)sc_cfg_set(NV_PB_TOTALENTRIES,resInfo);g_zPb_SimIndex[(0x1210+3080-0x1e18)]
+=(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[(0xf2+1588-0x71c)]={(0x65c+6451-0x1f8f)};assert(
-pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0x476+4168-0x14b4),"\x25\x64",
+UINT32 len){char converted[(0xe89+1945-0x1618)]={(0x856+3945-0x17bf)};assert(
+pbNvKeyWord!=ZUFI_NULL);(VOID)snprintf(converted,(0x841+5173-0x1c6c),"\x25\x64",
len);(VOID)sc_cfg_set(pbNvKeyWord,converted);}VOID atPb_ScpbrTestRsp(
-T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0xa44+4953-0x1d9d)};
-CHAR pbUsed[(0x1b55+1458-0x20d5)]={(0x74b+2701-0x11d8)};sc_cfg_get(
+T_zPb_AtScpbrTestRes*scpbsInd){T_zPb_UsimCapacity pbPara={(0x550+1381-0xab5)};
+CHAR pbUsed[(0x167+872-0x49d)]={(0xeba+4511-0x2059)};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 +222,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=(0x265+8167-0x224c);int max=(0x3bc+4803-0x167f);int res=
-(0x1430+2648-0x1e88);int index=(0x16b2+3485-0x244f);CHAR pbMin[
-(0x15ec+1127-0x1a21)]={(0x239+1899-0x9a4)};CHAR pbMax[(0x139f+3397-0x20b2)]={
-(0x1e4+7916-0x20d0)};int indexmin=(0x1275+4563-0x2448);int indexmax=
-(0x31+9213-0x242e);T_zPb_ScpbrReadRes scpbrReadInfo={(0x18af+2262-0x2185)};
-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")==(0x1+9895-0x26a8)||strcmp(pbMax,"\x30")==
-(0x279+3673-0x10d2)){sc_cfg_set(ZPB_NV_INIT,ZPB_OPERATE_SUC);printf(
+ min=(0x14e3+629-0x1758);int max=(0x1124+2100-0x1958);int res=
+(0x8c9+6259-0x213c);int index=(0x1ec+3057-0xddd);CHAR pbMin[(0x1396+1134-0x17d2)
+]={(0x1488+748-0x1774)};CHAR pbMax[(0x7d0+3310-0x148c)]={(0x3a9+2036-0xb9d)};int
+ indexmin=(0xd9a+2699-0x1825);int indexmax=(0x1c79+2346-0x25a3);
+T_zPb_ScpbrReadRes scpbrReadInfo={(0x7fd+803-0xb20)};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")
+==(0x2055+478-0x2233)||strcmp(pbMax,"\x30")==(0x125b+5167-0x268a)){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-(0x1873+2502-0x2238);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
-"\x25\x64",&max);if((min<(0x87+1551-0x696)||min>INT_MAX-(0xda6+311-0xedc))||(max
-<(0x9df+6047-0x217e)||max>INT_MAX-(0x1cc4+427-0x1e6e))){printf(
+);return-(0x670+5991-0x1dd6);}sscanf(pbMin,"\x25\x64",&min);sscanf(pbMax,
+"\x25\x64",&max);if((min<(0x1006+2181-0x188b)||min>INT_MAX-(0xce7+338-0xe38))||(
+max<(0xbdd+2514-0x15af)||max>INT_MAX-(0x405+4470-0x157a))){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-(0xdcd+2161-0x163d);}while((0xdfb+3014-0x19c0)){if(indexmin<min
-){indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0x118+862-0x475);if(
+,min,max);return-(0x583+3817-0x146b);}while((0x18d1+1499-0x1eab)){if(indexmin<
+min){indexmin=min;indexmax=min+ZPB_INIT_LOAD_RECORD_NUM-(0x894+75-0x8de);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 +249,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,
-(0x1be2+2272-0x24c2));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
-(0x8d7+2668-0x1342)){break;}}return g_PbOptRsp.result;}
-#if (0x495+3987-0x1428)
+(0xbdd+5183-0x201c));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result==-
+(0x1cc0+2492-0x267b)){break;}}return g_PbOptRsp.result;}
+#if (0x333+4361-0x143c)
int atPb_SendScpbrSet(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){UINT32
-indexmin=(0x5dd+2946-0x115f);UINT32 indexmax=(0x53c+3394-0x127e);CHAR atcmdMsg[
-(0x65c+7518-0x2374)]={(0x1385+727-0x165c)};int res=(0x6d4+1553-0xce5);CHAR pbMin
-[(0x1875+2180-0x20c7)]={(0x1df+2269-0xabc)};CHAR pbMax[(0x224+7448-0x1f0a)]={
-(0x114+8655-0x22e3)};sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+indexmin=(0x1e55+1895-0x25bc);UINT32 indexmax=(0x60+3471-0xdef);CHAR atcmdMsg[
+(0x3ba+5665-0x1995)]={(0x112d+4665-0x2366)};int res=(0x580+8207-0x258f);CHAR
+pbMin[(0x4fb+303-0x5f8)]={(0x23fd+321-0x253e)};CHAR pbMax[(0x1025+1253-0x14d8)]=
+{(0x3ff+6882-0x1ee1)};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")==(0x10dd+1040-0x14ed)||strcmp(pbMax,"\x30"
-)==(0x62a+2927-0x1199)){printf(
+,ZPB_LOADING);if(strcmp(pbMin,"\x30")==(0xe03+291-0xf26)||strcmp(pbMax,"\x30")==
+(0xd1+6966-0x1c07)){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 +268,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=
-(0x410+7943-0x2317);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0x563+3996-0x14ff)};if
-(pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0x661+5490-0x1bcf)+
-ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0x1345+288-0x1465)],
-sizeof(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0x1874+2243-0x2137)
-;(i<strlen(pbTextSrc))&&(i*(0xd73+5633-0x2370)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
-snprintf(strTarget+i*(0x275+4228-0x12f5)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-i
-*(0x93f+5770-0x1fc5)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i]
-);}strncpy(pbDst,strTarget,dstLen-(0x1849+1808-0x1f58));return ZUFI_SUCC;}}
-return ZUFI_FAIL;}VOID atPb_ScpbrSetRsp(T_zPb_ScpbrSetRes*atRes){
-T_zPb_WebContact pbRecord={(0x11ca+770-0x14cc)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]=
-{(0x58b+8497-0x26bc)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0x5f4+380-0x770)};int
-text_len=(0x44c+5839-0x1b1b);int tmp_len=(0x1213+3476-0x1fa7);CHAR tmp[
-ZPB_TEXT_SIZE_BYTES]={(0x17a+4148-0x11ae)};if(atRes->coding!=ZPB_UCS2){if(
+(0xc30+3208-0x18b8);CHAR strTarget[ZPB_TEXT_SIZE_BYTES]={(0x1174+2376-0x1abc)};
+if(pbTextSrc!=ZUFI_NULL){if(strlen(pbTextSrc)*(0xd8d+3920-0x1cd9)+
+ZPB_UCS2_PREFIX_LEN<dstLen){snprintf((CHAR*)&strTarget[(0xc35+637-0xeb2)],sizeof
+(strTarget),"\x25\x30\x32\x58",ZPB_UCS2_PREFIX);for(i=(0x156b+2661-0x1fd0);(i<
+strlen(pbTextSrc))&&(i*(0x1193+2059-0x199a)+ZPB_UCS2_PREFIX_LEN<dstLen);i++){
+snprintf(strTarget+i*(0x162b+3473-0x23b8)+ZPB_UCS2_PREFIX_LEN,sizeof(strTarget)-
+i*(0xba0+6497-0x24fd)-ZPB_UCS2_PREFIX_LEN,"\x30\x30\x25\x30\x32\x58",pbTextSrc[i
+]);}strncpy(pbDst,strTarget,dstLen-(0x7c4+1165-0xc50));return ZUFI_SUCC;}}return
+ ZUFI_FAIL;}VOID atPb_ScpbrSetRsp(T_zPb_ScpbrSetRes*atRes){T_zPb_WebContact
+pbRecord={(0x172a+3063-0x2321)};CHAR pbDst[ZPB_TEXT_SIZE_BYTES]={
+(0x1896+192-0x1956)};CHAR text[ZPB_TEXT_SIZE_BYTES]={(0x468+6203-0x1ca3)};int
+text_len=(0x2141+1235-0x2614);int tmp_len=(0x70b+6487-0x2062);CHAR tmp[
+ZPB_TEXT_SIZE_BYTES]={(0x86b+5370-0x1d65)};if(atRes->coding!=ZPB_UCS2){if(
atPb_EncodeText(pbDst,atRes->text,ZPB_TEXT_SIZE_BYTES)==ZUFI_SUCC){strncpy(atRes
-->text,pbDst+(0x75+4301-0x1140),sizeof(atRes->text)-(0x11f+8216-0x2136));}else{
+->text,pbDst+(0x3bd+4584-0x15a3),sizeof(atRes->text)-(0xca3+117-0xd17));}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<
-(0xbbf+4124-0x1bdb))return;memset(&text,(0x1c14+2236-0x24d0),ZPB_TEXT_SIZE_BYTES
-);text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0x17d+8105-0x2124)
-){memset(&atRes->text,(0xbe3+121-0xc5c),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->text
-,text+(0x15aa+1423-0x1b37),strlen(text)-(0x1175+646-0x13f9));}}pbRecord.pbId=-
-(0x6b6+5922-0x1dd7);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord.name,
-atRes->text,sizeof(pbRecord.name)-(0x4b1+4674-0x16f2));strncpy(pbRecord.
-mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0x54+9893-0x26f8));
+(0x1259+5205-0x26ae))return;memset(&text,(0xfc4+4084-0x1fb8),ZPB_TEXT_SIZE_BYTES
+);text_len=atPb_Bytes2String(&tmp,&text,tmp_len);if(text_len>(0x837+5922-0x1f57)
+){memset(&atRes->text,(0x4b7+4996-0x183b),ZPB_TEXT_SIZE_BYTES);memcpy(&atRes->
+text,text+(0x1ff8+80-0x2046),strlen(text)-(0xa01+1190-0xea5));}}pbRecord.pbId=-
+(0x44d+8283-0x24a7);pbRecord.pbIndex=(SINT32)atRes->index;strncpy(pbRecord.name,
+atRes->text,sizeof(pbRecord.name)-(0xa6c+220-0xb47));strncpy(pbRecord.
+mobilNumber,atRes->number1,sizeof(pbRecord.mobilNumber)-(0x14cf+359-0x1635));
strncpy(pbRecord.officeNumber,atRes->number2,sizeof(pbRecord.officeNumber)-
-(0x35f+2867-0xe91));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord.
-homeNumber)-(0x4c+3147-0xc96));strncpy(pbRecord.email,atRes->email,sizeof(
-pbRecord.email)-(0x9a1+3991-0x1937));pbRecord.pbLocation=ZPB_LOCATION_USIM;(VOID
+(0x13cd+2672-0x1e3c));strncpy(pbRecord.homeNumber,atRes->number3,sizeof(pbRecord
+.homeNumber)-(0xd08+2968-0x189f));strncpy(pbRecord.email,atRes->email,sizeof(
+pbRecord.email)-(0x2348+318-0x2485));pbRecord.pbLocation=ZPB_LOCATION_USIM;(VOID
)atPb_LoadARecToPbmTable(&pbRecord);}VOID atPb_SetDelStatusMultOrAll(){if(
-g_zPb_DelStatusUsim.dealFailNum>(0xe3+7165-0x1ce0)){if(g_zPb_DelStatusUsim.
-dealSuccNum>(0xdd3+444-0xf8f)){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
+g_zPb_DelStatusUsim.dealFailNum>(0x16a7+3449-0x2420)){if(g_zPb_DelStatusUsim.
+dealSuccNum>(0x16d3+595-0x1926)){(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 (0x8a0+4141-0x18cd)
+#if (0x504+7309-0x2191)
VOID atPb_RecvScpbwAddErr(UINT8*pErrCode){(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,
-ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0x1199+5356-0x2683)
-)==(0xd4f+3749-0x1bf4))){(VOID)sc_cfg_set(ZPB_NV_USIMMEMORYFULL,"\x79\x65\x73");
+ZPB_NEW_ERROR);if((strncmp(pErrCode,ZAT_ERRCODE_MEMORY_FULL,(0x169c+683-0x1945))
+==(0x18ab+1833-0x1fd4))){(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 +317,83 @@
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=(0xdb4+1797-0x14b9);UINT8 iTemp=(0x5ff+946-0x9b1);SINT32 i=
-(0x12da+2869-0x1e0f);if((NULL==pcHex)||(NULL==pcASC)||((0x11e1+5228-0x264d)==
-iDstLen)||(iDstLen<(iSrcLen/(0x44a+445-0x605)+(0x52a+5247-0x19a8)))){return;}for
-(i=(0x21a8+831-0x24e7);i<iSrcLen;i++){if(iOddOrEven%(0x1832+885-0x1ba5)==
-(0x23c+7298-0x1ebe)){iTemp=*(pcASC+i);if((iTemp>=((char)(0x74c+5219-0x1b7f)))&&(
-iTemp<=((char)(0xa8d+4145-0x1a85)))){*(pcHex+i/(0xddd+505-0xfd4))|=(UINT8)(iTemp
--(0xa96+4193-0x1ac7))<<(0xa49+2616-0x147d);}else{*(pcHex+i/(0x4e0+3184-0x114e))
-|=(UINT8)(iTemp-(0xba+6414-0x1991))<<(0xf7c+4076-0x1f64);}}else{iTemp=*(pcASC+i)
-;if((iTemp>=((char)(0x1779+1538-0x1d4b)))&&(iTemp<=((char)(0x374+4387-0x145e))))
-{*(pcHex+i/(0x195b+437-0x1b0e))|=iTemp-(0xb0a+4545-0x1c9b);}else{*(pcHex+i/
-(0xdb8+1120-0x1216))|=iTemp-(0x12e8+2658-0x1d13);}}iOddOrEven++;}}SINT32
-atPb_IfUcs2IsSMS7(UINT16*psUcs2,SINT32 iLength){int iRetVal=(0x17c0+368-0x192f);
-char cTemp;int i=(0x6c1+5484-0x1c2d);if(NULL==psUcs2){return-(0x4e3+5537-0x1a83)
-;}for(i=(0xc92+5012-0x2026);i<iLength;i++){if((0x108+2485-0x9bd)>psUcs2[i]){
-switch(psUcs2[i]){case(0x2238+770-0x252e):case(0xa00+4306-0x1a77):case
-(0x47c+5470-0x197e):case(0x19fb+2654-0x23fc):case(0x765+3079-0x130e):case
-(0x3f8+7822-0x220b):case(0x981+1293-0xe12):case(0x1925+1175-0x1d3f):case
-(0xde6+1925-0x14ed):case(0xf83+5077-0x22b4):case(0x1493+1843-0x1ba6):{break;}
-default:{cTemp=(char)G_ZPB_NEWUCS2TOGSM[psUcs2[i]];if(ZPB_NON_GSM==cTemp){
-iRetVal=(0xcfc+6037-0x2491);}break;}}}else{switch(psUcs2[i]){case
-(0xd06+4188-0x19ce):case(0x1ed3+2702-0x25bb):case(0x1fd8+1047-0x205c):case
-(0x794+379-0x574):case(0x1599+503-0x13e7):case(0x7d4+632-0x6ac):case
-(0xb7b+5150-0x1bd1):case(0x644+6757-0x1d06):case(0x191a+55-0x1599):case
-(0xd86+2384-0x1338):{break;}default:{iRetVal=(0x10a+4971-0x1475);break;}}}if(
-(0x10ea+1333-0x161f)==iRetVal){break;}}return iRetVal;}static UINT8
+){UINT32 iOddOrEven=(0x1bf6+950-0x1fac);UINT8 iTemp=(0x7a5+4235-0x1830);SINT32 i
+=(0x7a5+4990-0x1b23);if((NULL==pcHex)||(NULL==pcASC)||((0x225+4303-0x12f4)==
+iDstLen)||(iDstLen<(iSrcLen/(0x1aaf+1724-0x2169)+(0x5ff+3351-0x1315)))){return;}
+for(i=(0x7a0+7938-0x26a2);i<iSrcLen;i++){if(iOddOrEven%(0xecd+4922-0x2205)==
+(0xe89+2579-0x189c)){iTemp=*(pcASC+i);if((iTemp>=((char)(0xc61+3745-0x1ad2)))&&(
+iTemp<=((char)(0x22e7+846-0x25fc)))){*(pcHex+i/(0x9d9+5412-0x1efb))|=(UINT8)(
+iTemp-(0x13e0+1467-0x196b))<<(0xb2a+3665-0x1977);}else{*(pcHex+i/
+(0x915+5201-0x1d64))|=(UINT8)(iTemp-(0x3d+1572-0x62a))<<(0x205c+1012-0x244c);}}
+else{iTemp=*(pcASC+i);if((iTemp>=((char)(0x6a8+4690-0x18ca)))&&(iTemp<=
+((char)(0x7cf+2568-0x119e)))){*(pcHex+i/(0x1181+1105-0x15d0))|=iTemp-
+(0x420+4941-0x173d);}else{*(pcHex+i/(0x1666+2726-0x210a))|=iTemp-
+(0xdd+709-0x36b);}}iOddOrEven++;}}SINT32 atPb_IfUcs2IsSMS7(UINT16*psUcs2,SINT32
+iLength){int iRetVal=(0x154+6956-0x1c7f);char cTemp;int i=(0x4a8+2444-0xe34);if(
+NULL==psUcs2){return-(0x1893+2607-0x22c1);}for(i=(0x2625+215-0x26fc);i<iLength;i
+++){if((0x729+6228-0x1e7d)>psUcs2[i]){switch(psUcs2[i]){case(0x1012+5065-0x23cf)
+:case(0x4aa+897-0x7d0):case(0x5b0+1281-0xa55):case(0x569+533-0x721):case
+(0x1347+281-0x1402):case(0x491+4912-0x1746):case(0x4b0+8278-0x248a):case
+(0x119f+4794-0x23dc):case(0x417+1828-0xabd):case(0xe3+872-0x3a7):case
+(0x1a12+1881-0x214b):{break;}default:{cTemp=(char)G_ZPB_NEWUCS2TOGSM[psUcs2[i]];
+if(ZPB_NON_GSM==cTemp){iRetVal=(0x1100+3201-0x1d81);}break;}}}else{switch(psUcs2
+[i]){case(0xd53+6520-0x2337):case(0x8f3+2415-0xebc):case(0xdc9+1829-0x115b):case
+(0x1a5b+4062-0x269e):case(0xaa5+6436-0x2020):case(0x910+2139-0xdcb):case
+(0x511+5374-0x1647):case(0x12f3+2559-0x194f):case(0xef6+3290-0x1818):case
+(0xf07+4997-0x1eee):{break;}default:{iRetVal=(0xea9+1292-0x13b5);break;}}}if(
+(0x771+7394-0x2453)==iRetVal){break;}}return iRetVal;}static UINT8
atPb_EncodeNameToUcs2(char*pbDst,UINT32 iDstLen,char const*pbSrc){UINT16 acHex[
-(0x12d4+260-0x12d8)]={(0x5c+213-0x131)};SINT32 srclen=(0x26c+764-0x568);SINT32
-rest=(0xd5a+237-0xe47);assert(pbDst!=NULL&&pbSrc!=NULL);srclen=(SINT32)strlen(
-pbSrc);slog(PB_PRINT,SLOG_DEBUG,
+(0x16aa+3311-0x2299)]={(0x114+2272-0x9f4)};SINT32 srclen=(0x13e9+900-0x176d);
+SINT32 rest=(0x1a21+2077-0x223e);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,(0x163d+2798-0x202b),(UINT8*)pbSrc,srclen);rest
-=atPb_IfUcs2IsSMS7(acHex,srclen/(0xc67+5389-0x2170));if(rest==
-(0x145a+4459-0x25c4)){return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest
-==(0x116b+523-0x1376)){if(strlen(pbSrc)+(0x9a0+2366-0x12dc)<iDstLen){memcpy(
-pbDst,"\x38\x30",(0x23+9477-0x2526));memcpy(pbDst+(0x9b7+341-0xb0a),pbSrc,srclen
-);return ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(
-T_zPb_WebContact const*pbRecv,BOOL pbNewFlag){SINT32 count=(0x823+4664-0x1a5a);
-SINT32 total=(0x1196+4426-0x22e0);SINT32*IndexType=NULL;if((NULL==pbRecv)){slog(
-PB_PRINT,SLOG_ERR,
+,pbSrc,srclen);pb_AsctoHex(acHex,(0x16d4+276-0x16e8),(UINT8*)pbSrc,srclen);rest=
+atPb_IfUcs2IsSMS7(acHex,srclen/(0x104d+4775-0x22f0));if(rest==
+(0x22ef+426-0x2498)){return atPb_EncodeText(pbDst,pbSrc,iDstLen);}else if(rest==
+(0x1b93+2714-0x262d)){if(strlen(pbSrc)+(0x716+7865-0x25cd)<iDstLen){memcpy(pbDst
+,"\x38\x30",(0x63b+6878-0x2117));memcpy(pbDst+(0xcb8+1619-0x1309),pbSrc,srclen);
+return ZUFI_SUCC;}}return ZUFI_FAIL;}SINT32 atPb_FindIdleIndex(T_zPb_WebContact
+const*pbRecv,BOOL pbNewFlag){SINT32 count=(0x4dc+4596-0x16cf);SINT32 total=
+(0x1b6b+2799-0x265a);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-(0x181b+1578-0x1e44);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv
-->pbLocation){total=g_zPb_SimIndex[(0x920+2603-0x134b)];IndexType=g_zPb_SimIndex
-;}else if(ZPB_LOCATION_AP==pbRecv->pbLocation){total=g_zPb_ApIndex[
-(0x59d+2226-0xe4f)];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,
+);return-(0x4bf+8139-0x2489);}if(TRUE==pbNewFlag){if(ZPB_LOCATION_USIM==pbRecv->
+pbLocation){total=g_zPb_SimIndex[(0x15f7+3466-0x2381)];IndexType=g_zPb_SimIndex;
+}else if(ZPB_LOCATION_AP==pbRecv->pbLocation){total=g_zPb_ApIndex[
+(0x1da7+2056-0x25af)];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-(0x4f8+1386-0xa61);}slog(PB_PRINT,SLOG_DEBUG,
+,count);return-(0x1032+1739-0x16fc);}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=(0x669+1839-0xd98);SINT32 i=
-(0x1236+411-0x13d1);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0x1b3b+1552-0x214b)};CHAR
-str[(0xcc7+4926-0x2002)]={(0x1272+703-0x1531)};SINT32 length=(0xa9d+1240-0xf75);
-length=atPb_String2Bytes(pSrc,buf,len);for(i=(0x1103+3391-0x1e42);i<length;i+=
-(0x1ab+9479-0x26b0)){if(buf[i]!=(0x214+3853-0x1121)||buf[i+(0xe9+4522-0x1292)]>
-(0x109f+4022-0x1fd6)){return FALSE;}pDst[j++]=buf[i+(0xda2+6190-0x25cf)];}return
- TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL
-pbNewFlag,sem_t semId){int atRes=(0x5cd+6909-0x20ca);CHAR pbName[
-ZPB_TEXT_SIZE_BYTES+(0x9a8+6795-0x2430)]={(0x114c+5566-0x270a)};CHAR buf_src[
-ZPB_TEXT_SIZE_BYTES+(0x593+4736-0x1810)]={(0x157f+358-0x16e5)};CHAR buf_dest[
-ZPB_TEXT_SIZE_BYTES+(0x547+3670-0x139a)]={(0x1658+4078-0x2646)};T_zPb_ScpbwParam
- scpbwParam={(0x1cf3+767-0x1ff2)};int len=(0x161f+518-0x1825);atPb_WebRecodeShow
-(pWebPbContact);if(atPb_GetASCII(pWebPbContact->name,pbName,strlen(pWebPbContact
-->name))){scpbwParam.coding=(0x130c+1843-0x1a3f);}else{len=atPb_String2Bytes(
+CHAR*pSrc,CHAR*pDst,SINT32 len){SINT32 j=(0x1491+837-0x17d6);SINT32 i=
+(0x8a4+1673-0xf2d);CHAR buf[ZPB_TEXT_SIZE_BYTES]={(0x1a15+2674-0x2487)};CHAR str
+[(0xe6b+2230-0x171e)]={(0x22a0+200-0x2368)};SINT32 length=(0x17b4+1763-0x1e97);
+length=atPb_String2Bytes(pSrc,buf,len);for(i=(0x1398+595-0x15eb);i<length;i+=
+(0x1342+199-0x1407)){if(buf[i]!=(0x36+7559-0x1dbd)||buf[i+(0x283+8069-0x2207)]>
+(0xfaa+4619-0x2136)){return FALSE;}pDst[j++]=buf[i+(0x74+4788-0x1327)];}return
+TRUE;}VOID atWeb_AddOrModOnePbUsim(T_zPb_WebContact*pWebPbContact,BOOL pbNewFlag
+,sem_t semId){int atRes=(0x163+1695-0x802);CHAR pbName[ZPB_TEXT_SIZE_BYTES+
+(0x69d+3564-0x1486)]={(0x5e1+3835-0x14dc)};CHAR buf_src[ZPB_TEXT_SIZE_BYTES+
+(0x12d9+2000-0x1aa6)]={(0x392+3946-0x12fc)};CHAR buf_dest[ZPB_TEXT_SIZE_BYTES+
+(0x1742+3162-0x2399)]={(0xf47+1507-0x152a)};T_zPb_ScpbwParam scpbwParam={
+(0x40c+6994-0x1f5e)};int len=(0x12a2+3377-0x1fd3);atPb_WebRecodeShow(
+pWebPbContact);if(atPb_GetASCII(pWebPbContact->name,pbName,strlen(pWebPbContact
+->name))){scpbwParam.coding=(0x67d+17-0x68e);}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=(0x205b+1381-0x25bf);}scpbwParam.pbIndex=pWebPbContact->
+,len);scpbwParam.coding=(0x1058+1885-0x17b4);}scpbwParam.pbIndex=pWebPbContact->
pbIndex;strncpy(scpbwParam.name,pbName,sizeof(scpbwParam.name)-
-(0x76b+2594-0x118c));strncpy(scpbwParam.mobilNumber,pWebPbContact->mobilNumber,
-sizeof(scpbwParam.mobilNumber)-(0x14b5+651-0x173f));strncpy(scpbwParam.
+(0x500+8124-0x24bb));strncpy(scpbwParam.mobilNumber,pWebPbContact->mobilNumber,
+sizeof(scpbwParam.mobilNumber)-(0x116f+3270-0x1e34));strncpy(scpbwParam.
officeNumber,pWebPbContact->officeNumber,sizeof(scpbwParam.officeNumber)-
-(0x8b7+4017-0x1867));strncpy(scpbwParam.homeNumber,pWebPbContact->homeNumber,
-sizeof(scpbwParam.homeNumber)-(0xd82+6379-0x266c));strncpy(scpbwParam.email,
-pWebPbContact->email,sizeof(scpbwParam.email)-(0xcf+3154-0xd20));
+(0x36d+2559-0xd6b));strncpy(scpbwParam.homeNumber,pWebPbContact->homeNumber,
+sizeof(scpbwParam.homeNumber)-(0x241a+369-0x258a));strncpy(scpbwParam.email,
+pWebPbContact->email,sizeof(scpbwParam.email)-(0x1994+2014-0x2171));
ipc_send_message(MODULE_ID_PB,MODULE_ID_AT_CTL,MSG_CMD_ADD_MODIFY_PB_REQ,sizeof(
-T_zPb_ScpbwParam),(unsigned char*)&scpbwParam,(0x71+8445-0x216e));sem_wait(&
-g_Pb_sem_id);if(g_PbOptRsp.result!=(0x1f15+270-0x2022)){(VOID)sc_cfg_set(
+T_zPb_ScpbwParam),(unsigned char*)&scpbwParam,(0x21b4+433-0x2365));sem_wait(&
+g_Pb_sem_id);if(g_PbOptRsp.result!=(0x66f+6216-0x1eb6)){(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,17 +406,17 @@
);}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
"\x70\x62\x3a\x57\x72\x69\x74\x65\x43\x6f\x6e\x74\x61\x63\x74\x54\x6f\x50\x62\x6d\x54\x61\x62\x6c\x65\x20\x65\x72\x72\x6f\x72\x2e" "\n"
);}}VOID atWeb_AddOnePb(T_zPb_WebContact*webPbContact,sem_t semId){SINT32
-idleIndex=(0x53+4307-0x1125);T_zPb_Header pbHeader={(0x194+1211-0x64f)};BOOL
-pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0x1b0d+2514-0x24df)};CHAR ptFlag[
-(0x135+2256-0x9f1)]={(0x3b0+5853-0x1a8d)};printf(
+idleIndex=(0x2643+94-0x26a0);T_zPb_Header pbHeader={(0x29a+6043-0x1a35)};BOOL
+pbNewFlag=FALSE;T_zPb_DelInfo delRecord={(0x15+5708-0x1661)};CHAR ptFlag[
+(0x896+5526-0x1e18)]={(0x273+2521-0xc4c)};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(-(0x35b+6880-0x1e3a)==webPbContact->pbId){slog(PB_PRINT,
-SLOG_DEBUG,
+,webPbContact->pbId);if(-(0x2183+1300-0x2696)==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!=-(0x77+4277-0x112b)){webPbContact->pbIndex=idleIndex;}
-else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
+,idleIndex);if(idleIndex!=-(0x4ba+4185-0x1512)){webPbContact->pbIndex=idleIndex;
+}else{(VOID)sc_cfg_set(ZPB_NV_WRITE_FLAG,ZPB_NEW_ERROR);printf(
"\x5b\x50\x42\x5d\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x66\x75\x6c\x6c\x2c\x20\x63\x61\x6e\x20\x6e\x6f\x74\x20\x61\x64\x64\x20\x72\x65\x63\x6f\x64\x65\x20\x61\x6e\x79\x20\x6d\x6f\x72\x65\x2e" "\n"
);return;}}else{printf(
"\x5b\x50\x42\x5d\x20\x61\x74\x57\x65\x62\x5f\x41\x64\x64\x4f\x6e\x65\x50\x62\x20\x6d\x6f\x64\x69\x66\x79\x2e" "\n"
@@ -435,27 +434,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(
-(0x1a04+764-0x1d00)==strcmp("\x30",ptFlag)&&-(0x117+5060-0x14da)!=webPbContact->
-del_id){delRecord.delId[(0x11bf+5211-0x261a)]=webPbContact->del_id;
-atWeb_DelOnepb(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,
-sem_t semId){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x8e8+1334-0xe1e)};int atRes=
-(0xa78+4827-0x1d53);SINT32 delTime=(0xa50+5703-0x2097);
+(0x2c6+3209-0xf4f)==strcmp("\x30",ptFlag)&&-(0x226d+288-0x238c)!=webPbContact->
+del_id){delRecord.delId[(0xcad+6633-0x2696)]=webPbContact->del_id;atWeb_DelOnepb
+(&delRecord,semId);}}VOID atWeb_DelOnepb(T_zPb_DelInfo*delRecord,sem_t semId){
+CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x579+5452-0x1ac5)};int atRes=
+(0xdca+5888-0x24ca);SINT32 delTime=(0x145+7580-0x1ee1);
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[(0x159+4600-0x1351)],delRecord->delLocation);if(
+,delRecord->delIndex[(0x1852+1743-0x1f21)],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[(0x10ab+4664-0x22b1)]={(0x1fac+900-0x2330)};
+delRecord->delLocation){CHAR pbMax[(0x17c8+367-0x1905)]={(0x15a3+1358-0x1af1)};
sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,sizeof(pbMax));if((delRecord->delIndex[
-(0x13d8+716-0x16a4)]>=(0x50+3251-0xd02))&&(delRecord->delIndex[
-(0xaf1+2329-0x140a)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
+(0x316+6805-0x1dab)]>=(0x374+3485-0x1110))&&(delRecord->delIndex[
+(0xd55+6166-0x256b)]<=atoi(pbMax))){ipc_send_message(MODULE_ID_PB,
MODULE_ID_AT_CTL,MSG_CMD_DELETE_PB_REQ,sizeof(int),(unsigned char*)&delRecord->
-delIndex[(0x9d3+6723-0x2416)],(0x14e0+3104-0x2100));sem_wait(&g_Pb_sem_id);if(
-g_PbOptRsp.result!=(0x887+2832-0x1396)){sc_cfg_set(ZPB_NV_WRITE_FLAG,
+delIndex[(0x4a6+248-0x59e)],(0x934+1057-0xd55));sem_wait(&g_Pb_sem_id);if(
+g_PbOptRsp.result!=(0x1583+716-0x184e)){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 +464,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]={(0xfed+3479-0x1d84)};int atRes=(0xd58+5646-0x2366);SINT32
- delCount=(0xce6+5284-0x218a);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
-g_zPb_DelStatusUsim,(0x1324+2012-0x1b00),sizeof(T_zPb_DelStatusMultiOrAll));
+ZSVR_AT_RES_CODE_LEN]={(0xabd+3592-0x18c5)};int atRes=(0xc85+3148-0x18d1);SINT32
+ delCount=(0x555+2479-0xf04);(VOID)sc_cfg_set(NV_PHO_DEL,"");memset(&
+g_zPb_DelStatusUsim,(0x2a5+6956-0x1dd1),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 +477,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[
-(0x3f2+3500-0x116c)]={(0x192+3867-0x10ad)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
-sizeof(pbMax));if((delRecord->delIndex[delCount]>=(0x174+9476-0x2677))&&(
+(0x1b68+1330-0x2068)]={(0x2d2+344-0x42a)};sc_cfg_get(ZPB_NV_USIMINDEXMAX,pbMax,
+sizeof(pbMax));if((delRecord->delIndex[delCount]>=(0x1212+4329-0x22fa))&&(
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]
-,(0x38d+1677-0xa1a));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0x164b+4255-0x26e9)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+,(0x1a3+3643-0xfde));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0x192f+1704-0x1fd6)){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 +492,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={(0xf6b+5860-0x264f)};SINT32
- i=(0xd3a+2295-0x1630);result=atPb_DelRecFromPbmTableByGroup(&index);if(
+T_zPb_DbResult result=ZPB_DB_OK;T_zPb_ApIndex index={(0x135c+4635-0x2577)};
+SINT32 i=(0x1c9+4604-0x13c4);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=
-(0x17c3+3185-0x2433);i<=ZPB_AP_MAX_RECORD;i++){if((0x1957+2747-0x2412)!=index.
+(0xf97+1532-0x1592);i<=ZPB_AP_MAX_RECORD;i++){if((0x1cb9+286-0x1dd7)!=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]={
-(0x90f+5969-0x2060)};snprintf(sql,sizeof(sql)-(0x103+53-0x137),
+(0x7c6+6816-0x2266)};snprintf(sql,sizeof(sql)-(0x633+4971-0x199d),
"\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 +508,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]={(0x2f2+8711-0x24f9)};int atRes=
-(0x13ba+1777-0x1aab);UINT32 i=(0xb62+810-0xe8c);CHAR sql[ZPB_MAX_BYTES_DB]={
-(0x946+2985-0x14ef)};UINT32 count=(0x1bf+1267-0x6b2);if(pdelRecord!=NULL){memset
-(&g_zPb_DelStatusUsim,(0xdcf+5076-0x21a3),sizeof(T_zPb_DelStatusMultiOrAll));
+CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0xb88+3207-0x180f)};int atRes=
+(0x1e8+6229-0x1a3d);UINT32 i=(0x10ac+1802-0x17b6);CHAR sql[ZPB_MAX_BYTES_DB]={
+(0x6+5953-0x1747)};UINT32 count=(0xfb8+2296-0x18b0);if(pdelRecord!=NULL){memset(
+&g_zPb_DelStatusUsim,(0xc74+5254-0x20fa),sizeof(T_zPb_DelStatusMultiOrAll));
g_zPb_DelStatusUsim.dealFlag=ZPB_DEL_ALL_RECORD_USIM;snprintf(sql,sizeof(sql)-
-(0x11f5+34-0x1216),
+(0x43c+7452-0x2157),
"\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((0x506+58-0x540)<count){CHAR pbMin[
-(0x1701+307-0x1802)]={(0x1b89+752-0x1e79)};CHAR pbMax[(0x1785+3875-0x2676)]={
-(0x1181+707-0x1444)};UINT32 i_pbMin=(0x1112+859-0x146d);UINT32 i_pbMax=
-(0x12e1+2445-0x1c6e);sc_cfg_get(ZPB_NV_USIMINDEXMIN,pbMin,sizeof(pbMin));
+atPb_DbCountTableLineCb,&count);if((0x133b+2130-0x1b8d)<count){CHAR pbMin[
+(0x510+1316-0xa02)]={(0x1be3+1907-0x2356)};CHAR pbMax[(0xb0f+1593-0x1116)]={
+(0x168f+152-0x1727)};UINT32 i_pbMin=(0xbe7+5119-0x1fe6);UINT32 i_pbMax=
+(0x16d3+226-0x17b5);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,
-(0x5fa+5837-0x1cc7));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
-(0x75c+2043-0xf56)){g_zPb_DelStatusUsim.dealFailNum++;sc_cfg_set(
+(0x1c1d+667-0x1eb8));sem_wait(&g_Pb_sem_id);if(g_PbOptRsp.result!=
+(0x6d9+3268-0x139c)){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)-
-(0x7d7+2112-0x1016),
+(0xbd9+4465-0x1d49),
"\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/sms/src/sms_code.c b/ap/app/zte_comm/sms/src/sms_code.c
index cac3c07..3b29d96 100755
--- a/ap/app/zte_comm/sms/src/sms_code.c
+++ b/ap/app/zte_comm/sms/src/sms_code.c
@@ -6,662 +6,661 @@
#ifdef WIN32
#include <wchar.h>
#endif
-#define NON_GSM (0x34+4140-0x1040)
+#define NON_GSM (0x16a6+2632-0x20ce)
#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[(0x2610+94-0x265e)]={
-((char)(0x33d+9153-0x26ce)),((char)(0x76c+6414-0x2049)),
-((char)(0xafa+7163-0x26c3)),((char)(0x10cc+780-0x13a5)),
-((char)(0x649+2965-0x11aa)),((char)(0xae3+1311-0xfcd)),
-((char)(0xc76+3213-0x18cd)),((char)(0x161a+2875-0x211e)),
-((char)(0x8d9+706-0xb63)),((char)(0xeab+4455-0x1fd9)),
-((char)(0x11b4+4526-0x2321)),((char)(0x7ed+4256-0x184b)),
-((char)(0x9d1+635-0xc09)),((char)(0xa2+642-0x2e0)),((char)(0xf5b+1992-0x16de)),
-((char)(0xd59+1635-0x1376))};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)(0xce0+1485-0x128d)),
-((char)(0x37+1923-0x79a)),((char)(0x2f8+1017-0x6d1)),((char)(0x12c+7323-0x1da7))
-,((char)(0x8e4+4647-0x1aeb)),((char)(0x1000+3286-0x1cb6)),
-((char)(0x8f+6900-0x1b63)),((char)(0x52f+6015-0x1c8e)),
-((char)(0xf0d+2898-0x1a3f)),((char)(0x618+835-0x93b)),
-((char)(0xa16+6539-0x2381)),((char)(0x1912+1488-0x1ec2)),
-((char)(0xb5+8313-0x210e)),((char)(0x20dd+458-0x2287)),((char)(0x7eb+110-0x839))
-,((char)(0x9dd+6033-0x214e)),((char)(0xa31+5434-0x1f4b)),
-((char)(0x21a7+1406-0x2705)),((char)(0xbad+5492-0x2101)),
-((char)(0x1a12+3013-0x25b7)),((char)(0x4a+7645-0x1e07)),
-((char)(0x3aa+6020-0x1b0e)),((char)(0x7f+4588-0x124b)),
-((char)(0x921+1652-0xf75)),((char)(0x2f8+6058-0x1a82)),
-((char)(0x1395+1260-0x1861)),((char)(0x1f3+5970-0x1925)),
-((char)(0x2009+540-0x2205)),((char)(0x1265+2615-0x1c7c)),
-((char)(0x8cc+4963-0x1c0f)),((char)(0x1b7+5882-0x1891)),
-((char)(0xc66+1456-0x11f6)),((char)(0x1fc+153-0x275)),
-((char)(0x1fd4+1113-0x240c)),(0x2f5+3996-0x126f),((char)(0x262+3269-0xf04)),
-(0x1060+889-0x13d7),((char)(0x697+4826-0x194c)),((char)(0x10fb+4272-0x2185)),
-(0x11db+4379-0x22cf),((char)(0x798+4132-0x1794)),((char)(0xe8a+2300-0x175d)),
-((char)(0x12a2+3985-0x2209)),((char)(0x11d5+1917-0x1927)),
-((char)(0xd9d+5025-0x2112)),((char)(0x885+6820-0x22fc)),
-((char)(0x4c7+1693-0xb36)),((char)(0x939+3122-0x153c)),
-((char)(0xedf+5218-0x2311)),((char)(0x311+5701-0x1925)),
-((char)(0x1e73+1798-0x2547)),((char)(0x1b6b+2310-0x243e)),
-((char)(0xf0d+5387-0x23e4)),((char)(0x1f34+1282-0x2401)),
-((char)(0x18c6+1160-0x1d18)),((char)(0x11d0+1582-0x17c7)),
-((char)(0x1a05+2321-0x22de)),((char)(0xc98+5564-0x221b)),
-((char)(0x21b+258-0x2e3)),((char)(0x22ba+903-0x2606)),
-((char)(0xa8d+3991-0x19e8)),((char)(0x19fd+1614-0x200e)),
-((char)(0x17fa+3112-0x23e4)),((char)(0xa6d+5542-0x1fd4)),(0x814+3026-0x13e6),
-((char)(0x10b3+589-0x12bf)),((char)(0x13f5+932-0x1757)),
-((char)(0x5df+4358-0x16a2)),((char)(0x64c+3953-0x1579)),
-((char)(0x366+7221-0x1f56)),((char)(0x3bf+3902-0x12b7)),
-((char)(0x8f9+3752-0x175a)),((char)(0x1cc2+1463-0x2231)),
-((char)(0x327+3504-0x108e)),((char)(0x2bf+1410-0x7f7)),
-((char)(0xbfc+6869-0x2686)),((char)(0x654+748-0x8f4)),
-((char)(0x1950+1453-0x1eb0)),((char)(0xbf+3248-0xd21)),
-((char)(0xced+1243-0x1179)),((char)(0x5a9+1140-0x9cd)),
-((char)(0x2eb+7309-0x1f27)),((char)(0x969+2668-0x1383)),
-((char)(0x1ba5+1677-0x21df)),((char)(0x9d9+4220-0x1a01)),
-((char)(0x1edf+1167-0x2319)),((char)(0x15b9+499-0x1756)),
-((char)(0x868+1901-0xf7e)),((char)(0x7e9+3952-0x1701)),
-((char)(0xf7+9501-0x25bb)),((char)(0xa11+3524-0x177b)),(0x264b+1876-0x1263),6959
-,(0x2144+4380-0x1722),6932,(0xa3d+179-0xadf),((char)(0x1134+778-0x141e)),
-((char)(0x3da+6231-0x1bd0)),((char)(0xdb7+814-0x1083)),
-((char)(0x2389+131-0x23a9)),((char)(0x122f+1917-0x1948)),
-((char)(0x1706+2440-0x2029)),((char)(0x23a+6991-0x1d23)),
-((char)(0x22d0+460-0x2435)),((char)(0x1ad3+1964-0x2217)),
-((char)(0x19c2+2076-0x2175)),((char)(0x1487+3304-0x2105)),
-((char)(0x428+1771-0xaa8)),((char)(0xc30+5522-0x2156)),
-((char)(0x31d+6210-0x1af2)),((char)(0x88f+7245-0x246e)),
-((char)(0xd23+5822-0x2372)),((char)(0xeca+1367-0x13b1)),
-((char)(0x2f7+7480-0x1fbe)),((char)(0x1007+2782-0x1a73)),
-((char)(0x11c4+2434-0x1ad3)),((char)(0x1f13+739-0x2182)),
-((char)(0x1240+349-0x1328)),((char)(0x9ec+6424-0x228e)),
-((char)(0x9e0+2757-0x142e)),((char)(0x469+8796-0x264d)),
-((char)(0x441+1842-0xafa)),((char)(0x185b+1147-0x1c5c)),(0x1df4+645-0x551),6976,
-6953,(0x21cf+4449-0x17f3),((char)(0x5ad+1988-0xd51)),
-((char)(0x1bed+1987-0x2390)),((char)(0x121b+5334-0x26d1)),
-((char)(0x267+7690-0x2051)),((char)(0xad6+2180-0x133a)),
-((char)(0x19ab+2643-0x23de)),((char)(0x120+3519-0xebf)),
-((char)(0x1aed+2738-0x257f)),((char)(0x417+3764-0x12ab)),
-((char)(0x417+6537-0x1d80)),((char)(0x218d+233-0x2256)),
-((char)(0xbf3+5927-0x22fa)),((char)(0x1767+1904-0x1eb7)),
-((char)(0x1a24+2306-0x2306)),((char)(0x2055+791-0x234c)),
-((char)(0x9ca+835-0xced)),((char)(0x699+415-0x818)),((char)(0x956+5621-0x1f2b)),
-((char)(0x7c3+6654-0x21a1)),((char)(0x111a+5456-0x264a)),
-((char)(0x3f4+3264-0x1094)),((char)(0x172d+216-0x17e5)),
-((char)(0x1832+2717-0x22af)),((char)(0x6a7+5671-0x1cae)),
-((char)(0xc52+828-0xf6e)),((char)(0x11e5+1832-0x18ed)),
-((char)(0x19e0+99-0x1a23)),((char)(0x226b+337-0x239c)),
-((char)(0x68a+4363-0x1775)),((char)(0xb88+3471-0x18f7)),
-((char)(0x9c3+6705-0x23d4)),((char)(0xb6+7573-0x1e2b)),
-((char)(0x11d4+3804-0x2090)),((char)(0x3b8+5687-0x19cf)),(0x63a+5570-0x1bbc),
-((char)(0xfad+183-0x1044)),(0x6d1+4996-0x1a54),(0x18c0+143-0x192b),
-(0x4a2+1457-0xa50),((char)(0x1899+126-0x18f7)),(0x447+8416-0x24c8),
-((char)(0x143c+1196-0x18c8)),((char)(0x25+1367-0x55c)),
-((char)(0x2048+999-0x240f)),((char)(0x514+6635-0x1edf)),
-((char)(0x3e8+1759-0xaa7)),((char)(0x211f+807-0x2426)),
-((char)(0x9e4+1212-0xe80)),((char)(0x1d3c+2231-0x25d3)),
-((char)(0x1812+2066-0x2004)),((char)(0x770+451-0x913)),
-((char)(0x1f76+1178-0x23f0)),((char)(0x9d9+4231-0x1a40)),
-((char)(0xa3a+6025-0x21a3)),((char)(0x9fa+3534-0x17a8)),
-((char)(0x1815+376-0x196d)),((char)(0x1b74+2465-0x24f5)),(0x148f+1734-0x1b4a),
-((char)(0x10f3+1100-0x151f)),((char)(0x7dd+4689-0x1a0e)),
-((char)(0x92d+5170-0x1d3f)),((char)(0x32d+1070-0x73b)),
-((char)(0x3f3+3559-0x11ba)),((char)(0x1db6+2233-0x264f)),(0x1781+1287-0x1c28),
-((char)(0xf30+4693-0x2165)),((char)(0x18a+7252-0x1dbe)),
-((char)(0x161c+3641-0x2435)),((char)(0x19b+3509-0xf30)),(0xbfa+1356-0x10eb),
-(0x1119+1925-0x1890),(0x184+1866-0x8b2),(0x1474+2478-0x1e19),
-((char)(0x162+3122-0xd74)),(0x23e5+585-0x260f),((char)(0x1540+3387-0x225b)),
-((char)(0x874+854-0xbaa)),((char)(0x342+7868-0x21de)),
-((char)(0xc84+5675-0x228f)),((char)(0x565+2223-0xdf4)),
-((char)(0x249f+384-0x25ff)),((char)(0x115c+5512-0x26c4)),(0x697+3387-0x1375),
-((char)(0x1477+2386-0x1da9)),((char)(0x1a00+2355-0x2313)),
-((char)(0x17c7+1000-0x1b8f)),((char)(0x1a2a+887-0x1d81)),(0x578+4492-0x16a8),
-((char)(0x743+5481-0x1c8c)),((char)(0x2ef+4937-0x1618)),
-((char)(0x5ba+1113-0x9f3)),((char)(0x774+2874-0x128e)),
-((char)(0xd20+5310-0x21be)),(0x1a83+702-0x1ce3),((char)(0x3dd+3397-0x1102)),
-((char)(0x2e1+7772-0x211d)),(0x1528+1543-0x1b11),(0x14d3+4208-0x24c4),
-((char)(0xa4f+4651-0x1c5a)),((char)(0x1707+2547-0x20da)),
-((char)(0x24c+7758-0x207a)),(0x346+1978-0xa85),(0x9fd+5505-0x1f6f),
-(0x1cd+6629-0x1b95),((char)(0x616+8227-0x2619)),(0x5e1+4857-0x18d6),
-(0x3f+7849-0x1ee3),((char)(0xca6+1737-0x134f)),((char)(0x25ff+74-0x2629)),
-(0x13b0+4132-0x23cd),((char)(0x10c0+4085-0x2095)),((char)(0xcba+5655-0x22b1)),
-((char)(0xd24+1848-0x143c)),((char)(0xd8a+94-0xdc8)),(0xd55+4703-0x1f37),
-(0x11f+5305-0x15d0),((char)(0x3b8+4793-0x1651)),((char)(0xa5a+6980-0x257e)),
-((char)(0x2221+801-0x2522)),(0x92+8602-0x21b0),((char)(0x5a+9727-0x2639)),
-(0x2348+806-0x2662),(0x1558+1427-0x1ae5),((char)(0x1890+3521-0x2631)),
-((char)(0x130f+2469-0x1c94)),(0xf19+2228-0x174f),((char)(0x375+3764-0x1209)),
-((char)(0x125+6752-0x1b65)),((char)(0xd0d+2296-0x15e5)),};const unsigned short
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0xd1c+4584-0x1f02)]={{
-(0x325+5026-0x16be),(0x1a90+3357-0x26c6)},{(0x1247+3532-0x2009),
-(0x592+135-0x60d)},{(0x15b5+3215-0x2237),(0x9d+8566-0x2206)},{
-(0x70d+7182-0x2307),(0x1815+3846-0x26bd)},{(0xc82+4392-0x1d82),
-(0xb68+6015-0x226c)},{(0xa71+33-0xa69),(0x128d+5254-0x2696)},{
-(0x21c4+1356-0x26e1),(0x8b8+65-0x89d)},{(0x272+5496-0x17ae),(0xe4a+4758-0x2085)}
-,{(0x7cd+5574-0x1d56),(0x60c+3216-0x121e)},{(0x1491+295-0x157a),
-(0xe06+4769-0x204a)},{(0x180+3746-0xfe2),(0x188+2590-0xb2a)},{
-(0xdff+2544-0x17ae),(0x989+7407-0x25b7)},{(0xea+6188-0x18cd),
-(0x1bef+2252-0x23ee)},{(0xdc6+6472-0x26bf),(0x1b7+2179-0x967)},{
-(0x6c0+5460-0x1bbf),(0x760+2516-0x105a)},{(0xdaf+6205-0x258b),
-(0xa34+6644-0x2347)},{(0x1ac4+529-0x1c70),8364},{(0xb25+4095-0x1abb),
-(0xdad+1499-0x129b)},{(0xec4+809-0x117e),(0x1ac6+3136-0x2613)},{
-(0xaac+3416-0x178f),(0x3ab+2951-0xe38)},};const unsigned short
-Ucs2_To_Gsm7_SPANISH_Table_UCS[][(0x15ff+2600-0x2025)]={{(0xa67+3279-0x1726),
-(0x1e3c+1225-0x1f71)},{(0x16df+3116-0x22f9),(0xb2a+1382-0xcea)},{
-(0xea3+1152-0x1310),(0x8ef+3923-0x14af)},{(0xb34+1469-0x10dd),
-(0x1adf+1807-0x1e53)},{(0x1b99+1925-0x2309),(0x240c+1450-0x260d)},{
-(0x292+2367-0xbbb),(0x554+746-0x49e)},{(0xfb+2221-0x991),(0x144a+5232-0x2512)},{
-(0xb03+1554-0x10fd),(0x15d9+3319-0x1f2d)},{(0x77a+5090-0x1b43),
-(0x9ad+5746-0x1c87)},{(0x1307+2827-0x1df8),(0x2251+661-0x2148)},};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,(0x12bc+3778-0x2174),NON_GSM,NON_GSM,
-(0x1395+824-0x16c0),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+const_header;char g_zUfiSms_DigAscMap[(0x78d+5626-0x1d77)]={
+((char)(0x1322+4989-0x266f)),((char)(0xd42+3267-0x19d4)),
+((char)(0xae0+728-0xd86)),((char)(0xfa8+3670-0x1dcb)),
+((char)(0x18eb+3157-0x250c)),((char)(0xb8f+572-0xd96)),
+((char)(0x5e0+5034-0x1954)),((char)(0x13b6+3190-0x1ff5)),
+((char)(0x1d03+747-0x1fb6)),((char)(0xc5b+6004-0x2396)),
+((char)(0x2ac+6810-0x1d05)),((char)(0x20c7+476-0x2261)),
+((char)(0xb7b+1082-0xf72)),((char)(0x1349+3350-0x201b)),
+((char)(0x131d+3400-0x2020)),((char)(0x18fd+2985-0x2460))};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)(0x9cd+1774-0x109b)),((char)(0xc11+2327-0x1508)),
+((char)(0x1a1b+1539-0x1ffe)),((char)(0x246f+475-0x262a)),
+((char)(0x153b+2554-0x1f15)),((char)(0x8d1+6653-0x22ae)),
+((char)(0x171f+3720-0x2587)),((char)(0xf76+3433-0x1cbf)),
+((char)(0xe13+3813-0x1cd8)),((char)(0x1265+2333-0x1b62)),
+((char)(0x1a6+923-0x521)),((char)(0x2d+8921-0x22e6)),((char)(0x770+1386-0xcba)),
+((char)(0x12a5+4058-0x225f)),((char)(0xff4+2819-0x1ad7)),
+((char)(0x372+7725-0x217f)),((char)(0xddd+3534-0x1b8b)),
+((char)(0x309+6912-0x1de9)),((char)(0x8a2+6519-0x21f9)),
+((char)(0x37a+2893-0xea7)),((char)(0xe4c+1931-0x15b7)),
+((char)(0x4f8+8715-0x26e3)),((char)(0x61+3519-0xe00)),
+((char)(0x18ec+1602-0x1f0e)),((char)(0x594+5530-0x1b0e)),
+((char)(0x10f5+444-0x1291)),((char)(0xfc+6721-0x1b1d)),
+((char)(0x16a4+3544-0x245c)),((char)(0x1733+2797-0x2200)),
+((char)(0x108a+5369-0x2563)),((char)(0x8c5+6518-0x221b)),
+((char)(0x1e21+886-0x2177)),((char)(0xa3d+4816-0x1ced)),
+((char)(0x172+7020-0x1cbd)),(0x55+9740-0x263f),((char)(0x5a9+1956-0xd2a)),
+(0xad7+7094-0x268b),((char)(0x155+6731-0x1b7b)),((char)(0x11da+75-0x11ff)),
+(0xa3+7835-0x1f17),((char)(0x1010+4838-0x22ce)),((char)(0x621+5800-0x1ca0)),
+((char)(0xdff+65-0xe16)),((char)(0x3ab+525-0x58d)),((char)(0x8b1+7448-0x259d)),
+((char)(0xf86+2893-0x1aa6)),((char)(0x738+769-0xa0b)),
+((char)(0x1d60+1381-0x2296)),((char)(0xc8+1306-0x5b2)),
+((char)(0x49+5665-0x1639)),((char)(0x7d3+4106-0x17ab)),
+((char)(0x188+4170-0x119f)),((char)(0x1ff1+544-0x21dd)),
+((char)(0xce7+181-0xd67)),((char)(0xe6f+1729-0x14fa)),((char)(0x436+2816-0xeff))
+,((char)(0x1702+3410-0x241c)),((char)(0x141d+1788-0x1ae0)),
+((char)(0xf80+2463-0x18e5)),((char)(0x1539+885-0x1873)),
+((char)(0x8c5+1594-0xec3)),((char)(0x1022+3205-0x1c6a)),
+((char)(0x12c2+5125-0x2689)),((char)(0xce3+2295-0x159b)),(0x1538+2491-0x1ef3),
+((char)(0x839+4552-0x19c0)),((char)(0x6d1+2781-0x116c)),
+((char)(0x2d7+6582-0x1c4a)),((char)(0x12a3+1831-0x1986)),
+((char)(0xc1f+6381-0x24c7)),((char)(0x89f+1332-0xd8d)),
+((char)(0x5f8+1235-0xa84)),((char)(0x1d45+700-0x1fb9)),
+((char)(0x173a+1777-0x1de2)),((char)(0x1160+1856-0x1856)),
+((char)(0x1c70+2200-0x24bd)),((char)(0x837+5650-0x1dfd)),
+((char)(0x309+653-0x549)),((char)(0x1b76+1978-0x22e2)),
+((char)(0x1415+927-0x1765)),((char)(0x1623+871-0x193a)),
+((char)(0xd76+5252-0x21a9)),((char)(0x888+2274-0x1118)),
+((char)(0x556+6887-0x1fea)),((char)(0x105d+1615-0x1658)),
+((char)(0x8ac+5164-0x1c83)),((char)(0x10c2+3915-0x1fb7)),
+((char)(0x83c+605-0xa42)),((char)(0x19bc+3438-0x26d2)),
+((char)(0xe46+3725-0x1c7a)),((char)(0xb94+4643-0x1d5d)),6972,6959,
+(0x1e98+2082-0xb7c),(0x1ba7+6555-0x1a2e),(0x1973+1601-0x1fa3),
+((char)(0xa47+1712-0x10d7)),((char)(0x129+6038-0x185e)),
+((char)(0xf6b+4816-0x21d9)),((char)(0x316+2737-0xd64)),
+((char)(0x1128+2143-0x1923)),((char)(0x17bd+562-0x198a)),
+((char)(0xf0+4705-0x12eb)),((char)(0x9ec+66-0x9c7)),((char)(0x2bb+3818-0x113d)),
+((char)(0xa70+307-0xb3a)),((char)(0x3ff+1468-0x951)),((char)(0x262c+315-0x26fc))
+,((char)(0x1165+5163-0x2524)),((char)(0x1220+3157-0x1e08)),
+((char)(0xd14+2162-0x1518)),((char)(0x4df+2755-0xf33)),
+((char)(0xc9a+3249-0x18db)),((char)(0x11d0+5268-0x25f3)),
+((char)(0x7b5+3271-0x140a)),((char)(0x751+7459-0x2401)),
+((char)(0x42d+6402-0x1cbb)),((char)(0x19b4+515-0x1b42)),
+((char)(0x11d0+2251-0x1a25)),((char)(0x1455+4874-0x26e8)),
+((char)(0x17ba+283-0x185d)),((char)(0xf20+3449-0x1c20)),
+((char)(0x9a3+5737-0x1f92)),6952,6976,6953,(0x229b+549-0x983),
+((char)(0x859+5421-0x1d66)),((char)(0x413+1419-0x97e)),
+((char)(0xb96+2038-0x136c)),((char)(0x1253+1104-0x1683)),
+((char)(0x158d+97-0x15ce)),((char)(0x2bc+8879-0x254b)),
+((char)(0xbcc+2311-0x14b3)),((char)(0x359+7537-0x20aa)),
+((char)(0x11c+2296-0x9f4)),((char)(0xee4+55-0xefb)),((char)(0x236a+383-0x24c9)),
+((char)(0xf39+2218-0x17c3)),((char)(0x9b+5185-0x14bc)),
+((char)(0x6dc+3119-0x12eb)),((char)(0x1da+5963-0x1905)),
+((char)(0x3b0+6968-0x1ec8)),((char)(0x1297+448-0x1437)),
+((char)(0x9c6+4784-0x1c56)),((char)(0xdf5+4059-0x1db0)),
+((char)(0x334+1839-0xa43)),((char)(0xeb1+4493-0x201e)),((char)(0x4d1+705-0x772))
+,((char)(0xf6a+3823-0x1e39)),((char)(0x1c67+1653-0x22bc)),
+((char)(0xedd+3704-0x1d35)),((char)(0xbd3+4493-0x1d40)),
+((char)(0x16c6+3174-0x230c)),((char)(0x1591+1182-0x1a0f)),
+((char)(0x206c+1475-0x260f)),((char)(0x17f8+1595-0x1e13)),
+((char)(0xd1d+1831-0x1424)),((char)(0xaf9+4959-0x1e38)),
+((char)(0xc6+5366-0x159c)),((char)(0x992+447-0xb31)),(0x11d4+2698-0x1c1e),
+((char)(0x65+5650-0x1657)),(0x1638+13-0x1644),(0x7db+3641-0x15f0),
+(0xf3a+312-0x106f),((char)(0xc6f+4946-0x1fa1)),(0x1966+881-0x1c78),
+((char)(0x15e3+1865-0x1d0c)),((char)(0x957+496-0xb27)),
+((char)(0x148f+673-0x1710)),((char)(0x144+391-0x2ab)),
+((char)(0x1d9+6488-0x1b11)),((char)(0x16e6+2291-0x1fb9)),
+((char)(0xa04+4751-0x1c73)),((char)(0x29c+5229-0x16e9)),
+((char)(0x5ed+7982-0x24fb)),((char)(0x790+4318-0x184e)),
+((char)(0xccd+135-0xd34)),((char)(0x837+192-0x8d7)),((char)(0x3ca+3549-0x1187)),
+((char)(0x17e1+2543-0x21b0)),((char)(0x11d0+2378-0x1afa)),
+((char)(0x96b+5340-0x1e27)),(0x700+7330-0x2397),((char)(0x1437+2797-0x1f04)),
+((char)(0x20ef+755-0x23c2)),((char)(0x13aa+75-0x13d5)),
+((char)(0x17a2+679-0x1a29)),((char)(0x215a+947-0x24ed)),
+((char)(0x1d3+240-0x2a3)),(0x1588+1527-0x1b1f),((char)(0x175+5727-0x17b4)),
+((char)(0x705+2838-0x11fb)),((char)(0xbe9+3671-0x1a20)),
+((char)(0x859+988-0xc15)),(0xc95+2076-0x1456),(0xac9+3561-0x18a4),
+(0x1213+1160-0x167f),(0xf04+5549-0x24a8),((char)(0x7c6+6410-0x20b0)),
+(0x8c1+3345-0x15b3),((char)(0x10e2+5633-0x26c3)),((char)(0x12fb+2530-0x1cbd)),
+((char)(0x44+7280-0x1c94)),((char)(0xc08+118-0xc5e)),((char)(0x21d+2592-0xc1d)),
+((char)(0x1355+4279-0x23ec)),((char)(0x14c+3992-0x10c4)),(0x6f1+2219-0xf3f),
+((char)(0x1b69+1909-0x22be)),((char)(0x867+1985-0x1008)),
+((char)(0xed9+5693-0x24f6)),((char)(0x352+1990-0xaf8)),(0x606+5554-0x1b5c),
+((char)(0x156d+1937-0x1cde)),((char)(0x1495+3789-0x2342)),
+((char)(0x4e2+621-0x72f)),((char)(0x7f5+858-0xb2f)),((char)(0x39a+2422-0xcf0)),
+(0xe5f+1024-0x1201),((char)(0x785+7024-0x22d5)),((char)(0x1928+554-0x1b32)),
+(0x168a+3861-0x2581),(0xd06+2696-0x170f),((char)(0x13e9+4753-0x265a)),
+((char)(0x42b+1750-0xae1)),((char)(0x1ac5+1174-0x1f3b)),(0x11db+5055-0x251f),
+(0x125+7385-0x1def),(0x1475+3930-0x23b2),((char)(0xa59+686-0xce7)),
+(0x2a6+783-0x5b1),(0x191b+3007-0x24d5),((char)(0x872+2764-0x131e)),
+((char)(0x374+1609-0x99d)),(0x431+4637-0x1647),((char)(0x455+3220-0x10c9)),
+((char)(0x1505+648-0x176d)),((char)(0x62+4708-0x12a6)),
+((char)(0x6fc+4554-0x18a6)),(0x75a+2275-0xfc0),(0xc9c+5663-0x22b3),
+((char)(0x366+7915-0x2231)),((char)(0x783+3462-0x14e9)),
+((char)(0x186+368-0x2d6)),(0x1b17+459-0x1c66),((char)(0x146b+3353-0x2164)),
+(0x1355+1557-0x195e),(0x229+2911-0xd82),((char)(0x19fd+2396-0x2339)),
+((char)(0xa2a+6098-0x21dc)),(0x46f+5602-0x19d3),((char)(0x1fb1+988-0x236d)),
+((char)(0x8d+511-0x26c)),((char)(0xc20+846-0xf4e)),};const unsigned short
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[][(0x527+244-0x619)]={{(0x1db+1944-0x96a),
+(0x7f9+5678-0x1d40)},{(0x15bc+541-0x17cf),(0x849+3021-0x140a)},{
+(0x1345+3947-0x22a3),(0x744+4726-0x19ad)},{(0x21a3+540-0x23ab),
+(0x14a+8358-0x2192)},{(0x783+1935-0xeea),(0x1583+2058-0x1d12)},{
+(0x1ebb+2172-0x270e),(0xa8+9017-0x2364)},{(0x1b30+1626-0x215b),
+(0x1486+3208-0x20b2)},{(0x68a+3714-0x14d0),(0x747+1583-0xd1b)},{
+(0x2281+620-0x24b0),(0x464+439-0x59d)},{(0x6d9+7407-0x238a),(0x620+2331-0xede)},
+{(0xb7+9831-0x26de),(0x1b55+733-0x1db6)},{(0x1f7b+1718-0x25f0),(0x181+112-0x130)
+},{(0x11d2+2854-0x1caf),(0x3c8+6905-0x1df4)},{(0x1cb+8101-0x2121),
+(0x553+4376-0x1598)},{(0x1a06+1055-0x1dd0),(0x1274+1337-0x16d3)},{
+(0x7f6+7745-0x25d6),(0x1d0+9257-0x2518)},{(0x6b0+3628-0x1477),8364},{
+(0x27d+8907-0x24df),(0x972+5646-0x1e93)},{(0x1915+2163-0x2119),
+(0x14a0+3578-0x21a7)},{(0x65d+5623-0x1bdf),(0xb10+2734-0x14c4)},};const unsigned
+ short Ucs2_To_Gsm7_SPANISH_Table_UCS[][(0xb68+5295-0x2015)]={{
+(0x7c0+5091-0x1b93),(0x682+2400-0xc4e)},{(0xbfa+6029-0x2375),
+(0x1171+5010-0x215d)},{(0x1404+3867-0x230c),(0x1b49+2251-0x2081)},{
+(0x3d1+8656-0x258d),(0x139f+3899-0x1f3f)},{(0x100+8148-0x20bf),
+(0xce3+3868-0x1856)},{(0x480+5937-0x1b9b),(0x1a51+501-0x18a6)},{
+(0x12dd+4433-0x2417),(0xbd1+2780-0x1305)},{(0xbf2+3738-0x1a74),
+(0x863+7233-0x2101)},{(0x8f1+3652-0x171c),(0x11ac+2916-0x1978)},{
+(0x2b7+7530-0x2007),(0x82c+668-0x72a)},};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,(0x1346+230-0x1422),NON_GSM,NON_GSM,
+(0x2b7+9183-0x2689),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0x1c3d+2033-0x240e),(0x6e4+1092-0xb07),(0x1998+127-0x19f5),
-(0x4c2+33-0x4c0),(0xfca+3319-0x1cbf),(0x50f+8377-0x25a3),(0x123+7339-0x1da8),
-(0xd6d+1378-0x12a8),(0xae5+1874-0x120f),(0x2d9+1632-0x910),(0x646+3150-0x126a),
-(0x732+6338-0x1fc9),(0x14b9+996-0x1871),(0x3f+555-0x23d),(0x1699+3446-0x23e1),
-(0x1cf+7147-0x1d8b),(0xa3+9670-0x2639),(0x3c9+3083-0xfa3),(0x832+3908-0x1744),
-(0x6c5+6023-0x1e19),(0x6bf+3983-0x161a),(0xb3a+3433-0x186e),(0x480+3485-0x11e7),
-(0x1283+2437-0x1bd1),(0x1773+2273-0x201c),(0x1b78+607-0x1d9e),
-(0x1d52+235-0x1e03),(0x19e0+2895-0x24f4),(0xa98+3242-0x1706),(0x8bb+5238-0x1cf4)
-,(0x326+8270-0x2336),(0xbf2+142-0xc41),(0x1d03+1815-0x241a),(0xb01+4942-0x1e0e),
-(0x151f+3615-0x22fc),(0x31f+8009-0x2225),(0x103b+2441-0x1980),
-(0x307+6427-0x1bdd),(0x1d54+2380-0x265a),(0xb7d+6061-0x22e3),(0x190+1725-0x805),
-(0xf41+5226-0x2362),(0x5c8+6953-0x20a7),(0x1135+1100-0x1536),
-(0x111b+3991-0x2066),(0x1c20+2427-0x254e),(0xeb1+1230-0x1331),
-(0x101d+5304-0x2486),(0x1140+2509-0x1abd),(0x927+685-0xb83),(0x626+3910-0x151a),
-(0x1886+2580-0x2247),(0x214+9287-0x2607),(0xb91+1850-0x1276),(0xdb5+3628-0x1b8b)
-,(0x4b6+7160-0x2057),(0x753+6563-0x209e),(0x261+9470-0x2706),(0xdf+8589-0x2212),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1487+3029-0x204b),NON_GSM,
-(0x14bd+3750-0x2302),(0x5fd+6819-0x203e),(0x83d+4755-0x1a6d),
-(0x1c52+1331-0x2121),(0xd63+1133-0x116b),(0x18a7+2178-0x20c3),
-(0x1ff8+566-0x21c7),(0xb00+318-0xbd6),(0x1a5b+2685-0x246f),(0xbd2+1224-0x1030),
-(0x715+3706-0x1524),(0x1722+307-0x17e9),(0x4c2+8030-0x23b3),(0x1379+887-0x1682),
-(0xfb+5811-0x173f),(0x7e1+6752-0x21d1),(0x715+1962-0xe4e),(0x589+1279-0xa16),
-(0x363+2593-0xd11),(0x1412+4377-0x24b7),(0x1d2b+2430-0x2634),(0x26d+4223-0x1276)
-,(0x1486+2305-0x1d10),(0x19da+2293-0x2257),(0x18d7+789-0x1b73),
-(0x112a+4336-0x21a0),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0xaca+755-0xd9d),(0x723+3228-0x139e),(0x1205+3683-0x2046),
+(0x36d+9078-0x26c0),(0x1e40+1876-0x2592),(0x1149+599-0x137b),(0xeef+4810-0x2193)
+,(0x5da+7817-0x243c),(0x13ac+1489-0x1955),(0xa5+9111-0x2413),
+(0x13a3+3683-0x21dc),(0xfd9+5697-0x25ef),(0x3b0+726-0x65a),(0x757+3840-0x162a),
+(0x5c+5505-0x15af),(0x1770+1611-0x1d8c),(0x563+7567-0x22c2),(0x75f+5204-0x1b82),
+(0x331+7276-0x1f6b),(0xaf+8454-0x2182),(0x137+6525-0x1a80),(0x1696+527-0x1870),
+(0x8a4+4538-0x1a28),(0x535+7996-0x243a),(0x4c+9805-0x2661),(0xf50+6135-0x270e),
+(0x82f+3417-0x154e),(0x954+5286-0x1dbf),(0x74+1609-0x681),(0x1549+3481-0x22a5),
+(0x76a+6304-0x1fcc),(0x4c+8044-0x1f79),(0xfc1+1385-0x152a),(0x5f5+618-0x81e),
+(0x2f4+2297-0xbab),(0x1030+52-0x1021),(0x16a3+1940-0x1df3),(0x239+4459-0x135f),
+(0x1856+3041-0x23f1),(0x2639+10-0x25fc),(0x2352+767-0x2609),(0xe4d+3750-0x1caa),
+(0x1089+3606-0x1e55),(0xe03+2356-0x16ec),(0xd1a+5890-0x23d0),
+(0x1223+2334-0x1af4),(0xae5+6868-0x256b),(0x11af+623-0x13cf),(0xbda+1284-0x108e)
+,(0x324+5709-0x1920),(0x8e7+7630-0x2663),(0x105a+3831-0x1efe),
+(0x17e1+1942-0x1f23),(0x2047+806-0x2318),(0xa30+2646-0x1430),(0x738+3747-0x1584)
+,(0x9aa+1665-0xfd3),(0x478+246-0x515),(0x283+4284-0x12e5),NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,(0x9a8+3336-0x169f),NON_GSM,(0x694+5105-0x1a24),
+(0x274+6518-0x1b88),(0x94f+2659-0x134f),(0xd12+6368-0x258e),(0x259+9233-0x2605),
+(0xcb4+38-0xc74),(0x19ff+2428-0x2314),(0xd16+5990-0x2414),(0x4f7+3276-0x115a),
+(0xf2b+3263-0x1b80),(0x2b6+1159-0x6d2),(0x939+5881-0x1fc6),(0x19a8+278-0x1a51),
+(0x1f2d+1237-0x2394),(0x3a5+4727-0x15ad),(0x1ac4+821-0x1d89),(0xad6+2020-0x1249)
+,(0x1530+4308-0x2592),(0x607+5972-0x1ce8),(0x74+1692-0x69c),(0x131d+3691-0x2113)
+,(0x327+8291-0x2314),(0x155b+3290-0x21be),(0x1308+1310-0x17ae),
+(0xeec+1350-0x13b9),(0x35f+4747-0x1570),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x19f6+2193-0x226c),(0x16d4+3898-0x25ce),NON_GSM,(0x33f+3747-0x11e1),
-(0x5eb+2553-0xfc0),(0xcb+5593-0x16a1),NON_GSM,(0x18c+6868-0x1c01),NON_GSM,
+NON_GSM,NON_GSM,(0x10e0+1160-0x154d),(0xb0d+5686-0x2103),NON_GSM,
+(0x1d82+1664-0x2401),(0x1d7+1167-0x642),(0x1331+2009-0x1b07),NON_GSM,
+(0xf45+142-0xf74),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0xeb4+5894-0x255a),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0x1479+456-0x15e6),(0x148c+3563-0x2269),(0x4a0+5885-0x1b81),(0x13c2+230-0x149f)
-,NON_GSM,(0x73+5123-0x1457),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0xe3+3291-0xd61),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xb7+605-0x2b8),
-NON_GSM,(0xf35+3453-0x1ca7),NON_GSM,NON_GSM,NON_GSM,(0x191b+3536-0x268d),NON_GSM
-,NON_GSM,(0x73+9420-0x2521),(0x1b80+1532-0x20fd),NON_GSM,NON_GSM,NON_GSM,
-(0x1664+1136-0x1a59),(0x12d2+2026-0x1aad),(0x740+5127-0x1b2a),NON_GSM,
-(0xf18+4982-0x228a),(0x25dc+101-0x263c),NON_GSM,NON_GSM,(0xd53+2604-0x1778),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0xc48+1809-0x12dc),(0x2f3+926-0x689),NON_GSM,
-NON_GSM,NON_GSM,(0x112f+639-0x1332),NON_GSM,(0x4d5+1975-0xc80),
-(0x16d1+2869-0x2200),NON_GSM,NON_GSM,(0x12da+4187-0x22b7),NON_GSM,NON_GSM,
-NON_GSM};const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][
-(0x9d5+304-0xb03)]={{(0xaaf+1261-0xf97),(0x12c1+4169-0x2220)},{(0x1ec+925-0x580)
-,(0x1343+360-0x13c4)},{(0x2019+43-0x203a),(0xb38+788-0xe40)},{
-(0xe5b+2995-0x1a03),(0x1db8+449-0x1ea5)},{(0xde7+4993-0x215c),
-(0x4bf+6467-0x1d0e)},{(0x83+3551-0xe55),(0xe81+5017-0x220d)},{
-(0x1108+5225-0x2563),(0x11c+9450-0x2545)},{(0xd90+1346-0x12c3),
-(0x30a+4594-0x141b)},{(0xdb8+4506-0x1f40),(0x446+6141-0x189d)},{
-(0xf8f+3455-0x1cfb),(0x1157+528-0xfd4)},{(0xa1d+5956-0x214d),(0xe58+2872-0x1932)
-},{(0x306+6060-0x1a9d),(0x5c5+5225-0x1685)},{(0x950+1581-0xf67),
-(0x1992+911-0x1981)},{(0xe06+3869-0x1d0c),(0x191c+3681-0x23d5)},{
-(0x1bf+2549-0xb9c),(0x1c38+406-0x1a2b)},{(0x106b+3678-0x1eb0),(0x104d+269-0xdc2)
-},{(0x137+3086-0xd26),(0x13d9+1473-0x18d0)},{(0x1c25+2017-0x23de),
-(0x21c7+234-0x2236)},{(0x25bc+204-0x265f),(0xecb+4436-0x1fa2)},{
-(0x14ea+2323-0x1dce),(0xcc+7619-0x1e33)},{(0x5a1+4013-0x1512),
-(0xbf3+1164-0x1024)},{(0x1138+4049-0x20cc),(0xd1f+5573-0x2266)},{
-(0x73f+3229-0x139e),(0x1136+4531-0x228c)},{(0xe63+936-0x11cb),(0x190+1786-0x80e)
-},{(0xb79+3312-0x1828),(0x837+2232-0x102f)},{(0xc8f+5241-0x20bf),
-(0xfd2+5103-0x22f4)},{(0x19d4+83-0x19d8),(0x960+6433-0x21ae)},{
-(0xc6f+3973-0x1b9f),(0x1610+4059-0x2511)},{(0x1938+2670-0x234b),
-(0xd7+5070-0x13e2)},{(0x1b30+2797-0x25c1),(0x74c+5009-0x1a08)},{
-(0xb68+918-0xe9d),(0x1a93+3201-0x2652)},{(0x1de1+41-0x1da5),8364},{
-(0x1eed+1810-0x2596),(0xb70+5767-0x210a)},{(0xa10+5549-0x1f4e),
-(0x980+7381-0x2562)},{(0x1ad7+2044-0x225e),(0x39a+3245-0xf4d)},{
-(0xc8+5697-0x168e),(0x669+3419-0x12e1)},{(0x7b6+3418-0x1494),
-(0x193b+2654-0x22a4)},{(0x16b1+3805-0x250f),(0xe8d+371-0xf1e)},};const unsigned
-short Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0x852+1647-0xebf)]={{
-(0xb4b+3464-0x18c3),(0x1652+2719-0x1d5d)},{(0x1a88+417-0x1c14),8929},{
-(0x17db+1866-0x1f0d),8364},{(0x1b8+3251-0xe06),(0x2547+2457-0xe34)},};const
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x8a9+1424-0xdd9),NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,(0x1e2+5780-0x181b),(0x1ab9+2133-0x2300),
+(0x1610+1355-0x1b3f),(0x8d3+5198-0x1d18),NON_GSM,(0x313+2114-0xb36),NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x272+7898-0x20ef),NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,(0x9cd+1426-0xf03),NON_GSM,(0x465+3651-0x129d),NON_GSM,
+NON_GSM,NON_GSM,(0x75+6460-0x1953),NON_GSM,NON_GSM,(0x78f+6069-0x1f26),
+(0x109c+2699-0x1aa8),NON_GSM,NON_GSM,NON_GSM,(0x4ea+1418-0x9f9),
+(0x1da3+5-0x1d99),(0x5e3+3371-0x12f1),NON_GSM,(0xf97+3872-0x1eb3),
+(0x1257+2434-0x1bd4),NON_GSM,NON_GSM,(0x5a0+4270-0x1647),NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,(0x1c94+2116-0x245b),(0x105+2666-0xb67),NON_GSM,NON_GSM,NON_GSM,
+(0x178+2121-0x945),NON_GSM,(0xe0d+927-0x11a0),(0x150f+1501-0x1ae6),NON_GSM,
+NON_GSM,(0x7ab+4667-0x1968),NON_GSM,NON_GSM,NON_GSM};const unsigned short
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[][(0x8c0+5649-0x1ecf)]={{
+(0xe5+9452-0x25cc),(0x5f8+6681-0x1f27)},{(0xc5d+2219-0x14ff),(0x2228+606-0x239f)
+},{(0x1e3+4335-0x12c8),(0x93b+5523-0x1ec2)},{(0x828+7611-0x25d8),
+(0xc32+933-0xf03)},{(0x17ec+1437-0x1d7d),(0x4a7+8767-0x25f2)},{
+(0x20+8961-0x2314),(0x1a2c+1271-0x1f16)},{(0x3da+1868-0xb18),(0x2004+594-0x2195)
+},{(0x1fd3+322-0x2106),(0x15b0+2778-0x1fa9)},{(0x1a7c+3166-0x26c8),
+(0x1d08+275-0x1a75)},{(0x47c+7060-0x1ffd),(0xa38+681-0x94e)},{
+(0x188+8363-0x221f),(0x3af+8682-0x253b)},{(0x207c+905-0x23f0),
+(0x1709+3922-0x22b2)},{(0x11a0+4934-0x24d0),(0x2198+560-0x2028)},{
+(0x632+8294-0x2681),(0x19a2+1256-0x1ae2)},{(0x1751+3334-0x243f),
+(0xa27+4693-0x18d9)},{(0xf1b+59-0xf3d),(0xa39+8066-0x2623)},{(0x97d+2031-0x114d)
+,(0x17e1+3950-0x2685)},{(0xc7d+5055-0x2014),(0x2056+232-0x20c3)},{
+(0x1941+1053-0x1d35),(0x2c9+8444-0x2348)},{(0x1cd7+986-0x2082),
+(0x648+2630-0x1032)},{(0xa85+1515-0x1034),(0x10f0+3434-0x1dff)},{
+(0x3b2+3280-0x1045),(0xb17+862-0xdf7)},{(0x1648+1199-0x1ab9),
+(0x14da+4749-0x270a)},{(0x76+6223-0x1885),(0x131f+885-0x1618)},{
+(0xed6+2547-0x1888),(0x1c7+7128-0x1cdf)},{(0x41b+936-0x77a),(0x99d+2007-0x10a7)}
+,{(0x178a+2082-0x1f5d),(0xa08+5599-0x1f14)},{(0x3c4+1275-0x86a),
+(0x874+982-0xb70)},{(0x236b+810-0x263a),(0x4dc+3679-0x1278)},{(0x3bd+1952-0xb01)
+,(0x517+5816-0x1afa)},{(0xd5c+4920-0x2033),(0x9f0+1971-0x10e1)},{
+(0x4d5+6745-0x1ec9),8364},{(0xa57+1613-0x103b),(0x1eeb+1482-0x23c8)},{
+(0x966+3973-0x187c),(0x12bf+2401-0x1b2d)},{(0x541+2145-0xd2d),
+(0xe94+4793-0x2053)},{(0x1288+2012-0x19e9),(0xb17+5671-0x205b)},{
+(0xd1a+428-0xe4a),(0xbd6+5896-0x21e9)},{(0xb36+5302-0x1f6d),(0x788+1318-0xbcc)},
+};const unsigned short Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[][(0x15f5+2163-0x1e66)]
+={{(0x9e6+2567-0x13dd),(0x16f1+3347-0x2070)},{(0x329+9133-0x26c1),8929},{
+(0xe03+3497-0x1b94),(0x2474+228-0x4ac)},{(0x1cbd+1695-0x22f7),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,(0x1988+935-0x1d25),
-NON_GSM,NON_GSM,(0x12c+6343-0x19e6),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1058+4601-0x2247),
+NON_GSM,NON_GSM,(0x5a5+2395-0xef3),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,(0x9bc+5462-0x1ef2),(0xcfd+4925-0x2019),
-(0xc1a+2610-0x162a),(0x156+5622-0x1729),(0x6c8+8082-0x2658),(0xbaa+492-0xd71),
-(0x2007+1663-0x2660),(0x1730+2027-0x1ef4),(0xdec+2366-0x1702),
-(0x1926+1916-0x2079),(0x581+1601-0xb98),(0x137f+471-0x152b),(0x886+2632-0x12a2),
-(0xf7a+2147-0x17b0),(0xa95+2552-0x145f),(0x584+4295-0x161c),(0x8d3+302-0x9d1),
-(0x12d4+2184-0x1b2b),(0x653+7765-0x2476),(0x88f+2893-0x13a9),
-(0x1aa9+3195-0x26f0),(0x8d2+4831-0x1b7c),(0xb25+1451-0x109a),(0xbdd+4056-0x1b7e)
-,(0xb5b+4043-0x1aee),(0x6a0+3736-0x14ff),(0x1aac+2500-0x2436),
-(0xa46+7336-0x26b3),(0xa39+4190-0x1a5b),(0xb9+723-0x34f),(0xed1+3089-0x1aa4),
-(0x405+8478-0x24e4),(0x12eb+4053-0x22c0),(0xdbc+349-0xed8),(0xe36+3423-0x1b53),
-(0x1604+2355-0x1ef4),(0x1900+2106-0x20f6),(0xd74+3864-0x1c47),
-(0xd12+2817-0x17cd),(0x436+4157-0x142c),(0x813+6754-0x222d),(0x712+2027-0xeb4),
-(0x16cf+1279-0x1b84),(0x17e4+908-0x1b25),(0x594+5007-0x18d7),(0x1d21+78-0x1d22),
-(0x15a3+1662-0x1bd3),(0x1a98+738-0x1d2b),(0xcc6+392-0xdfe),(0x1274+5340-0x26ff),
-(0x216+2620-0xc00),(0xbe7+4696-0x1dec),(0x1941+3027-0x24c0),(0x1892+2761-0x2306)
-,(0x19f2+1593-0x1fd5),(0xe42+1846-0x1521),(0xc62+2524-0x15e6),
-(0x15e7+3593-0x2397),(0x2a3+4193-0x12aa),NON_GSM,(0x11f2+4110-0x21e9),NON_GSM,
-(0x9a3+3174-0x15f3),(0x12c0+582-0x14f5),(0x1309+327-0x13d3),(0x90+7732-0x1e63),
-(0x68f+1407-0xbac),(0x1c86+553-0x1e4c),(0x9ba+6218-0x21a0),(0x61f+2557-0xfb7),
-(0x540+4401-0x160b),(0x18d+6050-0x18c8),(0x13bc+4732-0x25d0),(0x98+1123-0x492),
-(0x175+2822-0xc11),(0x7d8+5401-0x1c86),(0x9fd+5446-0x1ed7),(0x1019+3234-0x1c4e),
-(0x2dd+3911-0x11b6),(0xde8+2656-0x17d9),(0x188d+1141-0x1c92),(0x306+6443-0x1bc0)
-,(0x1d85+159-0x1db2),(0x1870+1185-0x1c9e),(0x170f+3534-0x2469),
-(0x873+6499-0x2161),(0x670+5733-0x1c5f),(0x2a7+2861-0xd5d),(0x1386+2161-0x1b7f),
-(0x18f1+89-0x18d1),(0x86c+1212-0xcae),NON_GSM,(0xe31+4136-0x1e3f),NON_GSM,
-(0x57f+6129-0x1d10),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,NON_GSM,NON_GSM,(0xfa8+4757-0x221d),(0xf4d+1052-0x1348),
+(0xab2+5854-0x216e),(0x1905+2586-0x22fc),(0x11b8+2545-0x1ba7),
+(0x19af+3210-0x2614),(0x12f6+3287-0x1fa7),(0x55d+7147-0x2121),
+(0xc5b+5457-0x2184),(0xa18+1873-0x1140),(0x8a4+7649-0x265b),(0x7c0+742-0xa7b),
+(0x104b+546-0x1241),(0x11ba+3697-0x1ffe),(0x13f1+1018-0x17bd),
+(0x1d04+186-0x1d8f),(0x99+7869-0x1f26),(0x1afc+1737-0x2194),(0x1a73+1349-0x1f86)
+,(0x1879+498-0x1a38),(0x4e2+4508-0x164a),(0x1a3+1276-0x66a),(0x656+1819-0xd3b),
+(0x18f1+3230-0x2558),(0xe44+4503-0x1fa3),(0x147d+2769-0x1f15),
+(0x394+3832-0x1252),(0x1294+5185-0x269a),(0x1fe0+560-0x21d4),(0x279+2827-0xd47),
+(0xf3+5635-0x16b8),(0x170a+46-0x16f9),(0x150f+345-0x1668),(0xbc1+3681-0x19e1),
+(0x146c+2137-0x1c83),(0x8b6+6260-0x20e7),(0xae4+4920-0x1dd8),(0x1ca9+845-0x1fb1)
+,(0x9b0+2610-0x139c),(0x95+4189-0x10ab),(0x16db+3294-0x2371),
+(0x1e8a+1084-0x227d),(0x1175+955-0x14e6),(0x721+2822-0x11dc),(0xb26+3355-0x17f5)
+,(0x5e0+3777-0x1454),(0x7a2+4140-0x1780),(0xa97+2530-0x142a),
+(0x1524+1915-0x1c4f),(0x95a+3535-0x16d8),(0x14aa+4013-0x2405),
+(0x41f+6975-0x1f0b),(0x498+4065-0x1425),(0xd73+918-0x10b4),(0x916+6562-0x2262),
+(0x163b+175-0x1693),(0x5d+5140-0x1419),(0x31a+4899-0x15e4),(0xb09+6363-0x238a),
+NON_GSM,(0x780+2395-0x10c4),NON_GSM,(0x1723+1886-0x1e6b),(0x113d+420-0x12d0),
+(0xd17+1115-0x10f5),(0x15d3+880-0x18e2),(0x8ca+1310-0xd86),(0x22a+2527-0xba6),
+(0x12b4+872-0x15b8),(0x1b95+1127-0x1f97),(0x1e81+1432-0x23b3),
+(0xfa5+2069-0x1753),(0x86f+5419-0x1d32),(0x6fd+1183-0xb33),(0x2199+584-0x2377),
+(0x24a+3100-0xdfb),(0x1658+3522-0x23ae),(0x4f3+6946-0x1fa8),(0x205+6254-0x1a05),
+(0xe16+5472-0x2307),(0xdb1+6147-0x2544),(0x8b6+1793-0xf46),(0x719+2869-0x11dc),
+(0x848+6876-0x22b1),(0x27c+433-0x3b9),(0x2d2+7304-0x1ee5),(0x7fb+7842-0x2627),
+(0x1280+999-0x15f0),(0x125+4177-0x10fe),(0xa3+8141-0x1ff7),(0xb42+2073-0x12e1),
+NON_GSM,(0x1cb4+665-0x1f33),NON_GSM,(0x1c57+2097-0x2428),NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,(0x74b+7732-0x2564),NON_GSM_P,NON_GSM,(0xc4f+5008-0x1fde),NON_GSM_P,
+(0x1d1d+2097-0x254b),NON_GSM,(0xa5f+2873-0x1539),NON_GSM,NON_GSM,
+(0x14a6+3355-0x21af),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1f29+589-0x2152)
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x956+253-0xa3f),(0x5f0+6682-0x1ffc),
+(0x2029+173-0x20ba),(0x835+4488-0x1962),NON_GSM_P,NON_GSM_P,NON_GSM_P,
+(0x9af+6464-0x22dc),NON_GSM,(0xfb1+5052-0x234e),(0x11d1+2921-0x1d1c),NON_GSM,
+NON_GSM,(0x1ee2+254-0x1fa0),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM,
+(0x1c2+3966-0x1127),(0x11ca+1003-0x15aa),(0x2237+806-0x2501),NON_GSM_P,NON_GSM,
+NON_GSM_P,NON_GSM,(0x1cd8+2565-0x2680),NON_GSM,(0x85d+2968-0x1397),NON_GSM,
+NON_GSM,NON_GSM_P,(0x47d+2065-0xc0f),(0x527+2201-0xdb1),(0x15a4+820-0x18bb),
+(0x147a+4647-0x2626),NON_GSM_P,NON_GSM_P,NON_GSM_P,(0x172b+3663-0x2571),
+NON_GSM_P,(0x1325+4293-0x23e5),(0x100+9303-0x2553),NON_GSM,NON_GSM_P,
+(0x1801+1252-0x1cde),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM_P,
+(0xfaf+90-0x1001),(0x993+5727-0x1fe6),(0x15eb+981-0x1944),NON_GSM_P,NON_GSM,
+NON_GSM_P,NON_GSM_P,(0x166+1998-0x92e),NON_GSM,(0xa9a+4183-0x1a73),NON_GSM,
+NON_GSM,NON_GSM};const unsigned short zte_sms_GSMDefault_To_UCS2_Table_Ex[][
+(0x1338+1606-0x197c)]={{(0x735+4254-0x17c9),(0x108a+2626-0x1ac0)},{
+(0x493+7503-0x21ce),(0x3d7+1085-0x7b6)},{(0xf52+5169-0x235b),(0x187c+601-0x1a5a)
+},{(0xc83+5417-0x2183),(0x1c79+358-0x1d62)},{(0xf23+3642-0x1d2e),
+(0x1515+2370-0x1dfb)},{(0x872+2514-0x1208),(0x1177+3923-0x206f)},{
+(0x1346+1561-0x1922),(0x414+6068-0x1b4a)},{(0xdd5+1629-0x13f4),
+(0x14d7+941-0x1827)},{(0x16e5+3993-0x263e),(0x23b+8140-0x218b)},{
+(0x5f5+336-0x6e0),8364},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[][
+(0x1ad+7520-0x1f0b)]={{(0x10cb+4573-0x2298),(0xd36+5841-0x2073)},{
+(0x6e1+7734-0x2505),(0x1146+557-0xfcd)},{(0x214f+609-0x239d),
+(0x107c+3097-0x1902)},{(0x157f+2544-0x1f5b),(0xe15+6457-0x23b3)},{
+(0x194+9330-0x25f1),(0x1e23+775-0x1d81)},{(0x1a38+3047-0x2609),
+(0x1c93+2973-0x2490)},{(0x111+3774-0xfb8),(0x1ae0+1518-0x1d26)},{
+(0x679+5196-0x1aad),(0xd0b+1550-0xf76)},{(0x1fe7+1111-0x2425),(0x4c4+2520-0xb04)
+},{(0x559+5057-0x1900),(0x5a0+4072-0x11ea)},};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,(0x24c2+252-0x25b4),NON_GSM,NON_GSM,
+(0xeaa+6087-0x2664),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1bc+4301-0x126e),NON_GSM_P,
-NON_GSM,(0xaa8+1653-0x111c),NON_GSM_P,(0x1752+3433-0x24b8),NON_GSM,
-(0xaf9+1050-0xeb4),NON_GSM,NON_GSM,(0x241c+347-0x2565),NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0x2e8+3552-0x10a4),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0xd99+1315-0x12a8),(0x1927+2702-0x23a7),(0x1ce4+1783-0x23bf),
-(0x213c+291-0x2204),NON_GSM_P,NON_GSM_P,NON_GSM_P,(0x1dfd+159-0x1e89),NON_GSM,
-(0xf30+1781-0x1606),(0x671+4078-0x1641),NON_GSM,NON_GSM,(0x1425+271-0x14f4),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,NON_GSM,(0x28+3451-0xd8a),(0x184b+1194-0x1cea)
-,(0x1c27+611-0x1e2e),NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM,(0xae7+6046-0x2228),
-NON_GSM,(0x1d70+505-0x1f0b),NON_GSM,NON_GSM,NON_GSM_P,(0xe90+4914-0x2143),
-(0x1436+326-0x156d),(0x482+2018-0xc47),(0x121a+2790-0x1c85),NON_GSM_P,NON_GSM_P,
-NON_GSM_P,(0xddf+4509-0x1f73),NON_GSM_P,(0x998+5759-0x2012),(0xd84+2019-0x1563),
-NON_GSM,NON_GSM_P,(0xdaf+2764-0x1874),NON_GSM,NON_GSM,NON_GSM,NON_GSM_P,
-NON_GSM_P,(0xdf6+3163-0x1a49),(0x1167+4717-0x23c8),(0x13a3+4949-0x267c),
-NON_GSM_P,NON_GSM,NON_GSM_P,NON_GSM_P,(0x1124+2953-0x1ca7),NON_GSM,
-(0x745+7889-0x2598),NON_GSM,NON_GSM,NON_GSM};const unsigned short
-zte_sms_GSMDefault_To_UCS2_Table_Ex[][(0x2b9+604-0x513)]={{(0x320+2616-0xd4e),
-(0x1ee7+1681-0x256c)},{(0x1176+4416-0x22a2),(0x9b2+5815-0x200b)},{
-(0xb9+7781-0x1ef6),(0x4aa+1365-0x984)},{(0x644+424-0x7c3),(0x3f8+993-0x75c)},{
-(0x1bb+5830-0x1852),(0x117b+356-0x1283)},{(0x2563+458-0x26f1),(0x34c+1649-0x962)
-},{(0x1214+1624-0x182f),(0x148a+4576-0x25ec)},{(0x784+4530-0x18f8),
-(0x1366+4550-0x24cf)},{(0x43c+2834-0xf0e),(0x242c+270-0x24be)},{
-(0x23f+5951-0x1919),8364},};const unsigned short UCS2_To_GSMDefault_Table_UCS2[]
-[(0x5bf+3462-0x1343)]={{(0x21bd+640-0x242d),(0x22d7+76-0x1f8f)},{
-(0xc51+1431-0x11d6),(0x1a31+1162-0x1b15)},{(0x199d+2449-0x231b),
-(0x13bb+3440-0x1d98)},{(0x269+3229-0xef2),(0x1a09+3994-0x2608)},{
-(0x19e9+1099-0x1e1f),(0xf4c+1741-0x1270)},{(0x8dc+2436-0x124a),
-(0x1983+2712-0x207b)},{(0x520+2936-0x1081),(0x17df+3926-0x238d)},{
-(0x1a39+1768-0x2109),(0x979+7218-0x2208)},{(0x1ef9+1711-0x258f),
-(0x16b3+3679-0x217a)},{(0x15d7+1845-0x1cf2),(0x1908+3067-0x2165)},};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,(0x20d+5853-0x18e0),NON_GSM,
-NON_GSM,(0xfcd+161-0x1061),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0x159c+1144-0x19f4),(0x3b6+5728-0x19f5),(0x1a9+2370-0xac9),
-(0x1648+863-0x1984),(0x452+8001-0x2391),(0x1cb+1787-0x8a1),(0xbe1+5481-0x2124),
-(0x1053+776-0x1334),(0x53b+7396-0x21f7),(0xd4f+673-0xfc7),(0xb23+1070-0xf27),
-(0x8a2+1291-0xd82),(0x7bc+403-0x923),(0x15f2+1897-0x1d2e),(0xabb+5380-0x1f91),
-(0x8e6+7677-0x26b4),(0x28d+6762-0x1cc7),(0xbcf+3420-0x18fa),(0x54a+7098-0x20d2),
-(0xe38+971-0x11d0),(0x1a2+322-0x2b0),(0x912+959-0xc9c),(0x1348+1006-0x1700),
-(0x1c1b+1005-0x1fd1),(0xc9+9173-0x2466),(0x493+6099-0x1c2d),(0x490+571-0x691),
-(0xc61+2273-0x1507),(0x650+237-0x701),(0x6ed+1892-0xe14),(0x1687+2656-0x20a9),
-(0xb69+6114-0x230c),(0x2151+1182-0x25ef),(0xb8f+1286-0x1054),(0x52b+8561-0x265a)
-,(0x52b+7722-0x2312),(0xdb+7618-0x1e59),(0x20d8+1056-0x24b3),(0x1cfc+863-0x2015)
-,(0xebc+5745-0x24e6),(0x54+9635-0x25af),(0x1077+5616-0x261e),(0xf02+1324-0x13e4)
-,(0x314+9061-0x262e),(0x6b7+5412-0x1b8f),(0x1b63+210-0x1be8),(0x950+2718-0x13a0)
-,(0x1a99+3236-0x26ee),(0x800+3436-0x151c),(0x1ec5+208-0x1f44),
-(0xdf5+2181-0x1628),(0x1229+5354-0x26c0),(0x4e3+1174-0x925),(0x88c+7206-0x245d),
-(0x149a+1582-0x1a72),(0x51d+1948-0xc62),(0x13e4+4406-0x24c2),(0x7a3+3715-0x15cd)
-,(0x16bc+3314-0x2354),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x11d6+3895-0x20fc),
-NON_GSM,(0xd69+5289-0x21b1),(0x196c+1941-0x209f),(0x36b+3657-0x1151),
-(0x93+9936-0x26ff),(0x220a+40-0x21cd),(0x12c+4086-0x10bc),(0x1cb+7756-0x1fb0),
-(0x121c+487-0x139b),(0x1670+2516-0x1fdb),(0x580+4798-0x17d4),
-(0x146f+1302-0x191a),(0x15f2+2275-0x1e69),(0x1587+2963-0x20ad),
-(0xd8c+2897-0x186f),(0x440+1820-0xaed),(0x1944+2195-0x2167),(0x5df+1367-0xac5),
-(0x1f6a+501-0x20ed),(0x386+6371-0x1bf6),(0x979+2513-0x12d6),(0x25a+4863-0x14e4),
-(0x1f3a+818-0x21f6),(0xe07+3521-0x1b51),(0x190d+1097-0x1cde),(0x932+1950-0x1057)
-,(0x17d4+276-0x186e),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+NON_GSM,(0x995+7011-0x24d8),(0x632+317-0x74e),(0xe0+7876-0x1f82),
+(0x6d6+5766-0x1d39),(0xbc+2160-0x92a),(0x57+3651-0xe75),(0x381+2428-0xcd7),
+(0xea2+4690-0x20cd),(0x19c5+1356-0x1ee9),(0x1fcc+153-0x203c),(0x98b+1494-0xf37),
+(0x13b1+1381-0x18eb),(0xd5d+2605-0x175e),(0x59f+174-0x620),(0x1807+1645-0x1e46),
+(0x9ef+3294-0x169e),(0xecb+4726-0x2111),(0xe10+2803-0x18d2),(0x4ac+3114-0x10a4),
+(0x4d5+429-0x64f),(0x710+5057-0x1a9d),(0x10bf+394-0x1214),(0x278+8871-0x24e9),
+(0x3a6+4012-0x131b),(0x1069+2135-0x1888),(0x33c+7188-0x1f17),(0xc2f+6664-0x25fd)
+,(0x1905+1486-0x1e98),(0x532+1152-0x976),(0x79d+2296-0x1058),(0xab4+1478-0x103c)
+,(0x155b+3549-0x22f9),(0x1937+310-0x1a6d),(0x26a2+48-0x2691),(0x34a+1837-0xa35),
+(0x755+323-0x855),(0xf53+2436-0x1893),(0x20a+5554-0x1777),(0x18b5+2338-0x2191),
+(0x10b6+2464-0x1a0f),(0x190b+1361-0x1e14),(0x877+7869-0x26eb),
+(0x176c+1118-0x1b80),(0x1ce4+397-0x1e26),(0x37d+8678-0x2517),(0x58a+518-0x743),
+(0xa7+2502-0xa1f),(0x19c8+1126-0x1ddf),(0x8b3+3969-0x17e4),(0x1507+3316-0x21aa),
+(0x857+1740-0xed1),(0x599+711-0x80d),(0x536+4231-0x1569),(0x1755+3271-0x23c7),
+(0x13a+1536-0x6e4),(0xc19+5087-0x1fa1),(0x877+2620-0x125b),(0x50d+4753-0x1745),
+(0x319+3779-0x1182),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x907+2103-0x112d),NON_GSM,
+(0xabb+2739-0x150d),(0xa06+6059-0x214f),(0x15fd+3833-0x2493),
+(0x12ec+3694-0x20f6),(0x12bd+1536-0x1858),(0x1942+1758-0x1fba),
+(0x23f4+168-0x2435),(0x28b+6223-0x1a72),(0x1544+2200-0x1d73),(0x1b31+338-0x1c19)
+,(0x6ac+5028-0x19e5),(0xae4+3396-0x17bc),(0x92f+5744-0x1f32),(0x10bc+116-0x10c2)
+,(0x80f+5935-0x1ecf),(0x82+1518-0x600),(0xbd7+1325-0x1093),(0x221f+457-0x2376),
+(0xe01+5752-0x2406),(0x933+1009-0xcb0),(0x2ef+7293-0x1ef7),(0x94+1083-0x459),
+(0x295+3678-0x107c),(0x1aa0+3175-0x268f),(0x37c+5193-0x174c),(0x77c+1197-0xbaf),
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0xc90+2164-0x14e9),(0x10df+4544-0x225f),NON_GSM,(0xbca+408-0xd61),
-(0xe8b+3644-0x1ca3),(0x23f3+591-0x263f),NON_GSM,(0xa11+6348-0x227e),NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,NON_GSM,(0x5c3+2419-0xed6),NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-(0xe2+4189-0x10e4),(0x2447+330-0x2583),(0x888+5154-0x1c8e),(0x1498+1520-0x1a7f),
-NON_GSM,(0xb3a+2968-0x16b3),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
-NON_GSM,(0x980+3420-0x167f),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x8d0+6276-0x20f8),
-NON_GSM,(0xeda+5753-0x2548),NON_GSM,NON_GSM,NON_GSM,(0x19af+2916-0x24b5),NON_GSM
-,NON_GSM,(0x23c0+478-0x2580),(0x9cc+4133-0x1972),NON_GSM,NON_GSM,NON_GSM,
-(0x788+4335-0x17fc),(0x744+3034-0x130f),(0x1773+2650-0x21b0),NON_GSM,
-(0x10b+191-0x1c6),(0x1b16+357-0x1c76),NON_GSM,NON_GSM,(0x9fb+1855-0x1133),
-NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1333+4899-0x25d9),(0x126+3635-0xf51),NON_GSM,
-NON_GSM,NON_GSM,(0x1559+2638-0x1f2b),NON_GSM,(0x13d4+181-0x147d),
-(0x85b+296-0x97d),NON_GSM,NON_GSM,(0xed8+2374-0x17a0),NON_GSM,NON_GSM,NON_GSM};
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x21cd+281-0x22cb),
+(0x58a+2395-0xea5),NON_GSM,(0x619+1988-0xddc),(0x1322+3498-0x20a8),
+(0xdd3+4233-0x1e59),NON_GSM,(0x12fa+1272-0x1793),NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM
+,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0xdac+1511-0x1333),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1bba+1463-0x2116),
+(0xa7b+2317-0x137a),(0x14df+1038-0x18d1),(0x59d+7072-0x2134),NON_GSM,
+(0x1f3a+29-0x1f38),NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,NON_GSM,
+(0xcad+2650-0x16aa),NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1ac6+897-0x1deb),NON_GSM,
+(0x6b6+5475-0x1c0e),NON_GSM,NON_GSM,NON_GSM,(0x6a5+6484-0x1f9b),NON_GSM,NON_GSM,
+(0x303+2487-0xc9c),(0x174d+2336-0x1fee),NON_GSM,NON_GSM,NON_GSM,
+(0x932+2676-0x132b),(0xf80+3405-0x1cbe),(0x2f4+5226-0x1741),NON_GSM,
+(0x109b+5505-0x2618),(0x17b7+3846-0x26b8),NON_GSM,NON_GSM,(0x97c+5502-0x1ef3),
+NON_GSM,NON_GSM,NON_GSM,NON_GSM,(0x1d00+496-0x1e73),(0x1532+4037-0x24ef),NON_GSM
+,NON_GSM,NON_GSM,(0x1b60+1050-0x1efe),NON_GSM,(0x7b1+3497-0x154e),
+(0xe5+2951-0xc66),NON_GSM,NON_GSM,(0x603+3203-0x1208),NON_GSM,NON_GSM,NON_GSM};
const unsigned short zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[]={
-(0xbd7+4520-0x1d3f),(0x10ed+49-0x107b),(0x788+3594-0x156e),(0x428+4419-0x14c6),
-(0x1202+490-0x1302),(0x6e5+5131-0x1a07),(0x18ec+684-0x1a9e),(0xfe1+5128-0x22fc),
-(0x1c29+1809-0x2247),(0x856+6393-0x2068),(0x22a+6209-0x1a61),(0x943+7826-0x2701)
-,(0x785+1323-0xbbc),(0x270+8822-0x24d9),(0x14a9+2122-0x1c32),(0x3a8+3233-0xf68),
-(0x109f+3406-0x1a59),(0x1495+1417-0x19bf),(0x2d2+8938-0x2512),
-(0x586+5877-0x1bb4),(0x1f48+69-0x1ecd),8734,(0x81f+4479-0x1940),
-(0x1b63+1438-0x20a5),(0x20f7+6303-0x18ea),(0x1fcd+324-0x203e),
-(0x679+4585-0x17e6),(0x13ec+4080-0x233c),(0x2c7+5905-0x1916),(0x535+3819-0x133e)
-,(0xe45+4104-0x1d83),(0x1a36+74-0x19b7),(0x5c0+5430-0x1ad6),(0xbcf+1875-0x1301),
-(0x718+6013-0x1e73),(0x155b+4448-0x2698),(0x2381+372-0x2445),
-(0x1301+1100-0x1728),(0xeac+5844-0x255a),(0x26b9+103-0x26f9),(0x8b7+1199-0xd3e),
-(0x17ff+1433-0x1d6f),(0x1485+1292-0x1967),(0x217+6876-0x1cc8),
-(0x418+7610-0x21a6),(0x8bd+6686-0x22ae),(0xe6c+3238-0x1ae4),(0x5a6+4301-0x1644),
-(0xf34+1284-0x1408),(0x2090+647-0x22e6),(0xd0b+5395-0x21ec),(0x826+3430-0x1559),
-(0x600+1852-0xd08),(0x832+1763-0xee0),(0x632+5531-0x1b97),(0x9fb+4167-0x1a0b),
-(0xd30+2670-0x1766),(0x71b+2538-0x10cc),(0x85f+1017-0xc1e),(0x9ff+5174-0x1dfa),
-(0x985+6218-0x2193),(0xfea+4807-0x2274),(0x1d96+68-0x1d9c),(0x1e58+1984-0x25d9),
-(0x11c4+3748-0x1f9b),(0xcac+6510-0x25d9),(0xb1+2679-0xae6),(0x6a4+6748-0x20bd),
-(0x1d19+661-0x1f6a),(0x4c+8261-0x204c),(0x13c1+4943-0x26ca),(0x2c3+4776-0x1524),
-(0x745+5425-0x1c2e),(0x4cd+8604-0x2620),(0x42b+5048-0x1799),(0x798+7928-0x2645),
-(0x92a+6824-0x2386),(0xa60+3869-0x1930),(0x12ed+3131-0x1eda),(0x6a+1800-0x723),
-(0x1195+2220-0x19f1),(0x310+1793-0x9c0),(0xd02+6042-0x244a),(0x18f3+2719-0x233f)
-,(0x1045+4447-0x2150),(0x11a2+4413-0x228a),(0x1a81+1000-0x1e13),
-(0x122d+4633-0x23ef),(0x92b+1763-0xfb6),(0x2ba+8016-0x21b1),(0xdf2+461-0xf65),
-(0x5e8+3920-0x1475),(0x809+7247-0x2383),(0x16f3+4263-0x26c0),(0x813+1349-0xc7c),
-(0xf28+31-0xea0),(0x1bc3+446-0x1d03),(0x1320+996-0x16a3),(0x1418+4628-0x25ca),
-(0x1174+480-0x12f1),(0xdaa+5496-0x22be),(0xea2+3530-0x1c07),(0x921+7303-0x2542),
-(0x50f+130-0x52a),(0xb6+4538-0x1208),(0x1282+172-0x12c5),(0xe9c+3780-0x1cf6),
-(0x9d8+6120-0x2155),(0x6b8+4892-0x1968),(0x53d+8611-0x2673),(0x1854+1435-0x1d81)
-,(0xc9f+4509-0x1dcd),(0x836+49-0x7f7),(0x159+533-0x2fd),(0x6cc+3251-0x130d),
-(0xd9c+6209-0x256a),(0x4b2+4861-0x173b),(0x1a10+930-0x1d3d),(0x6ef+5856-0x1d59),
-(0x1c48+2247-0x2498),(0x47b+5959-0x1b4a),(0x58c+5071-0x18e2),
-(0x10d8+5231-0x24cd),(0xaf2+2983-0x15b6),(0xbff+1644-0x1176),
-(0x1477+4226-0x2499),(0x1569+2800-0x1f5d),(0xec7+5395-0x22fa)};const unsigned
-short zte_sms_GSMDefault_To_UCS2_Table[]={(0xaf9+55-0xaf0),(0x455+1418-0x93c),
-(0x1c55+458-0x1dfb),(0x568+6763-0x1f2e),(0x10db+3036-0x1bcf),(0x33c+9149-0x2610)
-,(0x1243+4475-0x22c5),(0x15c+7027-0x1be3),(0x24d+5665-0x177c),
-(0x101+7268-0x1c9e),(0x915+799-0xc2a),(0x2324+685-0x24f9),(0x21d+7530-0x1e8f),
-(0x69f+5154-0x1ab4),(0x123a+2728-0x1c1d),(0x1fbd+316-0x2014),(0x3cb+2060-0x843),
-(0xc8c+3172-0x1891),(0x1530+2711-0x1c21),(0x7e9+8478-0x2574),(0x444+5977-0x1802)
-,(0x12eb+2905-0x1a9b),(0x1ca4+3399-0x264b),(0xac8+7296-0x23a0),
-(0x1acd+1814-0x1e40),(0x18da+4260-0x25e6),(0xd84+2533-0x13cb),
-(0x1cbb+2631-0x2662),(0xb4f+2136-0x12e1),(0x110b+2616-0x1a5d),
-(0x11b+5382-0x1542),(0x45f+4483-0x1519),(0x301+911-0x670),(0x244+6178-0x1a45),
-(0x171f+3463-0x2484),(0x497+2912-0xfd4),(0x1b0+3124-0xd40),(0x243d+691-0x26cb),
-(0x453+122-0x4a7),(0x107+3136-0xd20),(0x769+1770-0xe2b),(0x8e1+964-0xc7c),
-(0x832+7514-0x2562),(0x62+2768-0xb07),(0x97d+375-0xac8),(0x82a+1598-0xe3b),
-(0xda0+2067-0x1585),(0x1746+58-0x1751),(0x1e8f+1578-0x2489),(0x247+6485-0x1b6b),
-(0x10a1+5034-0x2419),(0x458+3392-0x1165),(0x4ff+4542-0x1689),(0x585+1921-0xcd1),
-(0x10cc+3690-0x1f00),(0xc67+5755-0x22ab),(0xe63+5637-0x2430),(0xf45+4544-0x20cc)
-,(0x274+1172-0x6ce),(0x652+7801-0x2490),(0x1552+2439-0x1e9d),(0x87c+468-0xa13),
-(0x424+5989-0x1b4b),(0x99+4417-0x119b),(0x128c+1122-0x164d),(0x21f1+107-0x221b),
-(0x16ef+2092-0x1ed9),(0xd52+1109-0x1164),(0x818+3390-0x1512),(0xec3+2182-0x1704)
-,(0xf58+5387-0x241d),(0x1c7b+2596-0x2658),(0x1494+1591-0x1a83),
-(0xfd7+3424-0x1cee),(0x19b6+1797-0x2071),(0x1136+4610-0x22ed),
-(0x1409+173-0x146a),(0x2cb+5132-0x168a),(0x368+1349-0x85f),(0xc51+1698-0x12a4),
-(0x619+1832-0xcf1),(0x7a7+7899-0x2631),(0x357+476-0x4e1),(0xfa2+4283-0x200a),
-(0x1861+1219-0x1cd0),(0x156c+2671-0x1f86),(0x9b+2343-0x96c),(0x8c5+2891-0x13b9),
-(0x1139+801-0x1402),(0x4ea+4691-0x16e4),(0x1362+670-0x15a6),(0x325+1788-0x95d),
-(0xce5+3859-0x1b22),(0x760+6725-0x20d4),(0x882+1881-0xeff),(0x1b6a+1914-0x223d),
-(0xce0+4279-0x1cd8),(0x1c6+1648-0x7d5),(0x66a+1571-0xc2b),(0xa23+3736-0x1858),
-(0x18a+8210-0x2138),(0x179+9149-0x24d1),(0x908+188-0x95e),(0xb2+7953-0x1f5c),
-(0x46f+6411-0x1d12),(0x1f88+400-0x20af),(0xed8+1148-0x12ea),(0x921+4233-0x193f),
-(0x1162+4791-0x23ad),(0xc3b+4069-0x1bb3),(0x4b4+6604-0x1e12),(0xc0+932-0x3f5),
-(0x152c+2972-0x2058),(0x15a2+2476-0x1edd),(0xa2d+3236-0x165f),
-(0x23c9+250-0x2450),(0x2e2+7739-0x20a9),(0x2f2+5233-0x16ee),(0x1558+3373-0x220f)
-,(0x1774+552-0x1925),(0x615+4106-0x15a7),(0xd5d+3736-0x1b7c),(0x140+3893-0xffb),
-(0xff3+3129-0x1b48),(0x403+6501-0x1c72),(0x192+6334-0x195f),(0x3b2+1680-0x946),
-(0x182a+1759-0x1e29)};int Bytes2String(const unsigned char*pSrc,char*pDst,int
-nSrcLength){const char tab[]="0123456789ABCDEF";int i=(0x843+6632-0x222b);if(
-pSrc==NULL||pDst==NULL||nSrcLength<(0x210a+843-0x2455)){return-
-(0x18b+1586-0x7bc);}for(i=(0x12c1+4991-0x2640);i<nSrcLength;i++){*pDst++=tab[*
-pSrc>>(0x619+1361-0xb66)];*pDst++=tab[*pSrc&(0xfd1+3388-0x1cfe)];pSrc++;}*pDst=
-'\0';return nSrcLength*(0x75d+4462-0x18c9);}int String2Bytes(const char*pSrc,
-unsigned char*pDst,int nSrcLength){int i=(0xbb+5904-0x17cb);if(pSrc==NULL||pDst
-==NULL||nSrcLength<(0x104b+2858-0x1b75)){return-(0x1e38+1662-0x24b5);}for(i=
-(0x1553+2994-0x2105);i<nSrcLength;i+=(0x172a+85-0x177d)){if(*pSrc>=
-((char)(0x16c8+833-0x19d9))&&*pSrc<=((char)(0x1304+2212-0x1b6f))){*pDst=(*pSrc-
-((char)(0xd9a+5496-0x22e2)))<<(0x140d+2680-0x1e81);}else{*pDst=((toupper(*pSrc)-
-((char)(0x1946+616-0x1b6d)))+(0x2440+528-0x2646))<<(0x83+9648-0x262f);}pSrc++;if
-(*pSrc>=((char)(0x13f7+3421-0x2124))&&*pSrc<=((char)(0xe77+6080-0x25fe))){*pDst
-|=*pSrc-((char)(0x127+3775-0xfb6));}else{*pDst|=(toupper(*pSrc)-
-((char)(0x1598+2922-0x20c1)))+(0xc5b+885-0xfc6);}pSrc++;pDst++;}return
-nSrcLength/(0x118b+5403-0x26a4);}int EncodeUcs2(const char*pSrc,unsigned char*
-pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0x2372+479-0x2551)){
-return-(0x9fa+4630-0x1c0f);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);return
- nSrcLength/(0x2bf+4157-0x12fa);}int Encode7bit(const char*pSrc,unsigned char*
-pDst,int nSrcLength){int nSrc;int nDst;int nChar;unsigned char nLeft=
-(0x1746+1566-0x1d64);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x7f1+3544-0x15c9)){
-return-(0x419+3428-0x117c);}nSrc=(0x15c+8841-0x23e5);nDst=(0x11e4+748-0x14d0);
-while(nSrc<nSrcLength){nChar=nSrc&(0x1b72+2242-0x242d);if(nChar==
-(0x156+5316-0x161a)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
-(0x38+1953-0x7d8))&&(nSrc==(nSrcLength-(0x711+5951-0x1e4f)))){nDst++;}}else{*
-pDst=(*pSrc<<((0x292+3109-0xeaf)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst++;
-}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst,
-UINT8 TP_FCS){SINT32 nLength=(0x1266+1460-0x181a);SINT32 nDstLength=
-(0x15fd+4211-0x2670);UINT8 buf[(0x8c9+5344-0x1ca9)]={(0x4c5+5076-0x1899)};if(
-NULL==pDst){return-(0x568+2002-0xd39);}if(TP_FCS!=(0x7a5+7565-0x2532)){buf[
-(0x1422+1827-0x1b45)]=(0xbcc+1979-0x1387);buf[(0xcab+4126-0x1cc8)]=TP_FCS;buf[
-(0x133a+2428-0x1cb4)]=(0x292+7451-0x1fad);nDstLength+=Bytes2String(buf,&pDst[
-nDstLength],(0xd8a+2394-0x16e1));}else{buf[(0x7d3+6661-0x21d8)]=
-(0x16d2+1490-0x1ca4);buf[(0x32b+1403-0x8a5)]=(0x740+460-0x90c);nDstLength+=
-Bytes2String(buf,&pDst[nDstLength],(0x1a27+2331-0x2340));}return nDstLength;}
+(0x545+5907-0x1c18),(0x18ab+1495-0x1ddf),(0x1af9+1331-0x2008),
+(0x12a1+5379-0x26ff),(0xd9f+4976-0x2025),(0x1108+326-0x1165),(0x8cf+3602-0x15e7)
+,(0xca0+3560-0x199b),(0x1a75+2315-0x228d),(0x10e1+1404-0x1576),
+(0x8c2+3330-0x15ba),(0xc92+2971-0x1759),(0xd2a+891-0xfb1),(0x1636+1175-0x1ac0),
+(0x9e5+4127-0x1943),(0x1b04+1889-0x2184),(0x962+4902-0x18f4),
+(0x1439+2547-0x1dcd),(0xaac+6194-0x2234),(0x24b4+328-0x2535),
+(0x15e6+3069-0x2123),8734,(0x5eb+532-0x7a1),(0x40b+2701-0xe3c),8364,
+(0xb18+6909-0x2542),(0x515+2605-0xec6),(0x1aed+1594-0x2087),(0x1a02+464-0x1b10),
+(0xd82+5294-0x214e),(0x12d1+2659-0x1c6a),(0x55d+6935-0x1fab),(0xef+2647-0xb26),
+(0x1082+5388-0x256d),(0x20ff+169-0x2186),(0x3bd+3061-0xf8f),(0x3e6+6453-0x1c6b),
+(0x1c3a+1418-0x219f),(0x12d3+2267-0x1b88),(0x160c+1352-0x1b2d),
+(0x6d2+2384-0xffa),(0xf20+1497-0x14d0),(0x6cb+5333-0x1b76),(0x1469+2635-0x1e89),
+(0x16b+6092-0x190b),(0x1ad5+1908-0x221c),(0x22b+3016-0xdc5),(0x14ff+2342-0x1df6)
+,(0x100a+84-0x102e),(0x190+3427-0xec2),(0x17ac+121-0x17f3),(0x841+6438-0x2134),
+(0x2fd+5093-0x16ae),(0xf36+2551-0x18f8),(0x446+7249-0x2061),(0x56c+4837-0x181a),
+(0x507+6481-0x1e20),(0x989+2819-0x1453),(0x706+3500-0x1478),(0x1f1+3290-0xe90),
+(0x13f8+2860-0x1ee8),(0x194+7931-0x2052),(0x6f4+3700-0x152a),(0xafa+2183-0x1342)
+,(0xf20+3939-0x1db6),(0xb15+7220-0x2708),(0x134c+525-0x1517),(0xaab+2979-0x160b)
+,(0x1544+3985-0x2491),(0x1be2+2783-0x267c),(0x198f+1830-0x206f),
+(0xb2c+115-0xb58),(0x726+5001-0x1a67),(0x14cb+3891-0x23b5),(0x1c85+108-0x1ca7),
+(0x6a3+4627-0x186b),(0x287+2286-0xb29),(0xb15+226-0xbaa),(0x1e97+111-0x1eb8),
+(0x13eb+3145-0x1fe5),(0x246c+279-0x2533),(0x98b+7524-0x269e),(0xe67+6168-0x262d)
+,(0x253+6692-0x1c24),(0x1f51+1617-0x254e),(0x8a6+5098-0x1c3b),
+(0x14fb+724-0x1779),(0xf0f+5050-0x2272),(0x16a0+1926-0x1dce),(0x74+7768-0x1e73),
+(0x38b+8839-0x25b8),(0x17ef+1161-0x1bb5),(0x362+1563-0x8a8),(0x5f0+7446-0x222c),
+(0x1140+5441-0x25a5),(0xf45+6083-0x2661),(0x637+3126-0x11ef),
+(0x1301+4927-0x25df),(0x1640+3987-0x2571),(0x283+1120-0x680),
+(0x1109+5148-0x24c1),(0x7d7+7579-0x250d),(0xb8c+5111-0x1f1d),(0x100d+699-0x1261)
+,(0xf60+542-0x1116),(0x3ef+6550-0x1d1c),(0x68d+5676-0x1c4f),(0x299+9247-0x264d),
+(0xf96+1625-0x1583),(0x3bd+8409-0x2429),(0x1326+1335-0x17ef),
+(0x10f5+5239-0x24fd),(0x1673+4072-0x25eb),(0x2261+727-0x24c7),
+(0x1832+3805-0x269d),(0x468+1427-0x988),(0x1a69+2252-0x22c1),(0x245+4301-0x129d)
+,(0x67b+1823-0xd24),(0x633+1646-0xc2a),(0x1593+2810-0x2015),(0x1694+3241-0x22c4)
+,(0x16d9+3742-0x24fd),(0xf4d+2287-0x1759),(0xc87+959-0xf51),(0x647+2973-0x1184),
+(0xe9d+268-0xead),(0x200+1758-0x7fe)};const unsigned short
+zte_sms_GSMDefault_To_UCS2_Table[]={(0x15ac+4187-0x25c7),(0x139+899-0x419),
+(0x82+6880-0x1b3e),(0x1c4+6981-0x1c64),(0x66d+1115-0x9e0),(0xaf9+908-0xd9c),
+(0x5c3+5479-0x1a31),(0xc95+5823-0x2268),(0xdb0+59-0xcf9),(0x839+6558-0x2110),
+(0x2428+553-0x2647),(0x847+6081-0x1f30),(0x1e60+1147-0x21e3),(0x333+5193-0x176f)
+,(0xe14+4836-0x2033),(0x24c+732-0x443),(0x62f+146-0x32d),(0xa14+628-0xc29),
+(0x18d4+1116-0x198a),(0x74d+5331-0x188d),(0x7b8+8243-0x2450),(0x1187+344-0xf36),
+(0x21c7+127-0x1ea6),(0x65f+1304-0x7cf),(0x1eaa+1336-0x203f),(0x8c2+4951-0x1881),
+(0x118d+3139-0x1a32),(0x1dd9+1868-0x2485),(0x8db+4643-0x1a38),(0x684+2250-0xe68)
+,(0x632+2601-0xf7c),(0x1eb+6741-0x1b77),(0x1746+162-0x17c8),(0x1359+4883-0x264b)
+,(0x182b+928-0x1ba9),(0x151+9060-0x2492),(0xafb+2382-0x13a5),(0x104d+815-0x1357)
+,(0x825+2172-0x107b),(0x1c9+3424-0xf02),(0x22e5+257-0x23be),(0x4ab+5401-0x199b),
+(0x399+3141-0xfb4),(0x241+3034-0xdf0),(0x49f+148-0x507),(0x14ec+507-0x16ba),
+(0xa5c+5049-0x1de7),(0x842+866-0xb75),(0x90+1521-0x651),(0x103+461-0x29f),
+(0x10d9+137-0x1130),(0xe82+5128-0x2257),(0x11f9+5374-0x26c3),
+(0x14a9+4091-0x246f),(0x1a18+1507-0x1fc5),(0x229b+574-0x24a2),
+(0x1c8+8769-0x23d1),(0xe10+4651-0x2002),(0x4f4+1712-0xb6a),(0xa3d+4779-0x1cad),
+(0x11b0+5184-0x25b4),(0x150c+2587-0x1eea),(0x1f4d+425-0x20b8),
+(0x19d6+3367-0x26be),(0x754+7267-0x2316),(0xbd5+1748-0x1268),
+(0x1765+3264-0x23e3),(0x113+5823-0x178f),(0x1774+3607-0x2547),
+(0xfa8+3553-0x1d44),(0xc5f+4774-0x1ebf),(0x357+3761-0x11c1),(0x69c+5492-0x1bc8),
+(0x8d9+5898-0x1f9a),(0x96+1774-0x73a),(0x1458+3449-0x2186),(0x5f6+3802-0x1484),
+(0x36d+8841-0x25a9),(0x1140+4341-0x21e7),(0xa87+2808-0x1530),
+(0x14d6+4513-0x2627),(0x1822+2876-0x230d),(0x3e9+9015-0x26ce),
+(0x852+5549-0x1dac),(0x10a+179-0x169),(0x76a+6583-0x20cc),(0x1582+1668-0x1bb0),
+(0xa8+7619-0x1e14),(0xfcf+4483-0x20fa),(0x15b4+3107-0x217e),(0x2070+1350-0x255c)
+,(0x1308+1988-0x1a08),(0x1b39+276-0x1b77),(0xa2a+393-0xae2),(0x8fb+6247-0x2086),
+(0x316+6299-0x1b0a),(0x19a9+643-0x1b6d),(0xfac+1443-0x14ee),(0x287+6316-0x1ad1),
+(0x62d+320-0x70a),(0xc2b+4065-0x1ba8),(0x119f+4-0x113e),(0x1b2b+2364-0x2401),
+(0x1099+5328-0x2502),(0x19e7+2380-0x22cb),(0xfe5+503-0x1173),(0xf0b+5416-0x23c9)
+,(0xad0+1809-0x1176),(0x1d52+2247-0x25ad),(0xaea+6211-0x22c0),
+(0x1a6f+3290-0x26db),(0x12ed+1878-0x19d4),(0x25a+8892-0x24a6),
+(0x1b26+138-0x1b3f),(0x9f4+1700-0x1026),(0x1523+3238-0x2156),(0xe60+5345-0x22cd)
+,(0x2ec+7665-0x2068),(0xd16+2143-0x14ff),(0xb6+3-0x42),(0x100d+3980-0x1f21),
+(0xccb+5826-0x2314),(0x391+7080-0x1ebf),(0x16ef+1122-0x1a6d),(0x8d3+5543-0x1d84)
+,(0x1364+3430-0x1fd9),(0x761+2334-0xf83),(0x1dea+1743-0x23d9)};int Bytes2String(
+const unsigned char*pSrc,char*pDst,int nSrcLength){const char tab[]=
+"0123456789ABCDEF";int i=(0x470+7425-0x2171);if(pSrc==NULL||pDst==NULL||
+nSrcLength<(0x1612+3459-0x2395)){return-(0x772+4314-0x184b);}for(i=
+(0x9f8+6348-0x22c4);i<nSrcLength;i++){*pDst++=tab[*pSrc>>(0xb83+2233-0x1438)];*
+pDst++=tab[*pSrc&(0x83f+4154-0x186a)];pSrc++;}*pDst='\0';return nSrcLength*
+(0x973+7440-0x2681);}int String2Bytes(const char*pSrc,unsigned char*pDst,int
+nSrcLength){int i=(0x49c+4400-0x15cc);if(pSrc==NULL||pDst==NULL||nSrcLength<
+(0x4a0+4516-0x1644)){return-(0x1629+1422-0x1bb6);}for(i=(0xe9d+4752-0x212d);i<
+nSrcLength;i+=(0xb9f+6734-0x25eb)){if(*pSrc>=((char)(0x645+2774-0x10eb))&&*pSrc
+<=((char)(0x205f+1573-0x264b))){*pDst=(*pSrc-((char)(0x2d3+8843-0x252e)))<<
+(0x550+7551-0x22cb);}else{*pDst=((toupper(*pSrc)-((char)(0x897+2987-0x1401)))+
+(0x98+3907-0xfd1))<<(0x200+5376-0x16fc);}pSrc++;if(*pSrc>=
+((char)(0x27c+6791-0x1cd3))&&*pSrc<=((char)(0x396+3822-0x124b))){*pDst|=*pSrc-
+((char)(0xcf3+4095-0x1cc2));}else{*pDst|=(toupper(*pSrc)-
+((char)(0x11a5+411-0x12ff)))+(0x2ef+6106-0x1abf);}pSrc++;pDst++;}return
+nSrcLength/(0x611+6407-0x1f16);}int EncodeUcs2(const char*pSrc,unsigned char*
+pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<(0xbe7+3826-0x1ad9)){
+return-(0x657+7514-0x23b0);}(void)String2Bytes(pSrc,pDst,(int)nSrcLength);return
+ nSrcLength/(0x7c+2827-0xb85);}int Encode7bit(const char*pSrc,unsigned char*pDst
+,int nSrcLength){int nSrc;int nDst;int nChar;unsigned char nLeft=
+(0xc0c+2039-0x1403);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x8f9+2684-0x1375)){
+return-(0x86b+4766-0x1b08);}nSrc=(0x12d2+3022-0x1ea0);nDst=(0x178f+1512-0x1d77);
+while(nSrc<nSrcLength){nChar=nSrc&(0x14d3+3626-0x22f6);if(nChar==
+(0x1056+2016-0x1836)){nLeft=*pSrc;if((g_zUfiSms_ConcatSms.total_msg>
+(0x1742+3161-0x239a))&&(nSrc==(nSrcLength-(0x708+328-0x84f)))){nDst++;}}else{*
+pDst=(*pSrc<<((0x18ec+2541-0x22d1)-nChar))|nLeft;nLeft=*pSrc>>nChar;pDst++;nDst
+++;}pSrc++;nSrc++;}return nDst;}SINT32 zUfiSms_EncodePdu_DeliverReport(CHAR*pDst
+,UINT8 TP_FCS){SINT32 nLength=(0xec0+1846-0x15f6);SINT32 nDstLength=
+(0x792+1960-0xf3a);UINT8 buf[(0xd5d+5018-0x1ff7)]={(0x2cb+8246-0x2301)};if(NULL
+==pDst){return-(0x114+2372-0xa57);}if(TP_FCS!=(0x332+5742-0x19a0)){buf[
+(0x1c99+2215-0x2540)]=(0xe7c+4775-0x2123);buf[(0x1136+5479-0x269c)]=TP_FCS;buf[
+(0x1203+3071-0x1e00)]=(0x362+1487-0x931);nDstLength+=Bytes2String(buf,&pDst[
+nDstLength],(0x33+8337-0x20c1));}else{buf[(0x1818+3214-0x24a6)]=
+(0x126f+1862-0x19b5);buf[(0x254+2417-0xbc4)]=(0x356+7454-0x2074);nDstLength+=
+Bytes2String(buf,&pDst[nDstLength],(0x962+6231-0x21b7));}return nDstLength;}
unsigned long zUfiSms_ConvertAsciiToGsmDefault(const unsigned char*inputs,
-unsigned char*outputs,unsigned long len){unsigned long i=(0x491+5903-0x1ba0);
-unsigned long j=(0x901+281-0xa1a);unsigned long k=(0x17+4038-0xfdd);if(NULL==
+unsigned char*outputs,unsigned long len){unsigned long i=(0xdd8+5198-0x2226);
+unsigned long j=(0x702+944-0xab2);unsigned long k=(0xa20+4078-0x1a0e);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(0x5d8+7920-0x24c8);}for(i=(0xc07+2909-0x1764);i<len;i++){j=inputs[i];if(
-g_zUfiSms_AsciiToGsmdefaultTable[j]<(0x6f7+1061-0xa1d)){outputs[k]=
+return(0xf85+3177-0x1bee);}for(i=(0xd2f+1976-0x14e7);i<len;i++){j=inputs[i];if(
+g_zUfiSms_AsciiToGsmdefaultTable[j]<(0x1e5d+1170-0x21f0)){outputs[k]=
g_zUfiSms_AsciiToGsmdefaultTable[j];}else{outputs[k]=(
-g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0x1fa4+919-0x2333);k++;outputs[k]=(
-g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x738+2720-0x10d9));}k++;}return k;}
+g_zUfiSms_AsciiToGsmdefaultTable[j]&65280)>>(0xe99+2267-0x176c);k++;outputs[k]=(
+g_zUfiSms_AsciiToGsmdefaultTable[j]&(0x6ed+6836-0x20a2));}k++;}return k;}
unsigned long zUfiSms_ConvertUcs2ToSpanish(const unsigned char*def,unsigned char
-*gsm_default,unsigned long len){unsigned long i=(0x25a5+271-0x26b4);unsigned
-long k=(0x41b+7024-0x1f8b);unsigned long p=(0x9c0+5484-0x1f2c);unsigned long tmp
-=(0x13+474-0x1ed);unsigned long s1=(0x451+6854-0x1f17),s2=(0xb23+5779-0x21b6);
-unsigned long q=(0x1a7d+1560-0x2095);s1=sizeof(
+*gsm_default,unsigned long len){unsigned long i=(0x2bc+6859-0x1d87);unsigned
+long k=(0x46+4567-0x121d);unsigned long p=(0x5fc+8052-0x2570);unsigned long tmp=
+(0x88d+3086-0x149b);unsigned long s1=(0x14b+240-0x23b),s2=(0x1733+174-0x17e1);
+unsigned long q=(0x86a+2438-0x11f0);s1=sizeof(
zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0xcf6+1859-0x1439)]);s2=sizeof(
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[(0x617+7244-0x2263)]);s2=sizeof(
Ucs2_To_Gsm7_SPANISH_Table_UCS)/sizeof(Ucs2_To_Gsm7_SPANISH_Table_UCS[
-(0x12f+8444-0x222b)]);for(i=(0x1579+4061-0x2556);i<len;i++){if(def[i]==
-(0xb94+1701-0x1239)){i++;if(Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]!=NON_GSM){
+(0x214+8137-0x21dd)]);for(i=(0x68d+1097-0xad6);i<len;i++){if(def[i]==
+(0xd77+6161-0x2588)){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]==(0x1ce3+1710-0x2371))
-){gsm_default[k]=(0x1308+1087-0x1727);k++;continue;}for(q=(0x1486+1754-0x1b60);q
-<s1;q++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x11fa+152-0x1291)
-]){gsm_default[k]=(0x19b7+1540-0x1fa0);k++;gsm_default[k]=
-zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x9cc+7171-0x25cf)];break;}}}else{tmp=
-(def[i]<<(0x74+830-0x3aa))+def[i+(0xa4c+1251-0xf2e)];i++;if(tmp==8364){
-gsm_default[k]=(0x3b9+7419-0x2099);k++;gsm_default[k]=(0x2d6+8540-0x23cd);k++;}
-for(p=(0x105+6219-0x1950);p<s2;p++){if(tmp==Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
-(0xd62+6250-0x25cb)]){gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
-(0x1bef+1595-0x222a)];break;}}}k++;}gsm_default[k]='\0';return k;}unsigned long
+Ucs2_To_Gsm7_SPANISH_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0x1039+3365-0x1d3e))
+){gsm_default[k]=(0x2244+609-0x2485);k++;continue;}for(q=(0x6bc+2067-0xecf);q<s1
+;q++){if(def[i]==zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x1e61+389-0x1fe5)]){
+gsm_default[k]=(0xda2+1912-0x14ff);k++;gsm_default[k]=
+zte_sms_GSM7_SPANISH_To_UCS2_Table_Ex[q][(0x15d6+3482-0x2370)];break;}}}else{tmp
+=(def[i]<<(0x1808+3174-0x2466))+def[i+(0x1635+3471-0x23c3)];i++;if(tmp==8364){
+gsm_default[k]=(0xffa+4328-0x20c7);k++;gsm_default[k]=(0x2266+851-0x2554);k++;}
+for(p=(0x1958+1813-0x206d);p<s2;p++){if(tmp==Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0xfb+5160-0x1522)]){gsm_default[k]=Ucs2_To_Gsm7_SPANISH_Table_UCS[p][
+(0x1981+2336-0x22a1)];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=(0x1c4b+747-0x1f36);unsigned long
- k=(0x92+3932-0xfee);unsigned long p=(0x1bc+4759-0x1453);unsigned long tmp=
-(0x14bd+2047-0x1cbc);unsigned long s1=(0x8ca+4073-0x18b3),s2=(0x2188+111-0x21f7)
-;unsigned long q=(0xa93+754-0xd85);s1=sizeof(
+gsm_default,unsigned long len){unsigned long i=(0xac1+2332-0x13dd);unsigned long
+ k=(0xee2+4031-0x1ea1);unsigned long p=(0x24ff+53-0x2534);unsigned long tmp=
+(0xdcc+2220-0x1678);unsigned long s1=(0x1516+430-0x16c4),s2=(0xc2b+2371-0x156e);
+unsigned long q=(0x1cb+3446-0xf41);s1=sizeof(
zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0xe31+5940-0x2565)]);s2=sizeof(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x73+9164-0x243f)]);s2=sizeof(
Ucs2_To_Gsm7_PORTUGUESE_Table_UCS)/sizeof(Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[
-(0x10af+611-0x1312)]);for(i=(0x669+76-0x6b5);i<len;i++){if(def[i]==
-(0xeb4+419-0x1057)){i++;if(Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]!=NON_GSM){
+(0x26b+7463-0x1f92)]);for(i=(0x4a3+8698-0x269d);i<len;i++){if(def[i]==
+(0x734+3253-0x13e9)){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]==
-(0x767+3967-0x16c6))){gsm_default[k]=(0x298+5170-0x16aa);k++;continue;}for(q=
-(0x4c+8816-0x22bc);q<s1;q++){if(def[i]==zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
-[q][(0x149d+582-0x16e2)]){gsm_default[k]=(0x17af+591-0x19e3);k++;gsm_default[k]=
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0xe37+2176-0x16b7)];break;}}}else{
-tmp=(def[i]<<(0xd1+3449-0xe42))+def[i+(0x80b+232-0x8f2)];i++;if(tmp==8364){
-gsm_default[k]=(0x1412+4753-0x2688);k++;gsm_default[k]=(0xc61+1521-0x11ed);k++;
-continue;}for(p=(0x651+2891-0x119c);p<s2;p++){if(tmp==
-Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x10c+4862-0x1409)]){gsm_default[k]=
-Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x19d8+3371-0x2703)];break;}}}k++;}
+Ucs2_To_Gsm7_PORTUGUESE_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0x2bc+196-0x360))
+){gsm_default[k]=(0x11cb+4401-0x22dc);k++;continue;}for(q=(0x1118+2251-0x19e3);q
+<s1;q++){if(def[i]==zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][
+(0x27f+6897-0x1d6f)]){gsm_default[k]=(0xc40+75-0xc70);k++;gsm_default[k]=
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[q][(0x5a8+4776-0x1850)];break;}}}else{
+tmp=(def[i]<<(0x1b21+2294-0x240f))+def[i+(0x9b0+6415-0x22be)];i++;if(tmp==8364){
+gsm_default[k]=(0xf3+1793-0x7d9);k++;gsm_default[k]=(0x174+6385-0x1a00);k++;
+continue;}for(p=(0x92d+254-0xa2b);p<s2;p++){if(tmp==
+Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x1618+1208-0x1acf)]){gsm_default[k]=
+Ucs2_To_Gsm7_PORTUGUESE_Table_UCS[p][(0x146+2592-0xb66)];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=(0x2260+921-0x25f9);unsigned long k=(0x83d+2722-0x12df);unsigned long p=
-(0x8ac+4127-0x18cb);unsigned long tmp=(0x14dd+368-0x164d);unsigned long s1=
-(0x2473+264-0x257b),s2=(0xd10+5096-0x20f8);unsigned long q=(0x11d3+4673-0x2414);
-s1=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x1dc7+1081-0x2200)]);s2=sizeof(
+long i=(0x17a+9177-0x2553);unsigned long k=(0x890+2037-0x1085);unsigned long p=
+(0x771+7318-0x2407);unsigned long tmp=(0x52f+1556-0xb43);unsigned long s1=
+(0x3c6+519-0x5cd),s2=(0x767+5395-0x1c7a);unsigned long q=(0xb66+2865-0x1697);s1=
+sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x171a+3143-0x2361)]);s2=sizeof(
UCS2_To_GSMDefault_Table_UCS2)/sizeof(UCS2_To_GSMDefault_Table_UCS2[
-(0x95+7789-0x1f02)]);for(i=(0x15b3+537-0x17cc);i<len;i++){if(def[i]==
-(0x16b2+1974-0x1e68)){i++;if(UCS2_To_GSMDefault_Table_ASC[def[i]]!=NON_GSM){
+(0x1b64+795-0x1e7f)]);for(i=(0x1511+4050-0x24e3);i<len;i++){if(def[i]==
+(0x778+3176-0x13e0)){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]==(0x1905+790-0x1bfb))){
-gsm_default[k]=(0x138+411-0x2b3);k++;continue;}for(q=(0x241+5553-0x17f2);q<s1;q
-++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x15e7+3932-0x2542)]){
-gsm_default[k]=(0x36a+8067-0x22d2);k++;gsm_default[k]=
-zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x1778+3275-0x2443)];break;}}}else{tmp=(
-def[i]<<(0x12e9+30-0x12ff))+def[i+(0x851+4620-0x1a5c)];i++;if(tmp==8364){
-gsm_default[k]=(0x12da+3259-0x1f7a);k++;gsm_default[k]=(0x2bd+9132-0x2604);k++;
-continue;}for(p=(0xad+6462-0x19eb);p<s2;p++){if(tmp==
-UCS2_To_GSMDefault_Table_UCS2[p][(0x1bcf+2459-0x2569)]){gsm_default[k]=
-UCS2_To_GSMDefault_Table_UCS2[p][(0x43b+7452-0x2157)];break;}}}k++;}gsm_default[
+UCS2_To_GSMDefault_Table_ASC[def[i]]==NON_GSM)&&(def[i]==(0xb64+1522-0x1136))){
+gsm_default[k]=(0xb54+2952-0x16bc);k++;continue;}for(q=(0x68d+1757-0xd6a);q<s1;q
+++){if(def[i]==zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x1234+3479-0x1fca)]){
+gsm_default[k]=(0x1cf5+2483-0x268d);k++;gsm_default[k]=
+zte_sms_GSMDefault_To_UCS2_Table_Ex[q][(0x863+3396-0x15a7)];break;}}}else{tmp=(
+def[i]<<(0x1a7+5366-0x1695))+def[i+(0x2220+1209-0x26d8)];i++;if(tmp==8364){
+gsm_default[k]=(0x1372+4987-0x26d2);k++;gsm_default[k]=(0x17ad+454-0x190e);k++;
+continue;}for(p=(0xe08+5809-0x24b9);p<s2;p++){if(tmp==
+UCS2_To_GSMDefault_Table_UCS2[p][(0x80d+882-0xb7e)]){gsm_default[k]=
+UCS2_To_GSMDefault_Table_UCS2[p][(0x7cc+5651-0x1ddf)];break;}}}k++;}gsm_default[
k]='\0';return k;}UINT8 zUfiSms_TsIntToBcd(const UINT8 i){return(UINT8)(((i%
-(0x12ba+2850-0x1dd2))+((i/(0x581+6038-0x1d0d))<<(0x4e8+6738-0x1f36))));}void
+(0xa68+2356-0x1392))+((i/(0xbe1+5544-0x217f))<<(0x520+4768-0x17bc))));}void
zUfiSms_DecodeRelativeTime(UINT8 iValidTime,T_zUfiSms_TimeStamp*ptTimeStamp){
-uint32 i=(0x155a+1696-0x1bfa);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
-(0xe70+460-0x103c),sizeof(wms_timestamp_s_type));if(iValidTime<
-(0xa3d+2790-0x1493)){i=(iValidTime+(0xf17+2462-0x18b4))*(0x37c+3600-0x1187);
-ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0x1b0c+2696-0x2558)));
-ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0xa7a+2580-0x1452)));}
-else if(iValidTime<(0x15d9+1468-0x1aee)){i=(iValidTime-(0x4cd+2146-0xca0))*
-(0x114d+2832-0x1c3f);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
-(0x1b29+945-0x1ece)+i/(0x9d2+1719-0x104d)));ptTimeStamp->minute=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0x12ca+246-0x1384)));}else if(iValidTime<
-(0x13f+2702-0xb08)){i=iValidTime-(0x220f+1210-0x2623);ptTimeStamp->month=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i/(0x1589+724-0x183f)));ptTimeStamp->day=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i%(0x290+5020-0x160e)));}else{i=(iValidTime-
-(0x3ca+3408-0x105a))*(0x1947+1733-0x2005);ptTimeStamp->year=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)(i/(0x78b+2380-0xf6a)));ptTimeStamp->month=(UINT8)
-zUfiSms_TsIntToBcd((UINT8)((i%(0x62a+2134-0xd13))/(0x739+7600-0x24cb)));
-ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0x893+5710-0x1d74))%
-(0x444+5008-0x17b6)));}}else{printf(
+uint32 i=(0x1bf+1592-0x7f7);if(ptTimeStamp!=NULL){memset((void*)ptTimeStamp,
+(0xbc2+3523-0x1985),sizeof(wms_timestamp_s_type));if(iValidTime<
+(0x994+4491-0x1a8f)){i=(iValidTime+(0x1184+659-0x1416))*(0x1234+2299-0x1b2a);
+ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i/(0x19f2+743-0x1c9d)));
+ptTimeStamp->minute=(UINT8)zUfiSms_TsIntToBcd((UINT8)(i%(0xea8+267-0xf77)));}
+else if(iValidTime<(0xc6f+6504-0x2530)){i=(iValidTime-(0xd09+5825-0x233b))*
+(0xb16+822-0xe2e);ptTimeStamp->hour=(UINT8)zUfiSms_TsIntToBcd((UINT8)(
+(0x723+2145-0xf78)+i/(0x172+989-0x513)));ptTimeStamp->minute=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0xd3b+4622-0x1f0d)));}else if(iValidTime<
+(0x1570+2357-0x1de0)){i=iValidTime-(0xc0f+885-0xede);ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0x14ef+50-0x1503)));ptTimeStamp->day=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i%(0x9ea+3524-0x1790)));}else{i=(iValidTime-
+(0x718+7252-0x22ac))*(0x973+5169-0x1d9d);ptTimeStamp->year=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)(i/(0x913+5319-0x1c6d)));ptTimeStamp->month=(UINT8)
+zUfiSms_TsIntToBcd((UINT8)((i%(0x50a+7637-0x2172))/(0x9f6+7447-0x26ef)));
+ptTimeStamp->day=(UINT8)zUfiSms_TsIntToBcd((UINT8)((i%(0xb63+5604-0x1fda))%
+(0xc49+4565-0x1e00)));}}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=(0x958+5303-0x1e0f);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}
-for(i=(0x17d+1838-0x8ab);i<iLen;i++){pIntArray[i]=pCharArray[i]-
-((char)(0x6b1+2474-0x102b));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
+i=(0x182+7333-0x1e27);if(pIntArray==NULL||pCharArray==NULL){return ZUFI_FAIL;}
+for(i=(0x1548+2478-0x1ef6);i<iLen;i++){pIntArray[i]=pCharArray[i]-
+((char)(0x211f+978-0x24c1));}return ZUFI_SUCC;}void zUfiSms_FillGlobalTpudGsm7(
T_zUfiSms_SubmitTpdu*ptSubmit,T_zUfiSms_ConcatInfo*ptConcatSms,
-T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x109d+1633-0x16fe);if(ptConcatSms->
-total_msg>(0x132f+4052-0x2302)){g_zUfiSms_SendingSms.TP_UDHI=(0x19ad+271-0x1abb)
-;g_zUfiSms_SendingSms.TP_UD[(0x1079+331-0x11c4)]=(0x8cc+2486-0x127d);
-g_zUfiSms_SendingSms.TP_UD[(0x10b6+3530-0x1e7f)]=(0x10a2+2794-0x1b87);
-g_zUfiSms_SendingSms.TP_UD[(0x97+6481-0x19e6)]=(0x168c+409-0x1822);
-g_zUfiSms_SendingSms.TP_UD[(0x2c8+8410-0x239f)]=(char)ptDbSaveData->concat_info[
-(0x318+31-0x337)]%(0x1067+2951-0x1aef);g_zUfiSms_SendingSms.TP_UD[
-(0x1711+3776-0x25cd)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
-(0x14f+865-0x4ab)]=(char)ptConcatSms->current_sending+(0x1825+1804-0x1f30);
-g_zUfiSms_SendingSms.TP_UD[(0x1dc8+402-0x1f54)]=(0x446+7144-0x2028);for(i=
-(0x1735+961-0x1af6);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
-[i+(0x1a8+6181-0x19c6)]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.
-TP_UDLength=ptSubmit->user_data.sm_len+(0x379+4145-0x13a3);}else{for(i=
-(0x1beb+801-0x1f0c);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
-[i]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.TP_UDLength=ptSubmit->
+T_zUfiSms_DbStoreData*ptDbSaveData){int i=(0x1c87+1346-0x21c9);if(ptConcatSms->
+total_msg>(0x6dd+850-0xa2e)){g_zUfiSms_SendingSms.TP_UDHI=(0x2ff+8305-0x236f);
+g_zUfiSms_SendingSms.TP_UD[(0x1c20+753-0x1f11)]=(0x417+7717-0x2237);
+g_zUfiSms_SendingSms.TP_UD[(0x1511+1805-0x1c1d)]=(0x1484+4701-0x26dc);
+g_zUfiSms_SendingSms.TP_UD[(0x14d9+1978-0x1c91)]=(0x11f7+1279-0x16f3);
+g_zUfiSms_SendingSms.TP_UD[(0x1013+4100-0x2014)]=(char)ptDbSaveData->concat_info
+[(0xe43+460-0x100f)]%(0x221+9294-0x2570);g_zUfiSms_SendingSms.TP_UD[
+(0x129d+2480-0x1c49)]=(char)ptConcatSms->total_msg;g_zUfiSms_SendingSms.TP_UD[
+(0x22e0+408-0x2473)]=(char)ptConcatSms->current_sending+(0x161a+3112-0x2241);
+g_zUfiSms_SendingSms.TP_UD[(0x525+6251-0x1d8a)]=(0x6a6+6692-0x20c4);for(i=
+(0x84d+6810-0x22e7);i<ptSubmit->user_data.sm_len;i++){g_zUfiSms_SendingSms.TP_UD
+[i+(0x15ba+367-0x1722)]=ptSubmit->user_data.sm_data[i];}g_zUfiSms_SendingSms.
+TP_UDLength=ptSubmit->user_data.sm_len+(0xbe1+5913-0x22f3);}else{for(i=
+(0x257+465-0x428);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>(0x837+2784-0x1316)){g_zUfiSms_SendingSms.TP_UDHI=
-(0x319+5096-0x1700);g_zUfiSms_SendingSms.TP_UD[(0x5ad+6495-0x1f0c)]=
-(0x1973+1961-0x2117);g_zUfiSms_SendingSms.TP_UD[(0x12b6+2064-0x1ac5)]=
-(0x2114+705-0x23d0);g_zUfiSms_SendingSms.TP_UD[(0x139c+958-0x1758)]=
-(0x1317+2054-0x1b1a);g_zUfiSms_SendingSms.TP_UD[(0x1dbc+2089-0x25e2)]=(char)
-ptDbSaveData->concat_info[(0x669+5570-0x1c2b)]%(0xa7d+6100-0x2152);
-g_zUfiSms_SendingSms.TP_UD[(0x1438+4191-0x2493)]=(char)ptConcatSms->total_msg;
-g_zUfiSms_SendingSms.TP_UD[(0x11c0+2450-0x1b4d)]=(char)ptConcatSms->
-current_sending+(0x971+253-0xa6d);(void)Bytes2String(ptSubmit->user_data.sm_data
-,&g_zUfiSms_SendingSms.TP_UD[(0x103a+1822-0x1752)],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)(0x15db+4154-0x25b4))&&x<((char)(0x290+3148-0xe75))){x=(x-
-((char)(0x400+365-0x50c)))+((char)(0xb0c+5756-0x2147));}return x;}unsigned char
-zUfiSms_Char2Dec(unsigned char x){unsigned char d=(0x6a9+6422-0x1fbf);if(x>=
-((char)(0x1c39+2765-0x26c5))&&x<((char)(0xa68+4688-0x1c71))){d=(x-
-((char)(0xcec+3398-0x19f1)))+(0x55c+550-0x778);}else{d=x-
-((char)(0x492+1370-0x9bc));}return d;}unsigned char zUfiSms_Char2Byte(unsigned
-char a,unsigned char b){unsigned char data=(0x2a7+8438-0x239d);unsigned char l=
-(0xa62+1669-0x10e7),h=(0x17f7+2480-0x21a7);a=zUfiSms_Low2High(a);b=
-zUfiSms_Low2High(b);h=zUfiSms_Char2Dec(a);l=zUfiSms_Char2Dec(b);data=h*
-(0x25c0+71-0x25f7)+l;return data;}void zUfiSms_Str2Bytes(unsigned char*text,int
-text_len,unsigned char*data,int data_len){int i=(0x1a36+2644-0x248a);while(
-(0x15b+4532-0x130d)*i+(0x686+4728-0x18fd)<text_len){data[i]=zUfiSms_Char2Byte(
-text[(0x1016+4181-0x2069)*i],text[(0x12dd+2606-0x1d09)*i+(0xa77+657-0xd07)]);i++
-;}}int zUfiSms_SplitString(char*input,char***output,char cMatchChar){int src=
-(0x1c63+1385-0x21cc);int dst=(0x7c+2831-0xb8b);int count=(0x2098+707-0x235b);int
- size=(0x2ea+7990-0x2218);char quoted=(0x179+6935-0x1c90);char**tmpout=NULL;*
+ptConcatSms->total_msg>(0x1177+3404-0x1ec2)){g_zUfiSms_SendingSms.TP_UDHI=
+(0x15c+49-0x18c);g_zUfiSms_SendingSms.TP_UD[(0xe57+5957-0x259c)]=
+(0x1789+1338-0x1cbe);g_zUfiSms_SendingSms.TP_UD[(0x105+7390-0x1de2)]=
+(0x1c6a+2487-0x261c);g_zUfiSms_SendingSms.TP_UD[(0xb40+4409-0x1c77)]=
+(0xaeb+6147-0x22eb);g_zUfiSms_SendingSms.TP_UD[(0x1568+3504-0x2315)]=(char)
+ptDbSaveData->concat_info[(0x1dea+421-0x1f8f)]%(0x12bf+4082-0x21b2);
+g_zUfiSms_SendingSms.TP_UD[(0x162+9179-0x2539)]=(char)ptConcatSms->total_msg;
+g_zUfiSms_SendingSms.TP_UD[(0x1e07+1686-0x2498)]=(char)ptConcatSms->
+current_sending+(0x828+7798-0x269d);(void)Bytes2String(ptSubmit->user_data.
+sm_data,&g_zUfiSms_SendingSms.TP_UD[(0x735+293-0x854)],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)(0x1216+1112-0x160d))&&x<
+((char)(0x5ff+1699-0xc3b))){x=(x-((char)(0x5a6+784-0x855)))+
+((char)(0xc69+1740-0x12f4));}return x;}unsigned char zUfiSms_Char2Dec(unsigned
+char x){unsigned char d=(0x350+6964-0x1e84);if(x>=((char)(0x4fb+140-0x546))&&x<
+((char)(0x851+6223-0x2059))){d=(x-((char)(0x8a4+7289-0x24dc)))+
+(0x54d+3657-0x138c);}else{d=x-((char)(0x1323+4366-0x2401));}return d;}unsigned
+char zUfiSms_Char2Byte(unsigned char a,unsigned char b){unsigned char data=
+(0x244+9271-0x267b);unsigned char l=(0x547+8185-0x2540),h=(0xb84+6771-0x25f7);a=
+zUfiSms_Low2High(a);b=zUfiSms_Low2High(b);h=zUfiSms_Char2Dec(a);l=
+zUfiSms_Char2Dec(b);data=h*(0x123c+3583-0x202b)+l;return data;}void
+zUfiSms_Str2Bytes(unsigned char*text,int text_len,unsigned char*data,int
+data_len){int i=(0x1206+3439-0x1f75);while((0x5d7+231-0x6bc)*i+
+(0x1e3c+1894-0x25a1)<text_len){data[i]=zUfiSms_Char2Byte(text[(0x47c+2728-0xf22)
+*i],text[(0x1937+1476-0x1ef9)*i+(0x1cbc+878-0x2029)]);i++;}}int
+zUfiSms_SplitString(char*input,char***output,char cMatchChar){int src=
+(0x27f+9248-0x269f);int dst=(0x244+578-0x486);int count=(0x1186+3365-0x1eab);int
+ size=(0x886+456-0xa46);char quoted=(0xb20+6789-0x25a5);char**tmpout=NULL;*
output=(char**)malloc(sizeof(char*)*size);if(NULL==*output){return-
-(0x9ef+1575-0x1015);}(*output)[count++]=input;for(src=dst=(0x8b0+314-0x9ea);
+(0x14e5+2431-0x1e63);}(*output)[count++]=input;for(src=dst=(0x6a7+6772-0x211b);
input[src];){char cInputChar=input[src];if(!quoted&&cInputChar==cMatchChar){
-input[dst++]=(0x35b+6295-0x1bf2);while(input[++src]&&(int)isspace(input[src])){}
-;if(count>=size){size+=(0xc37+761-0xf20);tmpout=(char**)realloc(*output,sizeof(
-char*)*size);if(NULL==tmpout){return-(0x1fd1+1056-0x23f0);}*output=tmpout;}(*
+input[dst++]=(0x98+1034-0x4a2);while(input[++src]&&(int)isspace(input[src])){};
+if(count>=size){size+=(0x409+5460-0x194d);tmpout=(char**)realloc(*output,sizeof(
+char*)*size);if(NULL==tmpout){return-(0xd37+4160-0x1d76);}*output=tmpout;}(*
output)[count++]=input+dst;}else if(!quoted&&(cInputChar=='\''||cInputChar==
-((char)(0xe8a+4021-0x1e1d)))){quoted=cInputChar;src++;}else if(cInputChar==
-quoted){quoted=(0xaf+9046-0x2405);src++;}else{if(cInputChar=='\\'&"ed!='\'')
-{src++;cInputChar=input[src];if(!cInputChar){free(*output);*output=NULL;return-
-(0xfb6+928-0x1355);}}input[dst++]=cInputChar;src++;}}input[dst]=
-(0x6e8+1131-0xb53);if(quoted){free(*output);*output=NULL;return-
-(0x861+5731-0x1ec3);}return count;}int zUfiSms_atohex(char c){int result=
-(0x1e87+642-0x2109);if(c>=((char)(0x157f+640-0x17cf))&&c<=
-((char)(0x128+4343-0x11e6))){result=c-((char)(0xa8b+5450-0x1fa5));}else if(c>=
-((char)(0x11b1+2145-0x19b1))&&c<=((char)(0x268+3027-0xdd5))){result=(c-
-((char)(0x4af+1968-0xbfe)))+(0xdba+2652-0x180c);}else if(c>=
-((char)(0x18ab+1709-0x1f17))&&c<=((char)(0x8cc+973-0xc53))){result=(c-
-((char)(0x10f7+5353-0x259f)))+(0xcbc+3430-0x1a18);}else{at_print(LOG_DEBUG,
+((char)(0x2a3+150-0x317)))){quoted=cInputChar;src++;}else if(cInputChar==quoted)
+{quoted=(0xd10+2186-0x159a);src++;}else{if(cInputChar=='\\'&"ed!='\''){src++
+;cInputChar=input[src];if(!cInputChar){free(*output);*output=NULL;return-
+(0x311+6864-0x1de0);}}input[dst++]=cInputChar;src++;}}input[dst]=
+(0x220f+1271-0x2706);if(quoted){free(*output);*output=NULL;return-
+(0x5f0+2548-0xfe3);}return count;}int zUfiSms_atohex(char c){int result=
+(0x1aad+2895-0x25fc);if(c>=((char)(0x53+756-0x317))&&c<=
+((char)(0x85f+3807-0x1705))){result=c-((char)(0x7ac+1847-0xeb3));}else if(c>=
+((char)(0x13dc+3094-0x1f91))&&c<=((char)(0x6ed+861-0x9e4))){result=(c-
+((char)(0x16fb+2227-0x1f4d)))+(0x3b2+7281-0x2019);}else if(c>=
+((char)(0xf4a+1480-0x14d1))&&c<=((char)(0x1d59+172-0x1dbf))){result=(c-
+((char)(0xfe6+3849-0x1eae)))+(0x13b1+2861-0x1ed4);}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=(0xf8+6390-0x19ee);int high=
-(0x10bf+179-0x1172);if(in_ptr==NULL||out_ptr==NULL){printf(
+int iLength,unsigned char*out_ptr){int low=(0x1c67+2209-0x2508);int high=
+(0x12f1+3999-0x2290);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>(0x821+5747-0x1e94)){low=in_ptr[iLength-
-(0x113+9575-0x2679)]&(0x1d48+2332-0x2655);high=(in_ptr[iLength-
-(0xb66+3043-0x1748)]&(0x379+7357-0x1f46))>>(0x2032+420-0x21d2);out_ptr[
-(0x83c+2658-0x129c)*iLength-(0x250+8440-0x2347)]=g_zUfiSms_DigAscMap[low];
-out_ptr[(0xaf6+5466-0x204e)*iLength-(0xf3b+4546-0x20fb)]=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=(0x19e4+1409-0x1f65);unsigned int j=
-(0x3d1+3681-0x1232);unsigned int k=(0x114b+359-0x12b2);unsigned int p=
-(0xf22+3615-0x1d41);unsigned int s=(0x23e0+87-0x2437);s=sizeof(
+);return ZUFI_FAIL;}while(iLength>(0xe26+4404-0x1f5a)){low=in_ptr[iLength-
+(0x267+8073-0x21ef)]&(0x72d+1871-0xe6d);high=(in_ptr[iLength-(0x616+5829-0x1cda)
+]&(0x213f+1407-0x25ce))>>(0x5a7+367-0x712);out_ptr[(0x237f+423-0x2524)*iLength-
+(0x3a+6005-0x17ae)]=g_zUfiSms_DigAscMap[low];out_ptr[(0x97+1828-0x7b9)*iLength-
+(0x1256+322-0x1396)]=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=(0xa1+6094-0x186f);unsigned
+int j=(0x1ae6+2803-0x25d9);unsigned int k=(0x23b2+253-0x24af);unsigned int p=
+(0x871+3834-0x176b);unsigned int s=(0xdd+2826-0xbe7);s=sizeof(
zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[(0x2b+476-0x207)]);for(i=
-(0x12b6+2844-0x1dd2);i<len;i++){j=gsmdef[i];if(j==(0x69d+1935-0xe11)){i++;for(p=
-(0x391+7191-0x1fa8);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
-(0x1f20+45-0x1f4d)]==gsmdef[i]){ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
-[p][(0xaaa+5375-0x1fa8)]>>(0x127c+157-0x1311);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0x1713+3405-0x245f)]);break;}}}else
-{ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x237+1747-0x902);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[(0x19cc+2591-0x23eb)]);for(i=
+(0x6d2+2793-0x11bb);i<len;i++){j=gsmdef[i];if(j==(0x1400+2774-0x1ebb)){i++;for(p
+=(0x1307+2257-0x1bd8);p<s;p++){if(zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][
+(0x1672+72-0x16ba)]==gsmdef[i]){ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex
+[p][(0x13c5+852-0x1718)]>>(0xee7+1813-0x15f4);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSM7_PORTUGUESE_To_UCS2_Table_Ex[p][(0xbc7+4948-0x1f1a)]);break;}}}else{
+ucs2[k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x14e6+2946-0x2060);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=
-(0x98+5768-0x1720);unsigned int j=(0x3cf+8158-0x23ad);unsigned int k=
-(0x13bc+4308-0x2490);unsigned int p=(0xb1+4804-0x1375);unsigned int s=
-(0x11dc+5424-0x270c);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[(0xb9c+3628-0x19c8)]);for(i=
-(0x506+7401-0x21ef);i<len;i++){j=gsmdef[i];if(j==(0x101a+5583-0x25ce)){i++;for(p
-=(0x1653+542-0x1871);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x8f4+2156-0x1160)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0xfa4+2645-0x19f8)]>>(0x1081+4751-0x2308);k++;ucs2[k]=(unsigned char)(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xb6c+4554-0x1d35)]);break;}}}else{ucs2[
-k]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x1cf6+1145-0x2167);k++;ucs2[k]=(
+(0x12c2+1390-0x1830);unsigned int j=(0x34d+1499-0x928);unsigned int k=
+(0xf7+8658-0x22c9);unsigned int p=(0x1a34+872-0x1d9c);unsigned int s=
+(0xb04+1394-0x1076);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[(0x1a2+1261-0x68f)]);for(i=
+(0x8d1+3583-0x16d0);i<len;i++){j=gsmdef[i];if(j==(0x1649+266-0x1738)){i++;for(p=
+(0x16bb+3450-0x2435);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x378+7468-0x20a4)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0xa2a+6629-0x240e)]>>(0xc3f+3677-0x1a94);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xf49+648-0x11d0)]);break;}}}else{ucs2[k
+]=zte_sms_GSM7_PORTUGUESE_To_UCS2_Table[j]>>(0x231+1865-0x972);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=
-(0x152a+1030-0x1930);unsigned long j=(0x234f+186-0x2409);unsigned long k=
-(0x24d+9031-0x2594);unsigned long p=(0xb05+2038-0x12fb);unsigned long s=
-(0x14f4+3183-0x2163);unsigned long is_find=(0x2498+73-0x24e1);s=sizeof(
-zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex[
-(0x684+6822-0x212a)]);for(i=(0xc3d+654-0xecb);i<len;i++){j=gsmdef[i];if(j==
-(0x91+8451-0x2179)){i++;for(p=(0x1200+1470-0x17be);p<s;p++){if(
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0xc9b+4908-0x1fc7)]==gsmdef[i]){ucs2[k]=
-zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x6c9+4318-0x17a6)]>>(0x1cfb+981-0x20c8)
-;k++;ucs2[k]=(unsigned char)(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
-(0x195f+1731-0x2021)]);is_find=(0x1a6c+240-0x1b5b);break;}}if(!is_find){at_print
-(LOG_DEBUG,
+gsmdef,unsigned char*ucs2,unsigned long len){unsigned long i=(0xe1f+2383-0x176e)
+;unsigned long j=(0x389+1550-0x997);unsigned long k=(0x90+4352-0x1190);unsigned
+long p=(0x52+1420-0x5de);unsigned long s=(0x1df7+585-0x2040);unsigned long
+is_find=(0xf42+3295-0x1c21);s=sizeof(zte_sms_GSMDefault_To_UCS2_Table_Ex)/sizeof
+(zte_sms_GSMDefault_To_UCS2_Table_Ex[(0xf25+1545-0x152e)]);for(i=
+(0x1c21+133-0x1ca6);i<len;i++){j=gsmdef[i];if(j==(0x1598+122-0x15f7)){i++;for(p=
+(0x1695+1573-0x1cba);p<s;p++){if(zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0xb0a+1482-0x10d4)]==gsmdef[i]){ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table_Ex[p][
+(0x26d9+12-0x26e4)]>>(0x13ea+255-0x14e1);k++;ucs2[k]=(unsigned char)(
+zte_sms_GSMDefault_To_UCS2_Table_Ex[p][(0x348+5173-0x177c)]);is_find=
+(0x1dc9+1100-0x2214);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]>>(0x135a+699-0x160d)
+,gsmdef[i]);i--;ucs2[k]=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x927+3840-0x181f)
;k++;ucs2[k]=(unsigned char)(zte_sms_GSMDefault_To_UCS2_Table[j]);}}else{ucs2[k]
-=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x69c+220-0x770);k++;ucs2[k]=(unsigned
-char)(zte_sms_GSMDefault_To_UCS2_Table[j]);}k++;}ucs2[k]='\0';return k;}void
+=zte_sms_GSMDefault_To_UCS2_Table[j]>>(0x11d4+1293-0x16d9);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[(0x8f6+4605-0x1af1)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
-(0xd32+5012-0x20c5)]={(0x110a+981-0x14df)};UINT16 len=(0xc1a+3592-0x1a22);switch
-(g_zUfiSms_Language){case DCS_PORTUGUESE:if(g_zUfiSms_IsLanguageShift==
+ascii_content[(0xb89+1369-0x10e0)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX+
+(0xe33+4112-0x1e42)]={(0x131d+953-0x16d6)};UINT16 len=(0xb4+6825-0x1b5d);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
@@ -670,47 +669,47 @@
sms_len);break;}(void)zUfiSms_DispatchWtoi((char*)ascii_content,len,(char*)
out_content);}boolean zUfiSms_DecodeContent(char*msg_content,UINT16 sms_len,
boolean isEsc,char*out_content){boolean endEsc=FALSE;char*p=NULL;static char
-data[(0x698+2868-0x11cb)+(0x156+6257-0x1927)+(0x1303+795-0x161d)]={
-(0x1188+2273-0x1a69)};int len=(0x1421+4592-0x2611);if(msg_content==NULL||
-out_content==NULL||sms_len>(0x22e7+142-0x2235)||sms_len<(0x1801+1562-0x1e19)){
-return endEsc;}len=sms_len;memset(data,(0x189f+2909-0x23fc),(0x20d1+437-0x21e4))
-;p=data;if(isEsc){*p=(0x17e4+785-0x1ada);p++;}zUfiSms_Str2Bytes((unsigned char*)
-msg_content,len,(unsigned char*)p,(0x1110+1079-0x14a7));if(p[len/
-(0x28d+6388-0x1b7f)-(0x10e7+5470-0x2644)]==(0xc41+2859-0x1751)){endEsc=TRUE;}
-zUfiSms_ConvertUcs2(data,len/(0x1563+2384-0x1eb1)+(isEsc?(0x44b+7939-0x234d):
-(0x36+5165-0x1463))-(endEsc?(0x67a+505-0x872):(0x1a04+922-0x1d9e)),out_content);
-return endEsc;}byte*zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){byte buf[
-(0xae0+6779-0x253a)],c;int n;n=sizeof(buf)-(0x6c2+945-0xa72);buf[n]='\0';do{c=(
-byte)(v%r);if(n<=(0xcb3+6367-0x2592)){printf(
+data[(0x42c+774-0x731)+(0x5b9+4860-0x1815)+(0x8d5+6737-0x2325)]={
+(0x2b8+9145-0x2671)};int len=(0x647+2948-0x11cb);if(msg_content==NULL||
+out_content==NULL||sms_len>(0x77f+7009-0x21a0)||sms_len<(0x757+2423-0x10cc)){
+return endEsc;}len=sms_len;memset(data,(0x777+1709-0xe24),(0x5d5+4851-0x1826));p
+=data;if(isEsc){*p=(0x1a1+152-0x21e);p++;}zUfiSms_Str2Bytes((unsigned char*)
+msg_content,len,(unsigned char*)p,(0x15af+3254-0x21c5));if(p[len/
+(0xe62+6073-0x2619)-(0x8a1+2742-0x1356)]==(0x524+4548-0x16cd)){endEsc=TRUE;}
+zUfiSms_ConvertUcs2(data,len/(0x7e1+1230-0xcad)+(isEsc?(0x5b+1548-0x666):
+(0x22fb+929-0x269c))-(endEsc?(0x1216+4775-0x24bc):(0xe91+1723-0x154c)),
+out_content);return endEsc;}byte*zUfiSms_SmsiUtilitoa(uint32 v,byte*s,UINT16 r){
+byte buf[(0x241c+334-0x2549)],c;int n;n=sizeof(buf)-(0xa90+5584-0x205f);buf[n]=
+'\0';do{c=(byte)(v%r);if(n<=(0x1787+658-0x1a19)){printf(
"\x4f\x56\x45\x52\x46\x4c\x4f\x57\x20");break;}buf[--n]=(byte)((c>
-(0x4bf+6094-0x1c84))?c+((char)(0x222+5903-0x18f0))-(0x45c+913-0x7e3):c+
-((char)(0x1a1c+2772-0x24c0)));}while((v/=r)>(0xfa1+4182-0x1ff7));while((*s++=buf
-[n++])!=(0x6cb+2686-0x1149));return(s-(0x48f+2391-0xde5));}byte*
+(0xddd+1933-0x1561))?c+((char)(0x18e7+3246-0x2554))-(0xc6c+1218-0x1124):c+
+((char)(0x1030+5139-0x2413)));}while((v/=r)>(0x949+4453-0x1aae));while((*s++=buf
+[n++])!=(0x1902+2205-0x219f));return(s-(0xbe7+6697-0x260f));}byte*
zUfiSms_SmsiAddrToStr(wms_address_s_type addr,byte*res_ptr,UINT8*type_of_addr){
-byte bcd_idx=(0x68b+3516-0x1447);UINT8 temp=(0x1c41+2119-0x2488);*type_of_addr=
-(0x2305+937-0x26ae);temp=(UINT8)((uint32)addr.number_type&(0x1b6a+1120-0x1fc3));
-*type_of_addr=(UINT8)((*type_of_addr|temp)<<(0x5c0+7294-0x223a));temp=(UINT8)((
-uint32)addr.number_plan&(0x14a+144-0x1d3));*type_of_addr=*type_of_addr|temp;*
-type_of_addr=*type_of_addr|(0x1107+5733-0x26ec);while(bcd_idx<addr.
-number_of_digits){if(addr.digits[bcd_idx]==(0x54a+8565-0x26b5)){addr.digits[
-bcd_idx]=(0x7c6+7575-0x255d);}res_ptr=zUfiSms_SmsiUtilitoa((uint32)addr.digits[
-bcd_idx],res_ptr,(0xf9b+4126-0x1fa9));bcd_idx++;}return res_ptr;}byte*
+byte bcd_idx=(0xc1+7326-0x1d5f);UINT8 temp=(0x115+3961-0x108e);*type_of_addr=
+(0x146f+2548-0x1e63);temp=(UINT8)((uint32)addr.number_type&(0x791+5393-0x1c9b));
+*type_of_addr=(UINT8)((*type_of_addr|temp)<<(0x152d+1237-0x19fe));temp=(UINT8)((
+uint32)addr.number_plan&(0x946+6457-0x2278));*type_of_addr=*type_of_addr|temp;*
+type_of_addr=*type_of_addr|(0x168f+2814-0x210d);while(bcd_idx<addr.
+number_of_digits){if(addr.digits[bcd_idx]==(0x170f+2696-0x218d)){addr.digits[
+bcd_idx]=(0xcc6+1555-0x12d9);}res_ptr=zUfiSms_SmsiUtilitoa((uint32)addr.digits[
+bcd_idx],res_ptr,(0x20fa+107-0x2155));bcd_idx++;}return res_ptr;}byte*
zUfiSms_SmsiUtilitoaFill(word v,byte*rb_ptr){int n;byte c,*ptr;ptr=rb_ptr+
-(0x3ac+314-0x4e4);*ptr='\0';for(n=(0x668+448-0x828);n<(0xbf1+1677-0x127c);++n){c
-=(byte)(v%(0x4b+4999-0x13c8));v/=(0xe15+3029-0x19e0);*--ptr=(c+
-((char)(0xa38+1102-0xe56)));}return rb_ptr+(0x1709+3856-0x2617);}void
-zUfiSms_SprintfTime(char*str_time,int len,int t){if(t<(0x11d0+2470-0x1b6c)){
+(0x1402+2314-0x1d0a);*ptr='\0';for(n=(0xc59+4801-0x1f1a);n<(0x5a7+3915-0x14f0);
+++n){c=(byte)(v%(0x12f9+1381-0x1854));v/=(0x1b4b+18-0x1b53);*--ptr=(c+
+((char)(0x14a6+3406-0x21c4)));}return rb_ptr+(0x916+4225-0x1995);}void
+zUfiSms_SprintfTime(char*str_time,int len,int t){if(t<(0x1313+3047-0x1ef0)){
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=(0x1c16+598-0x1e6c);concat_8->seq_num--;
+T_zUfiSms_DbStoreData*db_data){int mux=(0x6d4+2613-0x1109);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=(0x2114+755-0x2406);db_data->concat_info[(0x544+6121-0x1d2d)
-]=(0x16b3+2141-0x1e11)*mux+concat_8->msg_ref;db_data->concat_info[
-(0x135c+724-0x162e)]=concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+
-(0x767+5005-0x1af3);db_data->concat_info[(0x7e8+2346-0x1111)]=concat_8->total_sm
--ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>ZTE_WMS_CONCAT_SMS_COUNT_MAX-
-(0x26c+1611-0x8b6)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(concat_8->total_sm%
+db_data->concat_sms=(0x8c7+360-0xa2e);db_data->concat_info[(0x238+8610-0x23da)]=
+(0x156d+1823-0x1b8d)*mux+concat_8->msg_ref;db_data->concat_info[
+(0x1a41+2796-0x252b)]=concat_8->seq_num%ZTE_WMS_CONCAT_SMS_COUNT_MAX+
+(0x12e8+4877-0x25f4);db_data->concat_info[(0x2107+1006-0x24f4)]=concat_8->
+total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>ZTE_WMS_CONCAT_SMS_COUNT_MAX-
+(0xf1c+5337-0x23f4)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(concat_8->total_sm%
ZTE_WMS_CONCAT_SMS_COUNT_MAX);}static void zUfiSms_ParserLangSs(wms_udh_s_type*
user_data_header){if(user_data_header==NULL){return;}switch(user_data_header->u.
nat_lang_ss.nat_lang_id){case WMS_UDH_NAT_LANG_PORTUGUESE:g_zUfiSms_Language=
@@ -719,27 +718,27 @@
user_data_header->u.nat_lang_ss.nat_lang_id){case WMS_UDH_NAT_LANG_PORTUGUESE:
g_zUfiSms_Language=DCS_PORTUGUESE;break;default:break;}}static void
zUfiSms_ParseDeliverConcat16(T_zUfiSms_UdhConcat16*concat_16,
-T_zUfiSms_DbStoreData*db_data){int mux=(0xb43+5830-0x2209);concat_16->seq_num--;
-db_data->concat_sms=(0x1f7+4593-0x13e7);
-#if (0xe5d+2937-0x19d6)
-db_data->concat_info[(0x45a+3547-0x1235)]=concat_16->msg_ref;db_data->
-concat_info[(0x1a67+2772-0x253a)]=concat_16->total_sm;db_data->concat_info[
-(0x16e6+722-0x19b6)]=concat_16->seq_num;
+T_zUfiSms_DbStoreData*db_data){int mux=(0xe5c+1660-0x14d8);concat_16->seq_num--;
+db_data->concat_sms=(0xe1f+655-0x10ad);
+#if (0x34+3353-0xd4d)
+db_data->concat_info[(0x93c+5435-0x1e77)]=concat_16->msg_ref;db_data->
+concat_info[(0xc0d+4559-0x1ddb)]=concat_16->total_sm;db_data->concat_info[
+(0xe85+2011-0x165e)]=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[(0x331+7569-0x20c2)]=(0xf99+4470-0x2010)*mux+concat_16->
-msg_ref;db_data->concat_info[(0xee2+2273-0x17c1)]=concat_16->seq_num%
-ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x2f9+8660-0x24cc);db_data->concat_info[
-(0x5a9+5166-0x19d6)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
-ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x263f+116-0x26b2)?ZTE_WMS_CONCAT_SMS_COUNT_MAX:(
+db_data->concat_info[(0x1ee0+490-0x20ca)]=(0x1a10+848-0x1c61)*mux+concat_16->
+msg_ref;db_data->concat_info[(0x992+6338-0x2252)]=concat_16->seq_num%
+ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x6f+1534-0x66c);db_data->concat_info[
+(0xe97+5453-0x23e3)]=concat_16->total_sm-ZTE_WMS_CONCAT_SMS_COUNT_MAX*mux>
+ZTE_WMS_CONCAT_SMS_COUNT_MAX-(0x23d+9336-0x26b4)?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=
-(0x14c4+3443-0x2236);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8)
-,db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0x856+919-0xbec);
+(0x11f6+4979-0x2568);zUfiSms_ParseDeliverConcat8(&(user_data_header->u.concat_8)
+,db_data);break;case WMS_UDH_CONCAT_16:db_data->concat_sms=(0x315+3041-0xef5);
zUfiSms_ParseDeliverConcat16(&(user_data_header->u.concat_16),db_data);break;
case WMS_UDH_NAT_LANG_SS:g_zUfiSms_IsLanguageShift=WMS_UDH_NAT_LANG_SS;
zUfiSms_ParserLangSs(user_data_header);break;case WMS_UDH_NAT_LANG_LS:
@@ -749,154 +748,156 @@
);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=(0x673+2141-0xed0);int ind=(0x14ef+4159-0x252e);if((
-NULL==ts_data_ptr)||(NULL==db_data)){printf(
+WMS_GW_ALPHABET_MAX32;int i=(0x1044+3085-0x1c51);int ind=(0x10cc+3353-0x1de5);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,
-(0xe61+6105-0x263a),ZTE_WMS_ADDRESS_LEN_MAX+(0x882+7049-0x240a));db_data->number
-[(0x1f89+305-0x20ba)]=((char)(0x1c7a+1253-0x2134));for(i=(0x90c+7566-0x269a);i<
-address_ptr->number_of_digits;i++){if((0xd92+4173-0x1dd5)==address_ptr->digits[i
-]){db_data->number[i+(0x41b+3674-0x1274)]=((char)(0x225c+1154-0x26ae));}else{
-db_data->number[i+(0x1dc+8525-0x2328)]=((char)(0x411+8391-0x24a8))+address_ptr->
+(0x1492+736-0x1772),ZTE_WMS_ADDRESS_LEN_MAX+(0x782+6081-0x1f42));db_data->number
+[(0x11bf+600-0x1417)]=((char)(0x1c2c+1596-0x223d));for(i=(0x432+6671-0x1e41);i<
+address_ptr->number_of_digits;i++){if((0x3ba+1987-0xb73)==address_ptr->digits[i]
+){db_data->number[i+(0x16e2+1400-0x1c59)]=((char)(0x950+7606-0x26d6));}else{
+db_data->number[i+(0x5b9+6408-0x1ec0)]=((char)(0x15b+4413-0x1268))+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[
-(0x11d8+5381-0x26dc)]),address_ptr->digits,address_ptr->number_of_digits);}else{
-for(i=(0x756+6754-0x21b8);i<address_ptr->number_of_digits;i++){if(
-(0x1742+863-0x1a97)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0x5e7+2397-0xf14));}else{db_data->number[i]=((char)(0x48a+2477-0xe07))+
-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=(0x374+6607-0x1d42);}
-else{db_data->tp_udhi=(0x415+865-0x776);}if(db_data->tp_udhi==
-(0x11e5+4607-0x23e3)){for(ind=(0x1a1a+183-0x1ad1);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[(0x2d3+5010-0x1664)]){printf(
+(0x79f+4325-0x1883)]),address_ptr->digits,address_ptr->number_of_digits);}else{
+for(i=(0xc2f+5748-0x22a3);i<address_ptr->number_of_digits;i++){if(
+(0x66d+1387-0xbce)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0x191+6119-0x1948));}else{db_data->number[i]=
+((char)(0x1ac9+2677-0x250e))+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=(0x13eb+1908-0x1b5e);}else{db_data->
+tp_udhi=(0x5f2+169-0x69b);}if(db_data->tp_udhi==(0x3a3+4024-0x135a)){for(ind=
+(0xc13+139-0xc9e);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[
+(0x11a1+1702-0x1846)]){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[(0x123a+2771-0x1d0c)],ZTE_WMS_CONCAT_SMS_COUNT_MAX);if(
+,db_data->concat_info[(0x195c+3425-0x26bc)],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)
-(0x13fb+368-0x156a);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
-unsigned char)(0x923+6273-0x21a2);}else{printf(
+WMS_GW_ALPHABET_8_BIT>=tp_dcs){db_data->tp_dcs=(unsigned char)(0x975+978-0xd46);
+}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(unsigned char)
+(0x1ea3+1377-0x2402);}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=(0x704+6097-0x1ed5);ind<ts_data_ptr->u.
-gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[(0x13f+49-0x16c)*
-ind]=((char)(0xef+7924-0x1fb3));db_data->sms_content[(0x11a9+45-0x11d2)*ind+
-(0x20f0+722-0x23c1)]=((char)(0x764+1509-0xd19));db_data->sms_content[
-(0xc77+4443-0x1dce)*ind+(0x4da+332-0x624)]=g_zUfiSms_DigAscMap[((ts_data_ptr->u.
-gw_pp.u.deliver.user_data.sm_data[ind]&(0x1bf+5070-0x149d))>>(0x8e1+453-0xaa2))]
-;db_data->sms_content[(0x951+5944-0x2085)*ind+(0xa5a+4564-0x1c2b)]=
-g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data[ind]&
-(0x6fa+4431-0x183a))];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)
-(0x2e7+2723-0xd88);}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=(0x1590+1549-0x1b9d);int ind=(0x1206+2377-0x1b4f);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((
+alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x16a3+3868-0x25bf);ind<ts_data_ptr->u
+.gw_pp.u.deliver.user_data.sm_len;ind++){db_data->sms_content[
+(0x1003+3440-0x1d6f)*ind]=((char)(0x1301+3109-0x1ef6));db_data->sms_content[
+(0x101a+3108-0x1c3a)*ind+(0x1407+2782-0x1ee4)]=((char)(0x255d+351-0x268c));
+db_data->sms_content[(0x64d+4614-0x184f)*ind+(0x214+2735-0xcc1)]=
+g_zUfiSms_DigAscMap[((ts_data_ptr->u.gw_pp.u.deliver.user_data.sm_data[ind]&
+(0x293+3471-0xf32))>>(0xcf9+5533-0x2292))];db_data->sms_content[
+(0x1d65+540-0x1f7d)*ind+(0x3ad+6772-0x1e1e)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u
+.gw_pp.u.deliver.user_data.sm_data[ind]&(0x133+8868-0x23c8))];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)(0xaea+6436-0x240c);}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=
+(0x14ec+1485-0x1ab9);int ind=(0x1292+830-0x15d0);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[
-(0x1147+5177-0x2580)]=((char)(0x886+110-0x8c9));for(i=(0x11+6289-0x18a2);i<
-address_ptr->number_of_digits;i++){if((0xd76+4460-0x1ed8)==address_ptr->digits[i
-]){db_data->number[i+(0x9eb+7452-0x2706)]=((char)(0x1a5f+2981-0x25d4));}else{
-db_data->number[i+(0x1fc5+1252-0x24a8)]=((char)(0x144+6584-0x1acc))+address_ptr
-->digits[i];}}}else{for(i=(0x5d6+3135-0x1215);i<address_ptr->number_of_digits;i
-++){if((0xc50+1670-0x12cc)==address_ptr->digits[i]){db_data->number[i]=
-((char)(0xc67+6636-0x2623));}else{db_data->number[i]=((char)(0x339+1473-0x8ca))+
-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)(0x276+1791-0x974)
-;}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(unsigned char)
-(0x384+3130-0xfbc);}else{printf(
+(0x1dda+2188-0x2666)]=((char)(0xb68+4805-0x1e02));for(i=(0x546+6984-0x208e);i<
+address_ptr->number_of_digits;i++){if((0x5bf+4847-0x18a4)==address_ptr->digits[i
+]){db_data->number[i+(0x18ca+158-0x1967)]=((char)(0xbc4+4691-0x1de7));}else{
+db_data->number[i+(0x878+41-0x8a0)]=((char)(0x853+6822-0x22c9))+address_ptr->
+digits[i];}}}else{for(i=(0x26+2982-0xbcc);i<address_ptr->number_of_digits;i++){
+if((0xd99+3225-0x1a28)==address_ptr->digits[i]){db_data->number[i]=
+((char)(0x12c4+4200-0x22fc));}else{db_data->number[i]=
+((char)(0x1c70+2452-0x25d4))+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)
+(0x61d+7012-0x2180);}else if(WMS_GW_ALPHABET_UCS2==tp_dcs){db_data->tp_dcs=(
+unsigned char)(0xa8+8464-0x21b6);}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=
-(0xb44+3935-0x1aa2);}else{db_data->tp_udhi=(0x12bc+3281-0x1f8d);}if(db_data->
-tp_udhi==(0x3ca+8390-0x248f)){for(ind=(0x12c7+4504-0x245f);ind<ts_data_ptr->u.
+(0x1560+3528-0x2327);}else{db_data->tp_udhi=(0x779+7924-0x266d);}if(db_data->
+tp_udhi==(0x140f+262-0x1514)){for(ind=(0xc7f+3643-0x1aba);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[(0x775+2551-0x116b)]){printf(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<db_data->concat_info[(0x549+6819-0x1feb)]){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=(0x1785+3338-0x248f)
-;ind<ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len;ind++){db_data->sms_content[
-(0xdad+4605-0x1fa6)*ind]=((char)(0xa11+2718-0x147f));db_data->sms_content[
-(0x276+5574-0x1838)*ind+(0x909+6489-0x2261)]=((char)(0x1be0+2076-0x23cc));
-db_data->sms_content[(0x941+7151-0x252c)*ind+(0x2a7+5276-0x1741)]=
-g_zUfiSms_DigAscMap[((ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&
-(0x19a6+2184-0x213e))>>(0x1910+1990-0x20d2))];db_data->sms_content[
-(0x729+3331-0x1428)*ind+(0x12e5+3973-0x2267)]=g_zUfiSms_DigAscMap[(ts_data_ptr->
-u.gw_pp.u.submit.user_data.sm_data[ind]&(0x75c+2401-0x10ae))];db_data->alphabet=
+gw_pp.u.submit.dcs.alphabet==WMS_GW_ALPHABET_8_BIT){for(ind=(0x2405+140-0x2491);
+ind<ts_data_ptr->u.gw_pp.u.submit.user_data.sm_len;ind++){db_data->sms_content[
+(0x11c9+5440-0x2705)*ind]=((char)(0xeb6+1342-0x13c4));db_data->sms_content[
+(0xad+3672-0xf01)*ind+(0x1339+3332-0x203c)]=((char)(0xd38+6312-0x25b0));db_data
+->sms_content[(0xd08+6352-0x25d4)*ind+(0x86c+6847-0x2329)]=g_zUfiSms_DigAscMap[(
+(ts_data_ptr->u.gw_pp.u.submit.user_data.sm_data[ind]&(0x2a7+7611-0x1f72))>>
+(0x3d1+4325-0x14b2))];db_data->sms_content[(0xb49+259-0xc48)*ind+
+(0x133d+662-0x15d0)]=g_zUfiSms_DigAscMap[(ts_data_ptr->u.gw_pp.u.submit.
+user_data.sm_data[ind]&(0x7f9+7324-0x2486))];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)(0x17f2+1391-0x1d5f);}return result;}int InvertNumbers(
+tp_dcs=(unsigned char)(0x8b5+6218-0x20fd);}return result;}int InvertNumbers(
const char*pSrc,char*pDst,int nSrcLength){int nDstLength;char ch;int i=
-(0xe7a+2985-0x1a23);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x13cc+1674-0x1a56)){
-return-(0x25d+1134-0x6ca);}nDstLength=nSrcLength;for(i=(0x1094+5257-0x251d);i<
-nSrcLength;i+=(0x724+1411-0xca5)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
-nSrcLength&(0xa48+1880-0x119f)){*(pDst-(0x4d+6090-0x1815))=
-((char)(0x1216+114-0x1242));nDstLength++;}*pDst='\0';return nDstLength;}int
+(0x19f1+1377-0x1f52);if(pSrc==NULL||pDst==NULL||nSrcLength<(0x21b5+196-0x2279)){
+return-(0x1fe2+1087-0x2420);}nDstLength=nSrcLength;for(i=(0x1e3b+613-0x20a0);i<
+nSrcLength;i+=(0x953+1937-0x10e2)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(
+nSrcLength&(0x200+3464-0xf87)){*(pDst-(0x12+2942-0xb8e))=
+((char)(0x1ad+2924-0xcd3));nDstLength++;}*pDst='\0';return nDstLength;}int
code_is_gsm7(const SMS_PARAM*pSrc,unsigned char buf[],int nLength){if(pSrc->
-TP_UDHI==(0x1021+2486-0x19d6)){buf[(0x197a+3050-0x2561)]=(unsigned char)nLength;
-buf[(0xd4f+1229-0x1218)]=(unsigned char)pSrc->TP_UD[(0x5c8+1860-0xd0c)];buf[
-(0xc51+3267-0x190f)]=(0xebb+1149-0x1338);buf[(0x1c44+1215-0x20fd)]=(unsigned
-char)pSrc->TP_UD[(0x1172+123-0x11eb)];buf[(0x942+5946-0x2075)]=(unsigned char)
-pSrc->TP_UD[(0x8dd+2159-0x1149)];buf[(0x2c0+3001-0xe71)]=(unsigned char)pSrc->
-TP_UD[(0x33b+2515-0xd0a)];buf[(0xdc5+4775-0x2063)]=(unsigned char)pSrc->TP_UD[
-(0x65+4015-0x100f)];buf[(0x1b59+2804-0x2643)]=(unsigned char)pSrc->TP_UD[
-(0xcd2+3158-0x1921)];buf[(0xd0c+1299-0x1215)]=(unsigned char)(buf[
-(0xadd+6319-0x2382)]<<(0x14fc+1936-0x1c8b));nLength=nLength-(0x35d+5551-0x1905);
-nLength=Encode7bit(&(pSrc->TP_UD[(0xf8+2176-0x970)]),&buf[(0x1695+225-0x176b)],
-nLength+(0x1969+3399-0x26af))+(0x13b4+3968-0x2330)+(0x32b+1096-0x76d);
-#if (0x131f+2009-0x1af8)
-nLength+=(0x961+6179-0x2182);
+TP_UDHI==(0x426+891-0x7a0)){buf[(0xc33+3433-0x1999)]=(unsigned char)nLength;buf[
+(0x457+2518-0xe29)]=(unsigned char)pSrc->TP_UD[(0x1c4+1519-0x7b3)];buf[
+(0x1c07+145-0x1c93)]=(0xa53+4558-0x1c21);buf[(0xe91+2295-0x1782)]=(unsigned char
+)pSrc->TP_UD[(0x12db+3070-0x1ed7)];buf[(0xf5d+2870-0x1a8c)]=(unsigned char)pSrc
+->TP_UD[(0x1483+4171-0x24cb)];buf[(0x1447+3918-0x238d)]=(unsigned char)pSrc->
+TP_UD[(0xc13+1439-0x11ae)];buf[(0x25+5204-0x1470)]=(unsigned char)pSrc->TP_UD[
+(0x1c+3556-0xdfb)];buf[(0x1964+3365-0x267f)]=(unsigned char)pSrc->TP_UD[
+(0x1c04+2243-0x24c0)];buf[(0x1632+1345-0x1b69)]=(unsigned char)(buf[
+(0xcd+9779-0x26f6)]<<(0x1ccf+516-0x1ed2));nLength=nLength-(0x880+625-0xaea);
+nLength=Encode7bit(&(pSrc->TP_UD[(0x768+3740-0x15fc)]),&buf[(0xeb3+5142-0x22be)]
+,nLength+(0x1a4d+952-0x1e04))+(0xe52+856-0x11a6)+(0x88+5190-0x14c8);
+#if (0x13ad+918-0x1743)
+nLength+=(0x879+6845-0x2334);
#endif
-}else{nLength=pSrc->TP_UDLength;buf[(0xff4+2729-0x1a9a)]=nLength;nLength=
-Encode7bit(pSrc->TP_UD,&buf[(0x18e3+2318-0x21ed)],nLength+(0xaf0+5222-0x1f55))+
-(0x139c+516-0x159c);}at_print(LOG_DEBUG,
+}else{nLength=pSrc->TP_UDLength;buf[(0x1f2c+1034-0x2333)]=nLength;nLength=
+Encode7bit(pSrc->TP_UD,&buf[(0x130+1806-0x83a)],nLength+(0xc81+4430-0x1dce))+
+(0xdbd+1984-0x1579);}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==(0x1e5c+2018-0x263d)){buf[
-(0x1739+727-0x1a0d)]=(unsigned char)nLength;buf[(0x83f+4376-0x1953)]=(unsigned
-char)pSrc->TP_UD[(0x6f+4246-0x1105)];buf[(0x5e4+4439-0x1736)]=
-(0x1504+469-0x16d9);buf[(0x971+5135-0x1d7a)]=(unsigned char)pSrc->TP_UD[
-(0x344+8017-0x2293)];buf[(0xea9+1095-0x12e9)]=(unsigned char)pSrc->TP_UD[
-(0x4b+1173-0x4dd)];buf[(0x154b+4399-0x2672)]=(unsigned char)pSrc->TP_UD[
-(0x1ec0+1382-0x2422)];buf[(0x1803+575-0x1a39)]=(unsigned char)pSrc->TP_UD[
-(0xbaf+3209-0x1833)];buf[(0x1017+1363-0x1567)]=(unsigned char)(EncodeUcs2(&(pSrc
-->TP_UD[(0x4e1+1382-0xa41)]),&buf[(0x11a+8981-0x2425)],nLength-(0xd+7502-0x1d55)
-)+(0x64d+6185-0x1e70));nLength=buf[(0xb8c+2657-0x15ea)]+(0x798+2530-0x1176);}
-else{buf[(0xde8+4785-0x2096)]=EncodeUcs2(pSrc->TP_UD,&buf[(0xab1+3531-0x1878)],
-nLength);nLength=buf[(0x171+3140-0xdb2)]+(0x87a+7433-0x257f);}return nLength;}
-int Encode8bit(const char*pSrc,unsigned char*pDst,int nSrcLength){if(pSrc==NULL
-||pDst==NULL||nSrcLength<(0x538+3618-0x135a)){return-(0x1b35+376-0x1cac);}memcpy
-(pDst,pSrc,nSrcLength);return nSrcLength;}int EncodePdu_Submit(const SMS_PARAM*
-pSrc,char*pDst){int nLength=(0xc85+881-0xff6);int nDstLength=(0x1b27+962-0x1ee9)
-;unsigned char buf[(0xf5d+4533-0x2012)]={(0x86f+2312-0x1177)};char tmpSCA[
-(0xd45+5645-0x232e)]={(0x2084+1219-0x2547)};int check_udl=(0x70c+551-0x933);
-memset(tmpSCA,(0x464+2166-0xcda),sizeof(tmpSCA));if(pSrc==NULL||pDst==NULL){
-return-(0x5a1+4212-0x1614);}
-#if (0x85d+1494-0xe32)
+strlen(pSrc->TP_UD);if(pSrc->TP_UDHI==(0x14c3+805-0x17e7)){buf[
+(0x4e0+3289-0x11b6)]=(unsigned char)nLength;buf[(0xd4b+6419-0x265a)]=(unsigned
+char)pSrc->TP_UD[(0x13e1+3514-0x219b)];buf[(0x636+7537-0x23a2)]=
+(0xb5f+5242-0x1fd9);buf[(0xd07+5926-0x2427)]=(unsigned char)pSrc->TP_UD[
+(0x1fc+8527-0x2349)];buf[(0x262b+168-0x26cc)]=(unsigned char)pSrc->TP_UD[
+(0x12a9+4450-0x2408)];buf[(0x44f+2537-0xe30)]=(unsigned char)pSrc->TP_UD[
+(0x857+3494-0x15f9)];buf[(0x73a+3865-0x164a)]=(unsigned char)pSrc->TP_UD[
+(0x382+8815-0x25ec)];buf[(0x581+3758-0x142c)]=(unsigned char)(EncodeUcs2(&(pSrc
+->TP_UD[(0x3e5+7014-0x1f45)]),&buf[(0xfdc+4629-0x21e7)],nLength-
+(0x3b5+5711-0x19fe))+(0x7a0+4087-0x1791));nLength=buf[(0x202+6600-0x1bc7)]+
+(0x5c0+3197-0x1239);}else{buf[(0x3d8+8117-0x238a)]=EncodeUcs2(pSrc->TP_UD,&buf[
+(0x1397+1376-0x18f3)],nLength);nLength=buf[(0x1acc+921-0x1e62)]+
+(0xcdf+5002-0x2065);}return nLength;}int Encode8bit(const char*pSrc,unsigned
+char*pDst,int nSrcLength){if(pSrc==NULL||pDst==NULL||nSrcLength<
+(0x12fd+3244-0x1fa9)){return-(0x49f+1952-0xc3e);}memcpy(pDst,pSrc,nSrcLength);
+return nSrcLength;}int EncodePdu_Submit(const SMS_PARAM*pSrc,char*pDst){int
+nLength=(0x160b+3100-0x2227);int nDstLength=(0x1d4+2350-0xb02);unsigned char buf
+[(0xf65+1155-0x12e8)]={(0x4bd+4454-0x1623)};char tmpSCA[(0x27d+7602-0x200b)]={
+(0xd1c+3424-0x1a7c)};int check_udl=(0x46b+7435-0x2176);memset(tmpSCA,
+(0x5e9+8253-0x2626),sizeof(tmpSCA));if(pSrc==NULL||pDst==NULL){return-
+(0xa44+4385-0x1b64);}
+#if (0x1871+1041-0x1c81)
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(
@@ -907,394 +908,394 @@
"\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[(0x6e2+7394-0x23c4)]=(char)(((nLength)&
-(0x3c3+4392-0x14ea))==(0x1425+4003-0x23c8)?(nLength):nLength+(0xa17+6976-0x2556)
-)/(0x4e1+8215-0x24f6)+(0xfb1+1520-0x15a0);buf[(0xae4+3722-0x196d)]=
-(0x13bf+4049-0x230f);strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0x9c6+2265-0x129e)
-);if(!(strncmp(pSrc->SCA,"\x30\x30\x38\x36",(0x10ec+1680-0x1778)))){memset(
-tmpSCA,(0x18d4+2214-0x217a),sizeof(tmpSCA));nLength=nLength-(0x181+628-0x3f4);
-#if (0x1b5d+2637-0x25a9)
-nLength=nLength-(0x1f6c+85-0x1fc0);strncpy(tmpSCA,&(pSrc->SCA[
-(0x65b+6053-0x1dfe)]),sizeof(tmpSCA)-(0x1beb+2381-0x2537));
+nLength=strlen(pSrc->SCA);buf[(0x59c+633-0x815)]=(char)(((nLength)&
+(0x1570+491-0x175a))==(0x9bb+4809-0x1c84)?(nLength):nLength+(0x8d+6248-0x18f4))/
+(0x1f+7158-0x1c13)+(0xba8+1974-0x135d);buf[(0x9fd+5575-0x1fc3)]=
+(0x18c6+1305-0x1d5e);strncpy(tmpSCA,pSrc->SCA,sizeof(tmpSCA)-(0x242+8120-0x21f9)
+);if(!(strncmp(pSrc->SCA,"\x30\x30\x38\x36",(0x11cf+3853-0x20d8)))){memset(
+tmpSCA,(0x1af7+228-0x1bdb),sizeof(tmpSCA));nLength=nLength-(0xb8f+2194-0x1420);
+#if (0x17c+3382-0xeb1)
+nLength=nLength-(0x1309+1120-0x1768);strncpy(tmpSCA,&(pSrc->SCA[
+(0x19e4+554-0x1c0c)]),sizeof(tmpSCA)-(0x981+6884-0x2464));
#else
-tmpSCA[(0x1c9+5948-0x1905)]=((char)(0xe90+4527-0x2014));strcpy(&(tmpSCA[
-(0xa7c+4353-0x1b7c)]),&(pSrc->SCA[(0xae2+5081-0x1eb9)]));
+tmpSCA[(0x9aa+50-0x9dc)]=((char)(0x673+4025-0x1601));strcpy(&(tmpSCA[
+(0x1dc5+6-0x1dca)]),&(pSrc->SCA[(0x1362+4531-0x2513)]));
#endif
-buf[(0xe99+2591-0x18b8)]=(char)((nLength&(0x146+3080-0xd4d))==
-(0xb11+3548-0x18ed)?nLength:nLength+(0x1258+2453-0x1bec))/(0x748+6245-0x1fab)+
-(0x1662+3105-0x2282);buf[(0x24a0+317-0x25dc)]=(0xbb+344-0x182);}else if(
-((char)(0xdf1+336-0xf16))==pSrc->SCA[(0x37a+6839-0x1e31)]){memset(tmpSCA,
-(0x19c1+3301-0x26a6),sizeof(tmpSCA));
-#if (0xb55+2620-0x1590)
-nLength=nLength-(0x11c9+2708-0x1c5c);strncpy(tmpSCA,&(pSrc->SCA[
-(0x2318+722-0x25e9)]),sizeof(tmpSCA)-(0x1986+3081-0x258e));
+buf[(0x1950+1949-0x20ed)]=(char)((nLength&(0x148a+1173-0x191e))==
+(0x1188+608-0x13e8)?nLength:nLength+(0x1060+3899-0x1f9a))/(0xf80+4690-0x21d0)+
+(0x311+8342-0x23a6);buf[(0x3bb+2193-0xc4b)]=(0xea6+829-0x1152);}else if(
+((char)(0x937+4706-0x1b6e))==pSrc->SCA[(0x2341+546-0x2563)]){memset(tmpSCA,
+(0xa0a+5034-0x1db4),sizeof(tmpSCA));
+#if (0x229+3650-0x106a)
+nLength=nLength-(0x36a+4878-0x1677);strncpy(tmpSCA,&(pSrc->SCA[
+(0x1ef3+128-0x1f72)]),sizeof(tmpSCA)-(0xa9+628-0x31c));
#else
strcpy(tmpSCA,pSrc->SCA);
#endif
-buf[(0xdcd+1321-0x12f6)]=(char)((nLength&(0x4a6+3858-0x13b7))==
-(0xda2+3664-0x1bf2)?(nLength):nLength+(0x8b7+3953-0x1827))/(0x13f1+2314-0x1cf9)+
-(0x15ac+1624-0x1c03);buf[(0x1b19+2265-0x23f1)]=(0xc4d+1880-0x1314);}
-#if (0xb+4487-0x1191)
+buf[(0xb2a+6671-0x2539)]=(char)((nLength&(0x1bb+1104-0x60a))==
+(0x2646+177-0x26f7)?(nLength):nLength+(0xdfa+5181-0x2236))/(0xcf4+1291-0x11fd)+
+(0x5d3+6040-0x1d6a);buf[(0x96b+7384-0x2642)]=(0xc04+3903-0x1ab2);}
+#if (0x3ac+6814-0x1e49)
printf(
"\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x70\x64\x73\x74\x32\x3a\x25\x73" "\n",
pDst);
#endif
-if(nLength<(0x1299+159-0x1337)||nLength>=sizeof(tmpSCA))return-
-(0xf09+2567-0x190f);nDstLength=Bytes2String(buf,pDst,(0x1500+517-0x1703));
+if(nLength<(0xbc1+1115-0x101b)||nLength>=sizeof(tmpSCA))return-
+(0xa6+5077-0x147a);nDstLength=Bytes2String(buf,pDst,(0xb54+2717-0x15ef));
nDstLength+=InvertNumbers(tmpSCA,&pDst[nDstLength],nLength);
-#if (0xc38+1548-0x1243)
+#if (0x1485+3269-0x2149)
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[(0xec9+4567-0x20a0)]==((char)(0x342+2826-0xe21))){nLength=strlen(&(
-pSrc->TPA[(0x1410+4759-0x26a6)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
-TP_UDHI==(0x734+4664-0x196c)){if(pSrc->TP_SRR==(0x10fa+1376-0x165a)){buf[
-(0x40f+148-0x4a3)]=(0xd7d+2030-0x155a);}if(pSrc->TP_SRR==(0x485+954-0x83e)){buf[
-(0x79f+7318-0x2435)]=(0x2e2+3906-0x11f3);}}if(pSrc->TP_UDHI==(0x5c3+494-0x7b0)){
-if(pSrc->TP_SRR==(0xa7+5065-0x1470)){buf[(0x550+6911-0x204f)]=
-(0xa5b+5710-0x2058);}if(pSrc->TP_SRR==(0x1444+1296-0x1953)){buf[
-(0x3c4+8128-0x2384)]=(0x1af9+2612-0x24bc);}}buf[(0x124d+3035-0x1e27)]=
-(0x100+5244-0x157c);buf[(0x51c+554-0x744)]=(char)nLength;if(pSrc->TPA[
-(0x25e8+53-0x261d)]==((char)(0x8ef+493-0xab1))){buf[(0x11e5+2960-0x1d72)]=
-(0x16da+1106-0x1a9b);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
-(0x570+7885-0x2439));nDstLength+=InvertNumbers(&(pSrc->TPA[(0x12f8+944-0x16a7)])
-,&pDst[nDstLength],nLength);}else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",
-(0x147+1909-0x8b8)))){buf[(0x335+1127-0x79a)]=(char)nLength-(0x18+4648-0x123e);
-buf[(0xfe4+1350-0x1527)]=(0xb74+5338-0x1fbd);nDstLength+=Bytes2String(buf,&pDst[
-nDstLength],(0x211b+1423-0x26a6));nDstLength+=InvertNumbers(&(pSrc->TPA[
-(0xc38+1952-0x13d6)]),&pDst[nDstLength],nLength-(0xad2+1716-0x1184));}else{buf[
-(0x787+7997-0x26c1)]=(0x2415+478-0x2572);nDstLength+=Bytes2String(buf,&pDst[
-nDstLength],(0x1190+3827-0x207f));nDstLength+=InvertNumbers(pSrc->TPA,&pDst[
+if(pSrc->TPA[(0x1075+2669-0x1ae2)]==((char)(0x1435+1349-0x194f))){nLength=strlen
+(&(pSrc->TPA[(0xa7a+5789-0x2116)]));}else{nLength=strlen(pSrc->TPA);}if(pSrc->
+TP_UDHI==(0x77a+36-0x79e)){if(pSrc->TP_SRR==(0x13d0+2647-0x1e27)){buf[
+(0x48+7380-0x1d1c)]=(0x1f87+1005-0x2363);}if(pSrc->TP_SRR==(0x9ac+204-0xa77)){
+buf[(0xbb4+4143-0x1be3)]=(0xdf3+5727-0x2421);}}if(pSrc->TP_UDHI==
+(0x1f49+269-0x2055)){if(pSrc->TP_SRR==(0x1089+5540-0x262d)){buf[
+(0x16e6+3556-0x24ca)]=(0xefb+8-0xeb2);}if(pSrc->TP_SRR==(0x16dc+2201-0x1f74)){
+buf[(0xa1f+3036-0x15fb)]=(0x10a5+5556-0x25e8);}}buf[(0x1d18+754-0x2009)]=
+(0xad+3817-0xf96);buf[(0x869+7140-0x244b)]=(char)nLength;if(pSrc->TPA[
+(0x3eb+5053-0x17a8)]==((char)(0x128c+509-0x145e))){buf[(0xc3b+6680-0x2650)]=
+(0x647+1813-0xccb);nDstLength+=Bytes2String(buf,&pDst[nDstLength],
+(0x58f+8008-0x24d3));nDstLength+=InvertNumbers(&(pSrc->TPA[(0x1aba+1111-0x1f10)]
+),&pDst[nDstLength],nLength);}else if(!(strncmp(pSrc->TPA,"\x30\x30\x38\x36",
+(0x41c+8454-0x251e)))){buf[(0x38c+2772-0xe5e)]=(char)nLength-(0xeda+2700-0x1964)
+;buf[(0x3c0+7226-0x1ff7)]=(0x22ba+488-0x2411);nDstLength+=Bytes2String(buf,&pDst
+[nDstLength],(0xcb0+2483-0x165f));nDstLength+=InvertNumbers(&(pSrc->TPA[
+(0x14c9+2620-0x1f03)]),&pDst[nDstLength],nLength-(0x6d2+570-0x90a));}else{buf[
+(0x16c2+2435-0x2042)]=(0x416+405-0x52a);nDstLength+=Bytes2String(buf,&pDst[
+nDstLength],(0x728+1238-0xbfa));nDstLength+=InvertNumbers(pSrc->TPA,&pDst[
nDstLength],nLength);}
-#if (0xeb2+3109-0x1ad6)
+#if (0xcf+744-0x3b6)
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[(0xcd9+6661-0x26de)]=pSrc->TP_PID;buf[
-(0xacf+1795-0x11d1)]=pSrc->TP_DCS;buf[(0x296+391-0x41b)]=pSrc->TP_VP;if(pSrc->
+nLength=(int)pSrc->TP_UDLength;buf[(0x1df+6702-0x1c0d)]=pSrc->TP_PID;buf[
+(0x1bd4+1160-0x205b)]=pSrc->TP_DCS;buf[(0x516+1954-0xcb6)]=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==(0x8e3+491-0xacd)){buf[(0x17ef+3537-0x25bd)]=(unsigned
-char)nLength;buf[(0x16b2+864-0x1a0e)]=(unsigned char)pSrc->TP_UD[
-(0x190d+1027-0x1d10)];buf[(0x1bd9+312-0x1d0c)]=(0x4f0+5660-0x1b0c);buf[
-(0x5d3+3774-0x148b)]=(unsigned char)pSrc->TP_UD[(0x53f+7909-0x2422)];buf[
-(0x1a6b+3208-0x26ec)]=(unsigned char)pSrc->TP_UD[(0x9dd+3195-0x1655)];buf[
-(0xa48+6073-0x21f9)]=(unsigned char)pSrc->TP_UD[(0x1858+1895-0x1fbb)];buf[
-(0x1d5d+1397-0x22c9)]=(unsigned char)pSrc->TP_UD[(0xf45+5397-0x2455)];if(nLength
--(0x930+6494-0x2288)<=(0x33+8098-0x1fd5)||nLength-(0x18c9+2380-0x220f)>=sizeof(
-buf)-(0x9c0+6132-0x21aa))return-(0x3d2+2196-0xc65);buf[(0x73+2954-0xbfa)]=(
-unsigned char)(Encode8bit(&(pSrc->TP_UD[(0xd5a+5358-0x2242)]),&buf[
-(0x2046+1170-0x24ce)],(unsigned short)(nLength-(0x1c9d+2053-0x249c)))+
-(0xa36+4166-0x1a76));nLength=buf[(0x1443+2687-0x1ebf)]+(0xcac+1498-0x1282);}else
-{if(nLength<=(0x1c2d+1763-0x2310)||nLength>=sizeof(buf)-(0x9f9+2665-0x145e))
-return-(0x86b+5427-0x1d9d);buf[(0x9d+3413-0xdef)]=Encode8bit(pSrc->TP_UD,&buf[
-(0x303+3608-0x1117)],nLength);nLength=buf[(0x1ac1+1385-0x2027)]+
-(0x1f85+1411-0x2504);}}check_udl=nLength-(0x1229+4302-0x22f3);nDstLength+=
+TP_UD);if(pSrc->TP_UDHI==(0x66d+330-0x7b6)){buf[(0x669+2876-0x11a2)]=(unsigned
+char)nLength;buf[(0x16a+834-0x4a8)]=(unsigned char)pSrc->TP_UD[
+(0x32f+6009-0x1aa8)];buf[(0xb33+362-0xc98)]=(0xbcc+6626-0x25ae);buf[
+(0x4a2+3192-0x1114)]=(unsigned char)pSrc->TP_UD[(0x1fa+7629-0x1fc5)];buf[
+(0x129b+679-0x153b)]=(unsigned char)pSrc->TP_UD[(0x5b3+1267-0xaa3)];buf[
+(0x54+6487-0x19a3)]=(unsigned char)pSrc->TP_UD[(0x212+8964-0x2512)];buf[
+(0xcd8+6163-0x24e2)]=(unsigned char)pSrc->TP_UD[(0x14f+5251-0x15cd)];if(nLength-
+(0x92f+7075-0x24cc)<=(0x2ba+4902-0x15e0)||nLength-(0xdd+7725-0x1f04)>=sizeof(buf
+)-(0x11bc+1288-0x16ba))return-(0xcf7+3233-0x1997);buf[(0x254c+324-0x268d)]=(
+unsigned char)(Encode8bit(&(pSrc->TP_UD[(0x1e65+513-0x2060)]),&buf[
+(0x1e3+3299-0xebc)],(unsigned short)(nLength-(0x19c+2950-0xd1c)))+
+(0xa0c+4299-0x1ad1));nLength=buf[(0x24b+5483-0x17b3)]+(0x9ac+404-0xb3c);}else{if
+(nLength<=(0x1489+1376-0x19e9)||nLength>=sizeof(buf)-(0x1c86+1919-0x2401))return
+-(0xa5b+3899-0x1995);buf[(0x9a+5922-0x17b9)]=Encode8bit(pSrc->TP_UD,&buf[
+(0x99a+2075-0x11b1)],nLength);nLength=buf[(0xa90+5568-0x204d)]+
+(0x66d+4828-0x1945);}}check_udl=nLength-(0x20a2+1023-0x249d);nDstLength+=
Bytes2String(buf,&pDst[nDstLength],nLength);sc_cfg_set(NV_CHECK_UDL,"");if(
-check_udl>(0x1f12+1196-0x2332)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");
-}
-#if (0x5dd+3027-0x11af)
+check_udl>(0xfba+1828-0x1652)){sc_cfg_set(NV_CHECK_UDL,"\x65\x72\x72\x6f\x72");}
+#if (0xb07+3941-0x1a6b)
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 (0x528+7929-0x2420)
+#if (0xee7+2982-0x1a8c)
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<(0x5ab+8439-0x26a2)){return-(0x7b0+7243-0x23fa);}nSrc=
-(0x434+2007-0xc0b);nDst=(0x36b+8605-0x2508);nByte=(0x8c4+3740-0x1760);nLeft=
-(0x104a+4612-0x224e);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
-(0x2173+1420-0x2680);nLeft=*pSrc>>((0x1064+2793-0x1b46)-nByte);pDst++;nDst++;
-nByte++;if(nByte==(0xe97+6014-0x260e)){*pDst=nLeft;pDst++;nDst++;nByte=
-(0x1f3d+450-0x20ff);nLeft=(0x1028+1184-0x14c8);}pSrc++;nSrc++;}*pDst='\0';return
+==NULL||nSrcLength<(0xab3+2335-0x13d2)){return-(0x58b+1385-0xaf3);}nSrc=
+(0x1d8+5534-0x1776);nDst=(0x214+6773-0x1c89);nByte=(0xc54+6149-0x2459);nLeft=
+(0xa90+3750-0x1936);while(nSrc<nSrcLength){*pDst=((*pSrc<<nByte)|nLeft)&
+(0x1b1+7296-0x1db2);nLeft=*pSrc>>((0x2ac+7194-0x1ebf)-nByte);pDst++;nDst++;nByte
+++;if(nByte==(0x1fcc+14-0x1fd3)){*pDst=nLeft;pDst++;nDst++;nByte=
+(0x1a7d+1046-0x1e93);nLeft=(0xec1+1204-0x1375);}pSrc++;nSrc++;}*pDst='\0';return
nDst;}int DecodePushPdu(const char*pSrcPdu,SMS_PARAM*pDst){int nDstLength=
-(0x45c+820-0x790);unsigned char tmp=(0x1b5a+1496-0x2132);int ud_length=
-(0x924+1002-0xd0e);unsigned char buf[(0x532+4144-0x1462)]={(0x51d+4677-0x1762)};
-char temp_num[(0x12c4+1043-0x1673)]={(0x17a9+2105-0x1fe2)};unsigned char
-first_octet=(0x370+3863-0x1287);unsigned char udhl=(0xd33+3164-0x198f);unsigned
-int halftmp=(0xd62+1634-0x13c4);char tp_ra[(0x3d5+6659-0x1dd5)]={
-(0x161+6847-0x1c20)};int tmplen=(0xbf6+4588-0x1de2);unsigned char IEIDL;int
-pushType=(0x153f+4315-0x261a);const char*pSrc=pSrcPdu;if(pSrcPdu==NULL||pDst==
+(0x1522+2425-0x1e9b);unsigned char tmp=(0x2da+7201-0x1efb);int ud_length=
+(0x700+7473-0x2431);unsigned char buf[(0xd3a+4834-0x1f1c)]={(0xfe6+4584-0x21ce)}
+;char temp_num[(0x9e3+4779-0x1c2a)]={(0x8da+3990-0x1870)};unsigned char
+first_octet=(0x1cba+1466-0x2274);unsigned char udhl=(0x451+2506-0xe1b);unsigned
+int halftmp=(0x23f0+105-0x2459);char tp_ra[(0x532+5193-0x1978)]={
+(0x16e7+2981-0x228c)};int tmplen=(0x847+3738-0x16e1);unsigned char IEIDL;int
+pushType=(0x1c01+283-0x1d1c);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-(0x502+3192-0x1179);}String2Bytes(pSrc,&tmp,(0xab1+1341-0xfec));
-at_print(LOG_DEBUG,
+);return-(0x98+5545-0x1640);}String2Bytes(pSrc,&tmp,(0x820+882-0xb90));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==(0x2fd+5888-0x19fd)){pSrc+=(0x5e7+780-0x8f1);}else{tmp=(tmp-
-(0x18d6+3521-0x2696))*(0x199+7524-0x1efb);pSrc+=(0x295+108-0x2fd);if(tmp>
-(0x433+6795-0x1e9e)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x773+5465-0x1cac));
-tmp=(0x11ed+4337-0x22be);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=
-tmp;}String2Bytes(pSrc,&tmp,(0x13e2+3970-0x2362));first_octet=tmp;pSrc+=
-(0x187+3007-0xd44);String2Bytes(pSrc,&tmp,(0x287+5993-0x19ee));halftmp=tmp;if(
-tmp&(0x6e2+3899-0x161c))tmp+=(0x324+3764-0x11d7);pSrc+=(0xb2c+6096-0x22fa);
-memset(tp_ra,(0xf73+2381-0x18c0),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
-(0x3ba+6202-0x1bf2));pSrc+=(0xb2b+5398-0x203f);if((tp_ra[(0x616+1572-0xc3a)]&
-(0x1269+1634-0x187b))==(0x3f6+7189-0x1fbb)){char tempra[(0x66f+511-0x7ee)];char
-acAsc[(0xb62+5644-0x20ee)];if(halftmp>=(0x7d0+6231-0x2019)){halftmp=(tmp/
-(0xf67+3654-0x1dab))/(0x169b+342-0x17ea)+(tmp/(0xfca+1238-0x149e));}else{halftmp
-=tmp/(0x1549+943-0x18f6);}memset(tempra,(0x14a5+3032-0x207d),sizeof(tempra));
-memcpy(tempra,pSrc,tmp);memset(acAsc,(0x3b2+6002-0x1b24),sizeof(acAsc));
-nDstLength=String2Bytes(tempra,buf,halftmp&(0x1ae6+860-0x1e3b)?(int)halftmp*
-(0x41a+8019-0x2366)/(0x363+305-0x490)+(0x122b+2421-0x1b9e):(int)halftmp*
-(0xd5a+6349-0x2620)/(0x1677+212-0x1747));halftmp=Decode7bit(buf,acAsc,nDstLength
-);memset(pDst->TPA,(0x195c+1547-0x1f67),sizeof(pDst->TPA));if(halftmp>
-(0xd6a+2624-0x178a)){memcpy(pDst->TPA,acAsc,(0x143+7367-0x1dea));tmp=
-(0xce0+5234-0x2132);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
-(0x710+6973-0x222d)){SerializeNumbers_sms(pSrc,pDst->TPA,(0x1d5b+1576-0x2363));}
-else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0x1834+2577-0x2245)]&
-(0x10b1+3770-0x1eda))==(0x4c9+2112-0xc78)){memset(temp_num,(0x66b+594-0x8bd),
-sizeof(temp_num));if(pDst->TPA[(0x1f83+524-0x218f)]!=((char)(0x2013+923-0x2383))
-){snprintf(temp_num,sizeof(temp_num),"\x25\x73\x25\x73","\x2b",pDst->TPA);if(
-strlen(temp_num)>(0x1dec+540-0x1fe8)){snprintf(pDst->TPA,sizeof(pDst->TPA),
+,tmp);if(tmp==(0x386+739-0x669)){pSrc+=(0x1590+2404-0x1ef2);}else{tmp=(tmp-
+(0x943+488-0xb2a))*(0xe0d+990-0x11e9);pSrc+=(0x144b+3703-0x22be);if(tmp>
+(0x130f+2074-0x1b09)){SerializeNumbers_sms(pSrc,pDst->SCA,(0x9a8+3988-0x191c));
+tmp=(0xd08+1763-0x13cb);}else{SerializeNumbers_sms(pSrc,pDst->SCA,tmp);}pSrc+=
+tmp;}String2Bytes(pSrc,&tmp,(0xbe4+1587-0x1215));first_octet=tmp;pSrc+=
+(0x1f+6694-0x1a43);String2Bytes(pSrc,&tmp,(0x1980+321-0x1abf));halftmp=tmp;if(
+tmp&(0x6df+546-0x900))tmp+=(0x4d2+7129-0x20aa);pSrc+=(0x547+5621-0x1b3a);memset(
+tp_ra,(0x3f9+1102-0x847),sizeof(tp_ra));String2Bytes(pSrc,tp_ra,
+(0x17f0+3379-0x2521));pSrc+=(0x3df+1323-0x908);if((tp_ra[(0xbba+3727-0x1a49)]&
+(0x178+1984-0x8e8))==(0x970+7494-0x2666)){char tempra[(0x8c5+6537-0x21ce)];char
+acAsc[(0x718+2448-0x1028)];if(halftmp>=(0x292+4215-0x12fb)){halftmp=(tmp/
+(0x372+8162-0x2352))/(0x1b92+1268-0x207f)+(tmp/(0x109+6995-0x1c5a));}else{
+halftmp=tmp/(0x5a1+1848-0xcd7);}memset(tempra,(0xaa+6137-0x18a3),sizeof(tempra))
+;memcpy(tempra,pSrc,tmp);memset(acAsc,(0x1cb1+2588-0x26cd),sizeof(acAsc));
+nDstLength=String2Bytes(tempra,buf,halftmp&(0x127a+137-0x12fc)?(int)halftmp*
+(0x160d+1616-0x1c56)/(0x4a4+8595-0x2633)+(0x1f0+544-0x40e):(int)halftmp*
+(0x10b6+4928-0x23ef)/(0x115d+1412-0x16dd));halftmp=Decode7bit(buf,acAsc,
+nDstLength);memset(pDst->TPA,(0x57b+6372-0x1e5f),sizeof(pDst->TPA));if(halftmp>
+(0x156c+3429-0x22b1)){memcpy(pDst->TPA,acAsc,(0x15bd+2880-0x20dd));tmp=
+(0xb42+1265-0x1013);}else{memcpy(pDst->TPA,acAsc,halftmp);}}else{if(tmp>
+(0xc5c+6282-0x24c6)){SerializeNumbers_sms(pSrc,pDst->TPA,(0xc5f+467-0xe12));}
+else{SerializeNumbers_sms(pSrc,pDst->TPA,tmp);}if((tp_ra[(0x1558+4021-0x250d)]&
+(0xaa1+6870-0x24e6))==(0xd7c+930-0x108d)){memset(temp_num,(0x878+721-0xb49),
+sizeof(temp_num));if(pDst->TPA[(0x26a+709-0x52f)]!=((char)(0xb03+6402-0x23da))){
+snprintf(temp_num,sizeof(temp_num),"\x25\x73\x25\x73","\x2b",pDst->TPA);if(
+strlen(temp_num)>(0x1b8a+2740-0x261e)){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,(0xc3d+4907-0x1f66));pSrc+=(0x106c+1323-0x1595);String2Bytes(pSrc,(
-unsigned char*)&pDst->TP_DCS,(0xd91+1597-0x13cc));pSrc+=(0xcd2+751-0xfbf);
-SerializeNumbers_sms(pSrc,pDst->TP_SCTS,(0xf6c+4518-0x2104));pSrc+=
-(0xfaf+3570-0x1d93);String2Bytes(pSrc,&tmp,(0x11fa+107-0x1263));pSrc+=
-(0xa90+2998-0x1644);memset(pDst->TP_UD,(0x20e9+1132-0x2555),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&(0x1249+4494-0x2397)){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,(0xb12+5751-0x2187));temp+=
-(0x1651+2787-0x2132);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0x416+121-0x48d));
+TP_PID,(0x3dd+3249-0x108c));pSrc+=(0x5da+6770-0x204a);String2Bytes(pSrc,(
+unsigned char*)&pDst->TP_DCS,(0x17d7+2611-0x2208));pSrc+=(0xbe6+1896-0x134c);
+SerializeNumbers_sms(pSrc,pDst->TP_SCTS,(0x229+4821-0x14f0));pSrc+=
+(0xfd1+2169-0x183c);String2Bytes(pSrc,&tmp,(0x491+3031-0x1066));pSrc+=
+(0xaaa+20-0xabc);memset(pDst->TP_UD,(0x1d7+618-0x441),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&(0x78a+3394-0x148c)){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,(0xeff+4799-0x21bc));temp+=
+(0x172a+1491-0x1cfb);tmplen=String2Bytes(temp,&pDst->TP_IEI,(0xe2a+1673-0x14b1))
+;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==(0x216+6670-0x1c1f)){temp+=(0x10d+1169-0x59c)*
-tmplen+(0x739+482-0x919);tmplen=String2Bytes(temp,&DestPort1,(0x911+1959-0x10b6)
-);at_print(LOG_DEBUG,
+,pDst->TP_IEI);if(pDst->TP_IEI==(0x16ac+3842-0x25a9)){temp+=(0x4ef+5681-0x1b1e)*
+tmplen+(0x1302+279-0x1417);tmplen=String2Bytes(temp,&DestPort1,
+(0x159f+3827-0x2490));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+=(0x357+7367-0x201c)*tmplen;tmplen=String2Bytes(temp,&DestPort2
-,(0x1f23+405-0x20b6));at_print(LOG_DEBUG,
+,DestPort1);temp+=(0x622+6347-0x1eeb)*tmplen;tmplen=String2Bytes(temp,&DestPort2
+,(0xcc5+645-0xf48));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==(0x188f+424-0x1a2c))&&((DestPort2==
-(0x813+5834-0x1e59))||(DestPort2==(0x3a6+579-0x564)))){pushType=SMS_PUSH;}}if(
-SMS_PUSH!=pushType){return pushType;}temp=pSrc+udhl*(0x1ac8+1547-0x20d1)+
-(0x110f+4669-0x2348);tmplen=String2Bytes(temp,&pduType,(0x45b+4636-0x1675));if(
-pduType==(0x1e55+2232-0x2707)){pushType=SMS_PUSH;temp+=(0xd1c+1253-0x11fd);
-tmplen=String2Bytes(temp,&pduType,(0xfe8+2093-0x1813));if(pduType==
-(0x1c9+6824-0x1bad)){pushType=SMS_NOTIFICATION;}else{temp+=(0xfd5+2887-0x1b18);
-tmplen=String2Bytes(temp,&pduType,(0x170c+780-0x1a16));if((pduType==
-(0x990+2421-0x1243))||(pduType==(0x1862+3497-0x2555))){pushType=SMS_BOOTSTRAP;}}
-}if((pDst->TP_IEI==(0x60d+3420-0x1365))||(pDst->TP_IEI==(0xa6f+4210-0x1adc))||(
-pDst->TP_IEI==(0x8f7+427-0xa9a))){temp=pSrc+(0x633+5677-0x1c5c);tmplen=
-String2Bytes(temp,&IEIDL,(0xfd3+4308-0x20a5));if(IEIDL==(udhl-
-(0x11a1+754-0x1491))){}else{temp+=(0xe32+4110-0x1e3e)*(0xf71+5370-0x2465);tmplen
-=String2Bytes(temp,&udhLen,(0x2531+438-0x26e5));if(udhLen==(0x57f+7369-0x2245)){
-temp+=(0x1eb+7146-0x1dd3)*tmplen;tmplen=String2Bytes(temp,&RefNum1,
-(0x1ef+1234-0x6bf));pDst->TP_ReferNum=RefNum1;temp+=(0xaab+2610-0x14db)*tmplen;
-tmplen=String2Bytes(temp,&pDst->TP_AllPieceNum,(0x26f+9164-0x2639));temp+=
-(0x175f+816-0x1a8d)*tmplen;tmplen=String2Bytes(temp,&pDst->TP_CurrentPieceNum,
-(0x1995+1888-0x20f3));temp+=(0x5ea+181-0x69d)*tmplen;}else if(udhLen==
-(0x17b4+222-0x188e)){temp+=(0x126+9605-0x26a9)*tmplen;tmplen=String2Bytes(temp,&
-RefNum1,(0x599+6102-0x1d6d));temp+=(0xc97+2256-0x1565)*tmplen;tmplen=
-String2Bytes(temp,&RefNum2,(0x11df+3083-0x1de8));int ReferNum=RefNum2+RefNum1*
-(0x2f7+8943-0x24e6);pDst->TP_ReferNum=ReferNum;temp+=(0x1c49+2167-0x24be)*tmplen
-;tmplen=String2Bytes(temp,&pDst->TP_AllPieceNum,(0x1c20+304-0x1d4e));temp+=
-(0x704+7441-0x2413)*tmplen;tmplen=String2Bytes(temp,&pDst->TP_CurrentPieceNum,
-(0xe6d+413-0x1008));temp+=(0xbd7+5242-0x204f)*tmplen;}}}at_print(LOG_DEBUG,
+,DestPort2);if((DestPort1==(0x1b80+1974-0x232b))&&((DestPort2==
+(0x9f3+1588-0xfa3))||(DestPort2==(0x225+6476-0x1aec)))){pushType=SMS_PUSH;}}if(
+SMS_PUSH!=pushType){return pushType;}temp=pSrc+udhl*(0x33d+2785-0xe1c)+
+(0x647+8384-0x2703);tmplen=String2Bytes(temp,&pduType,(0x1ba7+2055-0x23ac));if(
+pduType==(0x1849+569-0x1a7c)){pushType=SMS_PUSH;temp+=(0x1f99+885-0x230a);tmplen
+=String2Bytes(temp,&pduType,(0x177a+2005-0x1f4d));if(pduType==
+(0x931+4063-0x184c)){pushType=SMS_NOTIFICATION;}else{temp+=(0x1f1+2810-0xce7);
+tmplen=String2Bytes(temp,&pduType,(0x810+3454-0x158c));if((pduType==
+(0x1027+2017-0x1746))||(pduType==(0x1146+4732-0x230c))){pushType=SMS_BOOTSTRAP;}
+}}if((pDst->TP_IEI==(0x6ea+4380-0x1802))||(pDst->TP_IEI==(0x85c+1151-0xcd6))||(
+pDst->TP_IEI==(0x945+2313-0x1246))){temp=pSrc+(0xb1d+1088-0xf59);tmplen=
+String2Bytes(temp,&IEIDL,(0xc21+4676-0x1e63));if(IEIDL==(udhl-
+(0x838+4879-0x1b45))){}else{temp+=(0x7ca+5357-0x1cb5)*(0x190b+2136-0x215d);
+tmplen=String2Bytes(temp,&udhLen,(0x56+6121-0x183d));if(udhLen==
+(0x1b4b+862-0x1ea6)){temp+=(0x16ab+3605-0x24be)*tmplen;tmplen=String2Bytes(temp,
+&RefNum1,(0x1fc4+418-0x2164));pDst->TP_ReferNum=RefNum1;temp+=
+(0xec7+1645-0x1532)*tmplen;tmplen=String2Bytes(temp,&pDst->TP_AllPieceNum,
+(0xe60+5973-0x25b3));temp+=(0xca+2403-0xa2b)*tmplen;tmplen=String2Bytes(temp,&
+pDst->TP_CurrentPieceNum,(0x76c+2420-0x10de));temp+=(0x147b+818-0x17ab)*tmplen;}
+else if(udhLen==(0x208c+1550-0x2696)){temp+=(0xae3+504-0xcd9)*tmplen;tmplen=
+String2Bytes(temp,&RefNum1,(0x1074+4100-0x2076));temp+=(0x14f4+1516-0x1ade)*
+tmplen;tmplen=String2Bytes(temp,&RefNum2,(0x894+3892-0x17c6));int ReferNum=
+RefNum2+RefNum1*(0x424+8148-0x22f8);pDst->TP_ReferNum=ReferNum;temp+=
+(0xcec+65-0xd2b)*tmplen;tmplen=String2Bytes(temp,&pDst->TP_AllPieceNum,
+(0x1001+326-0x1145));temp+=(0x204+3921-0x1153)*tmplen;tmplen=String2Bytes(temp,&
+pDst->TP_CurrentPieceNum,(0x7ad+7407-0x249a));temp+=(0xc4d+5970-0x239d)*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*(0x172b+1995-0x1ef4)+
-(0x104b+2733-0x1af2);tmplen=String2Bytes(temp,&wspLen,(0x1129+4135-0x214e));temp
-=temp+wspLen*(0x2295+118-0x2309)+(0x7d8+4044-0x17a2);}else{temp=pSrc+udhl*
-(0x4ba+8435-0x25ab)+(0x1765+629-0x19d8);}nDstLength=((strlen(temp)<sizeof(pDst->
-TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x1e3+2281-0xacb)));memcpy(pDst->
+SMS_NOTIFICATION==pushType){temp=pSrc+udhl*(0xd41+6445-0x266c)+
+(0xdd9+2355-0x1706);tmplen=String2Bytes(temp,&wspLen,(0x15e9+819-0x191a));temp=
+temp+wspLen*(0x1065+2715-0x1afe)+(0xea1+5768-0x2527);}else{temp=pSrc+udhl*
+(0x983+4418-0x1ac3)+(0x1150+5126-0x2554);}nDstLength=((strlen(temp)<sizeof(pDst
+->TP_UD))?strlen(temp):(sizeof(pDst->TP_UD)-(0x2eb+3638-0x1120)));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=(0xad3+4102-0x1ad9);if(pSrc==
-NULL||pDst==NULL||nSrcLength<(0xca5+554-0xecf)){return-(0x4ca+8412-0x25a5);}
-nDstLength=nSrcLength;for(i=(0xb52+3308-0x183e);i<nSrcLength;i+=
-(0x7c6+483-0x9a7)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
-(0x1e4d+59-0x1e87))==((char)(0x341+3235-0xf9e))){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=(0x1204+2996-0x1db8);
-UINT16 pos=(0xb54+3949-0x1ac1);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+*pDst,int nSrcLength){int nDstLength;char ch;int i=(0x826+3738-0x16c0);if(pSrc==
+NULL||pDst==NULL||nSrcLength<(0x1717+1818-0x1e31)){return-(0x135a+325-0x149e);}
+nDstLength=nSrcLength;for(i=(0x1ada+689-0x1d8b);i<nSrcLength;i+=
+(0xfca+3096-0x1be0)){ch=*pSrc++;*pDst++=*pSrc++;*pDst++=ch;}if(*(pDst-
+(0x941+4912-0x1c70))==((char)(0x88b+1235-0xd18))){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=(0xd39+5407-0x2258);
+UINT16 pos=(0x518+7416-0x2210);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(0x1b03+1101-0x1f50);}shift%=(0x8cd+6668-0x22d2);if(shift!=
-(0x63+1579-0x68e)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0x6b5+3901-0x15eb)-
-shift)+(0xfc9+2901-0x1b1d);if(shift==(0x1f6+6416-0x1aff)){shift=
-(0x541+6096-0x1d11);i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[
-pos]=in[i]>>shift;if(i+(0x2c+1492-0x5ff)<in_len){out[pos]|=(UINT8)(in[i+
-(0x2295+26-0x22ae)]<<((0xab5+6740-0x2502)-shift));shift++;if(shift==
-(0x173+2543-0xb5b)){shift=(0xe12+1629-0x146f);i++;}}}return pos;}UINT8
+);return(0x3e5+1878-0xb3b);}shift%=(0x64+9225-0x2466);if(shift!=
+(0x403+8564-0x2577)){out[pos]|=(UINT8)(in[i]<<shift);shift=((0x12d3+4581-0x24b1)
+-shift)+(0xf0b+3298-0x1bec);if(shift==(0x114a+899-0x14c6)){shift=
+(0x1d65+1692-0x2401);i++;}pos++;}for(;pos<out_len_max&&i<in_len;pos++,i++){out[
+pos]=in[i]>>shift;if(i+(0x583+245-0x677)<in_len){out[pos]|=(UINT8)(in[i+
+(0x13a8+2525-0x1d84)]<<((0x15cc+1935-0x1d54)-shift));shift++;if(shift==
+(0x117b+1336-0x16ac)){shift=(0x28d+2197-0xb22);i++;}}}return pos;}UINT8
wms_ts_encode_address(const wms_address_s_type*addr,UINT8*data){UINT8 i,pos=
-(0x228+6460-0x1b64);if(addr->number_of_digits>WMS_GW_ADDRESS_MAX){at_print(
+(0x166c+3166-0x22ca);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(0xf49+4921-0x2282);}if(addr->number_type==
+,addr->number_of_digits);return(0x35f+617-0x5c8);}if(addr->number_type==
WMS_NUMBER_ALPHANUMERIC){data[pos]=(UINT8)((addr->number_of_digits*
-(0x108a+4335-0x2172)+(0x50+2550-0xa43))/(0x23f+7877-0x2100));}else{data[pos]=
-addr->number_of_digits;}pos++;data[pos]=(0x15e2+1365-0x1ab7);data[pos]|=(UINT8)(
-(UINT8)addr->number_type<<(0x16a1+179-0x1750));data[pos]|=(UINT8)addr->
+(0x14b9+4286-0x2570)+(0x6e7+3319-0x13db))/(0x1120+5222-0x2582));}else{data[pos]=
+addr->number_of_digits;}pos++;data[pos]=(0xf8d+5425-0x243e);data[pos]|=(UINT8)((
+UINT8)addr->number_type<<(0x5b0+7636-0x2380));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,
-(0x2e2+7422-0x1fe0),WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=
-(0x805+5823-0x1ec4);i<addr->number_of_digits;i++){data[pos]=(UINT8)(addr->digits
-[i++]&(0x1ec5+796-0x21d2));{data[pos]|=(UINT8)(addr->digits[i]<<
-(0x2149+1379-0x26a8));}pos++;}}return pos;}UINT8 wms_ts_encode_dcs(const
-wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=(0x1384+4931-0x26c7);if(dcs->
+(0x348+1325-0x875),WMS_GW_ADDRESS_MAX,&data[pos]);}else{for(i=
+(0xd25+1863-0x146c);i<addr->number_of_digits;i++){data[pos]=(UINT8)(addr->digits
+[i++]&(0x650+3076-0x1245));{data[pos]|=(UINT8)(addr->digits[i]<<
+(0x14ed+3291-0x21c4));}pos++;}}return pos;}UINT8 wms_ts_encode_dcs(const
+wms_gw_dcs_s_type*dcs,UINT8*data){UINT8 pos=(0x148+1693-0x7e5);if(dcs->
msg_waiting==WMS_GW_MSG_WAITING_NONE){data[pos]=dcs->is_compressed?
-(0x38d+3810-0x124f):(0x7e9+6472-0x2131);data[pos]|=(dcs->msg_class!=
-WMS_MESSAGE_CLASS_NONE)?(0xda1+4051-0x1d64):(0xc3f+4992-0x1fbf);data[pos]|=dcs->
-alphabet<<(0x182d+2644-0x227f);data[pos]|=dcs->msg_class&(0x15b8+495-0x17a4);}
-else if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data[pos]=
-(0x126a+4849-0x246b);if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=
-(0xc3a+1397-0x11ab);data[pos]|=dcs->msg_class&(0x16e5+1136-0x1b52);}else{if(dcs
-->msg_waiting==WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0x1960+381-0x1a1d);}else
-if(dcs->msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
-WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0x189d+3787-0x2698);}else{data[pos]=
-(0x226b+1007-0x257a);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
-(0x214+7996-0x2148):(0x1688+2096-0x1eb8);data[pos]|=dcs->msg_waiting_kind&
-(0x10b9+5695-0x26f5);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
-UINT8*result){unsigned char low_bit=(bcd&(0x1b3f+2820-0x2634));unsigned char
-high_bit=((bcd&(0x6ca+4946-0x192c))>>(0x125+4775-0x13c8));if(low_bit>
-(0x1038+3847-0x1f36)||high_bit>(0x74b+7219-0x2375)){at_print(LOG_DEBUG,
+(0x225+6012-0x1981):(0x41f+696-0x6d7);data[pos]|=(dcs->msg_class!=
+WMS_MESSAGE_CLASS_NONE)?(0x188b+137-0x1904):(0x19c+216-0x274);data[pos]|=dcs->
+alphabet<<(0x92b+6475-0x2274);data[pos]|=dcs->msg_class&(0x443+2963-0xfd3);}else
+ if(dcs->msg_waiting==WMS_GW_MSG_WAITING_NONE_1111){data[pos]=
+(0x1ed6+2171-0x2661);if(dcs->alphabet==WMS_GW_ALPHABET_8_BIT)data[pos]|=
+(0x27c+6090-0x1a42);data[pos]|=dcs->msg_class&(0xbac+1545-0x11b2);}else{if(dcs->
+msg_waiting==WMS_GW_MSG_WAITING_DISCARD){data[pos]=(0x1b81+77-0x1b0e);}else if(
+dcs->msg_waiting==WMS_GW_MSG_WAITING_STORE&&dcs->alphabet==
+WMS_GW_ALPHABET_7_BIT_DEFAULT){data[pos]=(0x150+295-0x1a7);}else{data[pos]=
+(0x1372+2366-0x1bd0);}data[pos]|=(dcs->msg_waiting_active==TRUE)?
+(0xa2c+1947-0x11bf):(0x914+1073-0xd45);data[pos]|=dcs->msg_waiting_kind&
+(0xc09+5630-0x2204);}pos++;return pos;}UINT8 wms_ts_bcd_to_int(const UINT8 bcd,
+UINT8*result){unsigned char low_bit=(bcd&(0x132a+1593-0x1954));unsigned char
+high_bit=((bcd&(0x272+6930-0x1c94))>>(0x187+2997-0xd38));if(low_bit>
+(0x12ac+3541-0x2078)||high_bit>(0xa30+6242-0x2289)){at_print(LOG_DEBUG,
"\x49\x6e\x76\x61\x6c\x69\x64\x20\x42\x43\x44\x20\x64\x69\x67\x69\x74\x21");*
-result=(0x2ea+8166-0x22d0);return FALSE;}else{*result=((bcd&(0x1cf+1384-0x728))+
-(((bcd&(0x16c3+89-0x162c))>>(0x18f2+1666-0x1f70))*(0xd78+366-0xedc)));return
+result=(0x8bf+5263-0x1d4e);return FALSE;}else{*result=((bcd&(0x8b9+5674-0x1ed4))
++(((bcd&(0x593+766-0x7a1))>>(0x5cd+5909-0x1cde))*(0x129a+3641-0x20c9)));return
TRUE;}}UINT8 wms_ts_encode_timestamp(const wms_timestamp_s_type*timestamp,UINT8*
-data){sint7 i;UINT8 pos=(0x3bf+778-0x6c9),j;if(!wms_ts_bcd_to_int(timestamp->
-year,&j)){return(0x1129+4784-0x23d9);}data[pos]=((timestamp->year&
-(0x1615+3761-0x24b7))<<(0x235+4504-0x13c9))+((timestamp->year&
-(0x7cd+3673-0x1536))>>(0x1126+4896-0x2442));pos++;if(wms_ts_bcd_to_int(timestamp
-->month,&j)){if(j>(0xb62+1757-0x1233)||j<(0x1c4d+787-0x1f5f)){at_print(LOG_DEBUG
-,
+data){sint7 i;UINT8 pos=(0x1151+1573-0x1776),j;if(!wms_ts_bcd_to_int(timestamp->
+year,&j)){return(0x1df+8366-0x228d);}data[pos]=((timestamp->year&
+(0x187f+1256-0x1d58))<<(0xaeb+3801-0x19c0))+((timestamp->year&
+(0x96d+7408-0x256d))>>(0x39a+8006-0x22dc));pos++;if(wms_ts_bcd_to_int(timestamp
+->month,&j)){if(j>(0x103c+5345-0x2511)||j<(0x38f+6867-0x1e61)){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(0x1424+2867-0x1f57);}}else{return(0x219+2379-0xb64);}data[pos]=((
-timestamp->month&(0x16f9+3296-0x23ca))<<(0xb03+4088-0x1af7))+((timestamp->month&
-(0x474+4853-0x1679))>>(0x144d+3228-0x20e5));pos++;if(wms_ts_bcd_to_int(timestamp
-->day,&j)){if(j>(0x11b2+360-0x12fb)||j<(0x2144+632-0x23bb)){at_print(LOG_DEBUG,
+,j);return(0x661+6054-0x1e07);}}else{return(0x9a6+1656-0x101e);}data[pos]=((
+timestamp->month&(0x102f+5808-0x26d0))<<(0x14c5+4158-0x24ff))+((timestamp->month
+&(0x2157+186-0x2121))>>(0xbdb+4510-0x1d75));pos++;if(wms_ts_bcd_to_int(timestamp
+->day,&j)){if(j>(0x784+7668-0x2559)||j<(0x10fb+2167-0x1971)){at_print(LOG_DEBUG,
"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);
-return(0xf32+5266-0x23c4);}}else{return(0x8f0+2045-0x10ed);}data[pos]=((
-timestamp->day&(0xc3f+6411-0x253b))<<(0x50+4385-0x116d))+((timestamp->day&
-(0xf6a+3957-0x1def))>>(0x405+3192-0x1079));pos++;if(wms_ts_bcd_to_int(timestamp
-->hour,&j)){if(j>(0x1e2+4241-0x125c)){at_print(LOG_DEBUG,
+return(0x10f0+2287-0x19df);}}else{return(0x484+4287-0x1543);}data[pos]=((
+timestamp->day&(0x8a7+4433-0x19e9))<<(0x1c91+920-0x2025))+((timestamp->day&
+(0x204c+1374-0x24ba))>>(0xadb+3834-0x19d1));pos++;if(wms_ts_bcd_to_int(timestamp
+->hour,&j)){if(j>(0x1142+1165-0x15b8)){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(0x487+156-0x523);}}else{return(0x1250+2895-0x1d9f);}data[pos]=((
-timestamp->hour&(0x713+7596-0x24b0))<<(0x191b+296-0x1a3f))+((timestamp->hour&
-(0x3a1+5282-0x1753))>>(0xaba+5210-0x1f10));pos++;if(wms_ts_bcd_to_int(timestamp
-->minute,&j)){if(j>(0x1122+2344-0x1a0f)){at_print(LOG_DEBUG,
+);return(0x219+537-0x432);}}else{return(0x18b7+2115-0x20fa);}data[pos]=((
+timestamp->hour&(0x93f+6412-0x223c))<<(0x65+8873-0x230a))+((timestamp->hour&
+(0x4da+5500-0x1966))>>(0x746+3280-0x1412));pos++;if(wms_ts_bcd_to_int(timestamp
+->minute,&j)){if(j>(0x6cd+4943-0x19e1)){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(0xf34+1036-0x1340);}}else{return(0x2d2+457-0x49b);}data[pos]=((
-timestamp->minute&(0x564+903-0x8dc))<<(0xfa4+4671-0x21df))+((timestamp->minute&
-(0x1983+1470-0x1e51))>>(0xf0f+3076-0x1b0f));pos++;if(wms_ts_bcd_to_int(timestamp
-->second,&j)){if(j>(0x1132+1254-0x15dd)){at_print(LOG_DEBUG,
+,j);return(0x1087+1253-0x156c);}}else{return(0x76a+3965-0x16e7);}data[pos]=((
+timestamp->minute&(0xb03+4472-0x1c6c))<<(0x15+1737-0x6da))+((timestamp->minute&
+(0x131f+4757-0x24c4))>>(0x12c0+1882-0x1a16));pos++;if(wms_ts_bcd_to_int(
+timestamp->second,&j)){if(j>(0x6c8+1622-0xce3)){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(0x12b2+1240-0x178a);}}else{return(0x1bb8+1287-0x20bf);}data[pos]=((
-timestamp->second&(0x479+3102-0x1088))<<(0xeb+7252-0x1d3b))+((timestamp->second&
-(0x5cf+3036-0x10bb))>>(0xd8f+3948-0x1cf7));pos++;i=(sint7)timestamp->timezone;if
-(i>(0x2098+787-0x237b)||i<-(0x6bc+6378-0x1f76)){at_print(LOG_DEBUG,
+,j);return(0x49+9303-0x24a0);}}else{return(0x29+2953-0xbb2);}data[pos]=((
+timestamp->second&(0x30+2440-0x9a9))<<(0x610+734-0x8ea))+((timestamp->second&
+(0x6b9+8455-0x26d0))>>(0xf+8955-0x2306));pos++;i=(sint7)timestamp->timezone;if(i
+>(0x1028+4207-0x2067)||i<-(0x215+3001-0xd9e)){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(0x176+4642-0x1398);}if(i>=(0x9ab+1062-0xdd1)){data[pos]=(UINT8)(((
-UINT8)(i%(0x19f8+2826-0x24f8)))<<(0x160+1809-0x86d));data[pos]|=(i/
-(0x778+515-0x971));}else{i*=(-(0x52+8534-0x21a7));data[pos]=(UINT8)(((UINT8)(i%
-(0xbe7+4977-0x1f4e)))<<(0x503+2106-0xd39));data[pos]|=(i/(0x1323+2395-0x1c74));
-data[pos]|=(0x1628+4060-0x25fc);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
-const wms_udh_s_type*udh){UINT8 length=(0xfa9+4832-0x2289);if(udh!=NULL){switch(
-udh->header_id){case WMS_UDH_CONCAT_8:length=(0xb94+490-0xd7d)+
-(0xe08+4884-0x211b)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
-(0xdc6+1674-0x144f)+(0x2ff+1442-0x8a0)+WMS_UDH_OCTETS_CONCAT16;break;case
-WMS_UDH_SPECIAL_SM:length=(0x1aaa+517-0x1cae)+(0x12c4+2179-0x1b46)+
-WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0x159b+1406-0x1b18)+
-(0x731+5784-0x1dc8)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
-(0x1a72+1993-0x223a)+(0x16fb+1457-0x1cab)+WMS_UDH_OCTETS_PORT16;break;case
-WMS_UDH_SMSC_CONTROL:length=(0x2b6+2151-0xb1c)+(0x1148+5267-0x25da)+udh->u.other
-.header_length;break;case WMS_UDH_SOURCE:length=(0x37+367-0x1a5)+
-(0x2e0+1450-0x889)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
-(0x472+1598-0xaaf)+(0x13ab+3874-0x22cc)+udh->u.other.header_length;break;case
+,i);return(0x1198+4356-0x229c);}if(i>=(0x13b3+4369-0x24c4)){data[pos]=(UINT8)(((
+UINT8)(i%(0x11bb+2188-0x1a3d)))<<(0x1f06+1973-0x26b7));data[pos]|=(i/
+(0x11d1+2549-0x1bbc));}else{i*=(-(0x999+1225-0xe61));data[pos]=(UINT8)(((UINT8)(
+i%(0x13df+841-0x171e)))<<(0x1512+2469-0x1eb3));data[pos]|=(i/(0xb62+5930-0x2282)
+);data[pos]|=(0xe3c+5107-0x2227);}pos++;return pos;}UINT8 wms_ts_get_udh_length(
+const wms_udh_s_type*udh){UINT8 length=(0xb6+9499-0x25d1);if(udh!=NULL){switch(
+udh->header_id){case WMS_UDH_CONCAT_8:length=(0x7f6+3131-0x1430)+
+(0x1846+1724-0x1f01)+WMS_UDH_OCTETS_CONCAT8;break;case WMS_UDH_CONCAT_16:length=
+(0x295+2201-0xb2d)+(0xfa+8664-0x22d1)+WMS_UDH_OCTETS_CONCAT16;break;case
+WMS_UDH_SPECIAL_SM:length=(0x759+1824-0xe78)+(0x874+5583-0x1e42)+
+WMS_UDH_OCTETS_SPECIAL_SM;break;case WMS_UDH_PORT_8:length=(0x126f+3006-0x1e2c)+
+(0x1e97+231-0x1f7d)+WMS_UDH_OCTETS_PORT8;break;case WMS_UDH_PORT_16:length=
+(0x65a+2011-0xe34)+(0x461+6087-0x1c27)+WMS_UDH_OCTETS_PORT16;break;case
+WMS_UDH_SMSC_CONTROL:length=(0x70f+1663-0xd8d)+(0x1177+4723-0x23e9)+udh->u.other
+.header_length;break;case WMS_UDH_SOURCE:length=(0x382+436-0x535)+
+(0x7f+3333-0xd83)+udh->u.other.header_length;break;case WMS_UDH_WCMP:length=
+(0xfb4+1636-0x1617)+(0x6d0+1611-0xd1a)+udh->u.other.header_length;break;case
WMS_UDH_TEXT_FORMATING:if(!udh->u.text_formating.is_color_present){length=
-(0x8bf+5244-0x1d3a)+(0x3f6+7609-0x21ae)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
-length=(0x197+6011-0x1911)+(0xb96+3588-0x1999)+WMS_UDH_OCTETS_TEXT_FORMATTING+
-(0xfba+872-0x1321);}break;case WMS_UDH_PRE_DEF_SOUND:length=(0xbb2+593-0xe02)+
-(0x1947+1963-0x20f1)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_USER_DEF_SOUND:
-length=(0x135a+3697-0x21ca)+(0x16d1+476-0x18ac)+udh->u.user_def_sound.
-data_length+(0xf25+4245-0x1fb9);break;case WMS_UDH_PRE_DEF_ANIM:length=
-(0x348+6155-0x1b52)+(0xa17+6858-0x24e0)+WMS_UDH_OCTETS_PRE_DEF;break;case
-WMS_UDH_LARGE_ANIM:length=(0xdd1+1489-0x13a1)+(0x15e2+1537-0x1be2)+
-WMS_UDH_LARGE_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0x1ba9+1303-0x20bf);break;
-case WMS_UDH_SMALL_ANIM:length=(0x197+6500-0x1afa)+(0x17ba+1126-0x1c1f)+
-WMS_UDH_SMALL_BITMAP_SIZE*WMS_UDH_ANIM_NUM_BITMAPS+(0xadb+365-0xc47);break;case
-WMS_UDH_LARGE_PICTURE:length=(0x4f1+5733-0x1b55)+(0x2333+317-0x246f)+
-WMS_UDH_LARGE_PIC_SIZE+(0x1f44+1090-0x2385);break;case WMS_UDH_SMALL_PICTURE:
-length=(0x7da+354-0x93b)+(0x6e2+1180-0xb7d)+WMS_UDH_SMALL_PIC_SIZE+
-(0x14b7+651-0x1741);break;case WMS_UDH_VAR_PICTURE:length=(0x111+5573-0x16d5)+
-(0x285+400-0x414)+(UINT8)(udh->u.var_picture.height*udh->u.var_picture.width/
-(0x72+2978-0xc0c))+(0x11c4+828-0x14fd);break;case WMS_UDH_RFC822:length=
-(0x452+7819-0x22dc)+(0x807+5284-0x1caa)+WMS_UDH_OCTETS_RFC822;break;case
-WMS_UDH_NAT_LANG_SS:length=(0x2f+1161-0x4b7)+(0x15b8+3746-0x2459)+
+(0xcdd+5540-0x2280)+(0x6a6+7411-0x2398)+WMS_UDH_OCTETS_TEXT_FORMATTING;}else{
+length=(0x85+1040-0x494)+(0x480+4875-0x178a)+WMS_UDH_OCTETS_TEXT_FORMATTING+
+(0x99a+1034-0xda3);}break;case WMS_UDH_PRE_DEF_SOUND:length=(0x140a+2381-0x1d56)
++(0x14e0+3468-0x226b)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_USER_DEF_SOUND:
+length=(0x588+5218-0x19e9)+(0xaf2+3671-0x1948)+udh->u.user_def_sound.data_length
++(0x850+4354-0x1951);break;case WMS_UDH_PRE_DEF_ANIM:length=(0x1690+4194-0x26f1)
++(0x88b+5938-0x1fbc)+WMS_UDH_OCTETS_PRE_DEF;break;case WMS_UDH_LARGE_ANIM:length
+=(0x970+5960-0x20b7)+(0xcc+274-0x1dd)+WMS_UDH_LARGE_BITMAP_SIZE*
+WMS_UDH_ANIM_NUM_BITMAPS+(0xf98+5540-0x253b);break;case WMS_UDH_SMALL_ANIM:
+length=(0xd4+7096-0x1c8b)+(0x9c+5758-0x1719)+WMS_UDH_SMALL_BITMAP_SIZE*
+WMS_UDH_ANIM_NUM_BITMAPS+(0x6ea+5580-0x1cb5);break;case WMS_UDH_LARGE_PICTURE:
+length=(0x721+2253-0xfed)+(0xda9+2756-0x186c)+WMS_UDH_LARGE_PIC_SIZE+
+(0x1a43+3127-0x2679);break;case WMS_UDH_SMALL_PICTURE:length=
+(0x1692+1844-0x1dc5)+(0x1074+1096-0x14bb)+WMS_UDH_SMALL_PIC_SIZE+
+(0x164d+3322-0x2346);break;case WMS_UDH_VAR_PICTURE:length=(0x1d63+617-0x1fcb)+
+(0xd00+738-0xfe1)+(UINT8)(udh->u.var_picture.height*udh->u.var_picture.width/
+(0x780+5976-0x1ed0))+(0x99d+780-0xca6);break;case WMS_UDH_RFC822:length=
+(0x70b+5815-0x1dc1)+(0xe05+1791-0x1503)+WMS_UDH_OCTETS_RFC822;break;case
+WMS_UDH_NAT_LANG_SS:length=(0x98a+3833-0x1882)+(0xc11+2917-0x1775)+
WMS_UDH_OCTETS_NAT_LANG_SS;break;case WMS_UDH_NAT_LANG_LS:length=
-(0x211+4164-0x1254)+(0x31d+7883-0x21e7)+WMS_UDH_OCTETS_NAT_LANG_LS;break;case
-WMS_UDH_USER_PROMPT:length=(0xa43+2878-0x1580)+(0xb1+8856-0x2348)+
+(0x1680+3240-0x2327)+(0xb56+2504-0x151d)+WMS_UDH_OCTETS_NAT_LANG_LS;break;case
+WMS_UDH_USER_PROMPT:length=(0x15b7+2568-0x1fbe)+(0xdc7+777-0x10cf)+
WMS_UDH_OCTETS_USER_PROMPT;break;case WMS_UDH_EXTENDED_OBJECT:length=
-(0xb1b+3915-0x1a65)+(0xb5b+4181-0x1baf)+udh->u.eo.content.length;if(udh->u.eo.
+(0x26f+2492-0xc2a)+(0x200f+480-0x21ee)+udh->u.eo.content.length;if(udh->u.eo.
first_segment==TRUE){length+=WMS_UDH_OCTETS_EO_HEADER;}break;default:length=
-(0x1c1f+2070-0x2434)+(0x14cd+2148-0x1d30)+udh->u.other.header_length;break;}}
+(0x1b6+2728-0xc5d)+(0x12a5+1328-0x17d4)+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=(0x3e3+62-0x421);uint32
-i;if(headers==NULL){at_print(LOG_DEBUG,
+num_headers,const wms_udh_s_type*headers){uint32 length=(0x518+6451-0x1e4b);
+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(0x1a07+2749-0x24c4);}if(num_headers>(0x1a49+1162-0x1ed3)){length+=
-(0x19a9+1247-0x1e87);for(i=(0x91d+5703-0x1f64);i<num_headers&&i<
+);return(0x3c3+7790-0x2231);}if(num_headers>(0xed2+377-0x104b)){length+=
+(0x1037+773-0x133b);for(i=(0x146d+1828-0x1b91);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=(0xd7f+2806-0x1875);
-if(dcs==NULL||user_data==NULL){at_print(LOG_DEBUG,
+*dcs,const wms_gw_user_data_s_type*user_data){uint32 length=(0x1967+2483-0x231a)
+;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(0x22dd+538-0x24f7);}length+=wms_ts_compute_user_data_header_length(
+);return(0xafd+5212-0x1f59);}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*(0x433+4440-0x1584))+
-(0x3a8+7809-0x2222))/(0x10cf+2887-0x1c0e);}else{length+=user_data->sm_len;}
+WMS_GW_ALPHABET_7_BIT_DEFAULT){length+=((user_data->sm_len*(0x1381+1082-0x17b4))
++(0x1245+4633-0x2457))/(0x16ca+2688-0x2142);}else{length+=user_data->sm_len;}
return length;}static int wms_ts_encode_udh_concat_8(UINT8*udh){int pos=
-(0x854+5542-0x1dfa);if(const_header->u.concat_8.total_sm==(0x1ccf+981-0x20a4)||
-const_header->u.concat_8.seq_num==(0x1d68+1132-0x21d4)||const_header->u.concat_8
-.seq_num>const_header->u.concat_8.total_sm){at_print(LOG_DEBUG,
+(0x7a7+2963-0x133a);if(const_header->u.concat_8.total_sm==(0x1d00+567-0x1f37)||
+const_header->u.concat_8.seq_num==(0xbf+7510-0x1e15)||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(0x10d8+5009-0x2469);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0x109a+3016-0x1c62);}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=(0x111f+4481-0x22a0);if(
-const_header->u.concat_16.total_sm==(0x297+7295-0x1f16)||const_header->u.
-concat_16.seq_num==(0x3f2+3195-0x106d)||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=(0x12+2013-0x7ef);if(const_header
+->u.concat_16.total_sm==(0x1153+4606-0x2351)||const_header->u.concat_16.seq_num
+==(0xbf7+5891-0x22fa)||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(0x150a+1763-0x1bed);}udh[pos++]=(UINT8)
+,const_header->header_id);return(0xc9a+2035-0x148d);}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)>>(0x88f+3868-0x17a3));udh[pos++]=(UINT8
-)(const_header->u.concat_16.msg_ref&(0xf99+3779-0x1d5d));udh[pos++]=const_header
+const_header->u.concat_16.msg_ref&65280)>>(0xb05+6401-0x23fe));udh[pos++]=(UINT8
+)(const_header->u.concat_16.msg_ref&(0xd89+5958-0x23d0));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=(0x1c95+961-0x2056);udh[pos
+int wms_ts_encode_udh_nat_lang_ss(UINT8*udh){int pos=(0x1ac+3153-0xdfd);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=(0x1f5+2690-0xc77);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_nat_lang_ls(UINT8*udh){int pos=(0x812+7339-0x24bd);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=
-(0xfc0+5898-0x26ca);int pos=(0xb65+3218-0x17f7);udh[pos++]=(UINT8)const_header->
-u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
-(0x8b9+6303-0x2158);i<const_header->u.other.header_length;i++){udh[pos++]=
+(0x23c+3805-0x1119);int pos=(0x13f8+1088-0x1838);udh[pos++]=(UINT8)const_header
+->u.other.header_id;udh[pos++]=const_header->u.other.header_length;for(i=
+(0xcc8+979-0x109b);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=
-(0x127d+2971-0x1e18);if(num_headers==(0x59+4912-0x1389))return
-(0x14f9+3235-0x219c);++pos;for(i=(0x11d2+1801-0x18db);i<WMS_MAX_UD_HEADERS&&i<
+(0x553+7949-0x2460);if(num_headers==(0xba3+2396-0x14ff))return
+(0x177d+1734-0x1e43);++pos;for(i=(0x1e07+750-0x20f5);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 (0x7a5+1958-0xf4b)
+#if (0x1410+1547-0x1a1b)
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
@@ -1314,106 +1315,106 @@
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[
-(0x155b+2175-0x1dda)]=(UINT8)(pos-(0x130a+171-0x13b4));return((UINT8)(pos-
-(0x6d3+7597-0x247f)));}UINT8 wms_ts_encode_gw_user_data(const wms_gw_dcs_s_type*
+(0x58f+221-0x66c)]=(UINT8)(pos-(0x299+4212-0x130c));return((UINT8)(pos-
+(0x4c+5809-0x16fc)));}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=
-(0xb45+1849-0x127e);UINT8 fill_bits=(0xcf3+6062-0x24a1);UINT16
+(0x1f7+3868-0x1113);UINT8 fill_bits=(0x1060+1837-0x178d);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>(0x11ff+3155-0x1e52)){
-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+(0x258+8162-0x2239);total_bits_occupied=(
-user_data_header_length+(0x1355+393-0x14dd))*(0x1b0+5895-0x18af);fill_bits=(
-total_bits_occupied%(0x9c6+5276-0x1e5b));if(fill_bits!=(0x2295+527-0x24a4)){
-fill_bits=(0x121d+5117-0x2613)-fill_bits;}user_data_length=(total_bits_occupied+
-fill_bits+(user_data->sm_len*(0x22+2287-0x90a)))/(0x1c1a+1213-0x20d0);data[
-(0x45c+2707-0xeef)]=(UINT8)user_data_length;data[(0x8f6+143-0x984)]=
+WMS_GW_ALPHABET_7_BIT_DEFAULT){if(user_data->num_headers>(0xa04+178-0xab6)){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+(0x8a0+4814-0x1b6d);total_bits_occupied=(
+user_data_header_length+(0x55a+7024-0x20c9))*(0x9f1+6621-0x23c6);fill_bits=(
+total_bits_occupied%(0x1109+1391-0x1671));if(fill_bits!=(0x15d9+761-0x18d2)){
+fill_bits=(0x2545+348-0x269a)-fill_bits;}user_data_length=(total_bits_occupied+
+fill_bits+(user_data->sm_len*(0xbd9+6160-0x23e2)))/(0x12c5+4463-0x242d);data[
+(0x9a6+2201-0x123f)]=(UINT8)user_data_length;data[(0xaf+3616-0xece)]=
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>
-(0x67b+6683-0x2096)){if(wms_ts_compute_user_data_header_length(user_data->
+(0x792+4506-0x192c)){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[(0x5bb+844-0x907)]=(UINT8)(user_data->sm_len+user_data_header_length+
-(0xae8+540-0xd03));pos+=user_data_header_length+(0x22a1+820-0x25d4);}else{
-at_print(LOG_DEBUG,
+pos);data[(0x1242+3729-0x20d3)]=(UINT8)(user_data->sm_len+
+user_data_header_length+(0x1305+437-0x14b9));pos+=user_data_header_length+
+(0x366+8776-0x25ad);}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=(0xbd3+2682-0x164d),i;if(
+wms_status_e_type st=WMS_OK_S;UINT8*data;UINT8 pos=(0x2471+259-0x2574),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,
-(0x345+6752-0x1da5),WMS_MAX_LEN);data[pos]=(0x1db+8975-0x24ea);data[pos]|=
-deliver->more?(0x108d+3305-0x1d76):(0x22c+7498-0x1f72);data[pos]|=deliver->
-status_report_enabled?(0xa21+2408-0x1369):(0x1962+3268-0x2626);data[pos]|=
-deliver->user_data_header_present?(0xc03+4741-0x1e48):(0x1c1+7711-0x1fe0);data[
-pos]|=deliver->reply_path_present?(0x1a82+1233-0x1ed3):(0x1eb+4686-0x1439);pos++
-;i=wms_ts_encode_address(&deliver->address,&data[pos]);if(i==
-(0x10e3+4405-0x2218)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;data[pos]=deliver->
+(0x137b+81-0x13cc),WMS_MAX_LEN);data[pos]=(0x693+8285-0x26f0);data[pos]|=deliver
+->more?(0xb8d+13-0xb9a):(0x3c3+2409-0xd28);data[pos]|=deliver->
+status_report_enabled?(0xbdc+2397-0x1519):(0x1a7f+1457-0x2030);data[pos]|=
+deliver->user_data_header_present?(0x14f9+4132-0x24dd):(0x821+5078-0x1bf7);data[
+pos]|=deliver->reply_path_present?(0x11c9+4075-0x2134):(0x1292+4859-0x258d);pos
+++;i=wms_ts_encode_address(&deliver->address,&data[pos]);if(i==
+(0x120+9529-0x2659)){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==(0x8ea+1260-0xdd6)){
-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,
+wms_ts_encode_timestamp(&deliver->timestamp,data+pos);if(i==(0x1915+3310-0x2603)
+){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"
);st=WMS_INVALID_USER_DATA_SIZE_S;}else{i=wms_ts_encode_gw_user_data(&deliver->
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=(0x47b+8152-0x2453),j;if(timestamp!=NULL){if(!wms_ts_bcd_to_int(timestamp->
-year,&j)){at_print(LOG_DEBUG,
+ v=(0xd4+714-0x39e),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*(0xb29+3519-0x177b);if(!wms_ts_bcd_to_int(timestamp->month,&j)){at_print(
+);}i=j*(0xa32+857-0xc1e);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*(0x87d+710-0xb25);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>(0x15dc+338-0x1710)){v=(UINT8)((i+(0x2ab+1201-0x756))/
-(0xe4c+2498-0x1807)+(0x641+1632-0xbe1));}else if(i>=(0x811+7433-0x2519)){v=(
-UINT8)(i+(0x1d0+9455-0x2619));}else{if(!wms_ts_bcd_to_int(timestamp->day,&j)){
+,j);}i=i+j*(0x17d3+1840-0x1ee5);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*(0x434+2408-0xd84)*(0x14a+2735-0xbbd);if(!wms_ts_bcd_to_int(timestamp->hour,&
-j)){at_print(LOG_DEBUG,
++=j;if(i>(0x1405+2532-0x1dcb)){v=(UINT8)((i+(0x2a6+2123-0xaeb))/
+(0x15c+4512-0x12f5)+(0xfcb+4725-0x2180));}else if(i>=(0x1f71+1555-0x2583)){v=(
+UINT8)(i+(0x6bb+4780-0x18c1));}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*(0x998+4758-0x1c16)*(0x13f2+441-0x156f);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*(0x1bb+579-0x3c2);if(!wms_ts_bcd_to_int(timestamp->minute,&j)){at_print
-(LOG_DEBUG,
+);}i=i+j*(0xee0+3976-0x1e2c);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>(0x3fd+7386-0x20cb)*(0xb4a+2939-0x1689)){v=(UINT8)((i-((
-(0x758+53-0x781)*(0x333+257-0x3f8))+(0x1242+2559-0x1c24)))/(0x679+5261-0x1ae8)+
-(0x1932+3115-0x24ce));}else{v=(UINT8)((i+(0xaaa+6445-0x23d3))/
-(0x74b+2792-0x122e)-(0x65+5120-0x1464));}}}else{at_print(LOG_DEBUG,
+,j);}i+=j;if(i>(0xc85+3903-0x1bb8)*(0x11b+5511-0x1666)){v=(UINT8)((i-((
+(0x906+7359-0x25b9)*(0x1016+756-0x12ce))+(0xe88+5111-0x2262)))/
+(0x200a+1162-0x2476)+(0xa8f+4879-0x1d0f));}else{v=(UINT8)((i+(0x2d5+4724-0x1545)
+)/(0x11d9+1603-0x1817)-(0x1a20+3031-0x25f6));}}}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=(0xc50+6327-0x2507);switch(validity->format){
+validity,UINT8*data){UINT8 i,pos=(0x15c2+3905-0x2503);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==(0x1f4c+1398-0x24c2)){at_print(LOG_DEBUG,
+if(i==(0x93a+1507-0xf1d)){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=(0x1f63+123-0x1fde),i;if(submit==NULL||raw_ts_data_ptr==NULL){at_print
+UINT8 pos=(0x3b5+8890-0x266f),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,
-(0x8d6+3367-0x15fd),WMS_MAX_LEN);data[pos]=(0xc84+2558-0x1681);data[pos]|=submit
-->reject_duplicates?(0x675+4270-0x171f):(0x3a9+5749-0x1a1e);if(submit->validity.
-format>(0x1c7b+1403-0x21f3)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]
-|=submit->validity.format<<(0x38b+523-0x593);data[pos]|=submit->
-status_report_enabled?(0xcdf+2546-0x16b1):(0x1575+3643-0x23b0);data[pos]|=submit
-->user_data_header_present?(0x3d3+8486-0x24b9):(0x650+6777-0x20c9);data[pos]|=
-submit->reply_path_present?(0x179c+1652-0x1d90):(0x323+999-0x70a);pos++;data[pos
-]=(UINT8)submit->message_reference;pos++;i=wms_ts_encode_address(&submit->
-address,&data[pos]);if(i==(0x148+623-0x3b7)){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(
+(0x5d6+8348-0x2672),WMS_MAX_LEN);data[pos]=(0x1218+694-0x14cd);data[pos]|=submit
+->reject_duplicates?(0x8c7+555-0xaee):(0x564+745-0x84d);if(submit->validity.
+format>(0xa69+2125-0x12b3)){return st=WMS_INVALID_VALIDITY_FORMAT_S;}data[pos]|=
+submit->validity.format<<(0x642+96-0x69f);data[pos]|=submit->
+status_report_enabled?(0x104+2768-0xbb4):(0xfa0+377-0x1119);data[pos]|=submit->
+user_data_header_present?(0x529+5959-0x1c30):(0x1d07+354-0x1e69);data[pos]|=
+submit->reply_path_present?(0x1cc7+2701-0x26d4):(0x1251+4614-0x2457);pos++;data[
+pos]=(UINT8)submit->message_reference;pos++;i=wms_ts_encode_address(&submit->
+address,&data[pos]);if(i==(0x1846+3169-0x24a7)){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"
@@ -1422,21 +1423,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=(0x1e1a+950-0x21d0),i;if(status_report==NULL||raw_ts_data_ptr==NULL){
+UINT8 pos=(0x12d4+3249-0x1f85),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,
-(0x856+5843-0x1f29),WMS_MAX_LEN);data[pos]=(0x418+2577-0xe19);data[pos]|=
-status_report->more?(0x10a9+2310-0x19af):(0x562+4840-0x1846);data[pos]|=
-status_report->status_report_qualifier?(0x1b1+4609-0x1392):(0x1bd0+523-0x1ddb);
-data[pos]|=status_report->user_data_header_present?(0x25a+1300-0x72e):
-(0x1333+3432-0x209b);pos++;data[pos]=(UINT8)status_report->message_reference;pos
-++;i=wms_ts_encode_address(&status_report->address,&data[pos]);if(i==
-(0x1770+3084-0x237c)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0xc92+943-0x1041),WMS_MAX_LEN);data[pos]=(0x9d5+6878-0x24a3);data[pos]|=
+status_report->more?(0x4ef+1677-0xb7c):(0x85c+6733-0x22a5);data[pos]|=
+status_report->status_report_qualifier?(0x1a5+5520-0x1715):(0x1c92+547-0x1eb5);
+data[pos]|=status_report->user_data_header_present?(0x2043+1420-0x258f):
+(0xdb+8292-0x213f);pos++;data[pos]=(UINT8)status_report->message_reference;pos++
+;i=wms_ts_encode_address(&status_report->address,&data[pos]);if(i==
+(0x1876+2778-0x2350)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
wms_ts_encode_timestamp(&status_report->timestamp,data+pos);if(i==
-(0xf8d+2184-0x1815)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0x1c0a+679-0x1eb1)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
wms_ts_encode_timestamp(&status_report->discharge_time,data+pos);if(i==
-(0xb85+6573-0x2532)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;data[pos]=
+(0x922+4213-0x1997)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;data[pos]=
status_report->tp_status;pos++;data[pos]=(UINT8)status_report->mask;pos++;if(
status_report->mask&WMS_TPDU_MASK_PID){data[pos]=status_report->pid;pos++;}if(
status_report->mask&WMS_TPDU_MASK_DCS){pos+=wms_ts_encode_dcs(&status_report->
@@ -1451,7 +1452,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 (0x16f2+3137-0x2333)
+#if (0x6a4+3556-0x1488)
case WMS_FORMAT_CDMA:case WMS_FORMAT_ANALOG_AWISMS:case WMS_FORMAT_ANALOG_CLI:
case WMS_FORMAT_ANALOG_VOICE_MAIL:case WMS_FORMAT_ANALOG_SMS:case WMS_FORMAT_MWI
:st=wms_ts_encode_bearer_data(&ptClientTsData->u.cdma,ptRawTsData);break;
@@ -1461,7 +1462,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 (0x14cd+4505-0x2666)
+#if (0x228d+671-0x252c)
case WMS_TPDU_SUBMIT_REPORT_ACK:st=wms_ts_encode_submit_report_ack(&msg->u.
submit_report_ack,ptRawTsData);break;case WMS_TPDU_SUBMIT_REPORT_ERROR:st=
wms_ts_encode_submit_report_error(&msg->u.submit_report_error,ptRawTsData);break
@@ -1478,358 +1479,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=(0x1142+1279-0x1641);UINT16 pos=
-(0x300+9020-0x263c);if(in==NULL||out==NULL){at_print(LOG_DEBUG,
+out_len_max,UINT16 shift,UINT8*out){int i=(0x189b+3698-0x270d);UINT16 pos=
+(0x670+4903-0x1997);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(0x36d+6832-0x1e1d);}if(shift!=(0x1605+2169-0x1e7e))pos=pos+
-(0x151f+1146-0x1998);if(shift==(0xf61+660-0x11ee)){out[(0xed+1327-0x61c)]=in[
-(0x8a9+7561-0x2632)]>>(0xb68+3357-0x1884);shift=(0x17f8+1604-0x1e3c);i=
-(0x1538+2920-0x209f);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]
-<<shift)&(0x8dd+1320-0xd86);if(pos!=(0xf4d+1448-0x14f5)){
-#if (0x24c0+389-0x2644)
-if(shift==(0xa2c+3956-0x19a0)){out[i]|=(0xda+802-0x3fc);}else{out[i]|=in[pos-
-(0x226c+1109-0x26c0)]>>((0x5ad+3765-0x145a)-shift);}
+);return(0x2539+67-0x257c);}if(shift!=(0x615+7951-0x2524))pos=pos+
+(0x10a5+692-0x1358);if(shift==(0x825+4196-0x1882)){out[(0x181c+2922-0x2386)]=in[
+(0x1b25+1893-0x228a)]>>(0x6a9+2956-0x1234);shift=(0x552+365-0x6bf);i=
+(0x16a2+410-0x183b);}for(i=i;i<out_len_max&&i<in_len;i++,pos++){out[i]=(in[pos]
+<<shift)&(0x228b+715-0x24d7);if(pos!=(0x16c1+1292-0x1bcd)){
+#if (0xab4+6004-0x2227)
+if(shift==(0x14cd+726-0x17a3)){out[i]|=(0xaa5+523-0xcb0);}else{out[i]|=in[pos-
+(0x726+965-0xaea)]>>((0x1e2d+479-0x2004)-shift);}
#else
-out[i]|=in[pos-(0x12d9+2651-0x1d33)]>>((0x3c5+3140-0x1001)-shift);
+out[i]|=in[pos-(0x107+7849-0x1faf)]>>((0x686+6876-0x215a)-shift);
#endif
-}shift++;if(shift==(0x544+2798-0x102b)){shift=(0xfc4+947-0x1377);i++;if(i>=
+}shift++;if(shift==(0x4e7+7603-0x2293)){shift=(0x4cc+1590-0xb02);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]>>(0xb9a+4851-0x1e8c);}}return(UINT8)(pos);}UINT8
+);break;}out[i]=in[pos]>>(0x144a+140-0x14d5);}}return(UINT8)(pos);}UINT8
wms_ts_decode_address(const UINT8*data,wms_address_s_type*addr){UINT8 i,pos=
-(0xb5d+2391-0x14b4);i=data[pos];if(i>WMS_GW_ADDRESS_MAX){at_print(LOG_DEBUG,
+(0xc7b+2056-0x1483);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(0x6c0+5846-0x1d96);}addr->number_of_digits=i;pos++;addr->digit_mode=
+,i);return(0x1556+3180-0x21c2);}addr->number_of_digits=i;pos++;addr->digit_mode=
WMS_DIGIT_MODE_4_BIT;addr->number_type=(wms_number_type_e_type)((data[pos]&
-(0x16b6+1927-0x1dcd))>>(0x17b0+2252-0x2078));addr->number_plan=(
-wms_number_plan_e_type)(data[pos]&(0x195+6240-0x19e6));pos++;if(addr->
-number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0xe06+1406-0x1384);
-addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
-(0x2202+688-0x24b1))/(0xacd+5712-0x211b);addr->number_of_digits=(UINT8)(addr->
-number_of_digits*(0x112+9008-0x243e)/(0x1532+1-0x152c));(void)
+(0xf84+3108-0x1b38))>>(0x14d+659-0x3dc));addr->number_plan=(
+wms_number_plan_e_type)(data[pos]&(0x108c+4243-0x2110));pos++;if(addr->
+number_type==WMS_NUMBER_ALPHANUMERIC){UINT8 bytes_increment=(0x1dcb+2016-0x25ab)
+;addr->digit_mode=WMS_DIGIT_MODE_8_BIT;bytes_increment=(addr->number_of_digits+
+(0x285+8522-0x23ce))/(0x493+5320-0x1959);addr->number_of_digits=(UINT8)(addr->
+number_of_digits*(0xa56+2979-0x15f5)/(0x6f2+4558-0x18b9));(void)
wms_ts_unpack_gw_7_bit_chars(&data[pos],addr->number_of_digits,
-WMS_GW_ADDRESS_MAX,(0x1c50+335-0x1d9f),addr->digits);pos+=bytes_increment;}else{
-for(i=(0x1202+2206-0x1aa0);i<addr->number_of_digits;i++){addr->digits[i++]=data[
-pos]&(0x13f+1062-0x556);addr->digits[i]=(data[pos]&(0x81a+5996-0x1e96))>>
-(0x1618+3577-0x240d);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*
-data,wms_gw_dcs_s_type*dcs){UINT8 pos=(0x1c98+224-0x1d78);UINT8 i;if(data==NULL
-||dcs==NULL){at_print(LOG_DEBUG,
+WMS_GW_ADDRESS_MAX,(0x6bd+6902-0x21b3),addr->digits);pos+=bytes_increment;}else{
+for(i=(0x108+3652-0xf4c);i<addr->number_of_digits;i++){addr->digits[i++]=data[
+pos]&(0x266+8926-0x2535);addr->digits[i]=(data[pos]&(0x20f+9235-0x2532))>>
+(0x922+5828-0x1fe2);pos++;}}return pos;}UINT8 wms_ts_decode_dcs(const UINT8*data
+,wms_gw_dcs_s_type*dcs){UINT8 pos=(0x7eb+6845-0x22a8);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(0x8b8+7614-0x2676);}dcs->msg_class=WMS_MESSAGE_CLASS_NONE;dcs->
+);return(0x1956+2409-0x22bf);}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]&(0xdd9+3087-0x1928))>>(0x3a4+5684-0x19d2);
-switch(i){case(0xb88+437-0xd3d):dcs->is_compressed=data[pos]&
-(0x1040+5860-0x2704);if(data[pos]&(0x1f25+1485-0x24e2)){dcs->msg_class=(
-wms_message_class_e_type)(data[pos]&(0x1751+130-0x17d0));}else{dcs->msg_class=
+dcs->is_compressed=FALSE;i=(data[pos]&(0x7aa+7826-0x257c))>>(0x1911+1297-0x1e1c)
+;switch(i){case(0xc0c+1262-0x10fa):dcs->is_compressed=data[pos]&
+(0xce0+4956-0x201c);if(data[pos]&(0x6da+4538-0x1884)){dcs->msg_class=(
+wms_message_class_e_type)(data[pos]&(0xa52+3760-0x18ff));}else{dcs->msg_class=
WMS_MESSAGE_CLASS_NONE;}dcs->alphabet=(wms_gw_alphabet_e_type)((data[pos]&
-(0x132c+1517-0x190d))>>(0x1c8+1504-0x7a6));break;case(0x1bb1+1319-0x20d5):if((
-data[pos]&(0x14db+4489-0x2634))==(0x3bc+3142-0xfd2)){dcs->alphabet=(data[pos]&
-(0x1999+1425-0x1f26))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
-msg_class=(wms_message_class_e_type)(data[pos]&(0x1b3+2773-0xc85));dcs->
+(0x791+7808-0x2605))>>(0x8d9+4177-0x1928));break;case(0x148c+1911-0x1c00):if((
+data[pos]&(0xfa+4761-0x1363))==(0x242d+511-0x25fc)){dcs->alphabet=(data[pos]&
+(0xf61+2067-0x1770))?WMS_GW_ALPHABET_8_BIT:WMS_GW_ALPHABET_7_BIT_DEFAULT;dcs->
+msg_class=(wms_message_class_e_type)(data[pos]&(0x14b4+4519-0x2658));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]&
-(0x15dd+3979-0x2538))==(0x278+1031-0x67f)){dcs->msg_waiting=
+(0x6f+7040-0x1bbf))==(0x8a6+5788-0x1f42)){dcs->msg_waiting=
WMS_GW_MSG_WAITING_DISCARD;dcs->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}else if(
-(data[pos]&(0xa59+6455-0x2360))==(0xec3+17-0xec4)){dcs->msg_waiting=
+(data[pos]&(0x1df2+1110-0x2218))==(0x14d0+4049-0x2491)){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]&(0x575+5778-0x1bff))?TRUE:FALSE;dcs->
-msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0x676+6003-0x1de6))
+msg_waiting_active=(data[pos]&(0xa3c+1982-0x11f2))?TRUE:FALSE;dcs->
+msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(data[pos]&(0x882+6152-0x2087))
;}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=(0x2166+1316-0x268a),i,j;if
-(data==NULL||timestamp==NULL){at_print(LOG_DEBUG,
+UINT8*data,wms_timestamp_s_type*timestamp){UINT8 pos=(0x6dc+7796-0x2550),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(0xa0+6922-0x1baa);}i=((data[pos]&(0xaed+478-0xcbc))<<
-(0x1a05+993-0x1de2))+((data[pos]&(0xe21+2479-0x16e0))>>(0x1064+4257-0x2101));if(
+);return(0x9f2+2924-0x155e);}i=((data[pos]&(0x73f+3332-0x1434))<<
+(0xb47+3751-0x19ea))+((data[pos]&(0xadf+5217-0x1e50))>>(0x158d+3652-0x23cd));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=(0x340+1363-0x893);}timestamp->year=i;pos++;i=((data[pos]&
-(0x789+830-0xab8))<<(0x145+8088-0x20d9))+((data[pos]&(0xd41+2049-0x1452))>>
-(0x798+2935-0x130b));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x126+3559-0xf01)||j<
-(0x134c+2921-0x1eb4)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x1a66+1278-0x1f64);}timestamp->year=i;pos++;i=((data[pos]&
+(0xb16+3192-0x177f))<<(0x44+6810-0x1ada))+((data[pos]&(0x16ac+4039-0x2583))>>
+(0x903+1177-0xd98));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x1acc+408-0x1c58)||j<
+(0x268+2905-0xdc0)){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=(0x8f1+2962-0x1482);}}else{at_print(LOG_DEBUG,
+,j);i=(0x7d6+6976-0x2315);}}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=(0xbb2+49-0xbe2);}timestamp->month=i;pos++;i=((data[pos]&
-(0x86+418-0x219))<<(0x1200+3022-0x1dca))+((data[pos]&(0x148c+1914-0x1b16))>>
-(0x49a+295-0x5bd));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x159d+2457-0x1f17)||j<
-(0x5b8+3838-0x14b5)){at_print(LOG_DEBUG,
+,data[pos]);i=(0x1d36+157-0x1dd2);}timestamp->month=i;pos++;i=((data[pos]&
+(0x384+5227-0x17e0))<<(0x1c93+1064-0x20b7))+((data[pos]&(0xcbd+2788-0x16b1))>>
+(0x1fd+8724-0x240d));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xb8+5861-0x177e)||j<
+(0x12fc+1289-0x1804)){at_print(LOG_DEBUG,
"\x44\x61\x79\x20\x69\x73\x20\x69\x6e\x76\x61\x6c\x69\x64\x3a\x20\x25\x64",j);i=
-(0xc82+2056-0x1489);}}else{at_print(LOG_DEBUG,
+(0x2d9+1069-0x705);}}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=(0x1c54+2648-0x26ab);}timestamp->day=i;pos++;i=((data[pos]&
-(0x348+4060-0x1315))<<(0x5e4+748-0x8cc))+((data[pos]&(0x656+8563-0x26d9))>>
-(0x864+373-0x9d5));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xa05+2676-0x1462)){
+,data[pos]);i=(0x1982+1675-0x200c);}timestamp->day=i;pos++;i=((data[pos]&
+(0x1be0+2724-0x2675))<<(0x1086+5670-0x26a8))+((data[pos]&(0x2010+1847-0x2657))>>
+(0x1294+4386-0x23b2));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xd5d+6032-0x24d6)){
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=(0xba+3912-0x1002);}}else{at_print(LOG_DEBUG,
+,j);i=(0x136f+21-0x1384);}}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=(0xc9+5566-0x1687);}timestamp->hour=i;pos++;i=((data[pos]&
-(0x1608+2821-0x20fe))<<(0x1455+1828-0x1b75))+((data[pos]&(0x1461+3810-0x2253))>>
-(0x24d+497-0x43a));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xd97+3704-0x1bd4)){
+,data[pos]);i=(0x448+2080-0xc68);}timestamp->hour=i;pos++;i=((data[pos]&
+(0x8aa+2376-0x11e3))<<(0xbf2+214-0xcc4))+((data[pos]&(0xe39+2812-0x1845))>>
+(0x106a+4067-0x2049));if(wms_ts_bcd_to_int(i,&j)){if(j>(0xfe4+3672-0x1e01)){
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=(0x17b1+936-0x1b59);}}else{at_print(LOG_DEBUG,
+,j);i=(0xbe2+4838-0x1ec8);}}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=(0x1ef3+431-0x20a2);}timestamp->minute=i;pos++;i=((data[pos]&
-(0x383+700-0x630))<<(0xa7d+250-0xb73))+((data[pos]&(0x553+439-0x61a))>>
-(0x2118+1248-0x25f4));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x6bb+4325-0x1765)){
+,data[pos]);i=(0x2c3+9193-0x26ac);}timestamp->minute=i;pos++;i=((data[pos]&
+(0x17af+727-0x1a77))<<(0x1547+3056-0x2133))+((data[pos]&(0xbf3+3916-0x1a4f))>>
+(0x652+4232-0x16d6));if(wms_ts_bcd_to_int(i,&j)){if(j>(0x3c2+988-0x763)){
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=(0x1133+4769-0x23d4);}}else{at_print(LOG_DEBUG,
+,i);i=(0x934+4159-0x1973);}}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=(0x165+8026-0x20bf);}timestamp->second=i;pos++;if(data[pos]&
-(0x915+349-0xa6a)){timestamp->timezone=(data[pos]&(0x83+3024-0xc4c))*
-(0x1b12+1865-0x2251)+((data[pos]&(0x1a90+3079-0x25a7))>>(0x1948+2811-0x243f));
-timestamp->timezone*=(-(0x834+2905-0x138c));}else{timestamp->timezone=(sint7)((
-data[pos]&(0x559+5145-0x1963))*(0x8ed+1449-0xe8c)+((data[pos]&
-(0xc3d+3159-0x17a4))>>(0xa6+5724-0x16fe)));}if(timestamp->timezone>
-(0x2fd+4766-0x156b)||timestamp->timezone<-(0x84d+5297-0x1cce)){at_print(
-LOG_DEBUG,
+,data[pos]);i=(0x10f5+1076-0x1529);}timestamp->second=i;pos++;if(data[pos]&
+(0x85d+3528-0x161d)){timestamp->timezone=(data[pos]&(0x1a07+549-0x1c25))*
+(0x54d+5848-0x1c1b)+((data[pos]&(0x13cd+2069-0x1af2))>>(0x44a+6933-0x1f5b));
+timestamp->timezone*=(-(0xd50+1520-0x133f));}else{timestamp->timezone=(sint7)((
+data[pos]&(0xcac+3914-0x1be7))*(0x257+3095-0xe64)+((data[pos]&
+(0xbd9+1696-0x1189))>>(0x1468+2294-0x1d5a)));}if(timestamp->timezone>
+(0x1227+620-0x1463)||timestamp->timezone<-(0x21d+1164-0x679)){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=(0x1713+467-0x18e6);}pos++;return pos;
-}static UINT8 wms_ts_decode_udh_concat_8(const UINT8*udh,wms_udh_s_type*
-header_ptr){UINT8 pos=(0xdc7+4563-0x1f9a);if(udh==NULL||header_ptr==NULL){
-at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x338+6140-0x1b34);}if(udh[pos]<(0x7c9+6678-0x21dc)){at_print(LOG_DEBUG,
+,timestamp->timezone);timestamp->timezone=(0x18b1+1380-0x1e15);}pos++;return pos
+;}static UINT8 wms_ts_decode_udh_concat_8(const UINT8*udh,wms_udh_s_type*
+header_ptr){UINT8 pos=(0x8a0+758-0xb96);if(udh==NULL||header_ptr==NULL){at_print
+(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
+(0xd5+1560-0x6ed);}if(udh[pos]<(0x174+478-0x34f)){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(0x1351+2117-0x1b96);}if(udh[pos+(0x7b4+907-0xb3d)]==
-(0x20b+2356-0xb3f)||udh[pos+(0xd45+5751-0x23b9)]>udh[pos+(0x4e4+7248-0x2132)]){
+,udh[pos]);return(0x8f4+4867-0x1bf7);}if(udh[pos+(0x219+442-0x3d1)]==
+(0x28c+4193-0x12ed)||udh[pos+(0xc57+3706-0x1ace)]>udh[pos+(0x1bb6+374-0x1d2a)]){
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(0xeb5+866-0x1217);}pos++;header_ptr->header_id=WMS_UDH_CONCAT_8;
+);return(0x5ec+2592-0x100c);}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[(0xc48+3115-0x1873)]
-+(0x7ff+4146-0x1830));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x6d+2293-0x962);if(udh==NULL||header_ptr
+pos++];header_ptr->u.concat_8.seq_num=udh[pos++];return(udh[(0x1ff2+997-0x23d7)]
++(0xc7b+3937-0x1bdb));}static UINT8 wms_ts_decode_udh_concat16(const UINT8*udh,
+wms_udh_s_type*header_ptr){UINT8 pos=(0x90c+628-0xb80);if(udh==NULL||header_ptr
==NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");
-return(0xb00+5081-0x1ed9);}if(udh[pos]<(0x1321+1048-0x1735)){at_print(LOG_DEBUG,
+return(0x1b2+625-0x423);}if(udh[pos]<(0x555+7014-0x20b7)){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(0x115f+3051-0x1d4a);}if(udh[pos+(0x16c+245-0x25e)]==
-(0x8a7+1855-0xfe6)||udh[pos+(0x993+5839-0x205e)]==(0x88c+6366-0x216a)||udh[pos+
-(0x5f3+7017-0x2158)]>udh[pos+(0x43+88-0x98)])return(0x18d4+2040-0x20cc);
+,udh[pos]);return(0x1767+3024-0x2337);}if(udh[pos+(0xcdf+6064-0x248c)]==
+(0x9c6+4139-0x19f1)||udh[pos+(0x242d+316-0x2565)]==(0x12f+8734-0x234d)||udh[pos+
+(0x1338+4338-0x2426)]>udh[pos+(0x10a2+4051-0x2072)])return(0x117a+2833-0x1c8b);
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<<(0x429+5540-0x19c5))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
-pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[
-(0x1e3f+1021-0x223c)]+(0x16b7+3923-0x2609));}static UINT8
-wms_ts_udh_decode_first_seg_check(const UINT8 len,const UINT8*data,UINT8*
-is_first_segment_ptr){UINT8 pos=(0x756+7434-0x2460);UINT8 num_headers=
-(0xc21+274-0xd33);UINT8 udhl=(0x6d0+4796-0x198c);UINT8 iedl=(0x16f6+2439-0x207d)
-;UINT8 iei=(0x1f9+4560-0x13c9);*is_first_segment_ptr=TRUE;if(data==NULL||data[
-pos]==(0x148b+3751-0x2332)||len==(0xaf+6348-0x197b)){at_print(LOG_DEBUG,
+msg_ref<<(0x992+2487-0x1341))|udh[pos++];header_ptr->u.concat_16.total_sm=udh[
+pos++];header_ptr->u.concat_16.seq_num=udh[pos++];return(udh[(0xaa1+359-0xc08)]+
+(0x467+8445-0x2563));}static UINT8 wms_ts_udh_decode_first_seg_check(const UINT8
+ len,const UINT8*data,UINT8*is_first_segment_ptr){UINT8 pos=(0x39b+7115-0x1f66);
+UINT8 num_headers=(0x898+7306-0x2522);UINT8 udhl=(0x109c+4828-0x2378);UINT8 iedl
+=(0x13bf+2316-0x1ccb);UINT8 iei=(0x1107+3827-0x1ffa);*is_first_segment_ptr=TRUE;
+if(data==NULL||data[pos]==(0x15a2+3454-0x2320)||len==(0x12d4+2894-0x1e22)){
+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+(0x3ff+2688-0xe7e)];if(iei==
-WMS_UDH_CONCAT_16){if(data[pos+(0x5b4+2276-0xe93)]!=(0x1488+3349-0x219c)){
+WMS_MAX_UD_HEADERS)){iei=data[pos];iedl=data[pos+(0xc6b+3048-0x1852)];if(iei==
+WMS_UDH_CONCAT_16){if(data[pos+(0x973+6926-0x247c)]!=(0x1bd3+758-0x1ec8)){
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+=((0x405+5576-0x19cb)+iedl);}}return TRUE;}static UINT8
+;pos+=((0x9d0+4797-0x1c8b)+iedl);}}return TRUE;}static UINT8
wms_ts_decode_udh_special_sm(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
-pos=(0x7c9+4260-0x186d);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x13b1+3065-0x1faa);}if(
-udh[pos]<(0x137a+4116-0x238c)){at_print(LOG_DEBUG,
+pos=(0xf06+2717-0x19a3);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x922+1571-0xf45);}if(udh
+[pos]<(0x1ac2+331-0x1c0b)){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(0x1342+1841-0x1a73);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x202c+951-0x23e3);}pos++;header_ptr->header_id=
WMS_UDH_SPECIAL_SM;header_ptr->u.special_sm.msg_waiting=(
-wms_gw_msg_waiting_e_type)((udh[pos]>>(0x10bb+1610-0x16fe)==(0x14d9+151-0x1570))
+wms_gw_msg_waiting_e_type)((udh[pos]>>(0x2c9+8982-0x25d8)==(0x1354+4080-0x2344))
?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++]&(0x250+2100-0xa05))
-;header_ptr->u.special_sm.message_count=udh[pos++];return(udh[
-(0xb48+1975-0x12ff)]+(0x18a3+2896-0x23f2));}static UINT8
+msg_waiting_kind=(wms_gw_msg_waiting_kind_e_type)(udh[pos++]&(0x3b5+8059-0x22b1)
+);header_ptr->u.special_sm.message_count=udh[pos++];return(udh[
+(0x17d3+3171-0x2436)]+(0x18a+5052-0x1545));}static UINT8
wms_ts_decode_udh_port_8(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
-(0xcac+4221-0x1d29);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x675+7202-0x2297);}if(
-udh[pos]<(0x19f+1497-0x776)){at_print(LOG_DEBUG,
+(0x23a1+775-0x26a8);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x426+3760-0x12d6);}if(
+udh[pos]<(0x1018+3990-0x1fac)){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(0x421+4686-0x166f);}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[(0x863+6630-0x2249)]+(0x45c+6504-0x1dc3));}static UINT8
-wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=
-(0x67+609-0x2c8);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x83c+5161-0x1c65);}if(
-udh[pos]<(0x1594+260-0x1694)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x1a62+2651-0x24bd);}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[(0x16b7+2682-0x2131)]+(0xbef+3516-0x19aa));}
+static UINT8 wms_ts_decode_udh_port16(const UINT8*udh,wms_udh_s_type*header_ptr)
+{UINT8 pos=(0x366+1025-0x767);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
+,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x13dc+609-0x163d);}if(
+udh[pos]<(0x15e0+3918-0x252a)){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(0x32+5827-0x16f5);}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<<(0x106a+4566-0x2238))|udh[pos++];
+,udh[pos]);return(0x2372+348-0x24ce);}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<<(0xdf3+4065-0x1dcc))|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<<(0x6d2+5354-0x1bb4))|udh[pos++];return(udh[
-(0x182a+1981-0x1fe7)]+(0xb76+284-0xc91));}static UINT8
+)(header_ptr->u.wap_16.orig_port<<(0x10b2+616-0x1312))|udh[pos++];return(udh[
+(0x41c+5902-0x1b2a)]+(0xb72+789-0xe86));}static UINT8
wms_ts_decode_udh_text_formatting(const UINT8*udh,wms_udh_s_type*header_ptr){
-UINT8 pos=(0x3f9+4067-0x13dc);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
-,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x10b+6415-0x1a1a);}if(
-udh[pos]<(0xadf+2608-0x150c)){at_print(LOG_DEBUG,
+UINT8 pos=(0x65a+2705-0x10eb);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG
+,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xb4b+1052-0xf67);}if(
+udh[pos]<(0x1a4a+2424-0x23bf)){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(0x1188+608-0x13e8);}if(udh[pos]>=(0x1e7+9039-0x2532)){
+,udh[pos]);return(0x1a70+285-0x1b8d);}if(udh[pos]>=(0x9a+4735-0x1315)){
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]&
-(0x1655+3384-0x238a));header_ptr->u.text_formating.font_size=(
-wms_udh_font_size_e_type)((udh[pos]&(0x1104+3046-0x1cde))>>(0x20+5526-0x15b4));
-header_ptr->u.text_formating.style_bold=(udh[pos]&(0xd9d+93-0xdea))>>
-(0xd08+1568-0x1324);header_ptr->u.text_formating.style_italic=(udh[pos]&
-(0x1037+1440-0x15b7))>>(0x12b0+3125-0x1ee0);header_ptr->u.text_formating.
-style_underlined=(udh[pos]&(0x279+9268-0x266d))>>(0xe1c+3689-0x1c7f);header_ptr
-->u.text_formating.style_strikethrough=(udh[pos]&(0x1ce2+1704-0x230a))>>
-(0x8e8+3800-0x17b9);pos++;if(header_ptr->u.text_formating.is_color_present){
+(0x5f2+5300-0x1aa3));header_ptr->u.text_formating.font_size=(
+wms_udh_font_size_e_type)((udh[pos]&(0x1105+360-0x1261))>>(0xb0f+6736-0x255d));
+header_ptr->u.text_formating.style_bold=(udh[pos]&(0x1c7+5710-0x1805))>>
+(0x880+2324-0x1190);header_ptr->u.text_formating.style_italic=(udh[pos]&
+(0x395+728-0x64d))>>(0x75a+7649-0x2536);header_ptr->u.text_formating.
+style_underlined=(udh[pos]&(0x636+4966-0x195c))>>(0x107a+4727-0x22eb);header_ptr
+->u.text_formating.style_strikethrough=(udh[pos]&(0xea5+6104-0x25fd))>>
+(0x1392+2748-0x1e47);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]&(0xb8+796-0x3c5));header_ptr->u.text_formating.text_color_background=(
-wms_udh_text_color_e_type)((udh[pos]&(0xbb2+1669-0x1147))>>(0x1d4+9492-0x26e4));
-pos++;}return(udh[(0x1856+2247-0x211d)]+(0x7f6+7613-0x25b2));}static UINT8
+udh[pos]&(0x646+1075-0xa6a));header_ptr->u.text_formating.text_color_background=
+(wms_udh_text_color_e_type)((udh[pos]&(0x2382+162-0x2334))>>(0x69f+1078-0xad1));
+pos++;}return(udh[(0x734+1480-0xcfc)]+(0x872+375-0x9e8));}static UINT8
wms_ts_decode_udh_pre_def_sound(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
- pos=(0xbaf+5830-0x2275);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x14b2+1149-0x192f);}if(
-udh[pos]<(0x1a8f+2201-0x2326)){at_print(LOG_DEBUG,
+ pos=(0xe1a+4533-0x1fcf);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1912+2083-0x2135);}if(
+udh[pos]<(0x506+6237-0x1d61)){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(0x141b+3447-0x2192);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x1415+1973-0x1bca);}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[(0x1057+4760-0x22ef)]+
-(0x1170+4331-0x225a));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8
-*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0xed3+5356-0x23bf),j;if(udh==NULL||
+->u.pre_def_sound.snd_number=udh[pos++];return(udh[(0x185a+2311-0x2161)]+
+(0x849+6165-0x205d));}static UINT8 wms_ts_decode_udh_user_def_sound(const UINT8*
+udh,wms_udh_s_type*header_ptr){UINT8 pos=(0xca5+6542-0x2633),j;if(udh==NULL||
header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xc83+5038-0x2031);}if(
-udh[pos]==(0x2383+892-0x26ff)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x6fd+6505-0x2066);}if(
+udh[pos]==(0x1518+4539-0x26d3)){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(0x12a7+1375-0x1806);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
-header_ptr->u.user_def_sound.data_length=udh[pos++]-(0x8d4+489-0xabc);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(0x1389+3570-0x217b);}header_ptr->header_id=WMS_UDH_USER_DEF_SOUND;
+header_ptr->u.user_def_sound.data_length=udh[pos++]-(0x1133+4440-0x228a);
+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(0x19a6+1951-0x2145);}memset(header_ptr->u.
-user_def_sound.user_def_sound,(0x33a+6367-0x1b1a),WMS_UDH_MAX_SND_SIZE);for(j=
-(0xdd6+1667-0x1459);j<header_ptr->u.user_def_sound.data_length;j++)header_ptr->u
+,header_ptr->header_id);return(0x348+50-0x37a);}memset(header_ptr->u.
+user_def_sound.user_def_sound,(0x3c5+8359-0x236d),WMS_UDH_MAX_SND_SIZE);for(j=
+(0x138+6436-0x1a5c);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=(0xceb+942-0x1099);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1201+1293-0x170e);}if(
-udh[pos]!=(0x1e93+1483-0x245c)){at_print(LOG_DEBUG,
+pos=(0xba0+1730-0x1262);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x795+5556-0x1d49);}if(
+udh[pos]!=(0xbc5+6346-0x248d)){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(0x956+1213-0xe13);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x62c+4973-0x1999);}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=(0x1b18+896-0x1e98),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xe4a+569-0x1083);}if(udh
-[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_LARGE_BITMAP_SIZE+(0xb85+2850-0x16a6)))
-{at_print(LOG_DEBUG,
+pos=(0x1c00+44-0x1c2c),j,k;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1779+951-0x1b30);}if(
+udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_LARGE_BITMAP_SIZE+
+(0x1456+1954-0x1bf7))){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(0x1182+5434-0x26bc);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
-pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0x10b+595-0x35e);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0xc70+4910-0x1f9e);k<
+,udh[pos]);return(0xd6c+2039-0x1563);}header_ptr->header_id=WMS_UDH_LARGE_ANIM;
+pos++;header_ptr->u.large_anim.position=udh[pos++];for(j=(0x331+1800-0xa39);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x9a+7512-0x1df2);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=(0x415+2553-0xe0e),j,k;if(udh==NULL||
+wms_udh_s_type*header_ptr){UINT8 pos=(0x34c+4449-0x14ad),j,k;if(udh==NULL||
header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xe3d+2425-0x17b6);}if(
-udh[pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_SMALL_BITMAP_SIZE+
-(0xa87+5853-0x2163))){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x29+2745-0xae2);}if(udh[
+pos]!=(WMS_UDH_ANIM_NUM_BITMAPS*WMS_UDH_SMALL_BITMAP_SIZE+(0x1427+790-0x173c))){
+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(0x12b8+5053-0x2675);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
-pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0xbcf+695-0xe86);j<
-WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0x25+3632-0xe55);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=(0x1b97+1693-0x2234),j;if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1056+1313-0x1577);}if(
-udh[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x4d9+2865-0x1009)){at_print(LOG_DEBUG,
+,udh[pos]);return(0x112a+3680-0x1f8a);}header_ptr->header_id=WMS_UDH_SMALL_ANIM;
+pos++;header_ptr->u.small_anim.position=udh[pos++];for(j=(0xcbf+3014-0x1885);j<
+WMS_UDH_ANIM_NUM_BITMAPS;j++)for(k=(0xb38+6103-0x230f);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=(0x5c9+171-0x674),j;if(udh==NULL||
+header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x8ca+2928-0x143a);}if(
+udh[pos]!=WMS_UDH_LARGE_PIC_SIZE+(0x11e9+459-0x13b3)){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(0x16b5+2442-0x203f);}header_ptr->header_id=
+,udh[pos]);return(0xb58+2739-0x160b);}header_ptr->header_id=
WMS_UDH_LARGE_PICTURE;pos++;header_ptr->u.large_picture.position=udh[pos++];for(
-j=(0x244+3695-0x10b3);j<WMS_UDH_LARGE_PIC_SIZE;j++)header_ptr->u.large_picture.
+j=(0xab7+5373-0x1fb4);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=(0x12c1+2200-0x1b59),j;if(
+const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x6cd+7209-0x22f6),j;if(
udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x2397+447-0x2556);}if(
-udh[pos]!=WMS_UDH_SMALL_PIC_SIZE+(0x1bb+1068-0x5e6)){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x324+3688-0x118c);}if(
+udh[pos]!=WMS_UDH_SMALL_PIC_SIZE+(0x192a+3244-0x25d5)){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(0x2c1+9075-0x2634);}header_ptr->header_id=
+,udh[pos]);return(0xaaa+2061-0x12b7);}header_ptr->header_id=
WMS_UDH_SMALL_PICTURE;pos++;header_ptr->u.small_picture.position=udh[pos++];for(
-j=(0x5f7+2929-0x1168);j<WMS_UDH_SMALL_PIC_SIZE;j++)header_ptr->u.small_picture.
+j=(0x1d39+260-0x1e3d);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=(0x1b70+1835-0x229b),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(0x58d+3511-0x1344);}if(
-udh[pos]>WMS_UDH_VAR_PIC_SIZE+(0x1020+5446-0x2563)){at_print(LOG_DEBUG,
+UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x89f+5627-0x1e9a),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(0x6b8+1434-0xc52);}if(udh
+[pos]>WMS_UDH_VAR_PIC_SIZE+(0x9d4+4567-0x1ba8)){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(0x806+5673-0x1e2f);}if((udh[pos]-(0x7e6+686-0xa91))!=(udh[pos+
-(0x1062+3797-0x1f35)]*udh[pos+(0x5e2+7477-0x2314)])){at_print(LOG_DEBUG,
+,udh[pos]);return(0xcf+719-0x39e);}if((udh[pos]-(0xcfc+3800-0x1bd1))!=(udh[pos+
+(0x191b+3300-0x25fd)]*udh[pos+(0xc3+3985-0x1051)])){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(0xcd8+1359-0x1227);}pic_size=udh[pos++]-(0xe10+1420-0x1399);header_ptr
+);return(0xb9b+2733-0x1648);}pic_size=udh[pos++]-(0xb21+6460-0x245a);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++]*(0x27d+1507-0x858));
-header_ptr->u.var_picture.height=udh[pos++];for(j=(0xf24+3801-0x1dfd);j<pic_size
+header_ptr->u.var_picture.width=(UINT8)(udh[pos++]*(0x14c0+694-0x176e));
+header_ptr->u.var_picture.height=udh[pos++];for(j=(0x805+5040-0x1bb5);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=(0x17f2+3557-0x25d7);if(udh==NULL||header_ptr==NULL){
+header_ptr){UINT8 pos=(0x1005+231-0x10ec);if(udh==NULL||header_ptr==NULL){
at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0x949+1466-0xf03);}if(udh[pos]<(0x1efd+1547-0x2507)){at_print(LOG_DEBUG,
+(0x10dd+2038-0x18d3);}if(udh[pos]<(0x4a1+5254-0x1926)){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(0x322+1296-0x832);}pos++;header_ptr->header_id=
+,udh[pos]);return(0x1739+3690-0x25a3);}pos++;header_ptr->header_id=
WMS_UDH_USER_PROMPT;header_ptr->u.user_prompt.number_of_objects=udh[pos++];
-return(udh[(0x61f+6676-0x2033)]+(0x438+6028-0x1bc3));}static UINT8
+return(udh[(0x449+3483-0x11e4)]+(0x9b4+4794-0x1c6d));}static UINT8
wms_ts_decode_udh_eo(const UINT8*udh,UINT8 first_segment,wms_udh_s_type*
-header_ptr){UINT8 pos=(0x1499+659-0x172c),udh_length;if(udh==NULL||header_ptr==
+header_ptr){UINT8 pos=(0x337+6125-0x1b24),udh_length;if(udh==NULL||header_ptr==
NULL){at_print(LOG_DEBUG,"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return
-(0xadb+4272-0x1b8b);}if(udh[pos]==(0x601+7093-0x21b6)){at_print(LOG_DEBUG,
+(0x7c9+2633-0x1212);}if(udh[pos]==(0x7a6+7961-0x26bf)){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(0x320+7846-0x21c6);}udh_length=udh[pos++];header_ptr->header_id=
+);return(0x1419+3587-0x221c);}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
-(0xa2f+2497-0x13f0);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.
-length=udh[pos++]<<(0x6d+6197-0x189a);header_ptr->u.eo.length|=udh[pos++];
+(0x717+3222-0x13ad);}header_ptr->u.eo.reference=udh[pos++];header_ptr->u.eo.
+length=udh[pos++]<<(0x622+2229-0xecf);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++]<<(0xb0f+5384-0x200f);header_ptr
+udh[pos++];header_ptr->u.eo.position=udh[pos++]<<(0x16dd+488-0x18bd);header_ptr
->u.eo.position|=udh[pos++];}header_ptr->u.eo.content.length=(udh_length-pos)+
-(0x30d+4122-0x1326);memcpy(header_ptr->u.eo.content.data,udh+pos,header_ptr->u.
+(0x1f32+1569-0x2552);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=
-(0xc99+6577-0x264a);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1d22+1566-0x2340);}if(
-udh[pos]<(0x526+46-0x553)){at_print(LOG_DEBUG,
+(0x9d+7717-0x1ec2);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x1852+803-0x1b75);}if(
+udh[pos]<(0x95c+1976-0x1113)){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(0x54c+5339-0x1a27);}pos++;header_ptr->header_id=WMS_UDH_RFC822
-;header_ptr->u.rfc822.header_length=udh[pos++];return(udh[(0x45f+7047-0x1fe6)]+
-(0x2b3+8032-0x2212));}static UINT8 wms_ts_decode_udh_nat_lang_ss(const UINT8*udh
-,wms_udh_s_type*header_ptr){UINT8 pos=(0x870+2543-0x125f);if(udh==NULL||
-header_ptr==NULL){return(0x4b8+3236-0x115c);}if(udh[pos]!=
-WMS_UDH_OCTETS_NAT_LANG_SS){return(0xbb+4505-0x1254);}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(0x9e8+605-0xc45);}header_ptr->u.
-nat_lang_ss.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
-(0x2d4+4520-0x147c)]+(0x43+8940-0x232e));}static UINT8
-wms_ts_decode_udh_nat_lang_ls(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
-pos=(0x18d2+2052-0x20d6);if(udh==NULL||header_ptr==NULL){return
-(0x10b+1598-0x749);}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_LS){return
-(0x1f5+6414-0x1b03);}pos++;header_ptr->header_id=WMS_UDH_NAT_LANG_LS;if((
+,udh[pos]);return(0x178d+3576-0x2585);}pos++;header_ptr->header_id=
+WMS_UDH_RFC822;header_ptr->u.rfc822.header_length=udh[pos++];return(udh[
+(0x1721+3004-0x22dd)]+(0x5ad+484-0x790));}static UINT8
+wms_ts_decode_udh_nat_lang_ss(const UINT8*udh,wms_udh_s_type*header_ptr){UINT8
+pos=(0x334+5531-0x18cf);if(udh==NULL||header_ptr==NULL){return
+(0x161d+271-0x172c);}if(udh[pos]!=WMS_UDH_OCTETS_NAT_LANG_SS){return
+(0x57a+8082-0x250c);}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(0xd9c+2998-0x1952);}header_ptr->u.nat_lang_ls.nat_lang_id=(
-wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[(0x10ba+5565-0x2677)]+
-(0x1de4+1299-0x22f6));}static UINT8 wms_ts_decode_udh_other(const UINT8*udh,
-wms_udh_s_type*header_ptr){UINT8 pos=(0x4d4+3918-0x1422),i=(0x21e2+489-0x23cb);
-if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
-"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0xbe7+4629-0x1dfc);}if(
-udh[pos+(0xeb8+5665-0x24d8)]>WMS_UDH_OTHER_SIZE){at_print(LOG_DEBUG,
+return(0x12f2+1519-0x18e1);}header_ptr->u.nat_lang_ss.nat_lang_id=(
+wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[(0x4da+4534-0x1690)]+
+(0x1f5+4934-0x153a));}static UINT8 wms_ts_decode_udh_nat_lang_ls(const UINT8*udh
+,wms_udh_s_type*header_ptr){UINT8 pos=(0x5a4+2210-0xe46);if(udh==NULL||
+header_ptr==NULL){return(0xb95+2040-0x138d);}if(udh[pos]!=
+WMS_UDH_OCTETS_NAT_LANG_LS){return(0x483+1830-0xba9);}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(0x1069+2001-0x183a);}header_ptr->u
+.nat_lang_ls.nat_lang_id=(wms_udh_nat_lang_id_e_type)udh[pos++];return(udh[
+(0xdda+3896-0x1d12)]+(0x68b+6961-0x21bb));}static UINT8 wms_ts_decode_udh_other(
+const UINT8*udh,wms_udh_s_type*header_ptr){UINT8 pos=(0x1a35+1044-0x1e49),i=
+(0x31c+391-0x4a3);if(udh==NULL||header_ptr==NULL){at_print(LOG_DEBUG,
+"\x75\x64\x68\x20\x69\x73\x20\x4e\x55\x4c\x4c");return(0x139f+423-0x1546);}if(
+udh[pos+(0x967+2967-0x14fd)]>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(0x597+7115-0x2162);}header_ptr->header_id=(wms_udh_id_e_type)udh[pos];
+);return(0x1470+4694-0x26c6);}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=(0x188b+1379-0x1dee);i<header_ptr->u.other.
+header_length=udh[pos++];for(i=(0x716+4849-0x1a07);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=(0xb1c+6212-0x2360);UINT8
-header_length=(0x4b7+4106-0x14c1),num_headers=(0x94a+5948-0x2086);UINT8 udhl;
-UINT8 first_segment=TRUE;if(data==NULL||len==(0x2a5+3367-0xfcc)||data[pos]==
-(0x1d92+244-0x1e86)||num_headers_ptr==NULL||udh_ptr==NULL){at_print(LOG_DEBUG,
+num_headers_ptr,wms_udh_s_type*udh_ptr){UINT8 pos=(0x118d+1604-0x17d1);UINT8
+header_length=(0x1aff+2175-0x237e),num_headers=(0x1c68+1873-0x23b9);UINT8 udhl;
+UINT8 first_segment=TRUE;if(data==NULL||len==(0x872+1501-0xe4f)||data[pos]==
+(0x21+1086-0x45f)||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(0x235+8551-0x239c);}udhl=data[pos];pos++;while((pos<udhl)&&(num_headers
+);return(0xd35+2803-0x1828);}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[
@@ -1863,66 +1865,66 @@
data+pos,&udh_ptr[num_headers]);break;}if((UINT16)pos+(UINT16)header_length>
WMS_MAX_LEN){at_print(LOG_DEBUG,
"\x6e\x75\x6d\x62\x65\x72\x20\x6f\x66\x20\x62\x79\x74\x65\x73\x20\x64\x65\x63\x6f\x64\x65\x64\x20\x68\x61\x73\x20\x65\x78\x63\x65\x65\x64\x65\x64\x20\x55\x44\x48\x4c\x20\x76\x61\x6c\x75\x65\x20\x6f\x66\x20\x25\x64"
-,udhl);return(0x65b+8190-0x2659);}else if(header_length!=(0x166a+2446-0x1ff8)){
+,udhl);return(0x211c+1084-0x2558);}else if(header_length!=(0x1116+1408-0x1696)){
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=(0x382+611-0x5e5);return(0x74+8625-0x2225);}}if
-(num_headers>=WMS_MAX_UD_HEADERS){at_print(LOG_DEBUG,
+,pos,data[pos]);*num_headers_ptr=(0xbab+1377-0x110c);return(0xa63+6218-0x22ad);}
+}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+(0x10a+4890-0x1423);}if(pos!=(udhl+(0x1bc+2186-0xa45))){at_print(
+);pos=udhl+(0x503+3773-0x13bf);}if(pos!=(udhl+(0x820+718-0xaed))){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=(0x607+7115-0x21d2);udhl=(0x1b0a+787-0x1e1d);}if(num_headers>
-(0x56b+7075-0x210e)){*num_headers_ptr=num_headers;}return udhl;}UINT8
+);num_headers=(0x1af2+75-0x1b3d);udhl=(0x874+7549-0x25f1);}if(num_headers>
+(0x37+3229-0xcd4)){*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=(0x22b6+935-0x265d);UINT8 fill_bits=(0xc62+2097-0x1493);
-UINT8 user_data_length;UINT8 user_data_header_length=(0x140d+3672-0x2265);if(dcs
+user_data){UINT8 i,pos=(0x1b1+6697-0x1bda);UINT8 fill_bits=(0x395+2970-0xf2f);
+UINT8 user_data_length;UINT8 user_data_header_length=(0x236+8348-0x22d2);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(0x640+1349-0xb85);}(void)memset(user_data,(0xe04+4275-0x1eb7),sizeof(
-wms_gw_user_data_s_type));if(len==(0x150+3541-0xf25)){return(0x136a+2737-0x1e1b)
+);return(0x21ec+123-0x2267);}(void)memset(user_data,(0x13b3+3087-0x1fc2),sizeof(
+wms_gw_user_data_s_type));if(len==(0xd68+4590-0x1f56)){return(0x2ca+5324-0x1796)
;}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(0xdb5+1689-0x144e);}user_data_length=len;if(user_data_header_present){
+);return(0x47d+699-0x738);}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(0x1780+152-0x1818);}if(user_data_header_length>(0xbf6+5217-0x2057)){
-fill_bits=((len*(0x1caf+194-0x1d6a))-((user_data_header_length+
-(0x1db4+2127-0x2602))*(0xf73+3293-0x1c48)))%(0x63f+4736-0x18b8);user_data_length
-=(UINT8)(((len*(0x117+5963-0x185b))-((user_data_header_length+
-(0x1b78+1455-0x2126))*(0x6e8+7708-0x24fc)))/(0x10fb+4994-0x2476));pos=
-user_data_header_length+(0x1e98+328-0x1fdf);if(fill_bits!=(0x14e8+1420-0x1a74)){
-fill_bits=(0x1266+3316-0x1f52)-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,
+);return(0x1c0+207-0x28f);}if(user_data_header_length>(0xd69+1322-0x1293)){
+fill_bits=((len*(0x1242+2105-0x1a74))-((user_data_header_length+
+(0xb71+6857-0x2639))*(0x1952+2613-0x237f)))%(0x7a9+4801-0x1a63);user_data_length
+=(UINT8)(((len*(0x136+2147-0x992))-((user_data_header_length+(0xb84+5920-0x22a3)
+)*(0x5ba+2673-0x1023)))/(0x1165+2152-0x19c6));pos=user_data_header_length+
+(0x121f+2850-0x1d40);if(fill_bits!=(0x1033+4994-0x23b5)){fill_bits=
+(0x11bd+2596-0x1bd9)-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(0x510+465-0x6e1);}user_data_length=len;if(user_data_header_present){
+);return(0xe3d+5733-0x24a2);}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(0x301+6867-0x1dd4);}pos+=user_data_header_length+(0x17e6+2697-0x226e);
-user_data_length=(len-user_data_header_length)-(0x79b+4125-0x17b7);}memcpy(
+);return(0x8e6+4235-0x1971);}pos+=user_data_header_length+(0x655+1248-0xb34);
+user_data_length=(len-user_data_header_length)-(0x5d7+267-0x6e1);}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=
-(0x13b3+1251-0x1896),i;const UINT8*data=ptRawTsData->data;if(ptRawTsData==NULL||
+(0x18b7+1356-0x1e03),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]&(0x50a+5909-0x1c1c))!=
-(0x1a56+2961-0x25e7)){printf(
+);return WMS_NULL_PTR_S;}else if((data[pos]&(0x848+4748-0x1ad1))!=
+(0x231+3429-0xf96)){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]&
-(0x1799+678-0x1a3b))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
-(0xff1+1066-0x13fb))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
-(0x590+3527-0x1317))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
-(0x1181+5056-0x24c1))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&
-deliver->address);if(i==(0xa0+4546-0x1262)){printf(
+(0xefc+5254-0x237e))?FALSE:TRUE;deliver->status_report_enabled=(data[pos]&
+(0x706+6998-0x223c))?TRUE:FALSE;deliver->user_data_header_present=(data[pos]&
+(0x1d88+2265-0x2621))?TRUE:FALSE;deliver->reply_path_present=(data[pos]&
+(0xbf2+6163-0x2385))?TRUE:FALSE;pos++;i=wms_ts_decode_address(&data[pos],&
+deliver->address);if(i==(0x688+7832-0x2520)){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.
@@ -1930,74 +1932,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==(0xa11+905-0xd9a)){printf(
+timestamp);if(i==(0x78+8000-0x1fb8)){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-(0xc1d+4330-0x1d06)],data+pos,deliver->
+deliver->dcs,data[pos-(0x58a+1989-0xd4e)],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=(0x1dc5+1604-0x2409);if(data==NULL||validity==NULL){at_print(
-LOG_DEBUG,
+UINT8 i,pos=(0x5a2+501-0x797);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(0x512+3922-0x1464);}else{switch(validity->format){case
-WMS_GW_VALIDITY_NONE:memset(validity,(0x17e4+3089-0x23f5),sizeof(
+);return(0x74b+704-0xa0b);}else{switch(validity->format){case
+WMS_GW_VALIDITY_NONE:memset(validity,(0x76b+4720-0x19db),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=
-(0xa3b+2209-0x12dc),i;const UINT8*data;if(ptRawTsData==NULL||submit==NULL){
+(0xc21+4533-0x1dd6),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]&(0xda9+3593-0x1bae))?TRUE:FALSE;submit->validity.format=(
-wms_gw_validity_format_e_type)((data[pos]&(0x1001+3424-0x1d49))>>
-(0x4af+2498-0xe6e));submit->status_report_enabled=(data[pos]&(0x383+3898-0x129d)
-)?TRUE:FALSE;submit->user_data_header_present=(data[pos]&(0xaab+6383-0x235a))?
-TRUE:FALSE;submit->reply_path_present=(data[pos]&(0x69a+4734-0x1898))?TRUE:FALSE
-;pos++;submit->message_reference=data[pos];pos++;i=wms_ts_decode_address(&data[
-pos],&submit->address);if(i==(0xef1+1436-0x148d)){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==(0xcd4+5745-0x2345))){return
- WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=wms_ts_decode_gw_user_data(&submit->
-dcs,data[pos-(0xc6f+5476-0x21d2)],data+pos,submit->user_data_header_present,&
-submit->user_data);if(i>WMS_SMS_UDL_MAX_8_BIT){printf(
+pos]&(0x670+3867-0x1587))?TRUE:FALSE;submit->validity.format=(
+wms_gw_validity_format_e_type)((data[pos]&(0x7bc+7466-0x24ce))>>
+(0x1239+261-0x133b));submit->status_report_enabled=(data[pos]&
+(0xdb9+4970-0x2103))?TRUE:FALSE;submit->user_data_header_present=(data[pos]&
+(0x128+8845-0x2375))?TRUE:FALSE;submit->reply_path_present=(data[pos]&
+(0x29b+1647-0x88a))?TRUE:FALSE;pos++;submit->message_reference=data[pos];pos++;i
+=wms_ts_decode_address(&data[pos],&submit->address);if(i==(0x7b6+849-0xb07)){
+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==(0x937+7537-0x26a8))){return WMS_INVALID_PARM_VALUE_S;}pos+=i;pos++;i=
+wms_ts_decode_gw_user_data(&submit->dcs,data[pos-(0x8b3+5232-0x1d22)],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=(0xa5a+6229-0x22af),i;const UINT8*data;if(ptRawTsData==NULL||status_report==
+pos=(0x52+8305-0x20c3),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]&
-(0x3e4+4581-0x15c5)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
-(0x490+3275-0x113b)?TRUE:FALSE;status_report->user_data_header_present=(data[pos
-]&(0xa11+4912-0x1d01))?TRUE:FALSE;pos++;status_report->message_reference=data[
-pos];pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i==
-(0x652+2345-0xf7b)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
+(0x7d5+13-0x7de)?FALSE:TRUE;status_report->status_report_qualifier=data[pos]&
+(0x1ddc+1389-0x2329)?TRUE:FALSE;status_report->user_data_header_present=(data[
+pos]&(0x1a16+2732-0x2482))?TRUE:FALSE;pos++;status_report->message_reference=
+data[pos];pos++;i=wms_ts_decode_address(&data[pos],&status_report->address);if(i
+==(0x396+8276-0x23ea)){return WMS_INVALID_PARM_SIZE_S;}pos+=i;i=
wms_ts_decode_timestamp(data+pos,&status_report->timestamp);if(i==
-(0x5d3+2031-0xdc2)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
+(0x6d4+5702-0x1d1a)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;i=
wms_ts_decode_timestamp(data+pos,&status_report->discharge_time);if(i==
-(0x36b+2959-0xefa)){return WMS_INVALID_PARM_VALUE_S;}pos+=i;status_report->
+(0x13ff+1882-0x1b59)){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)(0x79+7858-0x1f2b);status_report->user_data.
-sm_len=(0x673+3387-0x13ae);status_report->mask&=(0x7c6+7878-0x258d);if((
-status_report->mask!=(0x1ad9+647-0x1c61))&&(status_report->mask!=
-(0x14+8459-0x211f))){pos++;if(status_report->mask&WMS_TPDU_MASK_PID){
+status_report->pid=(wms_pid_e_type)(0x16e3+3559-0x24ca);status_report->user_data
+.sm_len=(0x105+9698-0x26e7);status_report->mask&=(0x109d+5278-0x243c);if((
+status_report->mask!=(0x561+2114-0xca4))&&(status_report->mask!=
+(0x93+8278-0x20e9))){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-(0x628+7586-0x23c9)],data+pos,status_report->
+&status_report->dcs,data[pos-(0x1caf+654-0x1f3c)],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=
-(0x1efd+99-0x1f60);}return st;}wms_status_e_type wms_ts_decode(const
+(0x2c7+2648-0xd1f);}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 3be03ae..e4b762b 100755
--- a/ap/app/zte_comm/sms/src/sms_db.c
+++ b/ap/app/zte_comm/sms/src/sms_db.c
@@ -101,84 +101,86 @@
#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=
-(0x157+8481-0x2278);extern T_zUfiSms_ParaInfo g_zUfiSms_CurSmsPara;extern
+(0x5ec+1379-0xb4f);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={(0x704+3711-0x1583)};int
-tmp_i=(0x14cc+1981-0x1c89);
-#if (0x2021+138-0x20ab)
-if(atoi(date.year)>(0x1e33+1832-0x24f8)||atoi(date.year)<(0x19d0+552-0x1bf8)){
+T_zUfiSms_Date date){time_t timet;struct tm tmtime={(0x83d+3940-0x17a1)};int
+tmp_i=(0x1135+2913-0x1c96);
+#if (0x2d0+2067-0xae3)
+if(atoi(date.year)>(0xb32+7110-0x2695)||atoi(date.year)<(0x1015+2952-0x1b9d)){
printf("[SMS] getsecond error, year out of range: %d!!!",atoi(date.year));return
-(0x87f+7141-0x2464);}
+(0x19c2+1148-0x1e3e);}
#endif
-tmp_i=atoi(date.year);if(tmp_i<(0xe2+660-0x376)||tmp_i>INT_MAX-
-(0xefc+2762-0x19c5)){at_print(LOG_ERR,
+tmp_i=atoi(date.year);if(tmp_i<(0x52a+4135-0x1551)||tmp_i>INT_MAX-
+(0x957+3710-0x17d4)){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(0xb47+7044-0x26cb);}tmtime.tm_year=tmp_i+(0x10fb+1673-0xfb4)-
-(0x1ebd+3863-0x2668);tmp_i=atoi(date.month);if(tmp_i<(0xb7d+5472-0x20dd)||tmp_i>
-INT_MAX-(0x189+3848-0x1090)){at_print(LOG_ERR,
+,tmp_i);return(0x2+7660-0x1dee);}tmtime.tm_year=tmp_i+(0x992+7825-0x2053)-
+(0x21bb+3088-0x265f);tmp_i=atoi(date.month);if(tmp_i<(0x12d2+2271-0x1bb1)||tmp_i
+>INT_MAX-(0x1873+3653-0x26b7)){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(0x92d+3487-0x16cc);}tmtime.tm_mon=tmp_i-(0x1d74+489-0x1f5c);tmp_i
-=atoi(date.day);if(tmp_i<(0x13d0+2556-0x1dcc)||tmp_i>INT_MAX-(0x12d3+221-0x13af)
-){at_print(LOG_ERR,
+,tmp_i);return(0x1227+318-0x1365);}tmtime.tm_mon=tmp_i-(0x6f9+5624-0x1cf0);tmp_i
+=atoi(date.day);if(tmp_i<(0x1975+861-0x1cd2)||tmp_i>INT_MAX-(0xc+994-0x3ed)){
+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(0x652+2731-0x10fd);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);if
-(tmp_i<(0x1d20+231-0x1e07)||tmp_i>INT_MAX-(0x405+4098-0x1406)){at_print(LOG_ERR,
+,tmp_i);return(0x1866+1772-0x1f52);}tmtime.tm_mday=tmp_i;tmp_i=atoi(date.hour);
+if(tmp_i<(0xe26+3749-0x1ccb)||tmp_i>INT_MAX-(0x40c+7817-0x2294)){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(0x1948+3339-0x2653);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if
-(tmp_i<(0x712+5828-0x1dd6)||tmp_i>INT_MAX-(0x2141+519-0x2347)){at_print(LOG_ERR,
+,tmp_i);return(0x1f07+306-0x2039);}tmtime.tm_hour=tmp_i;tmp_i=atoi(date.min);if(
+tmp_i<(0x1135+2431-0x1ab4)||tmp_i>INT_MAX-(0x1060+5200-0x24af)){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(0x1bac+1864-0x22f4);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
-tmp_i<(0xad4+6223-0x2323)||tmp_i>INT_MAX-(0x5cd+3575-0x13c3)){at_print(LOG_ERR,
+,tmp_i);return(0x9b5+6871-0x248c);}tmtime.tm_min=tmp_i;tmp_i=atoi(date.sec);if(
+tmp_i<(0xb16+5378-0x2018)||tmp_i>INT_MAX-(0x381+1904-0xaf0)){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(0x33b+8444-0x2437);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
+,tmp_i);return(0x1aa+4328-0x1292);}tmtime.tm_sec=tmp_i;timet=mktime(&tmtime);
return timet;}T_zUfiSms_DbResult zUfiSms_OpenDb(void){int retry_times=
-(0x64b+6684-0x2067);int open_rst=SQLITE_ERROR;if(g_zUfiSms_DbPointer!=NULL){
+(0x1bf3+717-0x1ec0);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++<(0x841+46-0x865));printf(
+SQLITE_CANTOPEN&&retry_times++<(0x1aa9+2476-0x244b));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=(0x565+5742-0x1bd3);int sqlRst=SQLITE_ERROR;while(try_times++<
-(0x15f6+383-0x176b)){sqlRst=sqlite3_exec(g_zUfiSms_DbPointer,exec_sql,callback,
+ try_times=(0x11a9+219-0x1284);int sqlRst=SQLITE_ERROR;while(try_times++<
+(0x10d2+5048-0x2480)){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(
-(0x2c6+7779-0x2128));}if(sqlRst!=SQLITE_OK){printf(
+(0xdc1+589-0x100d));}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)==(0x75+3729-0xf06)){slog(PB_PRINT,SLOG_ERR,
+if(access(ZTE_WMS_TMP1_PATH,F_OK)==(0x513+6512-0x1e83)){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)!=(0x7c9+4877-0x1ad6)){slog(SMS_PRINT,SLOG_ERR,
+);if(remove(ZTE_WMS_TMP1_PATH)!=(0x591+4930-0x18d3)){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[(0xf85+5998-0x26db)]={(0x8f7+1147-0xd72)};char cmd[
-(0x25a+1483-0x7a5)]={(0xef4+1732-0x15b8)};sc_cfg_get(
+);}}{char rnum_buf[(0xfd2+2625-0x19fb)]={(0x19d+2578-0xbaf)};char cmd[
+(0x8a4+5409-0x1d45)]={(0x1634+127-0x16b3)};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)==(0x146a+51-0x149d)){if(remove(ZTE_WMS_SEC_PATH)!=
-(0x279+3787-0x1144)){slog(SMS_PRINT,SLOG_ERR,
+ZTE_WMS_TMP1_PATH,F_OK)==(0x1399+3485-0x2136)){if(remove(ZTE_WMS_SEC_PATH)!=
+(0x27b+5819-0x1936)){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)!=(0x12a0+804-0x15c4)){slog(
+);}if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=(0x32b+7667-0x211e)){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>=(0x1853+2666-0x22bc)){if(zresult[
-(0xa72+265-0xb7b)]==NULL){*(int*)fvarg=(0xfd6+3232-0x1c76);}else{*(int*)fvarg=
-atoi(zresult[(0xec9+1318-0x13ef)]);}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(
+**zresult,char**lname){if(columns>=(0xbb+1444-0x65e)){if(zresult[
+(0x1695+2568-0x209d)]==NULL){*(int*)fvarg=(0x215a+1040-0x256a);}else{*(int*)
+fvarg=atoi(zresult[(0xebc+4490-0x2046)]);}return SQLITE_OK;}else{return
+SQLITE_ERROR;}}int zUfiSms_SetCmdStatus(T_zUfiSms_StatusInfo*ptSetStatus){
+T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;char*strSQL=NULL;printf(
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x65\x74\x43\x6d\x64\x53\x74\x61\x74\x75\x73\x20\x65\x6e\x74\x65\x72\x2e" "\n"
);strSQL=sqlite3_mprintf(
"\x49\x4e\x53\x45\x52\x54\x20\x4f\x52\x20\x52\x45\x50\x4c\x41\x43\x45\x20\x49\x4e\x54\x4f\x20\x25\x73\x28\x43\x6d\x64\x2c\x43\x6d\x64\x5f\x53\x74\x61\x74\x75\x73\x2c\x45\x72\x72\x5f\x43\x6f\x64\x65\x2c\x53\x65\x6e\x64\x5f\x46\x61\x69\x6c\x5f\x43\x6f\x75\x6e\x74\x2c\x44\x65\x6c\x5f\x43\x6f\x75\x6e\x74\x29\x20"
@@ -187,28 +189,28 @@
ptSetStatus->err_code,ptSetStatus->send_failed_count,ptSetStatus->
delete_failed_count);result=zUfiSms_ExecSql(strSQL,NULL,NULL);sqlite3_free(
strSQL);return isSucess(result);}void zUfiSms_SetParameterNv(T_zUfiSms_ParaInfo*
-para){if((0x67b+2173-0xef8)==(int)para->status_report_on){sc_cfg_set(
+para){if((0x21c+2931-0xd8f)==(int)para->status_report_on){sc_cfg_set(
NV_REPORT_ENABLE,"\x30");}else{sc_cfg_set(NV_REPORT_ENABLE,"\x31");}if(
-(0xaf5+1853-0x1232)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
-"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0x132a+216-0x1402)==(int
+(0xd0+8469-0x21e5)==(int)para->sendfail_retry_on){sc_cfg_set(NV_SENDFAIL_RETRY,
+"\x30");}else{sc_cfg_set(NV_SENDFAIL_RETRY,"\x31");}if((0xa2c+5425-0x1f5d)==(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((0x1ad5+181-0x1b8a)==(int)para
+NV_DEFAULT_STORE,(char*)para->default_store);}if((0x94c+3304-0x1634)==(int)para
->mem_store){sc_cfg_set(NV_PRA_MEMSTORE,"\x30");}else{sc_cfg_set(NV_PRA_MEMSTORE
-,"\x31");}if((0xfaa+3077-0x1ab0)==(int)para->tp_validity_period){sc_cfg_set(
-NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0x286+2587-0xbf4)==(int)para
-->tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x6f\x6e\x65\x77\x65\x65\x6b");}else
- if((0x1362+2153-0x1b24)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP,
-"\x6f\x6e\x65\x5f\x64\x61\x79");}else if((0xbc8+2856-0x1661)==(int)para->
+,"\x31");}if((0x433+8857-0x25cd)==(int)para->tp_validity_period){sc_cfg_set(
+NV_SMS_VP,"\x6c\x6f\x6e\x67\x65\x73\x74");}else if((0xb12+6063-0x2214)==(int)
+para->tp_validity_period){sc_cfg_set(NV_SMS_VP,"\x6f\x6e\x65\x77\x65\x65\x6b");}
+else if((0xf75+4672-0x210e)==(int)para->tp_validity_period){sc_cfg_set(NV_SMS_VP
+,"\x6f\x6e\x65\x5f\x64\x61\x79");}else if((0x9b4+1883-0x1080)==(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=
-(0xaf4+4709-0x1d59);if(NULL==para){return-(0x10f3+980-0x14c6);}zUfiSms_ExecSql(
+(0x1905+2896-0x2455);if(NULL==para){return-(0x1b93+802-0x1eb4);}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>(0x1cf1+1387-0x225c)){strSQL=
+zUfiSms_GetFirstColumnInt,&count);if(count>(0x1ac6+2272-0x23a6)){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 +223,13 @@
mem_store,(int)para->tp_validity_period,(int)para->sendfail_retry_on,(int)para->
outdate_delete_on,para->default_store);}result=zUfiSms_ExecSql(strSQL,NULL,NULL)
;sqlite3_free(strSQL);if(result==ZTE_WMS_DB_OK){zUfiSms_SetParameterNv(para);
-return(0xc04+2556-0x1600);}return-(0x102b+1723-0x16e5);}int
-zUfiSms_GetTotalCount(const char*pDbTable,int*pTotalCount){T_zUfiSms_DbResult
-result=ZTE_WMS_DB_OK;char*strSQL=NULL;strSQL=sqlite3_mprintf(
+return(0x1641+988-0x1a1d);}return-(0xd12+1411-0x1294);}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=-(0x1638+683-0x18e2);zUfiSms_ExecSql(
+void){int max_sms_ref=-(0x1903+3549-0x26df);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,20 +238,20 @@
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,-
-(0x587+3410-0x12d8),&stmt,(0x1bad+644-0x1e31));while(SQLITE_ROW==sqlite3_step(
-stmt)){char*column_text=NULL;memset(pac->IndStr,(0x64+8226-0x2086),sizeof(pac->
-IndStr));memset(pac->Seg_Seq,(0x1c8+8961-0x24c9),sizeof(pac->Seg_Seq));if((
-column_text=sqlite3_column_text(stmt,(0x1200+1302-0x1716)))!=NULL)strncpy(pac->
-IndStr,column_text,sizeof(pac->FormatInd)-(0xc58+1484-0x1223));if((column_text=
-sqlite3_column_text(stmt,(0x131+3275-0xdfb)))!=NULL)strncpy(pac->Seg_Seq,
-column_text,sizeof(pac->FormatSeq)-(0x1abd+2650-0x2516));if((column_text=
-sqlite3_column_text(stmt,(0x70a+5528-0x1ca0)))!=NULL)strncpy(content,column_text
-,len-(0xb3b+2258-0x140c));printf(
+(0x1f9b+1706-0x2644),&stmt,(0x6d9+4803-0x199c));while(SQLITE_ROW==sqlite3_step(
+stmt)){char*column_text=NULL;memset(pac->IndStr,(0x460+3437-0x11cd),sizeof(pac->
+IndStr));memset(pac->Seg_Seq,(0x130c+863-0x166b),sizeof(pac->Seg_Seq));if((
+column_text=sqlite3_column_text(stmt,(0x426+944-0x7d6)))!=NULL)strncpy(pac->
+IndStr,column_text,sizeof(pac->FormatInd)-(0x1184+1342-0x16c1));if((column_text=
+sqlite3_column_text(stmt,(0x382+3319-0x1078)))!=NULL)strncpy(pac->Seg_Seq,
+column_text,sizeof(pac->FormatSeq)-(0x1f4+1961-0x99c));if((column_text=
+sqlite3_column_text(stmt,(0xea1+2783-0x197e)))!=NULL)strncpy(content,column_text
+,len-(0x1c8+6592-0x1b87));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(0x98a+5017-0x1d23);}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;
+return(0x19b6+1937-0x2147);}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"
"\x43\x63\x5f\x43\x6f\x6e\x74\x65\x6e\x74\x3d\x27\x25\x71\x27\x2c\x43\x6f\x6e\x74\x65\x6e\x74\x3d\x27\x25\x71\x27\x2c\x59\x65\x61\x72\x3d\x27\x25\x71\x27\x2c\x4d\x6f\x6e\x74\x68\x3d\x27\x25\x71\x27\x2c\x20"
@@ -269,8 +271,8 @@
"\x43\x6f\x6e\x74\x65\x6e\x74\x2c\x53\x6d\x73\x5f\x52\x65\x70\x6f\x72\x74\x5f\x52\x65\x63\x69\x76\x65\x64\x2c\x44\x72\x61\x66\x74\x5f\x47\x72\x6f\x75\x70\x5f\x49\x64\x2c\x59\x65\x61\x72\x2c\x4d\x6f\x6e\x74\x68\x2c\x44\x61\x79\x2c\x48\x6f\x75\x72\x2c\x4d\x69\x6e\x75\x74\x65\x2c\x53\x65\x63\x6f\x6e\x64\x2c\x54\x69\x6d\x65\x5a\x6f\x6e\x65\x2c\x4d\x6b\x74\x69\x6d\x65\x2c\x44\x69\x73\x70\x6c\x61\x79\x4d\x6f\x64\x65\x29\x20"
"\x56\x41\x4c\x55\x45\x53\x28" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x20\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x20\x27\x25\x64\x27\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x20" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c" "\'" "\x25\x71" "\'" "\x2c\x27\x25\x64\x27\x2c\x20\x27\x25\x64\x27\x29\x3b"
,pac->FormatInd,mem_store,db_data->tag,db_data->number,db_data->concat_sms,
-db_data->concat_info[(0xe42+1850-0x157c)],db_data->concat_info[
-(0x768+4385-0x1888)],pac->FormatSeq,concat_num,format_concat,db_data->tp_dcs,
+db_data->concat_info[(0x1d4f+290-0x1e71)],db_data->concat_info[
+(0x852+7103-0x2410)],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,21 +281,21 @@
"\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=
-(0x7e5+181-0x89a);int result=(0x962+954-0xd1c);result=zUfiSms_ExecSql(
+(0x91d+7211-0x2548);int result=(0x9aa+3738-0x1844);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-
-(0x842+609-0xaa2);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap=
-(0xb6d+3009-0x172e);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x325+4851-0x1617),
-ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x698+3345-0x13a8),ZTE_WMS_DEL_SIM_SQL},{
-(0xe01+915-0x1193),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0x1169+3504-0x1f18),
-ZTE_WMS_CREATE_SMS_REP_SQL},{(0xb31+227-0xc13),ZTE_WMS_CREATE_PAR_SQL},{
-(0x9ab+1079-0xde1),ZTE_WMS_CREATE_INFO_SQL},{(0x1cb2+368-0x1e21),
-ZTE_WMS_CREATE_CELL_BRO_SQL},{(0x371+3407-0x10bf),
-ZTE_WMS_CREATE_SEND_CONTENT_SQL},};for(iMap=(0x936+2685-0x13b3);iMap<sizeof(
+(0x133c+2156-0x1ba7);}return ConcatMaxRefer;}int zUfiSms_CreateTables(){int iMap
+=(0xb8b+3650-0x19cd);const T_zUfiSms_SQLMap SQL_MAP[]={{(0x1864+269-0x1970),
+ZTE_WMS_CREATE_TABLE_SMS_SQL},{(0x2f7+4057-0x12cf),ZTE_WMS_DEL_SIM_SQL},{
+(0x11+6522-0x198a),ZTE_WMS_CREATE_CMD_STATUS_SQL},{(0x214+8846-0x24a1),
+ZTE_WMS_CREATE_SMS_REP_SQL},{(0xe28+748-0x1113),ZTE_WMS_CREATE_PAR_SQL},{
+(0x1514+2602-0x1f3d),ZTE_WMS_CREATE_INFO_SQL},{(0xe23+6078-0x25e0),
+ZTE_WMS_CREATE_CELL_BRO_SQL},{(0x1d8b+1849-0x24c3),
+ZTE_WMS_CREATE_SEND_CONTENT_SQL},};for(iMap=(0x9b8+2718-0x1456);iMap<sizeof(
SQL_MAP)/sizeof(T_zUfiSms_SQLMap);iMap++){if(SQL_MAP[iMap].valid==
-(0x863+94-0x8c0)){if(zUfiSms_ExecSql(SQL_MAP[iMap].strSQL,NULL,NULL)!=
+(0x18+6796-0x1aa3)){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"
@@ -324,9 +326,9 @@
"\x27\x25\x64\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x64\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x20"
"\x27\x25\x71\x27\x2c\x27\x25\x71\x27\x2c\x27\x25\x75\x27\x2c\x20\x27\x25\x64\x27\x29\x3b"
,ptDbSaveData->index,pStorePos,ptDbSaveData->tag,ptDbSaveData->number,
-ptDbSaveData->concat_sms,ptDbSaveData->concat_info[(0x4cb+7108-0x208f)],
-ptDbSaveData->concat_info[(0x515+5106-0x1906)],ptDbSaveData->concat_info[
-(0xadc+6136-0x22d2)],ptDbSaveData->tp_dcs,ptDbSaveData->msg_ref,pContent,"\x30",
+ptDbSaveData->concat_sms,ptDbSaveData->concat_info[(0x888+4066-0x186a)],
+ptDbSaveData->concat_info[(0x2048+1542-0x264d)],ptDbSaveData->concat_info[
+(0x8bf+2411-0x1228)],ptDbSaveData->tp_dcs,ptDbSaveData->msg_ref,pContent,"\x30",
ptDbSaveData->draft_group_id,ptDbSaveData->julian_date.year,ptDbSaveData->
julian_date.month,ptDbSaveData->julian_date.day,ptDbSaveData->julian_date.hour,
ptDbSaveData->julian_date.min,ptDbSaveData->julian_date.sec,ptDbSaveData->
@@ -348,25 +350,25 @@
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x55\x70\x64\x61\x74\x65\x4e\x6f\x72\x6d\x61\x6c\x53\x6d\x73\x54\x6f\x44\x62\x20\x73\x71\x6c\x3d\x25\x73" "\n"
,strSQL);result=zUfiSms_ExecSql(strSQL,NULL,NULL);sqlite3_free(strSQL);return
isSucess(result);}int zUfiSms_GetFirstColumnStr(void*fvarg,int columns,char**
-zresult,char**lname){if(columns>=(0x278+2169-0xaf0)&&fvarg!=NULL){if(zresult[
-(0xe83+5308-0x233f)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
-strncpy(para->buf_addr,zresult[(0x60d+5752-0x1c85)],para->buf_len-
-(0x3cd+771-0x6cf));return SQLITE_OK;}}return SQLITE_ERROR;}int
+zresult,char**lname){if(columns>=(0x562+2613-0xf96)&&fvarg!=NULL){if(zresult[
+(0xe14+3309-0x1b01)]!=NULL){T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;
+strncpy(para->buf_addr,zresult[(0x17bd+3339-0x24c8)],para->buf_len-
+(0xc9b+4745-0x1f23));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={
-(0x2bb+5780-0x194f)};char*strSQL=NULL;if(NULL==item||NULL==item_data){return
+(0x18b+2907-0xce6)};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)||((0x13ca+524-0x15d6)==strcmp(
+sqlite3_free(strSQL);if((ZTE_WMS_DB_OK!=result)||((0x1cdd+410-0x1e77)==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[
-(0x23c7+416-0x24e7)]={(0x2291+1064-0x26b9)};snprintf(sql,sizeof(sql),
+(0xc6f+2336-0x150f)]={(0x1ad+3120-0xddd)};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-
-(0xcc4+3392-0x1a03)]);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}int
+(0x286+3832-0x117d)]);return isSucess(zUfiSms_ExecSql(sql,NULL,NULL));}int
zUfiSms_DeleteAllSimSmsInDb(void){return isSucess(zUfiSms_ExecSql(
"\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27"
ZTE_WMS_DB_SIM_TABLE"\x27\x3b",NULL,NULL));}int zUfiSms_DeleteNvSms(void){if(
@@ -375,11 +377,11 @@
"\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27"
ZTE_WMS_DB_NV_TABLE"\x27\x3b",NULL,NULL)){printf(
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x64\x65\x6c\x65\x74\x65\x20\x66\x61\x69\x6c" "\n"
-);return WMS_CMD_FAILED;}}else{int i=(0x592+6756-0x1ff6);printf(
+);return WMS_CMD_FAILED;}}else{int i=(0xa8a+2638-0x14d8);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=(0x1885+1214-0x1d43);i<g_zUfiSms_DelMsg.
-nv_count;i++){char sql[(0x618+5334-0x1a6e)]={(0x22d+9253-0x2652)};snprintf(sql,
-sizeof(sql),
+,g_zUfiSms_DelMsg.nv_count);for(i=(0x2cb+3195-0xf46);i<g_zUfiSms_DelMsg.nv_count
+;i++){char sql[(0x1605+3719-0x240c)]={(0xbec+1583-0x121b)};snprintf(sql,sizeof(
+sql),
"\x44\x45\x4c\x45\x54\x45\x20\x46\x52\x4f\x4d\x20\x73\x6d\x73\x20\x57\x48\x45\x52\x45\x20\x4d\x65\x6d\x5f\x53\x74\x6f\x72\x65\x3d\x27\x25\x73\x27\x20\x61\x6e\x64\x20\x69\x64\x3d\x27\x25\x64\x27\x3b"
,ZTE_WMS_DB_NV_TABLE,g_zUfiSms_DelMsg.nv_id[i]);if(ZTE_WMS_DB_OK!=
zUfiSms_ExecSql(sql,NULL,NULL)){printf(
@@ -387,38 +389,38 @@
,i);return WMS_CMD_FAILED;}}}printf(
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x44\x65\x6c\x65\x74\x65\x4e\x76\x53\x6d\x73\x3a\x64\x65\x6c\x65\x74\x65\x20\x73\x75\x63\x63\x65\x73\x73" "\n"
);return WMS_CMD_SUCCESS;}int zUfiSms_GetSmsIndex(int id,T_zUfiSms_ModifyTag*
-ptModifyTag,int is_cc){char sql[(0xe50+3478-0x1b66)]={(0xfbb+1657-0x1634)};
-T_zUfiSms_BufInfo buf_info={(0x1089+1378-0x15eb)};char str_index[
-(0x1326+300-0x1450)*WMS_MESSAGE_LIST_MAX]={(0x1cf1+865-0x2052)};buf_info.
-buf_addr=str_index;buf_info.buf_len=sizeof(str_index);snprintf(sql,sizeof(sql),
+ptModifyTag,int is_cc){char sql[(0xcba+2214-0x14e0)]={(0x3b3+4165-0x13f8)};
+T_zUfiSms_BufInfo buf_info={(0x7+9206-0x23fd)};char str_index[(0x852+662-0xae6)*
+WMS_MESSAGE_LIST_MAX]={(0x779+5858-0x1e5b)};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((0x2a2+9009-0x25d2)==is_cc){int i=(0x210f+853-0x2464);int
- j=(0x442+962-0x804);int count=(0x97f+4181-0x19d4);char**out_result=NULL;count=
-zUfiSms_SplitString(str_index,&out_result,((char)(0x1105+593-0x131b)));for(i=
-(0xa63+6821-0x2508);i<count;i++){if((0x1aa+6691-0x1bcd)!=strcmp(out_result[i],""
-)){ptModifyTag->indices[j++]=atoi(out_result[i]);}}ptModifyTag->num_of_indices=j
-;free(out_result);}else{ptModifyTag->indices[(0x1654+2966-0x21ea)]=atoi(
-str_index);ptModifyTag->num_of_indices=(0x1d9f+1430-0x2334);}ptModifyTag->
+);return ZUFI_FAIL;}if((0x19bc+1200-0x1e6b)==is_cc){int i=(0xb57+4976-0x1ec7);
+int j=(0x473+2301-0xd70);int count=(0x1e31+112-0x1ea1);char**out_result=NULL;
+count=zUfiSms_SplitString(str_index,&out_result,((char)(0x5e7+3174-0x1212)));for
+(i=(0x182+4377-0x129b);i<count;i++){if((0x621+1975-0xdd8)!=strcmp(out_result[i],
+"")){ptModifyTag->indices[j++]=atoi(out_result[i]);}}ptModifyTag->num_of_indices
+=j;free(out_result);}else{ptModifyTag->indices[(0x1a94+2004-0x2268)]=atoi(
+str_index);ptModifyTag->num_of_indices=(0x1c9b+710-0x1f60);}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[(0x48f+3858-0x1321)]={(0x45c+56-0x494)};int is_cc=(0xa93+420-0xc37);
-T_zUfiSms_DbResult result=ZTE_WMS_DB_OK;snprintf(sql,sizeof(sql),
+char sql[(0x108d+207-0x10dc)]={(0x3d+5790-0x16db)};int is_cc=(0x10c9+378-0x1243)
+;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-(0x2c1+6517-0x1c35);}return is_cc;}int
+,ZTE_WMS_DB_SMS_TABLE);return-(0xb67+2449-0x14f7);}return is_cc;}int
zUfiSms_UpdateSmsTagInDb(unsigned long id,unsigned int tags){char sql[
-(0x302+5317-0x1747)]={(0x2134+1260-0x2620)};snprintf(sql,sizeof(sql),
+(0xaf5+2847-0x1594)]={(0x65b+3574-0x1451)};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[
-(0xf6c+1391-0x145b)]={(0x545+4489-0x16ce)};if(pTotalCount==NULL){return
+(0x69c+4262-0x16c2)]={(0x2133+668-0x23cf)};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,
@@ -428,18 +430,18 @@
"\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[(0x112a+1944-0x1842)]=
-{(0x608+4501-0x179d)};snprintf(sql,sizeof(sql),
+result);}int zUfiSms_DeleteDraftSms(long iSmsId){char sql[(0xf3d+3910-0x1e03)]={
+(0x30a+3368-0x1032)};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[(0x1594+3634-0x2346)]={
-(0x1b22+2099-0x2355)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0x14a+7163-0x1d45);}
+int zUfiSms_SetConcatMaxRefer(int ref){char sql[(0x12b2+984-0x160a)]={
+(0x829+6001-0x1f9a)};if(ZTE_WMS_MAX_CONCAT_REF<ref){ref=(0xa09+4376-0x1b21);}
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[(0x1e17+1380-0x22fb)]={
-(0xad2+394-0xc5c)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0x35f+2326-0xc75);}snprintf(
-sql,sizeof(sql),
+;}int zUfiSms_SetMaxReference(int ref){char sql[(0x5b7+1409-0xab8)]={
+(0x10fc+4092-0x20f8)};if(ZTE_WMS_MAX_SMS_REF<ref){ref=(0xda6+1128-0x120e);}
+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))
;}int zUfiSms_InsertReportStatusToDb(unsigned char*pNumber,T_zUfiSms_Date*
@@ -451,75 +453,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>=(0xb49+6909-0x2645)&&fvarg!=NULL){if(zresult[(0x608+3518-0x13c6)]!=
-NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
-zresult[(0x1626+3828-0x251a)],sizeof(para->sca)-(0x1e3f+1511-0x2425));para->
-mem_store=atoi(zresult[(0x49+6851-0x1b0b)]);para->tp_validity_period=atoi(
-zresult[(0x1a2+1158-0x626)]);para->status_report_on=atoi(zresult[
-(0xbbc+4094-0x1bb7)]);para->sendfail_retry_on=atoi(zresult[(0x5b0+6994-0x20fe)])
-;para->outdate_delete_on=atoi(zresult[(0x17c+269-0x284)]);(void)strncpy(para->
-default_store,zresult[(0x421+3457-0x119c)],sizeof(para->default_store)-
-(0xabf+1832-0x11e6));return SQLITE_OK;}}return SQLITE_ERROR;}int
+{if(columns>=(0x160b+4256-0x26aa)&&fvarg!=NULL){if(zresult[(0x70d+3499-0x14b8)]
+!=NULL){T_zUfiSms_ParaInfo*para=(T_zUfiSms_ParaInfo*)fvarg;strncpy(para->sca,
+zresult[(0x362+5522-0x18f4)],sizeof(para->sca)-(0x1220+1218-0x16e1));para->
+mem_store=atoi(zresult[(0x2cb+9050-0x2624)]);para->tp_validity_period=atoi(
+zresult[(0x508+3836-0x1402)]);para->status_report_on=atoi(zresult[
+(0x1fa+4418-0x1339)]);para->sendfail_retry_on=atoi(zresult[(0x9c5+2668-0x142d)])
+;para->outdate_delete_on=atoi(zresult[(0x34+7299-0x1cb2)]);(void)strncpy(para->
+default_store,zresult[(0x552+1747-0xc1f)],sizeof(para->default_store)-
+(0xc53+4717-0x1ebf));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,
-(0x19b9+3271-0x2680),sizeof(T_zUfiSms_ParaInfo));return isSucess(zUfiSms_ExecSql
-(strSQL,zUfiSms_GetFirstColumnParaInfo,&g_zUfiSms_CurSmsPara));}int
+(0x7fc+1690-0xe96),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>=(0xcea+5135-0x20f8)
-&¶!=NULL)(void)strncpy(para->buf_addr,zresult[(0x629+1083-0xa64)],para->
-buf_len-(0x12bb+4691-0x250d));return(0x6cb+5699-0x1d0e);}int
+T_zUfiSms_BufInfo*para=(T_zUfiSms_BufInfo*)fvarg;if(column>=(0x220+2415-0xb8e)&&
+para!=NULL)(void)strncpy(para->buf_addr,zresult[(0xa58+5318-0x1f1e)],para->
+buf_len-(0x1eba+62-0x1ef7));return(0x1733+1008-0x1b23);}int
zUfiSms_GetSmsContent(char*pSmsBuf,int len){T_zUfiSms_BufInfo buf_info={
-(0xb04+2859-0x162f)};char*strSQL=
+(0xa92+1651-0x1105)};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,(0xb65+2606-0x1593),len);return isSucess(
+len;memset(buf_info.buf_addr,(0xc8b+679-0xf32),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=-(0x4f1+2902-0x1046);switch(
+char*sql=NULL;sqlite3_stmt*stmt=NULL;int id=-(0x6c2+745-0x9aa);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[(0xbd4+4664-0x1e0c)],
-ptDbSaveData->concat_info[(0xe04+1245-0x12e0)],pMemStore,
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0xb42+3511-0x18f9)],
+ptDbSaveData->concat_info[(0x35d+9058-0x26be)],pMemStore,
WMS_TAG_TYPE_MO_SENT_V01,WMS_TAG_TYPE_MO_NOT_SENT_V01);break;}case
-(0x67+3729-0xef4):{sql=sqlite3_mprintf(
+(0xb7f+6144-0x237b):{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[(0x1839+891-0x1bb4)],
-ptDbSaveData->concat_info[(0xa0a+1354-0xf53)],pMemStore,(0x8f+7220-0x1cbf));
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x798+3728-0x1628)],
+ptDbSaveData->concat_info[(0x367+4589-0x1553)],pMemStore,(0x33+6902-0x1b25));
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[(0x843+3691-0x16ae)],
-ptDbSaveData->concat_info[(0x3ab+1375-0x909)],pMemStore,WMS_TAG_TYPE_MT_READ_V01
-,WMS_TAG_TYPE_MT_NOT_READ_V01);break;}default:{sql=sqlite3_mprintf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x1856+2498-0x2218)],
+ptDbSaveData->concat_info[(0x2d9+681-0x581)],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[(0x10e0+861-0x143d)],
-ptDbSaveData->concat_info[(0x5e0+3512-0x1397)],pMemStore);at_print(LOG_ERR,
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0x7c4+5924-0x1ee8)],
+ptDbSaveData->concat_info[(0xbfc+2644-0x164f)],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,-(0xc0+2797-0xbac),&stmt,
-(0x2f+4854-0x1325))!=SQLITE_OK){at_print(LOG_ERR,
+sqlite3_prepare(g_zUfiSms_DbPointer,sql,-(0x1754+3010-0x2315),&stmt,
+(0x33b+3595-0x1146))!=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-
-(0x9d8+2709-0x146c);}while(SQLITE_ROW==sqlite3_step(stmt)){int j=
-(0x8bf+4782-0x1b6d);char**out_result=NULL;char*column_text=sqlite3_column_text(
-stmt,(0x227+2980-0xdcb));int count=-(0x5ed+3850-0x14f6);if(column_text!=NULL)
-count=zUfiSms_SplitString(column_text,&out_result,((char)(0x819+1508-0xdc2)));
-for(j=(0xcb+9258-0x24f5);j<count;j++){if((0x19f8+2561-0x23f9)==strcmp(out_result
-[j],"")){if(j+(0x13a2+2450-0x1d33)==ptDbSaveData->concat_info[
-(0x16dc+1709-0x1d87)]){id=sqlite3_column_int(stmt,(0x318+1897-0xa80));break;}}}
-if(out_result!=NULL){free(out_result);out_result=NULL;}if(-(0x3f8+2462-0xd95)!=
+(0x13d5+4588-0x25c0);}while(SQLITE_ROW==sqlite3_step(stmt)){int j=
+(0x2053+541-0x2270);char**out_result=NULL;char*column_text=sqlite3_column_text(
+stmt,(0x7f9+6678-0x220f));int count=-(0x149+4107-0x1153);if(column_text!=NULL)
+count=zUfiSms_SplitString(column_text,&out_result,((char)(0x1bc+4224-0x1201)));
+for(j=(0x70c+5342-0x1bea);j<count;j++){if((0x1150+4595-0x2343)==strcmp(
+out_result[j],"")){if(j+(0xd27+1941-0x14bb)==ptDbSaveData->concat_info[
+(0x124a+913-0x15d9)]){id=sqlite3_column_int(stmt,(0x1ba1+501-0x1d95));break;}}}
+if(out_result!=NULL){free(out_result);out_result=NULL;}if(-(0x9f8+1507-0xfda)!=
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>=(0x4f8+6699-0x1f22)){if(zresult[
-(0xfc0+2014-0x179e)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
-result->id[result->all_or_count]=atoi(zresult[(0x5b5+41-0x5de)]);result->
+lname){if(fvarg!=NULL&&columns>=(0xd8+4068-0x10bb)){if(zresult[
+(0x123+1387-0x68e)]!=NULL){T_zUfiSms_DelReq*result=(T_zUfiSms_DelReq*)fvarg;
+result->id[result->all_or_count]=atoi(zresult[(0x4e0+5388-0x19ec)]);result->
all_or_count++;return SQLITE_OK;}}return SQLITE_ERROR;}VOID
zUfiSms_CheckDbOutdateSms(const char*pDbTable,T_zUfiSms_DelReq*pSmsDel){char
-acSql[(0x17eb+3613-0x2588)]={(0xa37+7044-0x25bb)};struct timeval tp;if(
-(0xc06+4215-0x1c7d)!=gettimeofday(&tp,NULL)){printf(
+acSql[(0x1e9+8208-0x2179)]={(0x371+3112-0xf99)};struct timeval tp;if(
+(0x148+7302-0x1dce)!=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"
@@ -529,21 +531,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>=(0xff9+5883-0x26f2)){if(zresult[
-(0x6d6+1613-0xd23)]!=NULL&&zresult[(0xd31+2676-0x17a4)]!=NULL){SMS_MSG_INFO*msg=
-(SMS_MSG_INFO*)fvarg;memset(msg->id,(0x8dd+3084-0x14e9),sizeof(msg->id));memset(
-msg->total_seq,(0xb3d+5239-0x1fb4),sizeof(msg->total_seq));strncpy(msg->id,
-zresult[(0x1aa+6736-0x1bfa)],sizeof(msg->id)-(0x346+2831-0xe54));strncpy(msg->
-total_seq,zresult[(0x12f0+4456-0x2457)],sizeof(msg->total_seq)-
-(0x68b+2428-0x1006));printf(
+**lname){if(fvarg!=NULL&&column>=(0x1796+2368-0x20d4)){if(zresult[
+(0xe6a+2556-0x1866)]!=NULL&&zresult[(0xbf6+4390-0x1d1b)]!=NULL){SMS_MSG_INFO*msg
+=(SMS_MSG_INFO*)fvarg;memset(msg->id,(0xd13+4661-0x1f48),sizeof(msg->id));memset
+(msg->total_seq,(0x1ba6+876-0x1f12),sizeof(msg->total_seq));strncpy(msg->id,
+zresult[(0x15d1+1224-0x1a99)],sizeof(msg->id)-(0xc8b+3635-0x1abd));strncpy(msg->
+total_seq,zresult[(0x9fd+1338-0xf36)],sizeof(msg->total_seq)-
+(0x1455+2518-0x1e2a));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[(0xaaf+4974-0x1e1d)],
-ptDbSaveData->concat_info[(0xff+1562-0x718)]);printf(
+,ptDbSaveData->number,ptDbSaveData->concat_info[(0xecf+5858-0x25b1)],
+ptDbSaveData->concat_info[(0x1c89+843-0x1fd3)]);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 47586de..5effa02 100755
--- a/ap/app/zte_comm/sms/src/sms_fnc.c
+++ b/ap/app/zte_comm/sms/src/sms_fnc.c
@@ -8,18 +8,18 @@
#include "sms_fnc.h"
#include "sms_db.h"
#include "sms_code.h"
-#define SMS_RETRY_COUNT (0x287+1089-0x6c5)
-#define SHORT_INT_LEN (0x2225+134-0x22a5)
+#define SMS_RETRY_COUNT (0x98a+6705-0x23b8)
+#define SHORT_INT_LEN (0x1a6+932-0x544)
SMS_LOCATION g_zUfiSms_CurLocation=SMS_LOCATION_SIM;int
-g_zUfiSms_ConcatSmsReference=(0xbf4+6112-0x23d4);T_zUfiSms_ParaInfo
+g_zUfiSms_ConcatSmsReference=(0x14d4+1133-0x1941);T_zUfiSms_ParaInfo
g_zUfiSms_CurSmsPara={"",WMS_STORAGE_TYPE_UIM_V01,
-ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0x6aa+7951-0x25b9),
-(0x1f4d+433-0x20fe),(0x779+7983-0x26a8),"\x6e\x76"};int g_zUfiSms_Language=
-NOT_DEFINE_LANGUAGE;int g_zUfiSms_Dcs=(0x595+7665-0x2386);unsigned long
-g_zUfiSms_StoreCapablity[ZTE_WMS_MEMORY_MAX]={(0x1dd1+424-0x1f15),
+ZTE_WMS_SMS_DEFAULT_TP_VALIDITY_PERIOD_GW,(0x1f6+3482-0xf90),
+(0x1ee6+1570-0x2508),(0x324+7816-0x21ac),"\x6e\x76"};int g_zUfiSms_Language=
+NOT_DEFINE_LANGUAGE;int g_zUfiSms_Dcs=(0x3eb+7787-0x2256);unsigned long
+g_zUfiSms_StoreCapablity[ZTE_WMS_MEMORY_MAX]={(0x8e5+1611-0xecc),
ZTE_WMS_DB_MSG_COUNT_MAX};T_zSms_SendSmsReq g_zUfiSms_FinalCmgsBuf;SMS_PARAM
-g_zUfiSms_SendingSms;UINT16 g_zUfiSms_IsLanguageShift=(0x572+4038-0x1538);extern
- int g_zUfiSms_MsgRefer;extern T_zUfiSms_DelSms g_zUfiSms_DelMsg;extern
+g_zUfiSms_SendingSms;UINT16 g_zUfiSms_IsLanguageShift=(0x1cac+1235-0x217f);
+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;
@@ -31,21 +31,20 @@
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[(0x70b+7396-0x23bd)];int i=
-(0x1573+1836-0x1c9f);g_zUfiSms_DelMsg.nv_count=(0x860+1104-0xcb0);
-g_zUfiSms_DelMsg.nv_index=(0xb82+192-0xc42);g_zUfiSms_DelMsg.sim_count=
-(0xc5c+4145-0x1c8d);g_zUfiSms_DelMsg.sim_index=(0xd09+647-0xf90);for(i=
-(0x953+767-0xc52);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
-(0xddb+6246-0x2641),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+T_zUfiSms_DelReq*ptDelMsg){char acStorePos[(0x1784+2980-0x22f6)];int i=
+(0xecf+2783-0x19ae);g_zUfiSms_DelMsg.nv_count=(0x791+7903-0x2670);
+g_zUfiSms_DelMsg.nv_index=(0x10cd+529-0x12de);g_zUfiSms_DelMsg.sim_count=
+(0x11aa+4398-0x22d8);g_zUfiSms_DelMsg.sim_index=(0x2d5+1959-0xa7c);for(i=
+(0x5da+5527-0x1b71);i<ptDelMsg->all_or_count;i++){memset(acStorePos,
+(0x61a+8353-0x26bb),sizeof(acStorePos));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
"Mem_Store",acStorePos,sizeof(acStorePos),ptDelMsg->id[i])){return ZUFI_FAIL;}if
-((0x2d0+7049-0x1e59)==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){g_zUfiSms_DelMsg.
+((0x8f9+4407-0x1a30)==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((0x380+8167-0x2367)==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((0x9f+1751-0x776)==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",
@@ -69,94 +68,96 @@
SMS_STATE_RECVING:case SMS_STATE_RECVED:case SMS_STATE_DELSAVING:case
SMS_STATE_DELSAVED:{break;}default:{return;}}sc_cfg_set(NV_SMS_STATE,
ptStrSmsState[iNewState]);}int zUfiSms_CheckStoreDir(void){if(-
-(0xa13+4987-0x1d8d)==access(ZTE_WMS_DB_DIR,F_OK)){printf(
+(0x13d3+593-0x1623)==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(-(0x177f+1629-0x1ddb)==mkdir(ZTE_WMS_DB_DIR,
-(0xfb6+5383-0x22be))){printf(
+,ZTE_WMS_DB_DIR);if(-(0x2a7+4763-0x1541)==mkdir(ZTE_WMS_DB_DIR,
+(0x16ea+3701-0x2360))){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(-
-(0x534+6233-0x1d8c)==access(ZTE_WMS_DB_PATH,F_OK)){printf(
+(0x22+3160-0xc79)==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=(0x1866+536-0x1a7e);unsigned char mem_store_flag=
-(0x8a7+6329-0x2160);unsigned int tp_validity_period=(0xbb0+4827-0x1e8b);char
-Temp_sms_vp[(0x1b7a+623-0x1de1)]={(0x1c4f+751-0x1f3e)};CHAR reportEnable[
-(0xb4+425-0x22b)]={(0x387+3885-0x12b4)};CHAR smsLocation[(0x5e4+1908-0xd26)]={
-(0x17eb+3440-0x255b)};CHAR sendfailRetry[(0xa6+5553-0x1625)]={(0x355+71-0x39c)};
-CHAR outdateDelete[(0x768+4656-0x1966)]={(0x72b+5419-0x1c56)};CHAR defaultStore[
-(0x13f8+4191-0x2425)]={(0xb0d+3227-0x17a8)};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(
-(0x389+3261-0x1046)==strcmp(reportEnable,"\x31")){sts_flag=(0xb+2462-0x9a8);}
-g_zUfiSms_CurSmsPara.status_report_on=sts_flag;if((0xcfa+3890-0x1c2c)==strcmp(
-smsLocation,"\x4d\x45")){mem_store_flag=(0x11f8+2074-0x1a12);}else{
-mem_store_flag=(0x1+3553-0xde1);}g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(
-(0x216+1405-0x793)==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=(0x15a5+4430-0x25f4);if((0x4d2+5700-0x1b16)==strncmp(
-Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0x257+4877-0x155d))){
-tp_validity_period=(0x259+8653-0x2327);}if((0x7d5+1094-0xc1b)==strncmp(
-Temp_sms_vp,"\x6f\x6e\x65\x5f\x64\x61\x79",(0xccc+4988-0x2041))){
-tp_validity_period=(0x1a11+1172-0x1dfe);}if((0x2308+855-0x265f)==strncmp(
-Temp_sms_vp,"\x6f\x6e\x65\x77\x65\x65\x6b",(0x64c+4053-0x161a))){
-tp_validity_period=(0x786+7462-0x23ff);}if((0x4b0+8441-0x25a9)==strncmp(
-Temp_sms_vp,"\x74\x77\x65\x6c\x76\x65\x68",(0x932+1657-0xfa4))){
-tp_validity_period=(0x1534+2753-0x1f66);}g_zUfiSms_CurSmsPara.tp_validity_period
-=tp_validity_period;if((0x54b+6261-0x1dc0)==strcmp(sendfailRetry,"\x31")){
-g_zUfiSms_CurSmsPara.sendfail_retry_on=(0x469+6792-0x1ef0);}else{
-g_zUfiSms_CurSmsPara.sendfail_retry_on=(0x2220+627-0x2493);}if((0xe22+9-0xe2b)==
-strcmp(outdateDelete,"\x31")){g_zUfiSms_CurSmsPara.outdate_delete_on=
-(0xefd+2258-0x17ce);}else{g_zUfiSms_CurSmsPara.outdate_delete_on=
-(0x1b71+2510-0x253f);}if((0xfe7+3079-0x1bee)==strcmp(defaultStore,"\x73\x69\x6d"
+unsigned char sts_flag=(0x1260+4420-0x23a4);unsigned char mem_store_flag=
+(0x184d+855-0x1ba4);unsigned int tp_validity_period=(0xd2b+3310-0x1a19);char
+Temp_sms_vp[(0x1e2a+2055-0x2629)]={(0x1915+2577-0x2326)};CHAR reportEnable[
+(0x1341+1535-0x190e)]={(0xbd3+2577-0x15e4)};CHAR smsLocation[(0x2c0+7027-0x1e01)
+]={(0xe7b+2887-0x19c2)};CHAR sendfailRetry[(0xb8c+2266-0x1434)]={
+(0x336+5215-0x1795)};CHAR outdateDelete[(0x13df+3629-0x21da)]={
+(0xbe4+4943-0x1f33)};CHAR defaultStore[(0x1a63+2783-0x2510)]={
+(0x433+8285-0x2490)};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((0x1909+614-0x1b6f)==
+strcmp(reportEnable,"\x31")){sts_flag=(0x8a2+998-0xc87);}g_zUfiSms_CurSmsPara.
+status_report_on=sts_flag;if((0x48b+2336-0xdab)==strcmp(smsLocation,"\x4d\x45"))
+{mem_store_flag=(0x963+1374-0xec1);}else{mem_store_flag=(0x1191+4523-0x233b);}
+g_zUfiSms_CurSmsPara.mem_store=(unsigned int)((0x16b4+1161-0x1b3d)==
+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=
+(0x1a11+1560-0x1f2a);if((0xf58+4144-0x1f88)==strncmp(Temp_sms_vp,
+"\x6c\x6f\x6e\x67\x65\x73\x74",(0x1284+4325-0x2362))){tp_validity_period=
+(0x10e0+4840-0x22c9);}if((0x489+3404-0x11d5)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0xb98+5504-0x2111))){tp_validity_period=
+(0x115a+1213-0x1570);}if((0xcb9+2559-0x16b8)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0x2eb+8444-0x23e0))){tp_validity_period=
+(0x17f6+2837-0x225e);}if((0x942+2875-0x147d)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0x11bc+2029-0x19a2))){tp_validity_period=
+(0x499+826-0x744);}g_zUfiSms_CurSmsPara.tp_validity_period=tp_validity_period;if
+((0x1ea3+77-0x1ef0)==strcmp(sendfailRetry,"\x31")){g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0xaeb+1782-0x11e0);}else{g_zUfiSms_CurSmsPara.
+sendfail_retry_on=(0xf75+256-0x1075);}if((0x131+8934-0x2417)==strcmp(
+outdateDelete,"\x31")){g_zUfiSms_CurSmsPara.outdate_delete_on=
+(0x1b11+702-0x1dce);}else{g_zUfiSms_CurSmsPara.outdate_delete_on=
+(0xc36+3804-0x1b12);}if((0x113c+5006-0x24ca)==strcmp(defaultStore,"\x73\x69\x6d"
)){strncpy(g_zUfiSms_CurSmsPara.default_store,"\x73\x69\x6d",sizeof(
-g_zUfiSms_CurSmsPara.default_store)-(0x926+4742-0x1bab));}else{strncpy(
+g_zUfiSms_CurSmsPara.default_store)-(0x14b4+230-0x1599));}else{strncpy(
g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(g_zUfiSms_CurSmsPara.
-default_store)-(0x1e46+132-0x1ec9));}}void zUfiSms_GetDefaultPara(void){memset(&
-g_zUfiSms_CurSmsPara,(0x17c+3644-0xfb8),sizeof(T_zUfiSms_ParaInfo));
-g_zUfiSms_CurSmsPara.status_report_on=(0xa00+167-0xaa7);g_zUfiSms_CurSmsPara.
+default_store)-(0xa6d+5216-0x1ecc));}}void zUfiSms_GetDefaultPara(void){memset(&
+g_zUfiSms_CurSmsPara,(0x59a+1403-0xb15),sizeof(T_zUfiSms_ParaInfo));
+g_zUfiSms_CurSmsPara.status_report_on=(0x3cd+92-0x429);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
-=(0x173d+592-0x198d);g_zUfiSms_CurSmsPara.outdate_delete_on=(0xd60+165-0xe05);
-strncpy(g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(
-g_zUfiSms_CurSmsPara.default_store)-(0x2186+151-0x221c));}
-#if (0x1f34+261-0x2039)
+=(0x22c8+780-0x25d4);g_zUfiSms_CurSmsPara.outdate_delete_on=(0x1894+1550-0x1ea2)
+;strncpy(g_zUfiSms_CurSmsPara.default_store,"\x6e\x76",sizeof(
+g_zUfiSms_CurSmsPara.default_store)-(0x1160+3822-0x204d));}
+#if (0x1132+4303-0x2201)
T_zUfiSms_CmdStatus zUfiSms_SetParameters(T_zUfiSms_CmdMsgBuff*ptSmsBuffer){
T_zUfiSms_ParaInfo*ptSmsParameter=NULL;T_zUfiSms_ParaInfo tNewSmsParameter={
-(0x751+6759-0x21b8)};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));
+(0x1bcb+2062-0x23d9)};if(NULL==ptSmsBuffer){return WMS_CMD_FAILED;}
+ptSmsParameter=(T_zUfiSms_ParaInfo*)(&(ptSmsBuffer->cmd_info.set_sms_para));
+memcpy((void*)&tNewSmsParameter,(void*)ptSmsParameter,sizeof(T_zUfiSms_ParaInfo)
+);
#ifndef TSP_MODEL
if((g_zUfiSms_CurSmsPara.mem_store!=ptSmsParameter->mem_store)){if(
ZUFI_SMS_FAILURE==zUfiSms_SetCpms(ptSmsParameter)){at_print(LOG_ERR,
"\x73\x65\x74\x20\x63\x66\x67\x20\x72\x6f\x75\x74\x65\x73\x20\x66\x61\x69\x6c\x65\x64\x2e"
);return WMS_CMD_FAILED;}}
#endif
-if(strlen(ptSmsParameter->sca)!=(0x3bf+3641-0x11f8)){if(ZUFI_SMS_FAILURE==
+if(strlen(ptSmsParameter->sca)!=(0x1515+991-0x18f4)){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=(0x1dad+19-0x1dc0);if(ZUFI_SUCC!=
+int zUfiSms_LoadSmsPara(){int count=(0x2c5+2347-0xbf0);if(ZUFI_SUCC!=
zUfiSms_IsDbEmpty(ZTE_WMS_DB_PARAMETER_TABLE,&count)){return ZUFI_FAIL;}if(count
-==(0x414+4355-0x1517)){zUfiSms_GetDefaultCfgPara();if((0x710+3445-0x1485)!=
+==(0x1fd+7853-0x20aa)){zUfiSms_GetDefaultCfgPara();if((0x1b9d+172-0x1c49)!=
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((0xe6d+1970-0x161f)!=zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){
+();if((0x515+4414-0x1653)!=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=(0x112d+1371-0x1688);if((ZTE_WMS_MEMORY_SIM==mem_store)||(
+int total_count=(0x85a+4280-0x1912);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,54 +174,53 @@
,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((0x1baf+924-0x1f4b)==strcmp(
+int zUfiSms_SetStorePara(char*mem_store){if((0x1797+2268-0x2073)==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(
-(0x1303+4006-0x22a9)==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((0xa54+7240-0x269c)==strcmp(mem_store,
-"\x53\x52")){g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0x669+4683-0x18b2);(
-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,
+(0x5a8+896-0x928)==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((0x1af5+229-0x1bda)==strcmp(mem_store,"\x53\x52")){
+g_zUfiSms_CurSmsPara.mem_store=(unsigned int)(0x6aa+285-0x7c5);(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)-(0x15d+1228-0x628)
-);if(ZUFI_FAIL==zUfiSms_SetDbParameters(&g_zUfiSms_CurSmsPara)){at_print(LOG_ERR
-,
+g_zUfiSms_CurSmsPara.sca,sca,sizeof(g_zUfiSms_CurSmsPara.sca)-
+(0xb00+3770-0x19b9));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==(0x1af4+1880-0x224b)){g_zUfiSms_Dcs=DCS_ASC;
-g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0xb4d+1713-0x11fc)){
-g_zUfiSms_Dcs=DCS_USC;g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==
-(0xb14+4260-0x1bb5)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;}
-else if(cDcs==(0x1d6+1189-0x676)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=
+char cDcs){if(cDcs==(0x2a8+1431-0x83e)){g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language
+=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0xb92+512-0xd90)){g_zUfiSms_Dcs=DCS_USC;
+g_zUfiSms_Language=NOT_DEFINE_LANGUAGE;}else if(cDcs==(0x1b8b+1221-0x204d)){
+g_zUfiSms_Dcs=DCS_ASC;g_zUfiSms_Language=DCS_GSM7_SPANISH;}else if(cDcs==
+(0x512+7658-0x22f7)){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=(0x2370+766-0x266e);i<ptGroupSms
+total_receiver=ptSendMsg->receiver_count;for(i=(0xd16+4099-0x1d19);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=(0x685+7490-0x23c7);
+,i,ptGroupSms->receivers[i]);}ptGroupSms->current_receiver=(0x479+8387-0x253c);
return ZUFI_SUCC;}int zUfiSms_FillConcatSms(T_zUfiSms_SendReq*pSendSrcMsg,
-T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x1e19+1266-0x230b);int
-iUnitlen=(0xff9+4574-0x21d7);int iSegNo=(0x3e2+441-0x59b);unsigned char*
+T_zUfiSms_ConcatInfo*pDestConcatMsg){int iTotalLen=(0x15e4+3413-0x2339);int
+iUnitlen=(0x3a5+4972-0x1711);int iSegNo=(0xeb2+2243-0x1775);unsigned char*
pSmsConverted=NULL;unsigned char acConvertContent[
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*(0x4bc+7611-0x2273)
-+(0x89a+2908-0x13f2)]={(0x456+7064-0x1fee)};unsigned char acTmpContent[
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*(0x9e8+4796-0x1ca0)
-+(0xfdb+1311-0x14f6)]={(0x9d1+56-0xa09)};int iTimeZone=(0x58b+5250-0x1a0d);int
-tmp_i=(0x130c+4148-0x2340);if(NULL==pSendSrcMsg||NULL==pDestConcatMsg){return-
-(0x752+4516-0x18f5);}iTotalLen=pSendSrcMsg->msg_len;if(ZUFI_FAIL==
-zUfiSms_GetSmsContent(acTmpContent,sizeof(acTmpContent))){printf(
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
+(0x105b+1498-0x1631)+(0x2140+692-0x23f0)]={(0xd8+6280-0x1960)};unsigned char
+acTmpContent[ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX*
+(0x189f+232-0x1983)+(0xfd7+2799-0x1ac2)]={(0xd28+2943-0x18a7)};int iTimeZone=
+(0x50+4862-0x134e);int tmp_i=(0x2191+845-0x24de);if(NULL==pSendSrcMsg||NULL==
+pDestConcatMsg){return-(0x1ed0+1029-0x22d4);}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-(0x6b4+3946-0x161d);}printf(
+);return-(0x3d0+1390-0x93d);}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,(0x1610+539-0x182b),sizeof(acTmpContent));if(
+acTmpContent));memset(acTmpContent,(0x484+6438-0x1daa),sizeof(acTmpContent));if(
DCS_USC==g_zUfiSms_Dcs){pSmsConverted=acConvertContent;}else{if(
NOT_DEFINE_LANGUAGE==g_zUfiSms_Language){iTotalLen=
zUfiSms_ConvertAsciiToGsmDefault(acConvertContent,acTmpContent,pSendSrcMsg->
@@ -230,56 +230,56 @@
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)-(0x1021+2965-0x1bb5))){
-iTotalLen=sizeof(acConvertContent)-(0x1a6a+2369-0x23aa);}pDestConcatMsg->sms_len
-=iTotalLen;if((iTotalLen>ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX)||(g_zUfiSms_Language==
-DCS_PORTUGUESE&&iTotalLen>(0xda2+3796-0x1bdb))||((g_zUfiSms_Dcs==DCS_USC)&&
+=acTmpContent;}if(iTotalLen>(sizeof(acConvertContent)-(0x118f+4573-0x236b))){
+iTotalLen=sizeof(acConvertContent)-(0x666+6729-0x20ae);}pDestConcatMsg->sms_len=
+iTotalLen;if((iTotalLen>ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX)||(g_zUfiSms_Language==
+DCS_PORTUGUESE&&iTotalLen>(0x634+2803-0x108c))||((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*
-(0x3a+1916-0x7b4);}else{if(g_zUfiSms_Language==NOT_DEFINE_LANGUAGE||
+(0x1fe8+1726-0x26a4);}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>
-(0xda1+790-0x10b7)&&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=(0x8e0+369-0xa50);memcpy(pDestConcatMsg->msg_contents[
-(0x9cb+6309-0x2270)],pSmsConverted,iTotalLen);printf(
+(0x11d8+3054-0x1dc6)&&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=(0x642+309-0x776);memcpy(pDestConcatMsg->msg_contents[
+(0x5cb+6786-0x204d)],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[(0x1b69+2755-0x262c)]);}
+,iUnitlen,pDestConcatMsg->msg_contents[(0x55+9583-0x25c4)]);}
g_zUfiSms_ConcatTotalNum=pDestConcatMsg->total_msg;pDestConcatMsg->
-current_sending=(0x1397+1723-0x1a52);memcpy(&(pDestConcatMsg->date),&(
+current_sending=(0x1b2d+1716-0x21e1);memcpy(&(pDestConcatMsg->date),&(
pSendSrcMsg->date),sizeof(T_zUfiSms_Date));tmp_i=atoi(pDestConcatMsg->date.
-timezone);if(tmp_i<INT_MIN+(0x15a8+2750-0x2065)||tmp_i>INT_MAX-
-(0x626+4083-0x1618)){printf(
+timezone);if(tmp_i<INT_MIN+(0x1ac7+980-0x1e9a)||tmp_i>INT_MAX-
+(0x1d51+1366-0x22a6)){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*(0x178b+846-0x1ad5);memset(
-pDestConcatMsg->date.timezone,(0x272+5430-0x17a8),sizeof(pDestConcatMsg->date.
-timezone));if(iTimeZone>(0x1913+2370-0x2255)){snprintf(pDestConcatMsg->date.
+,tmp_i);return ZUFI_FAIL;}iTimeZone=tmp_i*(0x6f9+3018-0x12bf);memset(
+pDestConcatMsg->date.timezone,(0x3d+955-0x3f8),sizeof(pDestConcatMsg->date.
+timezone));if(iTimeZone>(0x2178+649-0x2401)){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=
-(0x143f+2283-0x1d2a);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
-user_data_header_present=TRUE;if((0x854+1748-0xf28)==ptConcatSms->
+(0x73c+8100-0x26e0);iHeaderNum=ptSubmit->user_data.num_headers;ptSubmit->
+user_data_header_present=TRUE;if((0x3e5+3791-0x12b4)==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+(0x151f+3786-0x23e8);ptSubmit->user_data.
+seq_num=ptConcatSms->current_sending+(0x74d+5683-0x1d7f);ptSubmit->user_data.
headers[iHeaderNum].u.concat_8.msg_ref=g_zUfiSms_ConcatSmsReference%
-(0x93f+5424-0x1d70);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
-(0xac0+6866-0x2591);ptDbSaveData->concat_info[(0x1635+3655-0x247c)]=
+(0x1e5d+1337-0x2297);ptSubmit->user_data.num_headers++;ptDbSaveData->concat_sms=
+(0x47c+8758-0x26b1);ptDbSaveData->concat_info[(0x4f0+7827-0x2383)]=
g_zUfiSms_ConcatSmsReference;}int zUfiSms_MakeFinalCmgsBuf(){SMS_PARAM tSmsData;
-int iPduLength=(0x1a71+891-0x1dec);int nSmscLength=(0x2240+242-0x2332);char
-Tempstrr[(0x17b+1450-0x723)]={(0x1cd8+314-0x1e12)};char Temp_sms_vp[
-(0x621+4855-0x1910)]={(0x555+2624-0xf95)};char tmpBuf1[(0x479+1708-0xb22)]={
-(0x20d+8173-0x21fa)};char tmpBuf2[(0x12e6+905-0x1669)]={(0xb76+3343-0x1885)};
-CHAR smsCenter[(0x70f+618-0x947)]={(0x1b88+755-0x1e7b)};memset(&tSmsData,
-(0x1ac1+2302-0x23bf),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
-(0x1b54+2415-0x24c3),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==
-g_zUfiSms_SendingSms.TP_DCS){int i=(0xd04+5842-0x23d6);for(;i<
+int iPduLength=(0x39d+5601-0x197e);int nSmscLength=(0x548+373-0x6bd);char
+Tempstrr[(0x107+2315-0xa10)]={(0x160+8901-0x2425)};char Temp_sms_vp[
+(0x5d1+463-0x798)]={(0x313+2754-0xdd5)};char tmpBuf1[(0x1a84+1930-0x220b)]={
+(0x52c+5031-0x18d3)};char tmpBuf2[(0x84d+6357-0x211c)]={(0x2bd+747-0x5a8)};CHAR
+smsCenter[(0x11aa+2559-0x1b77)]={(0x12+6030-0x17a0)};memset(&tSmsData,
+(0x258+1795-0x95b),sizeof(SMS_PARAM));memset(&g_zUfiSms_FinalCmgsBuf,
+(0xf7f+1821-0x169c),sizeof(T_zSms_SendSmsReq));if(CODE_GSM7==
+g_zUfiSms_SendingSms.TP_DCS){int i=(0x94c+5237-0x1dc1);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);
@@ -287,40 +287,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(((0x81c+3537-0x15ed)==strncmp(
-Tempstrr,"\x31",(0x158+6808-0x1bef)))&&(g_zUfiSms_ConcatSms.current_sending==
-g_zUfiSms_ConcatSms.total_msg-(0x202d+927-0x23cb))){tSmsData.TP_SRR=
-(0xb5f+1152-0xfde);}else{tSmsData.TP_SRR=(0x1172+5191-0x25b9);}tSmsData.TP_UDHI=
-g_zUfiSms_SendingSms.TP_UDHI;tSmsData.TP_VP=(0x10fa+5641-0x2604);sc_cfg_get(
-NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));if((0x1ff+8281-0x2258)==strncmp(
-Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0x1bc9+772-0x1ec6))){tSmsData.TP_VP=
-(0x84a+3259-0x1406);}else if((0x24ea+178-0x259c)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x5f\x64\x61\x79",(0x1514+4140-0x2539))){tSmsData.TP_VP=
-(0x8c1+1494-0xdf0);}else if((0x139c+112-0x140c)==strncmp(Temp_sms_vp,
-"\x6f\x6e\x65\x77\x65\x65\x6b",(0x12ad+1574-0x18cc))){tSmsData.TP_VP=
-(0x933+4405-0x19bb);}else if((0x259+3150-0xea7)==strncmp(Temp_sms_vp,
-"\x74\x77\x65\x6c\x76\x65\x68",(0xa79+3424-0x17d2))){tSmsData.TP_VP=
-(0x933+6713-0x22dd);}tSmsData.TP_PID=(0x76+5666-0x1698);
-#if (0x143d+3217-0x20cd)
+(NV_REPORT_ENABLE,Tempstrr,sizeof(Tempstrr));if(((0x230+4319-0x130f)==strncmp(
+Tempstrr,"\x31",(0x1c02+482-0x1de3)))&&(g_zUfiSms_ConcatSms.current_sending==
+g_zUfiSms_ConcatSms.total_msg-(0x160c+3311-0x22fa))){tSmsData.TP_SRR=
+(0x177f+3606-0x2594);}else{tSmsData.TP_SRR=(0xa3b+1887-0x119a);}tSmsData.TP_UDHI
+=g_zUfiSms_SendingSms.TP_UDHI;tSmsData.TP_VP=(0x4e0+6670-0x1def);sc_cfg_get(
+NV_SMS_VP,Temp_sms_vp,sizeof(Temp_sms_vp));if((0x168d+699-0x1948)==strncmp(
+Temp_sms_vp,"\x6c\x6f\x6e\x67\x65\x73\x74",(0x175b+3349-0x2469))){tSmsData.TP_VP
+=(0xb55+1236-0xf2a);}else if((0x29+7370-0x1cf3)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x5f\x64\x61\x79",(0x3b5+5964-0x1afa))){tSmsData.TP_VP=
+(0x1745+3553-0x247f);}else if((0x1224+3329-0x1f25)==strncmp(Temp_sms_vp,
+"\x6f\x6e\x65\x77\x65\x65\x6b",(0x12c2+2261-0x1b90))){tSmsData.TP_VP=
+(0xd64+620-0xf23);}else if((0x1fc7+1670-0x264d)==strncmp(Temp_sms_vp,
+"\x74\x77\x65\x6c\x76\x65\x68",(0xf7+7437-0x1dfd))){tSmsData.TP_VP=
+(0x1bf2+1132-0x1fcf);}tSmsData.TP_PID=(0x1af4+1866-0x223e);
+#if (0x7+697-0x2bf)
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 (0x9e3+6701-0x240f)
+#if (0xaa4+1108-0xef7)
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,(0x17f5+3126-0x2429));
+(void)String2Bytes(g_zUfiSms_FinalCmgsBuf.pdu,tmpBuf1,(0x84+8999-0x23a9));
Bytes2String(tmpBuf1,tmpBuf2,strlen(tmpBuf1));nSmscLength=atoi(tmpBuf2);if(
-nSmscLength<(0x1b2b+1607-0x2172)||nSmscLength>INT_MAX-(0x94c+3714-0x17cd)){
+nSmscLength<(0x1690+3128-0x22c8)||nSmscLength>INT_MAX-(0x19d+5543-0x1743)){
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=(0xab3+1545-0x10bc);;}nSmscLength++;
-g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0x633+4883-0x1944)-nSmscLength;
-#if (0x17f+7795-0x1ff1)
+,nSmscLength);nSmscLength=(0x653+5769-0x1cdc);;}nSmscLength++;
+g_zUfiSms_FinalCmgsBuf.length=iPduLength/(0x86b+6149-0x206e)-nSmscLength;
+#if (0xbac+2869-0x16e0)
printf(
"\x5b\x53\x4d\x53\x63\x6f\x72\x65\x6d\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x4d\x61\x6b\x65\x46\x69\x6e\x61\x6c\x43\x6d\x67\x73\x42\x75\x66\x20\x6d\x61\x6b\x65\x20\x65\x6e\x64\x20\x70\x64\x75\x20\x64\x61\x74\x61" "\n"
);printf(
@@ -330,22 +330,22 @@
return ZUFI_SUCC;}int zUfiSms_FillSubmitTpdu(T_zUfiSms_ConcatInfo*ptConcatSms,
T_zUfiSms_GroupInfo*ptGroupSms,int iSmsLen,T_zUfiSms_SubmitTpdu*ptSubmit,
T_zUfiSms_DbStoreData*ptDbSaveData){if(NULL==ptSubmit||NULL==ptConcatSms||NULL==
-ptGroupSms||NULL==ptDbSaveData){return-(0x113b+5403-0x2655);}ptSubmit->
+ptGroupSms||NULL==ptDbSaveData){return-(0xdc7+2490-0x1780);}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(((0x1509+857-0x1861)<ptConcatSms->
-total_msg)&&(ptConcatSms->current_sending+(0x4e9+2641-0xf39)<ptConcatSms->
-total_msg)){ptSubmit->status_report_enabled=(0x339+22-0x34f);}ptSubmit->
+g_zUfiSms_CurSmsPara.status_report_on;if(((0x99a+5061-0x1d5e)<ptConcatSms->
+total_msg)&&(ptConcatSms->current_sending+(0x1987+3449-0x26ff)<ptConcatSms->
+total_msg)){ptSubmit->status_report_enabled=(0x698+2015-0xe77);}ptSubmit->
message_reference=g_zUfiSms_MsgRefer;ptSubmit->pid=WMS_PID_DEFAULT;ptSubmit->dcs
-.msg_class=(wms_message_class_e_type)(0xd52+274-0xe60);ptSubmit->dcs.
-is_compressed=(0xddb+2211-0x167e);ptSubmit->dcs.alphabet=(g_zUfiSms_Dcs==DCS_ASC
-)?WMS_GW_ALPHABET_7_BIT_DEFAULT:WMS_GW_ALPHABET_UCS2;ptSubmit->validity.format=
+.msg_class=(wms_message_class_e_type)(0x483+1641-0xae8);ptSubmit->dcs.
+is_compressed=(0x3b1+2508-0xd7d);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=
-(0x162+4315-0x123d);if(ptConcatSms->total_msg>(0x17f1+1252-0x1cd4)){
+(0x1a85+3170-0x26e7);if(ptConcatSms->total_msg>(0x1cd5+1562-0x22ee)){
zUfiSms_FillDateheader(ptSubmit,ptConcatSms,ptDbSaveData);ptDbSaveData->
-concat_info[(0x1c4d+1408-0x21cb)]=ptConcatSms->current_sending+
-(0x589+7547-0x2303);ptDbSaveData->concat_info[(0xb35+912-0xec4)]=ptConcatSms->
+concat_info[(0x114a+2823-0x1c4f)]=ptConcatSms->current_sending+
+(0xce6+6447-0x2614);ptDbSaveData->concat_info[(0x178+8936-0x245f)]=ptConcatSms->
total_msg;}if(g_zUfiSms_Language==DCS_PORTUGUESE){UINT8 i=ptSubmit->user_data.
num_headers;ptSubmit->user_data_header_present=TRUE;ptSubmit->user_data.headers[
i].header_id=WMS_UDH_NAT_LANG_SS;ptSubmit->user_data.headers[ptSubmit->user_data
@@ -353,28 +353,28 @@
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][(0x4a8+5857-0x1b89)]==((char)(0x3ba+2013-0xb6c))){
+ptGroupSms->current_receiver][(0x9a2+3662-0x17f0)]==((char)(0x12f+1280-0x604))){
(void)zUfiSms_CharToInt(ptGroupSms->receivers[ptGroupSms->current_receiver]+
-(0x1016+2031-0x1804),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])
--(0x3ca+6135-0x1bc0),ptSubmit->address.digits);ptSubmit->address.number_type=
+(0xc08+662-0xe9d),strlen(ptGroupSms->receivers[ptGroupSms->current_receiver])-
+(0x464+7699-0x2276),ptSubmit->address.digits);ptSubmit->address.number_type=
WMS_NUMBER_INTERNATIONAL;ptSubmit->address.number_of_digits=strlen(ptGroupSms->
-receivers[ptGroupSms->current_receiver])-(0x1ca5+2346-0x25ce);}else if(
-ptGroupSms->receivers[ptGroupSms->current_receiver][(0x1a79+3152-0x26c9)]==
-((char)(0x1b7+2855-0xcae))&&ptGroupSms->receivers[ptGroupSms->current_receiver][
-(0x1e9f+1164-0x232a)]==((char)(0x1dcd+2129-0x25ee))){(void)zUfiSms_CharToInt(
-ptGroupSms->receivers[ptGroupSms->current_receiver]+(0xd46+2342-0x166a),strlen(
-ptGroupSms->receivers[ptGroupSms->current_receiver])-(0x9c+7188-0x1cae),ptSubmit
-->address.digits);ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL;
-ptSubmit->address.number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->
-current_receiver])-(0xedf+2334-0x17fb);}else{(void)zUfiSms_CharToInt(ptGroupSms
+receivers[ptGroupSms->current_receiver])-(0xa7a+6906-0x2573);}else if(ptGroupSms
+->receivers[ptGroupSms->current_receiver][(0x4d6+7689-0x22df)]==
+((char)(0xcf+8572-0x221b))&&ptGroupSms->receivers[ptGroupSms->current_receiver][
+(0xc8+1725-0x784)]==((char)(0x25b+7-0x232))){(void)zUfiSms_CharToInt(ptGroupSms
+->receivers[ptGroupSms->current_receiver]+(0x12cf+1361-0x181e),strlen(ptGroupSms
+->receivers[ptGroupSms->current_receiver])-(0x7cc+4108-0x17d6),ptSubmit->address
+.digits);ptSubmit->address.number_type=WMS_NUMBER_INTERNATIONAL;ptSubmit->
+address.number_of_digits=strlen(ptGroupSms->receivers[ptGroupSms->
+current_receiver])-(0x23f3+711-0x26b8);}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)(0xd10+3661-0x1b5d);ptSubmit->address.
-number_mode=(wms_number_mode_e_type)(0xd74+1111-0x11cb);ptSubmit->address.
+digit_mode=(wms_digit_mode_e_type)(0xf39+2870-0x1a6f);ptSubmit->address.
+number_mode=(wms_number_mode_e_type)(0x2b5+4756-0x1549);ptSubmit->address.
number_plan=WMS_NUMBER_PLAN_TELEPHONY;memset(&g_zUfiSms_SendingSms,
-(0x8b5+6632-0x229d),sizeof(SMS_PARAM));snprintf(g_zUfiSms_SendingSms.TPA,sizeof(
+(0x13c6+560-0x15f6),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){
@@ -384,20 +384,20 @@
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]={
-(0xe67+5799-0x250e)};int i=(0x104f+1752-0x1727);if(NULL==ptClientMsg){return;}
+(0xb6f+2678-0x15e5)};int i=(0xce2+4524-0x1e8e);if(NULL==ptClientMsg){return;}
memcpy((void*)sca,(void*)(g_zUfiSms_CurSmsPara.sca),sizeof(g_zUfiSms_CurSmsPara.
-sca));if(sca[(0x21+3462-0xda7)]==((char)(0xa01+1497-0xfaf))){ptClientMsg->u.
+sca));if(sca[(0x9d8+5267-0x1e6b)]==((char)(0x12cf+3997-0x2241))){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[(0x1ac4+2047-0x22c3)]==
-((char)(0x4da+7092-0x2063))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits--;for(i=(0x6af+6392-0x1fa7);i<ptClientMsg->u.gw_message.
-sc_address.number_of_digits;i++){sca[i]=sca[i+(0x1f99+1587-0x25cb)];}}else if(
-sca[(0x105+5487-0x1674)]==((char)(0x3b8+8450-0x248a))&&sca[(0x3aa+8132-0x236d)]
-==((char)(0x1f20+367-0x205f))){ptClientMsg->u.gw_message.sc_address.
-number_of_digits-=(0x1a8d+2064-0x229b);for(i=(0x8c1+4179-0x1914);i<ptClientMsg->
-u.gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0xbf+6130-0x18af)];}
+sc_address.number_of_digits=strlen(sca);if(sca[(0x1640+2654-0x209e)]==
+((char)(0x38f+5114-0x175e))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits--;for(i=(0x977+4362-0x1a81);i<ptClientMsg->u.gw_message.
+sc_address.number_of_digits;i++){sca[i]=sca[i+(0xc90+3241-0x1938)];}}else if(sca
+[(0xfe4+459-0x11af)]==((char)(0x1065+1964-0x17e1))&&sca[(0x1516+3456-0x2295)]==
+((char)(0x1e1+5433-0x16ea))){ptClientMsg->u.gw_message.sc_address.
+number_of_digits-=(0x1afa+2165-0x236d);for(i=(0xe11+2474-0x17bb);i<ptClientMsg->
+u.gw_message.sc_address.number_of_digits;i++){sca[i]=sca[i+(0xa2+7114-0x1c6a)];}
}(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*
@@ -408,12 +408,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,
-(0x48d+6673-0x1e9e),ZTE_WMS_ADDRESS_LEN_MAX+(0x17f4+1599-0x1e32));memcpy(
+(0x79f+5683-0x1dd2),ZTE_WMS_ADDRESS_LEN_MAX+(0x177+264-0x27e));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,(0x1833+685-0x1ae0),sizeof(ptDbSaveData->sms_content));if(
+sms_content,(0x6+8115-0x1fb9),sizeof(ptDbSaveData->sms_content));if(
g_zUfiSms_Dcs==DCS_USC){ptDbSaveData->alphabet=WMS_GW_ALPHABET_UCS2;}else if(
g_zUfiSms_Dcs==DCS_ASC){ptDbSaveData->alphabet=WMS_GW_ALPHABET_7_BIT_DEFAULT;}(
void)zUfiSms_DispatchWtoi(ptConcatSms->msg_contents[ptConcatSms->current_sending
@@ -424,7 +424,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,(0x1995+609-0x1bf6),sizeof(
+is_broadcast=FALSE;memset((void*)&tClientTsData,(0x185f+3610-0x2679),sizeof(
wms_client_ts_data_s_type));tClientTsData.format=WMS_FORMAT_GW_PP;tClientTsData.
u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)zUfiSms_FillSubmitTpdu(&
g_zUfiSms_ConcatSms,&g_zUfiSms_GroupSms,g_zUfiSms_UnitLen,&tClientTsData.u.gw_pp
@@ -433,95 +433,94 @@
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=(0x13af+71-0x13f6);pContent=(char*)
-malloc((0xb03+2238-0x13bd)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent==
-NULL){return ZUFI_FAIL;}memset(pContent,(0x809+5799-0x1eb0),(0xb19+3989-0x1aaa)*
+ZUFI_SUCC;char*pContent=NULL;int iTotalCount=(0xfbc+5327-0x248b);pContent=(char*
+)malloc((0x191+7827-0x2020)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(pContent==
+NULL){return ZUFI_FAIL;}memset(pContent,(0x3ff+5084-0x17db),(0x71+6289-0x18fe)*
ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX);if(WMS_GW_ALPHABET_7_BIT_DEFAULT==
-ptDbSaveData->alphabet){static char data[(0x1912+3369-0x2637)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x83f+40-0x866)]={(0x1538+579-0x177b)};memset(
-data,(0x7+4022-0xfbd),(0x14f4+3594-0x22fa)*ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+
-(0x2e5+1786-0x9de));(void)zUfiSms_DecodeContent((char*)ptDbSaveData->sms_content
-,strlen(ptDbSaveData->sms_content),FALSE,data);strncpy(pContent,data,
-(0x386+487-0x569)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x6c2+8127-0x2680));}
-else{strncpy(pContent,ptDbSaveData->sms_content,(0x94f+3232-0x15eb)*
-ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x1090+1702-0x1735));}ptDbSaveData->
-tp_dcs=(unsigned char)(0xf52+2835-0x1a63);if(-(0x141c+106-0x1485)==iSmsId){if(
-ZUFI_FAIL==zUfiSms_GetTotalCount(pMemStore,&iTotalCount)){free(pContent);
-pContent=NULL;return ZUFI_FAIL;}printf(
+ptDbSaveData->alphabet){static char data[(0x1cc8+1641-0x232d)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+(0x701+3294-0x13de)]={(0x2b4+1109-0x709)};memset
+(data,(0x1b12+67-0x1b55),(0x5d1+2565-0xfd2)*ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX+
+(0x26c+7586-0x200d));(void)zUfiSms_DecodeContent((char*)ptDbSaveData->
+sms_content,strlen(ptDbSaveData->sms_content),FALSE,data);strncpy(pContent,data,
+(0x29f+3661-0x10e8)*ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x131+7686-0x1f36));}
+else{strncpy(pContent,ptDbSaveData->sms_content,(0x92b+7435-0x2632)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX-(0x22a+7172-0x1e2d));}ptDbSaveData->tp_dcs
+=(unsigned char)(0x6a7+590-0x8f3);if(-(0x1054+874-0x13bd)==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-(0x13f5+3921-0x2345);}if(ZUFI_FAIL==zUfiSms_InsertNormalSmsToDb(
+;return-(0x290+8663-0x2466);}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=(0x56c+4274-0x161e);for(i=(0x1e44+2-0x1e46);i<count;i++){if(
-ptDbSaveData->concat_info[(0xa63+4120-0x1a79)]==i+(0x1b37+2089-0x235f)){free(
-out_result[i]);out_result[i]=NULL;break;}}return(0x733+6301-0x1fd0);}int
+out_result){int i=(0x48f+2379-0xdda);for(i=(0x46a+3416-0x11c2);i<count;i++){if(
+ptDbSaveData->concat_info[(0xf0+1783-0x7e5)]==i+(0x954+3351-0x166a)){free(
+out_result[i]);out_result[i]=NULL;break;}}return(0xd57+4944-0x20a7);}int
zUfiSms_AddNewSmsToConcatData(T_zUfiSms_DbStoreData*ptDbSaveData,char*
pOldContent,char*pFormatNewContent,char*pRealNewContent,T_zUfiSms_DbStoreStr*pac
-,int*pConcatTotalNum,int len){int count=(0x122d+4718-0x249b);char**out_result=
-NULL;char cSegChar=((char)(0x188b+2857-0x2379));int i=(0x331+1438-0x8cf);int
-iTotalSegNum=(0x550+3298-0x1232);char acContentSeg[(0x99+4121-0x10b0)*
-ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX*ZTE_WMS_SMS_COUNT_MAX]={
-(0x9f6+5659-0x2011)};char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==
-pOldContent){return-(0x2fb+3826-0x11ec);}count=zUfiSms_SplitString(pOldContent,&
-out_result,cSegChar);for(i=(0x348+1610-0x992);i<count;i++){if(ptDbSaveData->
-concat_info[(0x153c+2627-0x1f7d)]==i+(0x5fb+6510-0x1f68)){out_result[i]=(char*)
-malloc(sizeof(ptDbSaveData->sms_content));memset(out_result[i],
-(0x271+4927-0x15b0),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)-(0x70+396-0x1fb));}break;}}for(i=
-(0x49+3065-0xc42);i<count;i++){snprintf(acContentSeg+strlen(acContentSeg),sizeof
-(acContentSeg)-strlen(acContentSeg),"\x25\x73",out_result[i]);strcat(
-pFormatNewContent,out_result[i]);if(i!=count-(0x4c4+247-0x5ba)){strcat(
-pFormatNewContent,"\x3b");}}strncpy(pRealNewContent,acContentSeg,len);
+,int*pConcatTotalNum,int len){int count=(0x19d6+1487-0x1fa5);char**out_result=
+NULL;char cSegChar=((char)(0x1153+2093-0x1945));int i=(0x655+1213-0xb12);int
+iTotalSegNum=(0xaed+1433-0x1086);char acContentSeg[(0x67b+2598-0x109f)*
+ZTE_WMS_SMS_MSG_CONTENT_STORE_LEN_MAX*ZTE_WMS_SMS_COUNT_MAX]={(0x741+1667-0xdc4)
+};char*pCurConPos=acContentSeg;boolean isEsc=FALSE;if(NULL==pOldContent){return-
+(0x421+3915-0x136b);}count=zUfiSms_SplitString(pOldContent,&out_result,cSegChar)
+;for(i=(0x923+2510-0x12f1);i<count;i++){if(ptDbSaveData->concat_info[
+(0xbdd+2356-0x150f)]==i+(0xa4f+2142-0x12ac)){out_result[i]=(char*)malloc(sizeof(
+ptDbSaveData->sms_content));memset(out_result[i],(0x19c4+2534-0x23aa),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)-(0x345+5254-0x17ca))
+;}break;}}for(i=(0x17a0+3778-0x2662);i<count;i++){snprintf(acContentSeg+strlen(
+acContentSeg),sizeof(acContentSeg)-strlen(acContentSeg),"\x25\x73",out_result[i]
+);strcat(pFormatNewContent,out_result[i]);if(i!=count-(0x464+8650-0x262d)){
+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=(0x633+3585-0x1434);i<count;i++){if(ptDbSaveData->concat_info[
-(0x212+2414-0xb7e)]==i+(0x43a+7899-0x2314)){out_result[i]=(char*)malloc(
-SHORT_INT_LEN);memset(out_result[i],(0x5ad+8058-0x2527),SHORT_INT_LEN);snprintf(
+i=(0xaf2+2331-0x140d);i<count;i++){if(ptDbSaveData->concat_info[
+(0x1d1f+2185-0x25a6)]==i+(0xb1+5377-0x15b1)){out_result[i]=(char*)malloc(
+SHORT_INT_LEN);memset(out_result[i],(0x150f+977-0x18e0),SHORT_INT_LEN);snprintf(
out_result[i],SHORT_INT_LEN,"\x25\x64",ptDbSaveData->index);break;}}for(i=
-(0xef0+5208-0x2348);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd),
+(0x77b+6110-0x1f59);i<count;i++){snprintf(pac->FormatInd+strlen(pac->FormatInd),
sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x25\x73",out_result[i]);if(i!=
-count-(0x161b+1445-0x1bbf)){snprintf(pac->FormatInd+strlen(pac->FormatInd),
-sizeof(pac->FormatInd)-strlen(pac->FormatInd),"\x3b");}}zUfiSms_ConcatDataFree(
+count-(0xc5a+2680-0x16d1)){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=(0xc85+3414-0x19db)
-;i<count;i++){if(ptDbSaveData->concat_info[(0xdf8+2398-0x1754)]==i+
-(0x6c5+7126-0x229a)){out_result[i]=(char*)malloc(SHORT_INT_LEN);memset(
-out_result[i],(0x11ec+2277-0x1ad1),SHORT_INT_LEN);snprintf(out_result[i],
-SHORT_INT_LEN,"\x25\x64",ptDbSaveData->concat_info[(0x3af+1251-0x890)]);break;}}
-for(i=(0xfcd+391-0x1154);i<count;i++){snprintf(pac->FormatSeq+strlen(pac->
+zUfiSms_SplitString(pac->Seg_Seq,&out_result,cSegChar);for(i=(0x12a9+580-0x14ed)
+;i<count;i++){if(ptDbSaveData->concat_info[(0x5f5+1448-0xb9b)]==i+
+(0x44f+8636-0x260a)){out_result[i]=(char*)malloc(SHORT_INT_LEN);memset(
+out_result[i],(0x16af+605-0x190c),SHORT_INT_LEN);snprintf(out_result[i],
+SHORT_INT_LEN,"\x25\x64",ptDbSaveData->concat_info[(0x50d+7501-0x2258)]);break;}
+}for(i=(0xf48+3647-0x1d87);i<count;i++){snprintf(pac->FormatSeq+strlen(pac->
FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x25\x73",out_result[i
-]);if(i!=count-(0x5a8+6354-0x1e79)){snprintf(pac->FormatSeq+strlen(pac->
-FormatSeq),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x3b");}if(
-(0x1840+3546-0x261a)!=strcmp(out_result[i],"")){iTotalSegNum++;}}*
-pConcatTotalNum=iTotalSegNum;zUfiSms_ConcatDataFree(ptDbSaveData,count,
-out_result);free(out_result);out_result=NULL;return(0xb40+5663-0x215f);}int
-zUfiSms_UpdateConcatSms(T_zUfiSms_DbStoreData*ptDbSaveData,const char*pStorePos,
-long iSmsId){T_zUfiSms_DbStoreStr ac={(0x1237+3202-0x1eb9)};char*pOldContent=
-NULL;char*pFormatNewContent=NULL;char*pRealNewContent=NULL;int iTotalNum=
-(0x798+5090-0x1b7a);int result=ZUFI_SUCC;int spaceLen=(0xc5b+1501-0x1234)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x989+801-0xca6);
-pOldContent=(char*)malloc(spaceLen);pFormatNewContent=(char*)malloc(spaceLen);
+]);if(i!=count-(0x4f3+2553-0xeeb)){snprintf(pac->FormatSeq+strlen(pac->FormatSeq
+),sizeof(pac->FormatSeq)-strlen(pac->FormatSeq),"\x3b");}if((0x35+6797-0x1ac2)!=
+strcmp(out_result[i],"")){iTotalSegNum++;}}*pConcatTotalNum=iTotalSegNum;
+zUfiSms_ConcatDataFree(ptDbSaveData,count,out_result);free(out_result);
+out_result=NULL;return(0x897+302-0x9c5);}int zUfiSms_UpdateConcatSms(
+T_zUfiSms_DbStoreData*ptDbSaveData,const char*pStorePos,long iSmsId){
+T_zUfiSms_DbStoreStr ac={(0xc0+6387-0x19b3)};char*pOldContent=NULL;char*
+pFormatNewContent=NULL;char*pRealNewContent=NULL;int iTotalNum=
+(0x262+8891-0x251d);int result=ZUFI_SUCC;int spaceLen=(0x761+772-0xa61)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x686+3939-0x15e5)
+;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,(0x1b1+6921-0x1cba),
-spaceLen);memset(pOldContent,(0x1603+2254-0x1ed1),spaceLen);memset(
-pFormatNewContent,(0x10a9+3390-0x1de7),spaceLen);(void)zUfiSms_GetConcatInfo(
+pRealNewContent);return ZUFI_FAIL;}memset(pRealNewContent,(0x3c8+5189-0x180d),
+spaceLen);memset(pOldContent,(0x3ba+1101-0x807),spaceLen);memset(
+pFormatNewContent,(0xdb5+626-0x1027),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(-(0x1033+2737-0x1ae3)==
+,ac.IndStr,ac.Seg_Seq,ac.FormatInd,ac.FormatSeq);if(-(0xdef+4652-0x201a)==
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=
-(0x8f+3088-0xc9d);if(ZUFI_FAIL==zUfiSms_UpdateConcatSmsToDb(ptDbSaveData,
+(0xd29+3341-0x1a34);if(ZUFI_FAIL==zUfiSms_UpdateConcatSmsToDb(ptDbSaveData,
pStorePos,pFormatNewContent,pRealNewContent,&ac,iTotalNum,iSmsId)){result=
ZUFI_FAIL;}printf(
"\x5b\x53\x4d\x53\x5d\x20\x74\x65\x65\x74\x20\x31\x20\x49\x6e\x64\x53\x74\x72\x3a\x25\x73\x2c\x53\x65\x67\x5f\x53\x65\x71\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x49\x6e\x64\x3a\x25\x73\x2c\x46\x6f\x72\x6d\x61\x74\x53\x65\x71\x3a\x25\x73" "\n"
@@ -530,34 +529,33 @@
pFormatNewContent=NULL;printf(
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x55\x70\x64\x61\x74\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x20\x73\x75\x63\x63\x65\x73\x73\x2e" "\n"
);return result;}int zUfiSms_InsertConcatSms(T_zUfiSms_DbStoreData*ptDbSaveData,
-const char*pStorePos){T_zUfiSms_DbStoreStr ac={(0x4b7+6780-0x1f33)};int
-iSms_TotalCount=(0xeea+3546-0x1cc4);int i=(0x2260+604-0x24bc);char acTmpContent[
-(0x56f+8148-0x2443)];int iConcatNum=(0xf49+1233-0x141a);char*pFormatConcat=NULL;
-char*pContent=NULL;int spaceLen=(0x440+5954-0x1b7e)*
-ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+
-(0x11a9+3044-0x1d89);if(NULL==ptDbSaveData||NULL==pStorePos){return ZUFI_FAIL;}
-printf(
+const char*pStorePos){T_zUfiSms_DbStoreStr ac={(0xba3+4479-0x1d22)};int
+iSms_TotalCount=(0x18a9+1669-0x1f2e);int i=(0x7a0+6147-0x1fa3);char acTmpContent
+[(0x1584+487-0x166b)];int iConcatNum=(0x963+2304-0x1263);char*pFormatConcat=NULL
+;char*pContent=NULL;int spaceLen=(0x3e8+5628-0x19e0)*
+ZTE_WMS_SMS_MSG_CONTENT_LEN_MAX*ZTE_WMS_CONCAT_SMS_COUNT_MAX+(0x688+1906-0xdf6);
+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,(0xac+1188-0x550),sizeof(acTmpContent));iSms_TotalCount=
-ptDbSaveData->concat_info[(0xfe9+2363-0x1923)];for(i=(0x64c+5104-0x1a3b);i<
+);memset(acTmpContent,(0x1886+3423-0x25e5),sizeof(acTmpContent));iSms_TotalCount
+=ptDbSaveData->concat_info[(0x1167+4721-0x23d7)];for(i=(0xc6c+1449-0x1214);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,(0xf44+2856-0x1a6c),
+pFormatConcat){return ZUFI_FAIL;}memset(pFormatConcat,(0x1b5d+1365-0x20b2),
spaceLen);pContent=(char*)malloc(spaceLen);if(pContent==NULL){free(pFormatConcat
-);return ZUFI_FAIL;}memset(pContent,(0x142c+3700-0x22a0),spaceLen);if(-
-(0x909+3613-0x1725)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
+);return ZUFI_FAIL;}memset(pContent,(0x4f1+3434-0x125b),spaceLen);if(-
+(0xe05+5893-0x2509)==zUfiSms_AddNewSmsToConcatData(ptDbSaveData,acTmpContent,
pFormatConcat,pContent,&ac,&iConcatNum,spaceLen)){free(pFormatConcat);free(
pContent);pFormatConcat=NULL;pContent=NULL;return ZUFI_FAIL;}ptDbSaveData->
-tp_dcs=(0xb51+3375-0x187e);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=(0xff+2973-0xc9a);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=(0x290+2928-0xe00);int total_count=
-(0x362+634-0x5dc);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
-iSmsId=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,pMemStore);if(-
-(0x9e7+1942-0x117c)!=iSmsId){printf(
+ptDbSaveData,char*pMemStore){long iSmsId=(0xd65+1183-0x1204);int total_count=
+(0x1fbf+1330-0x24f1);if(NULL==ptDbSaveData||NULL==pMemStore){return ZUFI_FAIL;}
+iSmsId=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,pMemStore);if(-(0x987+239-0xa75)
+!=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(
@@ -569,103 +567,102 @@
"\x5b\x53\x4d\x53\x5d\x20\x7a\x55\x66\x69\x53\x6d\x73\x5f\x53\x74\x6f\x72\x65\x43\x6f\x6e\x63\x61\x74\x53\x6d\x73\x54\x6f\x44\x62\x20\x53\x6d\x73\x20\x6d\x65\x6d\x6f\x72\x79\x20\x69\x73\x20\x46\x75\x6c\x6c\x2e" "\n"
);return ZUFI_FAIL;}return zUfiSms_InsertConcatSms(ptDbSaveData,pMemStore);}}int
zUfiSms_WriteSmsToDb(T_zUfiSms_DbStoreData*ptDbSaveData,zUfiSms_StoreType
-iMemStore,long iSmsId){char acDbMemStore[(0x441+8647-0x25fe)];int iTotalCount=
-(0x821+3339-0x152c);int id=(0x45+7633-0x1e16);UINT8 needCheckMemory=
-(0xa6d+2213-0x1311);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore
-,(0x184c+2526-0x222a),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==
-iMemStore){strncpy(acDbMemStore,ZTE_WMS_DB_SIM_TABLE,sizeof(acDbMemStore)-
-(0x1424+2702-0x1eb1));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
-acDbMemStore)-(0xcd2+1363-0x1224));}if((0xdba+262-0xebf)==ptDbSaveData->
+iMemStore,long iSmsId){char acDbMemStore[(0x101b+2056-0x1819)];int iTotalCount=
+(0x522+7697-0x2333);int id=(0xb22+3678-0x1980);UINT8 needCheckMemory=
+(0xb8c+3303-0x1872);if(NULL==ptDbSaveData){return ZUFI_FAIL;}memset(acDbMemStore
+,(0x4b+7240-0x1c93),sizeof(acDbMemStore));if(WMS_STORAGE_TYPE_UIM_V01==iMemStore
+){strncpy(acDbMemStore,ZTE_WMS_DB_SIM_TABLE,sizeof(acDbMemStore)-
+(0x1acd+119-0x1b43));}else{strncpy(acDbMemStore,ZTE_WMS_DB_NV_TABLE,sizeof(
+acDbMemStore)-(0x68+6029-0x17f4));}if((0xda2+430-0xf4f)==ptDbSaveData->
concat_sms){id=zUfiSms_SearchConcatSmsInDb(ptDbSaveData,&acDbMemStore);if(-
-(0x16ad+339-0x17ff)!=id){needCheckMemory=(0x1147+1688-0x17df);}}if(
-needCheckMemory==(0x1f2+6770-0x1c63)){if(ZUFI_FAIL==zUfiSms_GetTotalCount(
+(0x12f8+362-0x1461)!=id){needCheckMemory=(0x169c+2523-0x2077);}}if(
+needCheckMemory==(0xecc+2502-0x1891)){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[(0x785+190-0x841)
-]==(0x7eb+643-0xa6e)||ptDbSaveData->concat_info[(0x9b2+5994-0x211a)]>
-ptDbSaveData->concat_info[(0x3a0+6061-0x1b4c)]){ptDbSaveData->concat_sms=
-(0xb2+7287-0x1d29);}printf(
+);return ZTE_WMS_NV_MEMORY_FULL;}}if(ptDbSaveData->concat_info[
+(0x2c3+8771-0x2504)]==(0xb04+1251-0xfe7)||ptDbSaveData->concat_info[
+(0x88f+5860-0x1f71)]>ptDbSaveData->concat_info[(0xfc7+924-0x1362)]){ptDbSaveData
+->concat_sms=(0x148a+2644-0x1ede);}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[
-(0x21f+7968-0x213e)]);if((0x21a5+732-0x2480)==ptDbSaveData->concat_sms){if(
-ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x528+6144-0x1d27)]){
+(0x67+8520-0x21ae)]);if((0x2028+1253-0x250c)==ptDbSaveData->concat_sms){if(
+ZTE_WMS_CONCAT_SMS_COUNT_MAX<ptDbSaveData->concat_info[(0x2ca+7429-0x1fce)]){
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=(0x1f28+69-0x1f6d);if(NULL==ptDbSaveData){return
- WMS_CMD_FAILED;}if(!g_zUfiSms_IsConcatSendSuc){ptDbSaveData->tag=
+ptDbSaveData,int cid){int atRes=(0xe79+5318-0x233f);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,-(0x1fb7+1358-0x2504))){g_zUfiSms_MsgRefer++;
-ptDbSaveData->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(
-g_zUfiSms_MsgRefer);}}else{CHAR sendfailRetry[(0x2153+1415-0x26a8)]={
-(0x71+3513-0xe2a)};sc_cfg_get(NV_SENDFAIL_RETRY,sendfailRetry,sizeof(
-sendfailRetry));if((0xd7d+5496-0x22f5)==strcmp("\x31",sendfailRetry)){
-g_zUfiSms_SendFailedRetry=(0x168c+1261-0x1b76);}atRes=zSms_SendCmgsReq();if(
-atRes!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{zSms_RecvCmgsOk();}}return
-WMS_CMD_SUCCESS;}int zUfiSms_SendConcatSms(int cid){int atRes=
-(0x1aa+4650-0x13d4);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,
-(0xd87+4610-0x1f89),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,
-(0x26+5196-0x1472),sizeof(tDbSaveData));zUfiSms_SetPduData(&tClientMsg,&
-tDbSaveData);if(!g_zUfiSms_IsConcatSendSuc){tDbSaveData.tag=
+WMS_STORAGE_TYPE_NV_V01,-(0x7f7+5377-0x1cf7))){g_zUfiSms_MsgRefer++;ptDbSaveData
+->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(g_zUfiSms_MsgRefer);}
+}else{CHAR sendfailRetry[(0x1692+3971-0x25e3)]={(0x6c4+6145-0x1ec5)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x13a5+619-0x1610)==
+strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x1dd7+2253-0x26a1);}
+atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){zSms_RecvCmgsErr();}else{
+zSms_RecvCmgsOk();}}return WMS_CMD_SUCCESS;}int zUfiSms_SendConcatSms(int cid){
+int atRes=(0x46+8919-0x231d);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,(0x862+29-0x87f),sizeof(T_zUfiSms_ClientMsg));memset((void*)&
+tDbSaveData,(0xc1c+5805-0x22c9),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,-(0x1c8b+1379-0x21ed));g_zUfiSms_SendFailedCount++;}else
-{CHAR sendfailRetry[(0x86b+3994-0x17d3)]={(0x1032+5616-0x2622)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0xa3a+1161-0xec3)==
-strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x1319+3617-0x2137);}
+WMS_STORAGE_TYPE_NV_V01,-(0x1437+3601-0x2247));g_zUfiSms_SendFailedCount++;}else
+{CHAR sendfailRetry[(0x2d4+3652-0x10e6)]={(0xff3+2569-0x19fc)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x611+2334-0xf2f)==
+strcmp("\x31",sendfailRetry)){g_zUfiSms_SendFailedRetry=(0x1ab+2533-0xb8d);}
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+(0x1be6+2163-0x2458))){
+g_zUfiSms_UnitLen*(g_zUfiSms_ConcatSms.current_sending+(0x166f+3152-0x22be))){
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,(0x19af+2270-0x228d),sizeof(
+tSendStatus;memset((void*)&tSendStatus,(0x963+6709-0x2398),sizeof(
T_zUfiSms_StatusInfo));tSendStatus.err_code=ZTE_SMS_CMS_NONE;tSendStatus.
send_failed_count=g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=
-(0x4e4+1838-0xc12);tSendStatus.cmd_status=WMS_CMD_FAILED;tSendStatus.cmd=
+(0x5f8+1881-0xd51);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=(0x414+996-0x7f8);int i=
-(0x100+8650-0x22ca);atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){CHAR
-sendfailRetry[(0x356+4285-0x13e1)]={(0x104a+290-0x116c)};sc_cfg_get(
-NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x193+3334-0xe99)==
-strcmp("\x31",sendfailRetry)){for(i=(0x2d1+2051-0xad4);i<SMS_RETRY_COUNT;i++){
+return result;}int zSvr_sendCmgs(VOID){int atRes=(0x565+7358-0x2223);int i=
+(0x2f5+4023-0x12ac);atRes=zSms_SendCmgsReq();if(atRes!=ZSMS_RESULT_OK){CHAR
+sendfailRetry[(0xcb4+4836-0x1f66)]={(0xbf+4089-0x10b8)};sc_cfg_get(
+NV_SENDFAIL_RETRY,sendfailRetry,sizeof(sendfailRetry));if((0x95a+3-0x95d)==
+strcmp("\x31",sendfailRetry)){for(i=(0x585+758-0x87b);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=(0x494+1604-0xad8);if(-
-(0x56d+1083-0x9a7)==g_zUfiSms_UnitLen){printf(
+T_zUfiSms_DbStoreData tDbSaveData;int res=(0xa54+3886-0x1982);if(-
+(0x173+2788-0xc56)==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,(0xc03+4933-0x1f48),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x75a+4621-0x1967),
+g_zUfiSms_ConcatSms.total_msg){memset((void*)&tClientMsg,(0x1d3+6703-0x1c02),
+sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x1259+397-0x13e6),
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,-(0x5b6+7972-0x24d9));
+zUfiSms_WriteSmsToDb(&tDbSaveData,WMS_STORAGE_TYPE_NV_V01,-(0xd90+3763-0x1c42));
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+(0xa37+6783-0x24b5))){g_zUfiSms_UnitLen=g_zUfiSms_ConcatSms.
+current_sending+(0x874+2419-0x11e6))){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,(0x747+3381-0x147c),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
+tSendStatus,(0x10ec+5322-0x25b6),sizeof(T_zUfiSms_StatusInfo));tSendStatus.
err_code=ZTE_SMS_CMS_NONE;tSendStatus.send_failed_count=
-g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0x437+3937-0x1398);
+g_zUfiSms_SendFailedCount;tSendStatus.delete_failed_count=(0xa9+507-0x2a4);
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 (0x5cc+2999-0x1183)
-if(g_zUfiSms_ConcatSms.total_msg>(0xa9c+4694-0x1cf1)){printf(
+#if (0x3dc+2596-0xe00)
+if(g_zUfiSms_ConcatSms.total_msg>(0xc80+3531-0x1a4a)){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,(0x158+2576-0xb68),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x12e0+3529-0x20a9),
+);zUfiSms_SendConcatSms(cid);}else{memset((void*)&tClientMsg,(0x7b3+1458-0xd65),
+sizeof(T_zUfiSms_ClientMsg));memset((void*)&tDbSaveData,(0x1337+3067-0x1f32),
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(
@@ -673,79 +670,81 @@
);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[(0xa50+5949-0x2188)]={
-(0xcf5+1960-0x149d)};int tmp_i=(0x68c+7987-0x25bf);memset(ptTimestamp,
-(0x1122+5221-0x2587),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
-(0x1072+2959-0x1c00)){ptTimestamp->year=zUfiSms_atohex(((char)(0xc1+2822-0xb97))
-)*(0xefd+2110-0x172b)+zUfiSms_atohex(tData.year[(0xaf3+6548-0x2487)]);}else if(
-strlen(tData.year)==(0xf35+3092-0x1b47)){ptTimestamp->year=zUfiSms_atohex(tData.
-year[(0x1d4+5049-0x158d)])*(0x204a+825-0x2373)+zUfiSms_atohex(tData.year[
-(0x184d+2175-0x20cb)]);}else if(strlen(tData.year)==(0x118c+2435-0x1b0b)){
-ptTimestamp->year=zUfiSms_atohex(tData.year[(0x191f+2825-0x2426)])*
-(0x1c15+860-0x1f61)+zUfiSms_atohex(tData.year[(0x246+4025-0x11fc)]);}else{printf
-("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x79\x65\x61\x72\x2e");return ZUFI_FAIL;}if(
-strlen(tData.month)==(0xf4+3371-0xe1e)){ptTimestamp->month=zUfiSms_atohex(
-((char)(0x91f+498-0xae1)))*(0x492+7828-0x2316)+zUfiSms_atohex(tData.month[
-(0x2269+790-0x257f)]);}else if(strlen(tData.month)==(0x1ed0+1031-0x22d5)){
-ptTimestamp->month=zUfiSms_atohex(tData.month[(0x186a+2700-0x22f6)])*
-(0x797+4798-0x1a45)+zUfiSms_atohex(tData.month[(0x19b1+2748-0x246c)]);}else{
-printf("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)
-==(0x1bff+2593-0x261f)){ptTimestamp->day=zUfiSms_atohex(
-((char)(0xa20+391-0xb77)))*(0xd02+1887-0x1451)+zUfiSms_atohex(tData.day[
-(0x55c+3368-0x1284)]);}else if(strlen(tData.day)==(0x7c6+5443-0x1d07)){
-ptTimestamp->day=zUfiSms_atohex(tData.day[(0xe86+808-0x11ae)])*
-(0x21c+3809-0x10ed)+zUfiSms_atohex(tData.day[(0xbd5+2470-0x157a)]);}else{printf(
+T_zUfiSms_TimeStamp*ptTimestamp){unsigned char tTimeZone[(0x1bd+3863-0x10cf)]={
+(0x273+2220-0xb1f)};int tmp_i=(0x172c+893-0x1aa9);memset(ptTimestamp,
+(0x1b18+1324-0x2044),sizeof(T_zUfiSms_TimeStamp));if(strlen(tData.year)==
+(0x1737+241-0x1827)){ptTimestamp->year=zUfiSms_atohex(
+((char)(0x2327+139-0x2382)))*(0x14b0+719-0x176f)+zUfiSms_atohex(tData.year[
+(0x816+5146-0x1c30)]);}else if(strlen(tData.year)==(0x14a8+820-0x17da)){
+ptTimestamp->year=zUfiSms_atohex(tData.year[(0x161b+3103-0x223a)])*
+(0x93d+5855-0x200c)+zUfiSms_atohex(tData.year[(0x279+9163-0x2643)]);}else if(
+strlen(tData.year)==(0x893+7625-0x2658)){ptTimestamp->year=zUfiSms_atohex(tData.
+year[(0x186c+2752-0x232a)])*(0x490+6356-0x1d54)+zUfiSms_atohex(tData.year[
+(0x483+4634-0x169a)]);}else{printf(
+"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x79\x65\x61\x72\x2e");return ZUFI_FAIL;}if(
+strlen(tData.month)==(0xdb5+3473-0x1b45)){ptTimestamp->month=zUfiSms_atohex(
+((char)(0xa40+2365-0x134d)))*(0x11eb+635-0x1456)+zUfiSms_atohex(tData.month[
+(0xc08+4141-0x1c35)]);}else if(strlen(tData.month)==(0x539+1036-0x943)){
+ptTimestamp->month=zUfiSms_atohex(tData.month[(0x8f1+997-0xcd6)])*
+(0x15c+1846-0x882)+zUfiSms_atohex(tData.month[(0x373+2862-0xea0)]);}else{printf(
+"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.day)==
+(0x4c8+894-0x845)){ptTimestamp->day=zUfiSms_atohex(((char)(0x1ae9+2014-0x2297)))
+*(0xe86+1697-0x1517)+zUfiSms_atohex(tData.day[(0x933+5747-0x1fa6)]);}else if(
+strlen(tData.day)==(0xe16+3450-0x1b8e)){ptTimestamp->day=zUfiSms_atohex(tData.
+day[(0x849+543-0xa68)])*(0x2f3+2868-0xe17)+zUfiSms_atohex(tData.day[
+(0x2e7+2802-0xdd8)]);}else{printf(
"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x64\x61\x79\x2e");}if(strlen(tData.hour)==
-(0x16bc+790-0x19d1)){ptTimestamp->hour=zUfiSms_atohex(((char)(0x41c+818-0x71e)))
-*(0x1310+3611-0x211b)+zUfiSms_atohex(tData.hour[(0x2368+883-0x26db)]);}else if(
-strlen(tData.hour)==(0x147+7377-0x1e16)){ptTimestamp->hour=zUfiSms_atohex(tData.
-hour[(0x1337+4135-0x235e)])*(0x4c4+4044-0x1480)+zUfiSms_atohex(tData.hour[
-(0x859+7386-0x2532)]);}else{printf(
-"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.min)==
-(0x4+8473-0x211c)){ptTimestamp->minute=zUfiSms_atohex(
-((char)(0x149f+1109-0x18c4)))*(0x15f+892-0x4cb)+zUfiSms_atohex(tData.min[
-(0xa13+2578-0x1425)]);}else if(strlen(tData.min)==(0x1583+3888-0x24b1)){
-ptTimestamp->minute=zUfiSms_atohex(tData.min[(0x1316+174-0x13c4)])*
-(0x930+2087-0x1147)+zUfiSms_atohex(tData.min[(0xfb3+3058-0x1ba4)]);}else{printf(
+(0x1ff+3700-0x1072)){ptTimestamp->hour=zUfiSms_atohex(
+((char)(0x1c58+546-0x1e4a)))*(0x3ad+4554-0x1567)+zUfiSms_atohex(tData.hour[
+(0x8a6+4885-0x1bbb)]);}else if(strlen(tData.hour)==(0x583+5700-0x1bc5)){
+ptTimestamp->hour=zUfiSms_atohex(tData.hour[(0xe06+933-0x11ab)])*
+(0x2a6+7821-0x2123)+zUfiSms_atohex(tData.hour[(0xda4+5304-0x225b)]);}else{printf
+("\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x68\x6f\x75\x72\x2e");}if(strlen(tData.min)==
+(0xcb2+5288-0x2159)){ptTimestamp->minute=zUfiSms_atohex(
+((char)(0x1422+2484-0x1da6)))*(0xe29+2043-0x1614)+zUfiSms_atohex(tData.min[
+(0x7bf+6915-0x22c2)]);}else if(strlen(tData.min)==(0x7e5+6113-0x1fc4)){
+ptTimestamp->minute=zUfiSms_atohex(tData.min[(0x12fd+3969-0x227e)])*
+(0xe33+1785-0x151c)+zUfiSms_atohex(tData.min[(0x98d+6240-0x21ec)]);}else{printf(
"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x6d\x69\x6e\x75\x74\x65\x2e");}if(strlen(tData
-.sec)==(0x193b+281-0x1a53)){ptTimestamp->second=zUfiSms_atohex(
-((char)(0x129c+1728-0x192c)))*(0xc1f+1047-0x1026)+zUfiSms_atohex(tData.sec[
-(0x2f8+3396-0x103c)]);}else if(strlen(tData.sec)==(0x5ac+5741-0x1c17)){
-ptTimestamp->second=zUfiSms_atohex(tData.sec[(0x66c+4904-0x1994)])*
-(0x11b5+2688-0x1c25)+zUfiSms_atohex(tData.sec[(0xd1c+4447-0x1e7a)]);}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+(0xcd+4530-0x127e)||tmp_i>INT_MAX-
-(0x488+2912-0xfe7)){printf(
+.sec)==(0x945+84-0x998)){ptTimestamp->second=zUfiSms_atohex(
+((char)(0x858+2112-0x1068)))*(0x427+6902-0x1f0d)+zUfiSms_atohex(tData.sec[
+(0x627+6476-0x1f73)]);}else if(strlen(tData.sec)==(0x7c2+5084-0x1b9c)){
+ptTimestamp->second=zUfiSms_atohex(tData.sec[(0x1b7a+299-0x1ca5)])*
+(0xb66+5542-0x20fc)+zUfiSms_atohex(tData.sec[(0x10fa+593-0x134a)]);}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+(0x1da2+2091-0x25cc)||tmp_i>INT_MAX-
+(0x12+8768-0x2251)){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,(0x2e3+984-0x6bb),sizeof(tTimeZone));
-snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0x60b+257-0x708));if(
-tData.timezone[(0x1dc8+1357-0x2315)]==((char)(0x181+6474-0x1a9e))){if(strlen(
-tTimeZone)==(0x1902+3572-0x26f4)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0x1ff+1115-0x62a)))*(0x659+4394-0x1773)+zUfiSms_atohex(tTimeZone[
-(0xb20+566-0xd55)]);}else if(strlen(tTimeZone)==(0xae0+1219-0xfa0)){ptTimestamp
-->timezone=zUfiSms_atohex(tTimeZone[(0xe2f+2799-0x191d)])*(0x985+5014-0x1d11)+
-zUfiSms_atohex(tTimeZone[(0x4a4+8120-0x245a)]);}else{printf(
+,tmp_i);return ZUFI_FAIL;}memset(tTimeZone,(0x2274+567-0x24ab),sizeof(tTimeZone)
+);snprintf(tTimeZone,sizeof(tTimeZone),"\x25\x64",tmp_i*(0xeb4+809-0x11d9));if(
+tData.timezone[(0xd69+1149-0x11e6)]==((char)(0x874+5265-0x1cd8))){if(strlen(
+tTimeZone)==(0x1a6b+2604-0x2495)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0x397+6019-0x1aea)))*(0x1d86+1602-0x23b8)+zUfiSms_atohex(tTimeZone[
+(0x19c+1234-0x66d)]);}else if(strlen(tTimeZone)==(0x18fb+1468-0x1eb4)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x82a+6713-0x2262)])*
+(0x1108+3133-0x1d3b)+zUfiSms_atohex(tTimeZone[(0x1a27+3110-0x264b)]);}else{
+printf(
"\x75\x6e\x6b\x6e\x6f\x77\x6e\x20\x2d\x74\x69\x6d\x65\x7a\x6f\x6e\x65\x2e");}
-ptTimestamp->timezone=(0xd52+5728-0x23b2)-ptTimestamp->timezone;}else{if(strlen(
-tTimeZone)==(0x846+5309-0x1d02)){ptTimestamp->timezone=zUfiSms_atohex(
-((char)(0x856+2043-0x1021)))*(0x45d+1952-0xbed)+zUfiSms_atohex(tTimeZone[
-(0x956+5594-0x1f30)]);}else if(strlen(tTimeZone)==(0xf0f+2505-0x18d6)){
-ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x1165+3849-0x206e)])*
-(0x7bb+4045-0x177e)+zUfiSms_atohex(tTimeZone[(0x856+184-0x90d)]);}else{printf(
+ptTimestamp->timezone=(0xe51+4422-0x1f97)-ptTimestamp->timezone;}else{if(strlen(
+tTimeZone)==(0x20ed+461-0x22b9)){ptTimestamp->timezone=zUfiSms_atohex(
+((char)(0x114+442-0x29e)))*(0x1e4+8918-0x24aa)+zUfiSms_atohex(tTimeZone[
+(0x129b+4480-0x241b)]);}else if(strlen(tTimeZone)==(0x33+2493-0x9ee)){
+ptTimestamp->timezone=zUfiSms_atohex(tTimeZone[(0x249+4109-0x1256)])*
+(0x917+2003-0x10e0)+zUfiSms_atohex(tTimeZone[(0xbb4+3368-0x18db)]);}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=(0xfe4+3300-0x1cc8);deliver->user_data_header_present=TRUE;if(
-(0xdd9+6135-0x25d0)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference++
-;(void)zUfiSms_SetConcatMaxRefer(g_zUfiSms_ConcatSmsReference);}deliver->
-user_data_header_present=TRUE;deliver->user_data.num_headers=(0xdb2+2489-0x176a)
-;deliver->user_data.headers[(0xb39+2187-0x13c4)].header_id=WMS_UDH_CONCAT_8;
-deliver->user_data.headers[(0x599+1756-0xc75)].u.concat_8.msg_ref=msg_ref;
-deliver->user_data.headers[(0x6a1+4039-0x1668)].u.concat_8.total_sm=concat_sms->
-total_msg;deliver->user_data.headers[(0x53+6613-0x1a28)].u.concat_8.seq_num=
-concat_sms->current_sending+(0x463+7938-0x2364);ptDbSaveData->concat_sms=
-(0x18c5+1539-0x1ec7);ptDbSaveData->concat_info[(0xe3b+2473-0x17e4)]=msg_ref;}
-void zUfiSms_FillDeliverPdu(T_zUfiSms_DeliverPdu*ptDeliver,T_zUfiSms_ConcatInfo*
+UINT16 msg_ref=(0x9c0+3446-0x1736);deliver->user_data_header_present=TRUE;if(
+(0x1f44+1994-0x270e)==concat_sms->current_sending){g_zUfiSms_ConcatSmsReference
+++;(void)zUfiSms_SetConcatMaxRefer(g_zUfiSms_ConcatSmsReference);}deliver->
+user_data_header_present=TRUE;deliver->user_data.num_headers=(0x24fd+360-0x2664)
+;deliver->user_data.headers[(0x1437+1610-0x1a81)].header_id=WMS_UDH_CONCAT_8;
+deliver->user_data.headers[(0x3d6+8263-0x241d)].u.concat_8.msg_ref=msg_ref;
+deliver->user_data.headers[(0x654+3991-0x15eb)].u.concat_8.total_sm=concat_sms->
+total_msg;deliver->user_data.headers[(0x8c9+1998-0x1097)].u.concat_8.seq_num=
+concat_sms->current_sending+(0x57+6702-0x1a84);ptDbSaveData->concat_sms=
+(0xca6+2100-0x14d9);ptDbSaveData->concat_info[(0xfab+2307-0x18ae)]=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=
@@ -753,34 +752,34 @@
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>
-(0x67c+1772-0xd67)){zUfiSms_FillDeliver(ptDeliver,concat_sms,ptDbSaveData);
-ptDbSaveData->concat_sms=(0x110f+2220-0x19ba);ptDbSaveData->concat_info[
-(0x620+8270-0x266c)]=concat_sms->current_sending+(0x15a6+4044-0x2571);
-ptDbSaveData->concat_info[(0x64f+6859-0x2119)]=concat_sms->total_msg;
-ptDbSaveData->concat_info[(0x1bc6+1259-0x20b1)]=ptDeliver->user_data.headers[
-(0x35f+1660-0x9db)].u.concat_8.msg_ref;}else{ptDeliver->user_data_header_present
-=FALSE;ptDeliver->user_data.num_headers=(0x100f+737-0x12f0);}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][(0xaf2+5438-0x2030)]==((char)(0x860+2793-0x131e))){
-(void)zUfiSms_CharToInt(group_sms->receivers[group_sms->current_receiver]+
-(0x1c8b+112-0x1cfa),strlen(group_sms->receivers[group_sms->current_receiver])-
-(0x1d50+1178-0x21e9),ptDeliver->address.digits);ptDeliver->address.number_type=
-WMS_NUMBER_INTERNATIONAL;ptDeliver->address.number_of_digits=(UINT8)strlen(
-group_sms->receivers[group_sms->current_receiver])-(0x2fd+6414-0x1c0a);}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->receivers[group_sms->current_receiver]
-);}ptDeliver->address.digit_mode=WMS_DIGIT_MODE_4_BIT;ptDeliver->address.
-number_mode=WMS_NUMBER_MODE_NONE_DATA_NETWORK;ptDeliver->address.number_plan=
+(0x57d+3000-0x1134)){zUfiSms_FillDeliver(ptDeliver,concat_sms,ptDbSaveData);
+ptDbSaveData->concat_sms=(0xb18+262-0xc1d);ptDbSaveData->concat_info[
+(0x13+2450-0x9a3)]=concat_sms->current_sending+(0x135f+1883-0x1ab9);ptDbSaveData
+->concat_info[(0x1096+3954-0x2007)]=concat_sms->total_msg;ptDbSaveData->
+concat_info[(0xa3a+5898-0x2144)]=ptDeliver->user_data.headers[(0xe0d+1-0xe0e)].u
+.concat_8.msg_ref;}else{ptDeliver->user_data_header_present=FALSE;ptDeliver->
+user_data.num_headers=(0x544+6152-0x1d4c);}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][
+(0x97+6873-0x1b70)]==((char)(0x1f73+1312-0x2468))){(void)zUfiSms_CharToInt(
+group_sms->receivers[group_sms->current_receiver]+(0x954+4507-0x1aee),strlen(
+group_sms->receivers[group_sms->current_receiver])-(0x92c+3810-0x180d),ptDeliver
+->address.digits);ptDeliver->address.number_type=WMS_NUMBER_INTERNATIONAL;
+ptDeliver->address.number_of_digits=(UINT8)strlen(group_sms->receivers[group_sms
+->current_receiver])-(0x1831+380-0x19ac);}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->
+receivers[group_sms->current_receiver]);}ptDeliver->address.digit_mode=
+WMS_DIGIT_MODE_4_BIT;ptDeliver->address.number_mode=
+WMS_NUMBER_MODE_NONE_DATA_NETWORK;ptDeliver->address.number_plan=
WMS_NUMBER_PLAN_TELEPHONY;}T_zUfiSms_CmdStatus zUfiSms_SaveConcatSms(
T_zUfiSms_SaveReq*ptSaveSms,T_zUfiSms_ConcatInfo*ptConcatSms,T_zUfiSms_GroupInfo
*ptGroupSms,T_zUfiSms_DbStoreData*ptDbSaveData,int iSmsLen){printf(
"\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,-
-(0x1db1+1623-0x2407))){at_print(LOG_ERR,
+(0x1111+1343-0x164f))){at_print(LOG_ERR,
"\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x6e\x76\x20\x66\x61\x69\x6c\x65\x64\x2e"
);return WMS_CMD_FAILED;}}else{return WMS_CMD_FAILED;}g_zUfiSms_MsgRefer++;
ptDbSaveData->msg_ref=g_zUfiSms_MsgRefer;(void)zUfiSms_SetMaxReference(
@@ -795,20 +794,20 @@
zUfiSms_SaveSmsToDb(T_zUfiSms_SaveReq*ptSaveSms,T_zUfiSms_ConcatInfo*ptConcatSms
,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=(0x85+41-0xae);if
-(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-(0x932+5102-0x1d1f)==
-iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->current_sending=
-(0x1777+2856-0x229f);ptConcatSms->current_sending<ptConcatSms->total_msg;
-ptConcatSms->current_sending++){memset((void*)&tClientMsg,(0x15a4+4341-0x2699),
-sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,(0x1479+2659-0x1edc),
-sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,(0x354+3508-0x1108),
-sizeof(T_zUfiSms_DbStoreData));tClientMsg.msg_hdr.mem_store=(ptSaveSms->
-mem_store==WMS_STORAGE_TYPE_UIM_V01)?WMS_STORAGE_TYPE_UIM_V01:
+T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;int current_sending=
+(0xcc9+4051-0x1c9c);if(NULL==ptSaveSms||NULL==ptConcatSms||NULL==ptGroupSms||(-
+(0xf14+596-0x1167)==iSmsLength)){return WMS_CMD_FAILED;}for(ptConcatSms->
+current_sending=(0x388+6994-0x1eda);ptConcatSms->current_sending<ptConcatSms->
+total_msg;ptConcatSms->current_sending++){memset((void*)&tClientMsg,
+(0x4fb+1386-0xa65),sizeof(T_zUfiSms_ClientMsg));memset((void*)&tClientTsData,
+(0x557+4604-0x1753),sizeof(T_zUfiSms_ClientTsData));memset((void*)&tDbSaveData,
+(0x239d+238-0x248b),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
-(0x715+3858-0x1623):{tClientTsData.u.gw_pp.tpdu_type=WMS_TPDU_SUBMIT;(void)
+(0xfc4+3938-0x1f22):{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;(
@@ -820,42 +819,41 @@
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)-
-(0x1955+3201-0x25d5));if(TRUE==g_zUfiSms_MemFullFlag[ZTE_WMS_MEMORY_NV]){result=
+(0x82b+5259-0x1cb5));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==(0x8d5+5268-0x1d68)){result=
+);}else{if(tDbSaveData.concat_sms==(0x106b+2838-0x1b80)){result=
zUfiSms_SaveConcatSms(ptSaveSms,ptConcatSms,ptGroupSms,&tDbSaveData,iSmsLength);
-current_sending=ptConcatSms->current_sending+(0x113+5141-0x1527);if(ptConcatSms
-->sms_len<iSmsLength*(current_sending+(0x406+3452-0x1181))){iSmsLength=
-ptConcatSms->sms_len-iSmsLength*current_sending;}}else{result=
-zUfiSms_SaveNormalSms(ptSaveSms,&tDbSaveData);}}}return result;}int
-zUfiSms_DeleteSmsInSim(){char str_index[(0x517+7094-0x204d)]={
-(0x1173+944-0x1523)};int index=(0x629+6414-0x1f37);int is_cc=(0x242c+371-0x259f)
-;int iSmsId=(0x81f+5934-0x1f4d);T_zUfiSms_ModifyTag tDeleteInfo={
-(0xb7+8368-0x2167)};char StrValue[(0x545+7142-0x2121)]={(0x1172+3808-0x2052)};
-memset(&tDeleteInfo,(0x1418+4664-0x2650),sizeof(T_zUfiSms_ModifyTag));iSmsId=
-g_zUfiSms_DelMsg.sim_id[g_zUfiSms_DelMsg.sim_index];if(-(0x1ec0+28-0x1edb)==(
-is_cc=zUfiSms_IsConcatSms(iSmsId))){printf(
+current_sending=ptConcatSms->current_sending+(0x16c3+2716-0x215e);if(ptConcatSms
+->sms_len<iSmsLength*(current_sending+(0x919+632-0xb90))){iSmsLength=ptConcatSms
+->sms_len-iSmsLength*current_sending;}}else{result=zUfiSms_SaveNormalSms(
+ptSaveSms,&tDbSaveData);}}}return result;}int zUfiSms_DeleteSmsInSim(){char
+str_index[(0xdea+1738-0x1434)]={(0x1f6+3537-0xfc7)};int index=(0x2b6+359-0x41d);
+int is_cc=(0x249b+270-0x25a9);int iSmsId=(0x21+3434-0xd8b);T_zUfiSms_ModifyTag
+tDeleteInfo={(0x1af4+2518-0x24ca)};char StrValue[(0x1d4d+335-0x1e92)]={
+(0x2251+841-0x259a)};memset(&tDeleteInfo,(0x16c6+172-0x1772),sizeof(
+T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_DelMsg.sim_id[g_zUfiSms_DelMsg.sim_index]
+;if(-(0xd49+2545-0x1739)==(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((0x8f6+7552-0x2675)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(
+,is_cc,iSmsId);if((0x15e4+662-0x1879)==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>
-(0x14c9+733-0x17a6)){index=tDeleteInfo.indices[tDeleteInfo.id_index];
+(0x794+6982-0x22da)){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,
-(0x229d+1137-0x270e),sizeof(str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById(
+(0x41c+4658-0x164e),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=(0xa84+5700-0x20c8);
-char StrValue[(0x29c+6739-0x1ce5)]={(0x374+5703-0x19bb)};zUfiSms_SetSmsLocation(
-SMS_LOCATION_SIM);memset(&g_deleteIndex,(0x1c04+1175-0x209b),sizeof(
+T_zUfiSms_CmdStatus zUfiSms_DeleteSimSms(VOID){int atRes=(0xb6+8497-0x21e7);char
+ StrValue[(0x78d+7764-0x25d7)]={(0xc0b+5390-0x2119)};zUfiSms_SetSmsLocation(
+SMS_LOCATION_SIM);memset(&g_deleteIndex,(0x650+5969-0x1da1),sizeof(
T_zUfiSms_DelIndexInfo));while(g_zUfiSms_DelMsg.sim_index_count>
-(0x1d04+287-0x1e23)){if(ZUFI_FAIL==zUfiSms_DeleteSmsInSim()){printf(
+(0xad6+264-0xbde)){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.
@@ -864,69 +862,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,(0xcfb+2103-0x1530));if(tmp==(0xd0b+5100-0x20f7)){
-pdu_tmp+=(0x1da+785-0x4e9);}else{tmp=(tmp+(0xe6d+996-0x1250))*(0xac2+170-0xb6a);
-pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,(0x128c+5163-0x26b5));first_octet=
-tmp;if(first_octet&(0x171b+909-0x1aa6)){*stat=(0x177+7954-0x2084);}}
+String2Bytes(pdu_tmp,&tmp,(0xba2+154-0xc3a));if(tmp==(0xfb6+136-0x103e)){pdu_tmp
++=(0x295+2631-0xcda);}else{tmp=(tmp+(0x15ba+3769-0x2472))*(0x1f01+1734-0x25c5);
+pdu_tmp+=tmp;}(void)String2Bytes(pdu_tmp,&tmp,(0x532+1296-0xa40));first_octet=
+tmp;if(first_octet&(0x9af+978-0xd7f)){*stat=(0x12c5+2872-0x1df8);}}
T_zUfiSms_TpduType zUfiSms_GetTpduType(UINT8*pData){T_zUfiSms_TpduType iTpduType
-;UINT8 mti=(0x1aaf+1015-0x1ea6);mti=(T_zUfiSms_TpduType)(pData[
-(0x10e8+1159-0x156f)]&(0x576+1647-0xbe2));switch(mti){case(0x1035+3688-0x1e9d):
-iTpduType=WMS_TPDU_DELIVER;break;case(0x72c+2919-0x1292):iTpduType=
-WMS_TPDU_SUBMIT;break;case(0x1cfb+2106-0x2533):iTpduType=WMS_TPDU_STATUS_REPORT;
+;UINT8 mti=(0x18e2+158-0x1980);mti=(T_zUfiSms_TpduType)(pData[
+(0x145b+3648-0x229b)]&(0x1e1+8582-0x2364));switch(mti){case(0xbb8+5198-0x2006):
+iTpduType=WMS_TPDU_DELIVER;break;case(0x1b4d+1109-0x1fa1):iTpduType=
+WMS_TPDU_SUBMIT;break;case(0x1111+4487-0x2296):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=(0x87b+4323-0x195e);memset(pNumber,(0x1c67+2325-0x257c),
-ZTE_WMS_ADDRESS_LEN_MAX+(0x64b+5661-0x1c67));if(tAddress.number_type==
-WMS_NUMBER_INTERNATIONAL){pNumber[(0x268+7253-0x1ebd)]=
-((char)(0xea4+1989-0x163e));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[(0xb8+1719-0x76f)]));}}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)(0x2cd+86-0x301));tmp=zte_wms_time.
-year;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x390+2443-0xd0c))+((tmp>>
-(0x1c72+110-0x1cdc))*(0x81f+7657-0x25fe)),res_ptr);zUfiSms_SprintfTime(date->
-year,sizeof(date->year),zte_wms_time.year);*res_ptr++=((char)(0x666+242-0x729));
-tmp=zte_wms_time.month;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x12c2+378-0x142d)
-)+((tmp>>(0xcc4+6474-0x260a))*(0xa1a+6146-0x2212)),res_ptr);zUfiSms_SprintfTime(
-date->month,sizeof(date->month),zte_wms_time.month);*res_ptr++=
-((char)(0x2004+1767-0x26bc));tmp=zte_wms_time.day;res_ptr=
-zUfiSms_SmsiUtilitoaFill((tmp&(0x18a6+281-0x19b0))+((tmp>>(0x1b3b+1491-0x210a))*
-(0x220+8258-0x2258)),res_ptr);zUfiSms_SprintfTime(date->day,sizeof(date->day),
-zte_wms_time.day);*res_ptr++=((char)(0xd33+1903-0x1476));tmp=zte_wms_time.hour;
-res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xc3+9725-0x26b1))+((tmp>>
-(0x6a+4913-0x1397))*(0x294+5947-0x19c5)),res_ptr);zUfiSms_SprintfTime(date->hour
-,sizeof(date->hour),zte_wms_time.hour);*res_ptr++=((char)(0x1a42+638-0x1c86));
-tmp=zte_wms_time.minute;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&
-(0x5f9+4150-0x1620))+((tmp>>(0x8ab+4508-0x1a43))*(0x104c+1506-0x1624)),res_ptr);
-zUfiSms_SprintfTime(date->min,sizeof(date->min),zte_wms_time.minute);*res_ptr++=
-((char)(0x140+5999-0x1875));tmp=zte_wms_time.second;res_ptr=
-zUfiSms_SmsiUtilitoaFill((tmp&(0x1b57+553-0x1d71))+((tmp>>(0x1112+1056-0x152e))*
-(0x2261+53-0x228c)),res_ptr);zUfiSms_SprintfTime(date->sec,sizeof(date->sec),
-zte_wms_time.second);if(zte_wms_time.timezone<(0x903+426-0xaad)){*res_ptr++=
-((char)(0xaec+709-0xd84));tmp=(UINT8)(zte_wms_time.timezone*(-(0x31f+254-0x41c))
-);snprintf(date->timezone,sizeof(date->timezone),"\x2d\x25\x64",-
-(0x582+382-0x6ff)*zte_wms_time.timezone);}else{*res_ptr++=
-((char)(0x289+3002-0xe18));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)(0x217a+985-0x2531));
-return res_ptr;}T_zUfiSms_CmdStatus zUfiSms_HandleReport(unsigned char*ptPduData
-){T_zUfiSms_RawTsData tRawTsData;T_zUfiSms_ClientTsData tClientTsData;int
-iReportStatus=(0x50c+77-0x559);unsigned char acDeliverNumber[
-ZTE_WMS_ADDRESS_LEN_MAX+(0x73+9817-0x26cb)];unsigned char tTpScts[
-ZTE_WMS_TP_SCTS_LEN_MAX+(0xd98+2311-0x169e)];T_zUfiSms_Date tSmsDate;char
-acRecFlag[(0x107+7419-0x1dfd)]={(0xd04+6071-0x24bb)};int iRpCount=
-(0xed9+3392-0x1c19);char tmp[(0xba3+2678-0x160f)];int tmp_i=(0x17d3+2329-0x20ec)
-;unsigned int pos=(0xc12+5226-0x207c);if(NULL==ptPduData){return WMS_CMD_FAILED;
-}memset(acDeliverNumber,(0x108d+707-0x1350),sizeof(acDeliverNumber));memset(&
-tSmsDate,(0x155+5026-0x14f7),sizeof(T_zUfiSms_Date));memset(tTpScts,
-(0x4f7+5775-0x1b86),sizeof(tTpScts));memset(&tRawTsData,(0x788+6597-0x214d),
-sizeof(T_zUfiSms_RawTsData));memset(&tClientTsData,(0xa5b+3610-0x1875),sizeof(
-T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),"\x25\x58",ptPduData[
-(0xbb5+4364-0x1cc1)]);tmp_i=atoi(tmp);if(tmp_i<(0x179d+1187-0x1c40)||tmp_i>
-INT_MAX-(0x1098+264-0x119f)){at_print(LOG_ERR,
+UINT8 number_type=(0xccb+6182-0x24f1);memset(pNumber,(0x1c64+1870-0x23b2),
+ZTE_WMS_ADDRESS_LEN_MAX+(0x943+3945-0x18ab));if(tAddress.number_type==
+WMS_NUMBER_INTERNATIONAL){pNumber[(0x46+993-0x427)]=((char)(0xf10+521-0x10ee));
+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[
+(0x86a+711-0xb31)]));}}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)(0x7e2+3544-0x1598));tmp=zte_wms_time.year;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x677+6314-0x1f12))+((tmp>>(0x4ca+3304-0x11ae))*
+(0xc65+3371-0x1986)),res_ptr);zUfiSms_SprintfTime(date->year,sizeof(date->year),
+zte_wms_time.year);*res_ptr++=((char)(0x139a+639-0x15ea));tmp=zte_wms_time.month
+;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x2b6+6090-0x1a71))+((tmp>>
+(0x17eb+3728-0x2677))*(0xbf1+4170-0x1c31)),res_ptr);zUfiSms_SprintfTime(date->
+month,sizeof(date->month),zte_wms_time.month);*res_ptr++=
+((char)(0x1018+851-0x133c));tmp=zte_wms_time.day;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x833+5970-0x1f76))+((tmp>>(0x412+6233-0x1c67))*
+(0xe20+3103-0x1a35)),res_ptr);zUfiSms_SprintfTime(date->day,sizeof(date->day),
+zte_wms_time.day);*res_ptr++=((char)(0x4e4+3984-0x1448));tmp=zte_wms_time.hour;
+res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0xae1+1861-0x1217))+((tmp>>
+(0x23c5+210-0x2493))*(0x73b+6182-0x1f57)),res_ptr);zUfiSms_SprintfTime(date->
+hour,sizeof(date->hour),zte_wms_time.hour);*res_ptr++=
+((char)(0x864+2191-0x10b9));tmp=zte_wms_time.minute;res_ptr=
+zUfiSms_SmsiUtilitoaFill((tmp&(0x664+3991-0x15ec))+((tmp>>(0x7db+574-0xa15))*
+(0xaf1+2895-0x1636)),res_ptr);zUfiSms_SprintfTime(date->min,sizeof(date->min),
+zte_wms_time.minute);*res_ptr++=((char)(0x930+3596-0x1702));tmp=zte_wms_time.
+second;res_ptr=zUfiSms_SmsiUtilitoaFill((tmp&(0x7b+4703-0x12cb))+((tmp>>
+(0x57d+6072-0x1d31))*(0xc56+6316-0x24f8)),res_ptr);zUfiSms_SprintfTime(date->sec
+,sizeof(date->sec),zte_wms_time.second);if(zte_wms_time.timezone<
+(0x186+2844-0xca2)){*res_ptr++=((char)(0x1621+158-0x1692));tmp=(UINT8)(
+zte_wms_time.timezone*(-(0x1797+1266-0x1c88)));snprintf(date->timezone,sizeof(
+date->timezone),"\x2d\x25\x64",-(0x109d+4321-0x217d)*zte_wms_time.timezone);}
+else{*res_ptr++=((char)(0x289+6633-0x1c47));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)(0x58f+5151-0x198c));return res_ptr;}T_zUfiSms_CmdStatus
+zUfiSms_HandleReport(unsigned char*ptPduData){T_zUfiSms_RawTsData tRawTsData;
+T_zUfiSms_ClientTsData tClientTsData;int iReportStatus=(0xdcf+688-0x107f);
+unsigned char acDeliverNumber[ZTE_WMS_ADDRESS_LEN_MAX+(0x2ef+3996-0x128a)];
+unsigned char tTpScts[ZTE_WMS_TP_SCTS_LEN_MAX+(0x53b+6143-0x1d39)];
+T_zUfiSms_Date tSmsDate;char acRecFlag[(0x25f+8865-0x24fb)]={(0x1e15+341-0x1f6a)
+};int iRpCount=(0x1d7+1202-0x689);char tmp[(0xa8b+6281-0x230a)];int tmp_i=
+(0x11e5+3576-0x1fdd);unsigned int pos=(0xa68+6449-0x2399);if(NULL==ptPduData){
+return WMS_CMD_FAILED;}memset(acDeliverNumber,(0x1aea+1782-0x21e0),sizeof(
+acDeliverNumber));memset(&tSmsDate,(0x1ab6+816-0x1de6),sizeof(T_zUfiSms_Date));
+memset(tTpScts,(0xc16+3455-0x1995),sizeof(tTpScts));memset(&tRawTsData,
+(0x1549+382-0x16c7),sizeof(T_zUfiSms_RawTsData));memset(&tClientTsData,
+(0x5b9+6063-0x1d68),sizeof(T_zUfiSms_ClientTsData));snprintf(tmp,sizeof(tmp),
+"\x25\x58",ptPduData[(0x30f+119-0x386)]);tmp_i=atoi(tmp);if(tmp_i<
+(0x1764+1669-0x1de9)||tmp_i>INT_MAX-(0x600+120-0x677)){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+(0x5b+7579-0x1df5);if(pos>=
+,tmp_i);return WMS_CMD_FAILED;}pos=tmp_i+(0xfaa+4388-0x20cd);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(&
@@ -935,59 +933,60 @@
"\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=(0x1ccf+605-0x1f2b);break;}case
+case WMS_TP_STATUS_REPLACED:{iReportStatus=(0x15b1+3796-0x2484);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=(0x170d+3692-0x2576);break;}default:{iReportStatus=
-(0x16d+629-0x3e0);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=(0x1ed+2798-0xcd8);break;}default:{iReportStatus=
+(0x1474+1268-0x1966);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,(0x9d9+5524-0x1f6d),sizeof(acRecFlag))
+);return WMS_CMD_FAILED;}memset(acRecFlag,(0xdeb+2698-0x1875),sizeof(acRecFlag))
;sc_cfg_get(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag,sizeof(acRecFlag));iRpCount=
-atoi(acRecFlag);if(iRpCount<(0x1bb0+902-0x1f36)||iRpCount>INT_MAX-
-(0x890+2807-0x1386)){at_print(LOG_ERR,
+atoi(acRecFlag);if(iRpCount<(0x6ab+5381-0x1bb0)||iRpCount>INT_MAX-
+(0x1973+295-0x1a99)){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,(0x15d1+3602-0x23e3),sizeof(
+,iRpCount);return WMS_CMD_FAILED;}memset(acRecFlag,(0x677+7993-0x25b0),sizeof(
acRecFlag));snprintf(acRecFlag,sizeof(acRecFlag),"\x25\x64",iRpCount+
-(0x251b+259-0x261d));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return
+(0x379+3266-0x103a));sc_cfg_set(ZTE_WMS_NVCONFIG_SMS_REPORT,acRecFlag);return
WMS_CMD_SUCCESS;}void zUfiSms_DelModemSms(int in_index){
-#if (0x111f+1148-0x159b)
-char StrValue[(0x875+5864-0x1f53)]={(0x1899+2191-0x2128)};printf(
+#if (0x1cc+6648-0x1bc4)
+char StrValue[(0x1780+682-0x1a20)]={(0x5cb+2143-0xe2a)};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=(0x3f+1502-0x61d);atRes=zSms_SendCmgdReq(in_index);if(atRes==
+int atRes=(0xd67+4369-0x1e78);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=
-(0x15cd+3694-0x243b);memset(&g_zUfiSms_modifyMsg,(0x53b+6477-0x1e88),sizeof(
-T_zUfiSms_ModifySms));for(i=(0x1df9+1491-0x23cc);i<ptModifyBuff->total_id;i++){
+(0x1745+2001-0x1f16);memset(&g_zUfiSms_modifyMsg,(0x52+4771-0x12f5),sizeof(
+T_zUfiSms_ModifySms));for(i=(0x895+2599-0x12bc);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[(0x1333+3801-0x218c)]={
-(0xd68+1607-0x13af)};int index=(0x8b+5208-0x14e3);int is_cc=(0x6f8+4015-0x16a7);
-int iSmsId=(0x1664+3516-0x2420);T_zUfiSms_ModifyTag tModifyInfo={
-(0xaad+5122-0x1eaf)};char StrValue[(0x1417+2572-0x1e19)]={(0x87d+349-0x9da)};
-memset(&tModifyInfo,(0x16a5+3775-0x2564),sizeof(T_zUfiSms_ModifyTag));iSmsId=
-g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.sim_index];if(-
-(0x511+7896-0x23e8)==(is_cc=zUfiSms_IsConcatSms(iSmsId))){at_print(LOG_ERR,
+zUfiSms_GetUnreadSmsIndexInSim(){char str_index[(0x18c9+37-0x186e)]={
+(0x1ae4+399-0x1c73)};int index=(0x1fad+1343-0x24ec);int is_cc=
+(0x38d+6966-0x1ec3);int iSmsId=(0x815+5368-0x1d0d);T_zUfiSms_ModifyTag
+tModifyInfo={(0x1566+1524-0x1b5a)};char StrValue[(0x1799+87-0x17e6)]={
+(0x17f0+3543-0x25c7)};memset(&tModifyInfo,(0xdd+7765-0x1f32),sizeof(
+T_zUfiSms_ModifyTag));iSmsId=g_zUfiSms_modifyMsg.sim_id[g_zUfiSms_modifyMsg.
+sim_index];if(-(0xc49+6723-0x268b)==(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((0xbf7+4391-0x1d1d)==is_cc){if(ZUFI_FAIL==zUfiSms_GetSmsIndex(iSmsId,
+,is_cc);if((0xbcb+6608-0x259a)==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>
-(0xab2+1848-0x11ea)){index=tModifyInfo.indices[tModifyInfo.id_index];
+(0xb18+1566-0x1136)){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,(0x448+3458-0x11ca),sizeof(
+,index,g_modifyIndex.total);}}else{memset(str_index,(0xc14+5629-0x2211),sizeof(
str_index));if(ZUFI_FAIL==zUfiSms_GetStorePosById("\x69\x6e\x64",str_index,
sizeof(str_index),iSmsId)){at_print(LOG_ERR,
"\x67\x65\x74\x20\x69\x6e\x64\x65\x78\x20\x66\x72\x6f\x6d\x20\x64\x62\x20\x66\x61\x69\x6c\x64\x2e"
@@ -996,14 +995,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=(0x124+5095-0x150b);char StrValue[
-(0x1f2f+481-0x2106)]={(0x1585+3030-0x215b)};printf(
+T_zUfiSms_ModifyFlag*ptModifyBuff){int atRes=(0x8cf+380-0xa4b);char StrValue[
+(0x113f+4733-0x23b2)]={(0x7a6+7440-0x24b6)};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,
-(0x13d8+2679-0x1e4f),sizeof(T_zUfiSms_ModifyIndexInfo));printf(
+(0x1b5+9103-0x2544),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>
-(0x1f9a+1251-0x247d)){if(ZUFI_FAIL==zUfiSms_GetUnreadSmsIndexInSim()){at_print(
+(0x1f1+2156-0xa5d)){if(ZUFI_FAIL==zUfiSms_GetUnreadSmsIndexInSim()){at_print(
LOG_ERR,
"\x64\x65\x6c\x65\x74\x65\x20\x61\x6c\x6c\x3a\x25\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64" "\n"
,WMS_STORAGE_TYPE_UIM_V01);return;}}while(g_modifyIndex.cur_index<g_modifyIndex.
@@ -1022,21 +1021,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[(0x11a0+1673-0x181f)];int tmp_i=
-(0x63d+4381-0x175a);unsigned int pos=(0x1a9c+509-0x1c99);int result=ZUFI_SUCC;if
-(NULL==pDb_Data){return ZUFI_FAIL;}pDb_Data->mem_store=(unsigned long)iStorePos;
+T_zUfiSms_ClientTsData ts_data_ptr;char tmp[(0x21af+1148-0x2621)];int tmp_i=
+(0xd5+7945-0x1fde);unsigned int pos=(0x768+2345-0x1091);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,
-(0x1dd+7310-0x1e6b),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
-(0x109b+5610-0x2685),sizeof(wms_client_ts_data_s_type));memset(tmp,
-(0x777+7563-0x2502),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
-pPdu_Received[(0x1494+3578-0x228e)]);tmp_i=atoi(tmp);if(tmp_i<
-(0xb82+3661-0x19cf)||tmp_i>INT_MAX-(0x6ff+516-0x902)){at_print(LOG_ERR,
+(0x58d+1809-0xc9e),sizeof(T_zUfiSms_RawTsData));memset(&ts_data_ptr,
+(0xaa8+5094-0x1e8e),sizeof(wms_client_ts_data_s_type));memset(tmp,
+(0x786+8018-0x26d8),sizeof(tmp));snprintf(tmp,sizeof(tmp),"\x25\x64",
+pPdu_Received[(0x560+7238-0x21a6)]);tmp_i=atoi(tmp);if(tmp_i<(0xd29+3525-0x1aee)
+||tmp_i>INT_MAX-(0xb50+2292-0x1443)){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+(0x12c6+413-0x1462);if(pos>=iPdu_Len){return
+,tmp_i);return ZUFI_FAIL;}pos=tmp_i+(0x535+4113-0x1545);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)?
@@ -1046,62 +1045,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[
-(0xb2c+521-0xd11)]={(0xaff+6813-0x259c)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit,
-sizeof(IsInit));if((0x464+2200-0xcfc)==strcmp("\x6f\x6b",IsInit)){printf(
+(0xec3+1314-0x13c1)]={(0x80c+4250-0x18a6)};sc_cfg_get(NV_SMS_LOAD_RESULT,IsInit,
+sizeof(IsInit));if((0x590+5015-0x1927)==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 (0x10a2+4536-0x225a)
+#if (0x4+2670-0xa72)
int zUfiSms_FormatSms(CHAR*pSmsRawContent,int contentSize,T_zUfiSms_SmsItem*
-ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0x1651+3702-0x249b))
-);if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0xee5+4275-0x1f97)),
-((char)(0xb12+2605-0x1513)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
-*)(P2+(0x1371+2937-0x1ee9)),((char)(0xd2b+3355-0x1a1a)));atBase_PreProcRes(
-pSmsRawContent,contentSize);if((0xb66+6647-0x255c)==iCmdId){if(P3==P2+
-(0xe31+2872-0x1968)){sscanf(pSmsRawContent,
+ptSmsPara,int iCmdId){char*P1=strchr(pSmsRawContent,((char)(0xb50+4150-0x1b5a)))
+;if(NULL==P1){return ZUFI_FAIL;}char*P2=strchr((char*)(P1+(0x9b+7377-0x1d6b)),
+((char)(0x4c5+6531-0x1e1c)));if(NULL==P2){return ZUFI_FAIL;}char*P3=strchr((char
+*)(P2+(0x3d+6238-0x189a)),((char)(0x715+1288-0xbf1)));atBase_PreProcRes(
+pSmsRawContent,contentSize);if((0x719+151-0x7af)==iCmdId){if(P3==P2+
+(0x648+3232-0x12e7)){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(
-(0xc66+2528-0x1644)==iCmdId){if(P2==P1+(0x205d+1044-0x2470)){sscanf(
+(0xe28+1458-0x13d8)==iCmdId){if(P2==P1+(0x1cf8+1477-0x22bc)){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={(0x13a0+4853-0x2695)};
+WMS_CMD_PROCESSING;T_zUfiSms_DbStoreData db_data={(0x1964+3320-0x265c)};
zUfiSms_StoreType mem_store=WMS_STORAGE_TYPE_UIM_V01;unsigned char pdu_tmp[
-ZSMS_PDU_SIZE]={(0x14bf+1281-0x19c0)};int total_count=(0x15db+2647-0x2032);int
-sim_capability=(0x6c3+5680-0x1cf3);printf(
+ZSMS_PDU_SIZE]={(0x6e6+1764-0xdca)};int total_count=(0x1388+4085-0x237d);int
+sim_capability=(0xa11+7400-0x26f9);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,(0xca+4438-0x1220),sizeof(
-db_data));memset(pdu_tmp,(0x158d+2864-0x20bd),sizeof(pdu_tmp));(void)
+,strlen(pSmsItem->pdu),pSmsItem->pdu);memset(&db_data,(0x12f1+4407-0x2428),
+sizeof(db_data));memset(pdu_tmp,(0xd17+2988-0x18c3),sizeof(pdu_tmp));(void)
String2Bytes(pSmsItem->pdu,pdu_tmp,(int)strlen(pSmsItem->pdu));
-#if (0x1cb2+648-0x1f39)
-zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x831+7159-0x2423)==
+#if (0x12e9+1023-0x16e7)
+zUfiSms_GetReportStatus(pSmsItem->pdu,&pSmsItem->stat);if((0x2e1+6562-0x1c7e)==
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 (0xc57+3470-0x19e4)
+#if (0x647+2194-0xed8)
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 (0xa14+3111-0x163a)
+#if (0xa6b+6461-0x23a7)
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,-(0xb2a+5638-0x212f));{}
-#if (0xd7+8334-0x2164)
+(void)zUfiSms_WriteSmsToDb(&db_data,mem_store,-(0x649+4355-0x174b));{}
+#if (0x5cd+303-0x6fb)
if(SMS_LOCATION_SIM==g_zUfiSms_CurLocation){CHAR simCapability[
-(0x1e68+310-0x1f6c)]={(0xc4c+6260-0x24c0)};sc_cfg_get(
+(0x1912+1684-0x1f74)]={(0x164f+561-0x1880)};sc_cfg_get(
ZTE_WMS_NVCONFIG_SIM_CAPABILITY,simCapability,sizeof(simCapability));
sim_capability=atoi(simCapability);(void)zUfiSms_GetTotalCount(
ZTE_WMS_DB_SIM_TABLE,&total_count);if(total_count==sim_capability){
@@ -1111,18 +1110,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)!=(0x7f1+5847-0x1ec8)){if((access(
-ZTE_WMS_TMP1_PATH,F_OK)==(0x1525+2366-0x1e63))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
-(0x1741+2125-0x1f8e))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
-(0x863+2489-0x121c)){printf(
+if(access(ZTE_WMS_DB_PATH,F_OK)!=(0x3ff+877-0x76c)){if((access(ZTE_WMS_TMP1_PATH
+,F_OK)==(0x19b+5193-0x15e4))&&(access(ZTE_WMS_SEC_PATH,F_OK)!=
+(0xaf5+6665-0x24fe))){if(rename(ZTE_WMS_TMP1_PATH,ZTE_WMS_SEC_PATH)!=
+(0x893+550-0xab9)){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)==(0x1488+3053-0x2075))&&(access(
-ZTE_WMS_SEC_PATH,F_OK)!=(0xd4+8960-0x23d4))){if(rename(ZTE_WMS_TMP0_PATH,
-ZTE_WMS_SEC_PATH)!=(0x5bd+4287-0x167c)){printf(
+);}}if((access(ZTE_WMS_TMP0_PATH,F_OK)==(0xb58+4147-0x1b8b))&&(access(
+ZTE_WMS_SEC_PATH,F_OK)!=(0xd3d+2994-0x18ef))){if(rename(ZTE_WMS_TMP0_PATH,
+ZTE_WMS_SEC_PATH)!=(0xdaa+812-0x10d6)){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)==(0xc37+171-0xce2)){char rnum_buf[
-(0x1262+3525-0x200f)]={(0x93c+2227-0x11ef)};char cmd[(0x8d8+2845-0x1375)]={
-(0x869+4224-0x18e9)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
+);}}if(access(ZTE_WMS_SEC_PATH,F_OK)==(0xd52+6171-0x256d)){char rnum_buf[
+(0x88a+324-0x9b6)]={(0xf5f+4227-0x1fe2)};char cmd[(0x6a0+3407-0x136f)]={
+(0x40+2353-0x971)};sc_cfg_get("\x72\x6e\x75\x6d\x5f\x61\x74",rnum_buf,sizeof(
rnum_buf));snprintf(cmd,sizeof(cmd),
"\x2f\x62\x69\x6e\x2f\x6f\x70\x65\x6e\x73\x73\x6c\x20\x65\x6e\x63\x20\x2d\x64\x20\x2d\x61\x65\x73\x32\x35\x36\x20\x2d\x73\x61\x6c\x74\x20\x2d\x69\x6e\x20\x25\x73\x20\x2d\x6f\x75\x74\x20\x25\x73\x20\x2d\x70\x61\x73\x73\x20\x70\x61\x73\x73\x3a\x25\x73"
,ZTE_WMS_SEC_PATH,ZTE_WMS_DB_PATH,rnum_buf);zxic_system(cmd);}}
@@ -1134,48 +1133,48 @@
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[(0x336+4323-0x140f)]={(0x13f+8070-0x20c5)};
+zUfiSms_CfgSmsNvInit(void){char tmp[(0x8da+4948-0x1c24)]={(0x352+618-0x5bc)};
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,(0x107+5615-0x16f6),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
+pStatusInfo,(0x2b+6239-0x188a),sizeof(T_zUfiSms_StatusInfo));pStatusInfo->cmd=
iCmdId;pStatusInfo->cmd_status=WMS_CMD_PROCESSING;pStatusInfo->err_code=
-ZTE_SMS_CMS_NONE;pStatusInfo->send_failed_count=(0xc99+1861-0x13de);pStatusInfo
-->delete_failed_count=(0x9a8+2975-0x1547);(void)zUfiSms_SetCmdStatus(pStatusInfo
-);}void zUfiSms_CfgInit(void){char tmp[(0x145f+1380-0x19b9)]={
-(0x1947+3251-0x25fa)};sc_cfg_set(NV_SMS_STATE,"");sc_cfg_set(
+ZTE_SMS_CMS_NONE;pStatusInfo->send_failed_count=(0x19fd+1749-0x20d2);pStatusInfo
+->delete_failed_count=(0xe95+5318-0x235b);(void)zUfiSms_SetCmdStatus(pStatusInfo
+);}void zUfiSms_CfgInit(void){char tmp[(0x2095+1541-0x2690)]={
+(0x19a3+1914-0x211d)};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=(0x1a17+1549-0x2024);char buf[(0x86a+1506-0xe38)]={
-(0xa92+2618-0x14cc)};if(ZUFI_FAIL==zUfiSms_GetTagCountInDb(mem_store,
+int total_count=(0x130b+4053-0x22e0);char buf[(0x1bc3+2628-0x25f3)]={
+(0x1710+644-0x1994)};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(
-(0x1637+2640-0x2087)==total_count){return FALSE;}else{return TRUE;}}VOID
+(0x60b+6519-0x1f82)==total_count){return FALSE;}else{return TRUE;}}VOID
zUfiSms_SendSmsStatusInfo(wms_message_status_info sms_op){
-T_zUfi_SmsStatusInfoInd ind={(0xbbd+4431-0x1d0c)};CHAR temp[(0x17f4+1542-0x1dc8)
-]={(0x1471+631-0x16e8)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=
-(0x18d8+3069-0x24d4);}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=
-(0x2003+687-0x22b1);}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.
-sms_unread_ind=(0x19d5+504-0x1bcc);}else{ind.sms_unread_ind=(0x215+968-0x5dd);}
-sc_cfg_get("\x73\x6d\x73\x5f\x75\x6e\x72\x65\x61\x64\x5f\x63\x6f\x75\x6e\x74",
+T_zUfi_SmsStatusInfoInd ind={(0x13f0+3882-0x231a)};CHAR temp[(0x374+4581-0x1527)
+]={(0x13d9+3075-0x1fdc)};if(sms_op==MSG_SMS_NEW){ind.sms_new_ind=
+(0x1ef0+358-0x2055);}if(sms_op==MSG_SMS_READING){ind.sms_is_reading=
+(0x7b4+6749-0x2210);}if(zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){ind.
+sms_unread_ind=(0xa9f+1664-0x111e);}else{ind.sms_unread_ind=(0x98b+3396-0x16cf);
+}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=(0x997+2331-0x12b1);}else{ind.
-sms_memory_full_ind=(0x548+4405-0x167d);}printf(
+]==TRUE)){ind.sms_memory_full_ind=(0x31d+7415-0x2013);}else{ind.
+sms_memory_full_ind=(0x1f4f+465-0x2120);}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,(0x1aa0+2757-0x2565));if(ind.sms_memory_full_ind==
-(0x12e4+3034-0x1ebd)){sc_cfg_set(NV_SMS_INIT_STATUS,
+T_zUfi_SmsStatusInfoInd),&ind,(0xc2+7405-0x1daf));if(ind.sms_memory_full_ind==
+(0xf63+1117-0x13bf)){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==(0xffd+5434-0x2536)){sc_cfg_set(NV_SMS_INIT_STATUS,
+sms_unread_ind==(0xf7c+1775-0x166a)){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(
@@ -1184,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,(0x201f+1515-0x2609),pushSmsLen,fp);if(len==
+);return;}len=fwrite(pushSms,(0xe75+6182-0x269a),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 aa42409..cc32a01 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=(0x168b+867-0x19ee);int g_zSms_MsqId=-
-(0x7c9+1495-0xd9f);int g_zSms_LocalMsqId=-(0xb6a+17-0xb7a);sem_t g_sms_sem_id;
-T_zSms_optRsp g_smsOptRsp={(0x1977+566-0x1bad)};static const T_zSmsHandleTable
-SmsHandleWebTab[]={{MSG_CMD_SEND_SMS,atWeb_SendSms,TRUE},{
+g_zUfiSms_IsConcatSendSuc;int iSmsIndex=(0x3c3+6216-0x1c0b);int g_zSms_MsqId=-
+(0xc3b+2844-0x1756);int g_zSms_LocalMsqId=-(0x21fc+643-0x247e);sem_t
+g_sms_sem_id;T_zSms_optRsp g_smsOptRsp={(0xe8a+3039-0x1a69)};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},{(0x19f+3215-0xe2e),NULL,FALSE}};VOID atWeb_SendSms(
-UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;T_zUfiSms_StatusInfo tStatus={
-(0xf3c+2341-0x1861)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)
+atWeb_OutdateSmsCheck,TRUE},{(0xbfd+6816-0x269d),NULL,FALSE}};VOID atWeb_SendSms
+(UINT8*pDatabuf){T_zGoaheadMsgBuf*ptMessage=NULL;T_zUfiSms_StatusInfo tStatus={
+(0xa1c+4959-0x1d7b)};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={
-(0x1f69+1067-0x2394)};T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;
-T_zUfiSms_StatusInfo tStatus={(0x18f8+147-0x198b)};assert(pDatabuf!=NULL);printf
-("[SMS] atWeb_DelSmsByIndex recv msg\n");memcpy(&tDelReq,pDatabuf,sizeof(
+atWeb_DelSmsByIndex(UINT8*pDatabuf){T_zUfiSms_DelReq tDelReq={(0x5e5+20-0x5f9)};
+T_zUfiSms_CmdStatus result=WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={
+(0x7d1+6722-0x2213)};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 (0x7ea+444-0x9a6)
+#if (0x1dcd+814-0x20fb)
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,(0x7ff+2849-0x1320),req
-->eBoxName);if(req->eBoxName==SMS_INBOX){sms_LoadSmsFromSim();}
+,req->eBoxName);SMS_DeleteRecordFromXML(SMS_LOCATION_SIM,(0x9f6+326-0xb3c),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={
-(0xe7c+4177-0x1ecd)};assert(pDatabuf!=NULL);ptMessage=(T_zGoaheadMsgBuf*)
+(0x1d6+3703-0x104d)};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={(0x1519+2291-0x1e0c)};assert(
+WMS_CMD_PROCESSING;T_zUfiSms_StatusInfo tStatus={(0x1365+2128-0x1bb5)};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,251 +61,250 @@
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={
-(0x218a+175-0x2239)};printf(
+(0x11c2+5069-0x258f)};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={(0x76f+7318-0x2405)};
+pDatabuf){T_zUfiSms_DelReq tSmsDel={(0x1af4+1321-0x201d)};
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>(0xf49+980-0x131d)){
-atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0x27f+4029-0x123c),sizeof(
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x78+159-0x117)){
+atWeb_DelSmsByIndex(&tSmsDel);}memset(&tSmsDel,(0x308+4158-0x1346),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>(0x42+10-0x4c)){
+,tSmsDel.all_or_count);if(tSmsDel.all_or_count>(0x2b2+3065-0xeab)){
atWeb_DelSmsByIndex(&tSmsDel);}}VOID zSms_HandleWebMsg(MSG_BUF*ptMsgBuf){UINT32
-i=(0x1191+595-0x13e4);assert(ptMsgBuf!=NULL);printf(
+i=(0xed+6746-0x1b47);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((0x2115+1113-0x256e)!=SmsHandleWebTab[i].msg_id){if(
+,ptMsgBuf->usMsgCmd);while((0x3a5+6686-0x1dc3)!=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,(0x8c3+3885-0x17f0));}else if(NULL!=SmsHandleWebTab[i].
+ptMsgBuf->aucDataBuf,(0x12f2+4546-0x24b4));}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,(0x402+7157-0x1ff7));return(0x16f+4098-0x1171);}SINT32
-zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x12aa+1874-0x19fc)};
-memset(&sendSmsInfo,(0xbc9+5597-0x21a6),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
+unsigned char*)pData,(0x33+9604-0x25b7));return(0xc44+11-0xc4f);}SINT32
+zSms_SendCmgsReq(VOID){T_zSms_SendSmsReq sendSmsInfo={(0x1a9+6455-0x1ae0)};
+memset(&sendSmsInfo,(0x1010+5015-0x23a7),sizeof(T_zSms_SendSmsReq));sendSmsInfo.
length=g_zUfiSms_FinalCmgsBuf.length;if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<
-ZSMS_PDU_SIZE-(0x5a+2897-0xbaa)){memcpy(sendSmsInfo.pdu,g_zUfiSms_FinalCmgsBuf.
-pdu,strlen(g_zUfiSms_FinalCmgsBuf.pdu));}else{printf(
+ZSMS_PDU_SIZE-(0x1590+4352-0x268f)){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-(0x15ac+861-0x1907));}*(sendSmsInfo.pdu+strlen(
+ZSMS_PDU_SIZE-(0x1201+1778-0x18f1));}*(sendSmsInfo.pdu+strlen(
g_zUfiSms_FinalCmgsBuf.pdu))=ZSMS_CTRL_Z_CHAR;
-#if (0xe5+9743-0x26f3)
+#if (0x110a+4817-0x23da)
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==(0x12d8+5137-0x26e8)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x20c+350-0x369)){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-(0x20e3+463-0x22b1)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0xe91+1860-0x15d4)].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-(0x573+2010-0xd4c)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0xf9f+3718-0x1e24)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0xca2+1121-0x1102)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0xb24+5031-0x1eca)){
g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc();}SINT32 zSms_SendCmgdReq
-(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x275+335-0x3c4)};delSmsReq.index=
+(UINT8 index){T_zSms_DelSmsReq delSmsReq={(0x1aa4+581-0x1ce9)};delSmsReq.index=
index;zSms_SendMsg(MSG_CMD_DELSMS_REQ,sizeof(T_zSms_DelSmsReq),&delSmsReq);
-sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1376+384-0x14f5)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x405+28-0x420)){return
ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmgdOk(VOID){CHAR
-strUsed[(0xd7+3541-0xea2)]={(0xb2d+4087-0x1b24)};int used=(0x14cc+3351-0x21e3);
-int tmp_i=(0x252+9009-0x2583);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+strUsed[(0xfe7+2241-0x189e)]={(0x11e0+111-0x124f)};int used=(0x16f9+1635-0x1d5c)
+;int tmp_i=(0x50a+8115-0x24bd);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<(0x368+7051-0x1ef3)||tmp_i>INT_MAX-(0x14fd+1677-0x1b89)){
-at_print(LOG_ERR,
+strUsed);if(tmp_i<(0xa77+12-0xa83)||tmp_i>INT_MAX-(0x146b+2180-0x1cee)){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=(0x14a+7807-0x1fc9);}used=tmp_i-(0x1f66+1791-0x2664);if(used<
-(0x11ea+3649-0x202b)){used=(0x1d52+513-0x1f53);}memset(&strUsed,
-(0x862+7814-0x26e8),(0x513+3054-0x10f7));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(
+,tmp_i);tmp_i=(0x30d+1435-0x8a8);}used=tmp_i-(0x806+5111-0x1bfc);if(used<
+(0xfa+802-0x41c)){used=(0x6a5+7056-0x2235);}memset(&strUsed,(0x1766+2536-0x214e)
+,(0xe11+1306-0x1321));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[(0xcab+2288-0x1591)]={
-(0x490+8110-0x243e)};CHAR strTotal[(0x12dc+3963-0x224d)]={(0x1e5c+2001-0x262d)};
-CHAR strUsed[(0x130c+1118-0x1760)]={(0x49f+1647-0xb0e)};int total=
-(0xae0+358-0xc46);int used=(0x13ef+376-0x1567);int remain=(0xd9d+5619-0x2390);
-sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(strUsed));used=atoi(
-strUsed);if(used<(0x13ad+1156-0x1831)||used>INT_MAX-(0x1915+2622-0x2352)){
-at_print(LOG_ERR,
+);}VOID zSms_RecvCmgdFinish(VOID){char StrValue[(0x8c2+6142-0x20b6)]={
+(0x1857+657-0x1ae8)};CHAR strTotal[(0x32c+3821-0x120f)]={(0x1077+3508-0x1e2b)};
+CHAR strUsed[(0x1546+4226-0x25be)]={(0x1ac8+305-0x1bf9)};int total=
+(0xb58+4676-0x1d9c);int used=(0x1aff+2704-0x258f);int remain=
+(0x1259+3921-0x21aa);sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_USED,strUsed,sizeof(
+strUsed));used=atoi(strUsed);if(used<(0xd86+6304-0x2626)||used>INT_MAX-
+(0x1045+3288-0x1d1c)){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=(0x1b9+3520-0xf79);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
-strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0x810+5232-0x1c80)||
-total>INT_MAX-(0x139d+1410-0x191e)){at_print(LOG_ERR,
+,used);used=(0x602+3527-0x13c9);}sc_cfg_get(ZTE_WMS_NVCONFIG_SIM_CARD_TOTAL,
+strTotal,sizeof(strTotal));total=atoi(strTotal);if(total<(0xc6d+5471-0x21cc)||
+total>INT_MAX-(0xd57+4255-0x1df5)){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=(0x2f3+7681-0x20f4);}remain=total-used;if(remain<
-(0x65+7129-0x1c3e)){remain=(0xfd5+733-0x12b2);}memset(&StrValue,
-(0x1d4f+951-0x2106),(0x20b+6985-0x1d4a));snprintf(StrValue,sizeof(StrValue),
+,total);total=(0x679+7051-0x2204);}remain=total-used;if(remain<
+(0x1e1+3225-0xe7a)){remain=(0xcac+2992-0x185c);}memset(&StrValue,
+(0xb9d+5917-0x22ba),(0x2e8+5825-0x199f));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={(0x835+6957-0x2362)};storageReq.type=avail;zSms_SendMsg(
+storageReq={(0xd16+5011-0x20a9)};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==(0x7d9+5757-0x1e55)){return ZSMS_RESULT_OK;
-}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCmgrReq(UINT8 index){
-T_zSms_ModifyTagReq modTagReq={(0xfd6+413-0x1173)};modTagReq.index=index;
+g_sms_sem_id);if(g_smsOptRsp.result==(0xd+2025-0x7f5)){return ZSMS_RESULT_OK;}
+else{return ZSMS_RESULT_ERROR;}}int zSms_SendCmgrReq(UINT8 index){
+T_zSms_ModifyTagReq modTagReq={(0x17a6+2547-0x2199)};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==(0x17b0+1572-0x1dd3)){return
+sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x1466+2293-0x1d5a)){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)-
-(0x1080+5266-0x2511));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),
-&setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x206+8380-0x22c1)){
+(0x61a+2550-0x100f));zSms_SendMsg(MSG_CMD_SCA_SET_REQ,sizeof(T_zSms_SetScaReq),&
+setscareq);sem_wait(&g_sms_sem_id);if(g_smsOptRsp.result==(0x765+2744-0x121c)){
return ZSMS_RESULT_OK;}else{return ZSMS_RESULT_ERROR;}}int zSms_SendCnmiReq(PSTR
- pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x749+6955-0x2274)};if(
-(0x75c+6291-0x1fef)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
-(0x1c4f+1012-0x2042);}else{notifySetReq.mt=(0x539+3129-0x1170);}zSms_SendMsg(
+ pAtCmdPara){T_zSms_NotifySetReq notifySetReq={(0x79+2515-0xa4c)};if(
+(0x14d0+1728-0x1b90)==strcmp(pAtCmdPara,"\x73\x69\x6d")){notifySetReq.mt=
+(0x2ef+7874-0x21b0);}else{notifySetReq.mt=(0xe4d+3637-0x1c80);}zSms_SendMsg(
MSG_CMD_NOTIFY_SET_REQ,sizeof(T_zSms_NotifySetReq),¬ifySetReq);sem_wait(&
-g_sms_sem_id);if(g_smsOptRsp.result==(0x1e67+1225-0x232f)){return ZSMS_RESULT_OK
-;}else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR
-needSMS[(0xf23+5420-0x241d)]={(0x139+5217-0x159a)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x98d+3902-0x18cb)==strcmp(
+g_sms_sem_id);if(g_smsOptRsp.result==(0xabb+628-0xd2e)){return ZSMS_RESULT_OK;}
+else{return ZSMS_RESULT_ERROR;}}VOID zSms_RecvCmtInd(UINT8*pDatabuf){CHAR
+needSMS[(0x15b7+1511-0x1b6c)]={(0x1494+1084-0x18d0)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xe2c+5204-0x2280)==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={(0x219+2680-0xc91)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0xf0d+5746-0x257f)};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[(0x12f0+1365-0x1827)]={
-(0xc02+3647-0x1a41)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
-CHAR needSMS[(0xf40+5668-0x2532)]={(0x20ed+730-0x23c7)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1bb+2612-0xbef)==strcmp(
+zSms_RecvCmtiInd(UINT8*pDatabuf){char sms_Main_state[(0x1f24+843-0x2251)]={
+(0xb1b+6160-0x232b)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
+CHAR needSMS[(0x164+2686-0xbb0)]={(0x153d+3956-0x24b1)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1d97+1745-0x2468)==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")==
-(0xf46+2453-0x18db)){printf(
+(0xa79+587-0xcc4)){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((0x4d3+7695-0x22e2)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0x8b1+4088-0x18a7))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0xc1f+3578-0x1a19)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x575+8331-0x25fe))){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[(0xa05+4223-0x1a52)]={(0xd04+4760-0x1f9c)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x65a+5236-0x1ace)==strcmp(
+needSMS[(0x1736+2853-0x2229)]={(0xc26+4951-0x1f7d)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x141f+3611-0x223a)==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={(0x1b0+7036-0x1d2c)};memcpy(&tCmtRsp,(
+);return;}T_zSms_SmsInd tCmtRsp={(0x1049+5257-0x24d2)};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[(0x5f+8624-0x21f1)]={
-(0x1cd8+1377-0x2239)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf
-;CHAR needSMS[(0x132b+3399-0x2040)]={(0x1b27+1653-0x219c)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x961+911-0xcf0)==strcmp(
+zSms_RecvCdsiInd(UINT8*pDatabuf){char sms_Main_state[(0x195f+2406-0x22a7)]={
+(0x4a9+896-0x829)};T_zSms_SmsIndexInd*smsIdxInd=(T_zSms_SmsIndexInd*)pDatabuf;
+CHAR needSMS[(0xb44+3828-0x1a06)]={(0x117a+2995-0x1d2d)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xef6+3381-0x1c2b)==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")==
-(0x1ad7+1010-0x1ec9)){printf(
+(0xd98+509-0xf95)){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((0x123+2574-0xb31)==strncmp("\x53\x4d",smsIdxInd->storetype,
-(0x59b+5855-0x1c78))){zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);
+);return;}if((0xcb9+3188-0x192d)==strncmp("\x53\x4d",smsIdxInd->storetype,
+(0x5ea+1366-0xb3e))){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={(0x105f+4645-0x2284)};CHAR ackPduStr[
-(0x770+4926-0x1a7c)]={(0x9ba+3951-0x1929)};ackReq.ackmode=ack_mode;if(ack_mode==
-(0x31a+2442-0xca2)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,
-(0x543+3389-0x11ad));memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
-#if (0x7c4+1554-0xdd6)
-if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0x463+7376-0x2132)){memcpy(ackReq.pdu,
+T_zSms_SmsAckReq ackReq={(0x188d+1004-0x1c79)};CHAR ackPduStr[
+(0xec7+3170-0x1af7)]={(0x6cc+7277-0x2339)};ackReq.ackmode=ack_mode;if(ack_mode==
+(0xadf+3779-0x19a0)){zUfiSms_EncodePdu_DeliverReport(ackPduStr,
+(0x1dad+2389-0x262f));memcpy(ackReq.pdu,ackPduStr,strlen(ackPduStr));
+#if (0x7f+502-0x275)
+if(strlen(ackPduStr)<ZSMS_PDU_SIZE-(0x11c4+2875-0x1cfe)){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-(0x7cf+5732-0x1e31));}
+,ackPduStr);memcpy(ackReq.pdu,ackPduStr,ZSMS_PDU_SIZE-(0x358+8328-0x23de));}
#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)/(0xac3+7064-0x2659);}zSms_SendMsg(
+,ackReq.pdu);ackReq.length=strlen(ackPduStr)/(0x1f52+366-0x20be);}zSms_SendMsg(
MSG_CMD_SMSACK_REQ,sizeof(T_zSms_SmsAckReq),&ackReq);sem_wait(&g_sms_sem_id);if(
-g_smsOptRsp.result==(0xd08+4067-0x1cea)){return ZSMS_RESULT_OK;}else{return
+g_smsOptRsp.result==(0x9dd+7020-0x2548)){return ZSMS_RESULT_OK;}else{return
ZSMS_RESULT_ERROR;}}int zSms_SendZmgrReq(int index){T_zSms_ReadSmsReq readSmsReq
-={(0x1f69+1816-0x2681)};iSmsIndex=index;printf(
+={(0x1457+3859-0x236a)};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(0x1477+2758-0x1f3d);}VOID
-zSms_RecvZmgrRsp(UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0x47b+1818-0xb95)};
-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={(0x1d+1203-0x4d0)};
-memcpy(&smsOptRsp,(T_zSms_optRsp*)pDatabuf,sizeof(T_zSms_optRsp));if(smsOptRsp.
-result==(0xc35+4070-0x1c1a)){sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{
-printf(
+T_zSms_ReadSmsReq),&readSmsReq);return(0x20d+7604-0x1fc1);}VOID zSms_RecvZmgrRsp
+(UINT8*pDatabuf){T_zSms_SmsInd tCmgrRsp={(0x88c+4584-0x1a74)};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={(0xbb8+4059-0x1b93)};memcpy(&smsOptRsp,
+(T_zSms_optRsp*)pDatabuf,sizeof(T_zSms_optRsp));if(smsOptRsp.result==
+(0x1251+3322-0x1f4a)){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((
-(0x5a8+8476-0x26c3)==ptPara->result)&&((0x1cd2+59-0x1d0d)==ptPara->opertype)){
-CHAR needSms[(0x12ab+179-0x132c)]={(0x18ed+1143-0x1d64)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0x207b+630-0x22f1)!=strcmp(
+(0x217d+788-0x2490)==ptPara->result)&&((0x1215+3110-0x1e3b)==ptPara->opertype)){
+CHAR needSms[(0x2d3+397-0x42e)]={(0xd03+973-0x10d0)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSms,sizeof(needSms));if((0x65+5557-0x161a)!=strcmp(
needSms,"\x6e\x6f")){zSvr_Zpbic_Sms_Init();}}}VOID zSms_RecvCpmsInd(UINT8*
pDatabuf){T_zSms_CpmsInd*cpmsInd=(T_zSms_CpmsInd*)pDatabuf;CHAR strBuf[
-(0x629+8326-0x26a5)]={(0x1a10+2329-0x2329)};int remainSpace=(0x6e2+874-0xa4c);
+(0xa8+6191-0x18cd)]={(0x1cd+8064-0x214d)};int remainSpace=(0xe14+4190-0x1e72);
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,(0xad7+5443-0x201a),
-(0x19da+2799-0x24bf));snprintf(strBuf,sizeof(strBuf),"\x25\x64",cpmsInd->used);
+ZTE_WMS_NVCONFIG_SIM_CAPABILITY,strBuf);memset(&strBuf,(0x1762+952-0x1b1a),
+(0x11c7+22-0x11d3));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,(0x108a+5337-0x2563),(0x1527+2765-0x1fea));snprintf
-(strBuf,sizeof(strBuf),"\x25\x64",remainSpace);sc_cfg_set(
+cpmsInd->used;memset(&strBuf,(0xf76+5870-0x2664),(0x149b+3147-0x20dc));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 (0x66c+1764-0xd10)
-#define ZAT_TAB_REPLACE ((unsigned char )((0x4b3+2926-0xf25)\
-))
+#define AT_CMD_MAX (0x11ba+3668-0x1fce)
+#define ZAT_TAB_REPLACE ((unsigned char )(\
+(0x1c27+219-0x1c06)))
#define ZAT_NULL_FILL ((unsigned char )(\
-(0x15ea+3110-0x2113)))
+(0x8a2+4260-0x1849)))
#define ZAT_SPACE_REPLACE ((unsigned char )(\
-(0xc9d+1337-0x10d8)))
+(0x15e0+3301-0x21c7)))
#define ZAT_LF_REPLACE ((unsigned char )(\
-(0x21f+4888-0x143c)))
+(0x887+6605-0x2159)))
#define ZAT_CR_REPLACE ((unsigned char )(\
-(0x805+5144-0x1b23)))
+(0x4e2+4522-0x1592)))
static void atBase_PreProcRes(char*pParaLine,int paraSize){signed long flg=
-(0x1095+4587-0x2280);unsigned long i=(0xb5a+4875-0x1e65);unsigned long length=
-(0xbc2+6769-0x2633);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=(
-char*)malloc(AT_CMD_MAX);if(NULL==pStrDestMalloc){return;}memset(pStrDestMalloc,
-(0x1e66+1106-0x22b8),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
-length=strlen(pParaLine);if((length==(0x8d3+5744-0x1f43))||(length>=AT_CMD_MAX))
-{free(pStrDestMalloc);return;}for(i=(0x481+353-0x5e2);(i<length)&&(pDest-
-pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0x87f+4758-0x1af3))==*pSource){flg=(
-(0x13a8+1188-0x184c)==flg)?(0x551+461-0x71d):(0xa8d+5462-0x1fe3);if(
-((char)(0x7a7+3380-0x14b9))==*(pSource+(0xab8+5550-0x2065))){*pDest++=(char)
-ZAT_NULL_FILL;}}else if((((char)(0x1336+4115-0x231d))==*pSource)&&(
-(0x1522+1156-0x19a6)==flg)){*pDest++=((char)(0x42f+4699-0x166a));if(
-((char)(0xcad+357-0xde6))==*(pSource+(0x61b+8217-0x2633))){*pDest++=
-((char)(0xb5c+144-0xbb3));}else if('\0'==*(pSource+(0xd56+5306-0x220f))){*pDest
-++=(char)ZAT_NULL_FILL;}}else{if((((char)(0x2128+589-0x2355))==*pSource)&&(
-(0xa97+1894-0x11fc)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
-pSource)&&((0x11d1+3574-0x1fc6)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if((
-'\n'==*pSource)&&((0x1461+232-0x1548)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}else
- if(('\r'==*pSource)&&((0x227+8451-0x2329)==flg)){*pDest++=(char)ZAT_CR_REPLACE;
-}else{*pDest++=*pSource;}}pSource++;}memset(pParaLine,(0x6f0+8068-0x2674),
-paraSize);strncpy(pParaLine,pStrDestMalloc,paraSize-(0x13e5+562-0x1616));free(
-pStrDestMalloc);}VOID zSms_RecvCscaInd(UINT8*pDatabuf){T_zSms_CscaInd cscaInd={
-(0x248+5962-0x1992)};
-#if (0x1dd2+2233-0x268a)
+(0xd9d+5173-0x21d2);unsigned long i=(0x1595+3764-0x2449);unsigned long length=
+(0x19eb+2091-0x2216);char*pSource=pParaLine;char*pDest=NULL;char*pStrDestMalloc=
+(char*)malloc(AT_CMD_MAX);if(NULL==pStrDestMalloc){return;}memset(pStrDestMalloc
+,(0x1a6+1337-0x6df),AT_CMD_MAX);assert(pParaLine!=NULL);pDest=pStrDestMalloc;
+length=strlen(pParaLine);if((length==(0x85d+6610-0x222f))||(length>=AT_CMD_MAX))
+{free(pStrDestMalloc);return;}for(i=(0x632+3391-0x1371);(i<length)&&(pDest-
+pStrDestMalloc<AT_CMD_MAX);i++){if(((char)(0x189b+1357-0x1dc6))==*pSource){flg=(
+(0xe1d+4569-0x1ff6)==flg)?(0x1ad+6972-0x1ce8):(0x99f+2372-0x12e3);if(
+((char)(0xd35+3578-0x1b0d))==*(pSource+(0x23d+3642-0x1076))){*pDest++=(char)
+ZAT_NULL_FILL;}}else if((((char)(0x24c+8578-0x23a2))==*pSource)&&(
+(0xb7c+3130-0x17b6)==flg)){*pDest++=((char)(0x1621+1511-0x1be8));if(
+((char)(0x10e1+5642-0x26bf))==*(pSource+(0x280+369-0x3f0))){*pDest++=
+((char)(0x1a5c+1689-0x20bc));}else if('\0'==*(pSource+(0xe58+2084-0x167b))){*
+pDest++=(char)ZAT_NULL_FILL;}}else{if((((char)(0x1d4+6463-0x1af3))==*pSource)&&(
+(0xc50+6319-0x24fe)==flg)){*pDest++=(char)ZAT_SPACE_REPLACE;}else if(('\t'==*
+pSource)&&((0x1791+1590-0x1dc6)==flg)){*pDest++=(char)ZAT_TAB_REPLACE;}else if((
+'\n'==*pSource)&&((0x129b+2967-0x1e31)==flg)){*pDest++=(char)ZAT_LF_REPLACE;}
+else if(('\r'==*pSource)&&((0xfb4+1818-0x16cd)==flg)){*pDest++=(char)
+ZAT_CR_REPLACE;}else{*pDest++=*pSource;}}pSource++;}memset(pParaLine,
+(0x510+5912-0x1c28),paraSize);strncpy(pParaLine,pStrDestMalloc,paraSize-
+(0x938+1906-0x10a9));free(pStrDestMalloc);}VOID zSms_RecvCscaInd(UINT8*pDatabuf)
+{T_zSms_CscaInd cscaInd={(0x1838+1282-0x1d3a)};
+#if (0x454+8604-0x25ef)
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 (0xbeb+3950-0x1b58)
+#if (0x1f74+730-0x224d)
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);
@@ -313,22 +312,22 @@
sc_cfg_set(NV_SMS_CENTER_NUM,cscaInd.sca);zUfiSms_SetScaPara(cscaInd.sca);}VOID
zSms_RecvZmglInd(UINT8*pDatabuf){zUfiSms_CmglRespProc((T_zSms_SmsInd*)pDatabuf);
}int zSms_SendSmsInitReq(VOID){zSms_SendMsg(MSG_CMD_SMSINIT_REQ,
-(0x452+3435-0x11bd),NULL);return(0x930+4083-0x1923);}VOID zSms_initAtOk(VOID){
-T_zUfiSms_StatusInfo tStatus={(0x2ac+7135-0x1e8b)};sc_cfg_set(NV_SMS_STORE,
+(0x227a+1019-0x2675),NULL);return(0x12ac+4460-0x2418);}VOID zSms_initAtOk(VOID){
+T_zUfiSms_StatusInfo tStatus={(0xa03+4551-0x1bca)};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={(0x173d+3841-0x263e)};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={(0x4ac+7881-0x2375)};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==
-(0x271+1898-0x9da)){zSms_initAtOk();}else{zSms_initAtErr();}}UINT8
+(0xe07+5619-0x23f9)){zSms_initAtOk();}else{zSms_initAtErr();}}UINT8
zSms_SmsMsgCreat(VOID){g_zSms_MsqId=msgget(MODULE_ID_SMS,IPC_CREAT|
-(0x136f+5247-0x266e));if(g_zSms_MsqId==-(0x20bd+625-0x232d)){return ZUFI_FAIL;}
-g_zSms_LocalMsqId=msgget(MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x1913+2560-0x2193));if(
-g_zSms_LocalMsqId==-(0xbdb+5834-0x22a4)){return ZUFI_FAIL;}sem_init(&
-g_sms_sem_id,(0x555+2896-0x10a5),(0x1045+4284-0x2101));return ZUFI_SUCC;}void
+(0x820+1809-0xdb1));if(g_zSms_MsqId==-(0x132d+2302-0x1c2a)){return ZUFI_FAIL;}
+g_zSms_LocalMsqId=msgget(MODULE_ID_SMS_LOCAL,IPC_CREAT|(0x155d+3050-0x1fc7));if(
+g_zSms_LocalMsqId==-(0xb47+830-0xe84)){return ZUFI_FAIL;}sem_init(&g_sms_sem_id,
+(0x1108+726-0x13de),(0x472+8725-0x2687));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:
@@ -352,45 +351,44 @@
case MSG_CMD_NEWSMS_IND:case MSG_CMD_ZPBIC_IND:case MSG_CMD_ZMGL_IND:case
MSG_CMD_NEWSMS_STATUS_IND:ipc_send_message(MODULE_ID_SMS,MODULE_ID_SMS_LOCAL,
ptMsgBuf->usMsgCmd,ptMsgBuf->usDataLen,(unsigned char*)ptMsgBuf->aucDataBuf,
-(0x143f+479-0x161e));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
- clearSms[(0x16ff+1517-0x1cba)]={(0x1559+1773-0x1c46)};sc_cfg_get(
+(0x124d+261-0x1352));break;default:break;}}VOID zSms_HandleResetToFactory(){CHAR
+ clearSms[(0x1811+2868-0x2313)]={(0x245+1002-0x62f)};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")==(0x1336+3936-0x2296)){printf(
+,clearSms);if(strcmp(clearSms,"\x79\x65\x73")==(0x12d0+3569-0x20c1)){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,(0x51c+8376-0x25d4),NULL,
-(0x778+5854-0x1e56));}void zSms_HandleMainCtrlMsg(MSG_BUF*ptMsgBuf){assert(
+MODULE_ID_MAIN_CTRL,MSG_CMD_RESET_RSP,(0x14+9407-0x24d3),NULL,
+(0x10d3+1681-0x1764));}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=(0x1842+331-0x198d);MSG_BUF stMsg={
-(0x306+862-0x664)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((int*)
-arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
-(0x1332+3118-0x1f60),(0x830+3129-0x1469),(0x1b04+2672-0x2574));while(
-(0x11a1+2225-0x1a51)){iRet=(0x1035+5512-0x25bd);memset(&stMsg,
-(0x2128+1447-0x26cf),sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,
-(0x9f4+1960-0x119c),(0x56b+267-0x676));if(iRet>=(0x3dd+5215-0x183c)){switch(
-stMsg.src_id){case MODULE_ID_WEB_CGI:{zSms_HandleWebMsg(&stMsg);break;}case
-MODULE_ID_AT_CTL:{zSms_HandleAtctlMsg(&stMsg);break;}case MODULE_ID_SMS:{
-zSms_HandleWebMsg(&stMsg);zSms_HandleAtctlLocalMsg(&stMsg);break;}case
-MODULE_ID_MAIN_CTRL:{zSms_HandleMainCtrlMsg(&stMsg);break;}default:{break;}}}
-else{at_print(AT_DEBUG,
+sms_msg_thread_proc(void*arg){int iRet=(0xb00+3370-0x182a);MSG_BUF stMsg={
+(0x166+2771-0xc39)};int msgSize=sizeof(MSG_BUF)-sizeof(long);int queueId=*((int*
+)arg);prctl(PR_SET_NAME,"\x73\x6d\x73\x5f\x6c\x6f\x63\x61\x6c",
+(0x1d9+7995-0x2114),(0x1c9+7771-0x2024),(0x3ad+4491-0x1538));while(
+(0x4e0+5278-0x197d)){iRet=(0x13d9+3512-0x2191);memset(&stMsg,(0x9e4+1161-0xe6d),
+sizeof(MSG_BUF));iRet=msgrcv(queueId,&stMsg,msgSize,(0x344+5336-0x181c),
+(0x9a3+2939-0x151e));if(iRet>=(0xab5+7143-0x269c)){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=(0x6a1+2235-0xf5c);MSG_BUF msgBuf={(0x16db+310-0x1811)};CHAR
-needSMS[(0x170+7991-0x2075)]={(0x11fc+3939-0x215f)};prctl(PR_SET_NAME,
-"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x13a0+3694-0x220e),(0x608+4745-0x1891),
-(0x14ad+1682-0x1b3f));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,
-sizeof(needSMS));if((0x590+8110-0x253e)!=strcmp(needSMS,"\x6e\x6f")){
-zUfiSms_InitDb();zUfiSms_CfgSmsNvInit();zUfiMmi_SendSmsStatus();zSms_SmsMsgCreat
-();}else{return-(0x1c27+1149-0x20a3);}printf(
+recv_thread_tid=(0x1b7d+2295-0x2474);MSG_BUF msgBuf={(0xf58+4145-0x1f89)};CHAR
+needSMS[(0x1194+2906-0x1cbc)]={(0x907+2907-0x1462)};prctl(PR_SET_NAME,
+"\x73\x6d\x73\x5f\x6d\x61\x69\x6e",(0x8b+8828-0x2307),(0x9b8+2872-0x14f0),
+(0x348+344-0x4a0));loglevel_init();sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof
+(needSMS));if((0xad+9536-0x25ed)!=strcmp(needSMS,"\x6e\x6f")){zUfiSms_InitDb();
+zUfiSms_CfgSmsNvInit();zUfiMmi_SendSmsStatus();zSms_SmsMsgCreat();}else{return-
+(0x1582+4182-0x25d7);}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))==-(0x1e5+3623-0x100b)){assert((0xbe0+619-0xe4b));}
-sms_msg_thread_proc(&g_zSms_MsqId);return(0x2ec+3876-0x1210);}
+*)(&g_zSms_LocalMsqId))==-(0x26d+7148-0x1e58)){assert((0x22c8+234-0x23b2));}
+sms_msg_thread_proc(&g_zSms_MsqId);return(0x185b+1849-0x1f94);}
diff --git a/ap/app/zte_comm/sms/src/sms_proc.c b/ap/app/zte_comm/sms/src/sms_proc.c
index 7349b60..9516906 100755
--- a/ap/app/zte_comm/sms/src/sms_proc.c
+++ b/ap/app/zte_comm/sms/src/sms_proc.c
@@ -5,115 +5,116 @@
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={(0x2ab+4011-0x1256)};
-T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0x3d6+4593-0x15c7)};
-T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x571+4377-0x168a)};int
-g_zUfiSms_UnitLen=(0xcef+1922-0x1471);int g_zUfiSms_ConcatTotalNum=
-(0x9a+5346-0x157c);int g_zUfiSms_CurConcatSegNo=(0xacc+84-0xb20);UINT8
-g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=(0xb45+109-0xbb2);
-int g_zUfiSms_MsgRefer=(0x1b53+2233-0x240c);int g_zUfiSms_SendFailedRetry=
-(0x15f1+1111-0x1a48);char g_Zmena_value[(0x1ee6+1341-0x2421)]={
-(0x51d+4872-0x1825)};int g_displaymode=(0xfd7+817-0x1308);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={(0x865+3136-0x14a5)};
+T_zUfiSms_ModifySms g_zUfiSms_modifyMsg={(0xda2+5643-0x23ad)};
+T_zUfiSms_ModifyIndexInfo g_modifyIndex={(0x823+260-0x927)};int
+g_zUfiSms_UnitLen=(0x5e4+7125-0x21b9);int g_zUfiSms_ConcatTotalNum=
+(0xd+4684-0x1259);int g_zUfiSms_CurConcatSegNo=(0x13c0+3483-0x215b);UINT8
+g_zUfiSms_IsConcatSendSuc=TRUE;int g_zUfiSms_SendFailedCount=
+(0x1254+4552-0x241c);int g_zUfiSms_MsgRefer=(0x271+7547-0x1fec);int
+g_zUfiSms_SendFailedRetry=(0x16c+2902-0xcc2);char g_Zmena_value[
+(0x1790+1418-0x1d18)]={(0x800+7073-0x23a1)};int g_displaymode=
+(0x2179+413-0x2316);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[
-(0x610+5334-0x1ada)];}FOTA_MSG_BUF;
-#define WEBUI_NOTIFY_PUSH_MSG_ (0xf2f+2939-0x1aa7)
+(0xe67+5260-0x22e7)];}FOTA_MSG_BUF;
+#define WEBUI_NOTIFY_PUSH_MSG_ (0x1295+146-0x1324)
typedef struct{unsigned int isread_record;unsigned int inbox_full;}
T_zUfiMmi_SmsRecord;void zUfiMmi_SendSmsStatus(void){int iSmsNum=
-(0x4ca+2195-0xd5d);T_zUfiMmi_SmsRecord tRecord={(0x2c3+6030-0x1a51)};CHAR smsNum
-[(0x1c08+1253-0x20bb)]={(0x82+8551-0x21e9)};sc_cfg_get(NV_SMS_IN_NUM,smsNum,
-sizeof(smsNum));iSmsNum=atoi(smsNum);tRecord.isread_record=zUfiSms_IsUnreadSms(
+(0x559+4303-0x1628);T_zUfiMmi_SmsRecord tRecord={(0x268+5444-0x17ac)};CHAR
+smsNum[(0x10f4+584-0x130a)]={(0xfd+7952-0x200d)};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=
-(0x1461+4103-0x2467);}else{tRecord.inbox_full=(0x19c+452-0x360);}}VOID
+(0x177+5483-0x16e1);}else{tRecord.inbox_full=(0xe23+6045-0x25c0);}}VOID
zUfiSms_Init(VOID){zUfiSms_CfgInit();zUfiSms_ChangeMainState(SMS_STATE_INITING);
-}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0x1b46+2400-0x24a6);
-T_zUfiSms_StatusInfo tStatus={(0xab3+170-0xb5d)};CHAR outDate[(0x1f6+874-0x52e)]
-={(0x16ab+2233-0x1f64)};zUfiSms_Init();zUfiSms_InitCmdStatus(&tStatus,
-WMS_SMS_CMD_INIT);zSms_SendSmsInitReq();at_print(LOG_DEBUG,
+}VOID zSvr_Zpbic_Sms_Init(VOID){int atRes=(0x185+8937-0x246e);
+T_zUfiSms_StatusInfo tStatus={(0x3af+7368-0x2077)};CHAR outDate[
+(0xe11+328-0xf27)]={(0x529+8136-0x24f1)};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(
-(0x84c+4296-0x1914));at_print(LOG_DEBUG,
+(0x198f+122-0x1a09));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((0x1a16+1786-0x2110)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck
-(ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
-#if (0x823+3915-0x176e)
-VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x2d7+3768-0x115d)]={
-(0x149+5377-0x164a)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
-g_Zmena_rsp&&((0xe2b+5243-0x22a6)!=strcmp(
-"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0x209f+226-0x2181)!=strcmp
+,outDate);if((0x3b1+1123-0x814)==strcmp(outDate,"\x31")){atWeb_OutdateSmsCheck(
+ZUFI_NULL);}}VOID zUfiSms_DeleteAllSimSms(VOID){zUfiSms_DeleteAllSimSmsInDb();}
+#if (0x3c5+5142-0x17db)
+VOID zUfiSms_ResendAtCmdZmena(int cid){CHAR netType[(0x1a9c+2385-0x23bb)]={
+(0x3ea+3717-0x126f)};sc_cfg_get(NV_NETWORK_TYPE,netType,sizeof(netType));if(!
+g_Zmena_rsp&&((0x155f+4128-0x257f)!=strcmp(
+"\x4e\x6f\x20\x53\x65\x72\x76\x69\x63\x65",netType)&&(0xac1+6080-0x2281)!=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 (0x17ea+2028-0x1fd6)
-CHAR ackPduStr[(0xf66+212-0xeaa)]={(0x2a5+5482-0x180f)};SMS_PARAM reportParam={
-(0x14dc+1657-0x1b55)};int total_length=(0x726+6819-0x21c9);UINT8 TP_FCS=
-(0x1255+3334-0x1f5b);CHAR strValue[(0x1235+4257-0x22d4)]={(0x3b5+9045-0x270a)};
-if(needAck){TP_FCS=(0x19e3+3018-0x25ad);sprintf(strValue,"\x25\x64",
-(0x100d+5654-0x2622));}else{TP_FCS=(0x966+1944-0x102b);sprintf(strValue,
-"\x25\x64",(0x10b7+135-0x113c));}sprintf(reportParam.SCA,"\x25\x73",cfg_get(
+#if (0xca2+5054-0x2060)
+CHAR ackPduStr[(0x230+6651-0x1a9b)]={(0x1d1f+363-0x1e8a)};SMS_PARAM reportParam=
+{(0xbac+4395-0x1cd7)};int total_length=(0x28a+6226-0x1adc);UINT8 TP_FCS=
+(0x50c+2574-0xf1a);CHAR strValue[(0xb17+3380-0x1849)]={(0xccc+4046-0x1c9a)};if(
+needAck){TP_FCS=(0x271+2644-0xcc5);sprintf(strValue,"\x25\x64",
+(0x1174+4994-0x24f5));}else{TP_FCS=(0x92c+5975-0x1fb0);sprintf(strValue,
+"\x25\x64",(0x44c+3653-0x128f));}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,(0xd41+2577-0x1752),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu.
+g_zUfiSms_ackPdu,(0x299+6389-0x1b8e),sizeof(g_zUfiSms_ackPdu));g_zUfiSms_ackPdu.
length=String2Bytes(ackPduStr,g_zUfiSms_ackPdu.pdu,strlen(ackPduStr));memset(
-g_zUfiSms_ackPdu.pdu,(0x1252+4450-0x23b4),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
+g_zUfiSms_ackPdu.pdu,(0x14ec+3876-0x2410),sizeof(g_zUfiSms_ackPdu.pdu));memcpy(&
g_zUfiSms_ackPdu.pdu,&ackPduStr,sizeof(ackPduStr));atBase_SendMsgToSelf(
ZAT_CNMA_CMD,strValue,sizeof(strValue));
#endif
-#if (0x23d+7160-0x1e35)
-CHAR strValue[(0xda7+3122-0x19d7)]={(0x1649+830-0x1987)};if(needAck){snprintf(
-strValue,sizeof(strValue),"\x25\x64",(0x2285+6-0x228a));}else{snprintf(strValue,
-sizeof(strValue),"\x25\x64",(0x69d+7035-0x2216));}zSvr_InnerSendMsg(
+#if (0x9d6+5577-0x1f9f)
+CHAR strValue[(0x46b+987-0x844)]={(0x10ed+2711-0x1b84)};if(needAck){snprintf(
+strValue,sizeof(strValue),"\x25\x64",(0x90d+3170-0x156e));}else{snprintf(
+strValue,sizeof(strValue),"\x25\x64",(0x16da+206-0x17a6));}zSvr_InnerSendMsg(
ZUFI_MODULE_ID_AT_LOCAL,ZUFI_MODULE_ID_AT_UNSOLI,MSG_CMD_AT_CNMA,strlen(strValue
),strValue);
#endif
-if(needAck){zSms_SendCnmaReq((0x701+426-0x8aa));}else{zSms_SendCnmaReq(
-(0x747+7151-0x2334));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq*
-ptSendMsg){if(NULL==ptSendMsg||(0x216c+1300-0x2680)==ptSendMsg->receiver_count){
+if(needAck){zSms_SendCnmaReq((0xa38+3139-0x167a));}else{zSms_SendCnmaReq(
+(0xb7b+4933-0x1ebe));}}T_zUfiSms_CmdStatus zUfiSms_SendRawSms(T_zUfiSms_SendReq*
+ptSendMsg){if(NULL==ptSendMsg||(0x12f5+2341-0x1c1a)==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[(0x1c2+3194-0xe3c)],ptSendMsg->
+,ptSendMsg->receiver_count,ptSendMsg->dest_num[(0x352+2680-0xdca)],ptSendMsg->
msg_len,ptSendMsg->id);
-#if (0x225+6572-0x1bd0)
+#if (0x5d4+745-0x8bc)
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=(0x3ad+7188-0x1fc1);
-if(ptSendMsg->isDelete==TRUE||-(0x1f50+1820-0x266b)!=ptSendMsg->id){(void)
+sc_cfg_set(NV_SMS_SEND_RESULT,"");g_zUfiSms_SendFailedCount=(0x9e5+6648-0x23dd);
+if(ptSendMsg->isDelete==TRUE||-(0xa3a+5006-0x1dc7)!=ptSendMsg->id){(void)
zUfiSms_DeleteDraftSms(ptSendMsg->id);}zUfiSms_SetGlobalDcsLang(ptSendMsg->dcs);
-memset(&g_zUfiSms_GroupSms,(0x142d+4346-0x2527),sizeof(g_zUfiSms_GroupSms));if(
+memset(&g_zUfiSms_GroupSms,(0x1364+4868-0x2668),sizeof(g_zUfiSms_GroupSms));if(
ZUFI_FAIL==zUfiSms_FillGroupSms(ptSendMsg,&g_zUfiSms_GroupSms)){return
-WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0x860+5448-0x1da8),sizeof(
+WMS_CMD_FAILED;}memset(&g_zUfiSms_ConcatSms,(0xd33+441-0xeec),sizeof(
g_zUfiSms_ConcatSms));g_zUfiSms_UnitLen=zUfiSms_FillConcatSms(ptSendMsg,&
g_zUfiSms_ConcatSms);g_zUfiSms_IsConcatSendSuc=TRUE;g_zUfiSms_CurConcatSegNo=
-(0x190c+1778-0x1ffe);memset(g_zUfiSms_DbStoreData,(0xccb+3611-0x1ae6),sizeof(
-g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0x1b02+445-0x1cb5)){
-g_displaymode=(0xc81+4279-0x1d37);at_print(LOG_DEBUG,
+(0xba9+2987-0x1754);memset(g_zUfiSms_DbStoreData,(0xb75+6279-0x23fc),sizeof(
+g_zUfiSms_DbStoreData));if(ptSendMsg->mem_store==(0xf3f+240-0x1025)){
+g_displaymode=(0x1447+2459-0x1de1);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=(0xc31+2760-0x16f9);at_print(LOG_DEBUG,
+);}else{g_displaymode=(0x8c3+6924-0x23cf);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=(0x483+1-0x484);T_zUfiSms_CmdStatus result=
+ tGroupSms;int iSmsLen=(0x1971+2485-0x2326);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,(0x177b+3868-0x2697),sizeof(T_zUfiSms_ConcatInfo));memset(&
-tGroupSms,(0x2213+998-0x25f9),sizeof(T_zUfiSms_GroupInfo));(void)
+memset(&tConcatSms,(0x946+2353-0x1277),sizeof(T_zUfiSms_ConcatInfo));memset(&
+tGroupSms,(0x64f+1516-0xc3b),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=
-(0x1463+3743-0x2302);tGroupSms.current_receiver<tGroupSms.total_receiver;
-tGroupSms.current_receiver++){tConcatSms.current_sending=(0x278+316-0x3b4);
+(0xdb2+2737-0x1863);tGroupSms.current_receiver<tGroupSms.total_receiver;
+tGroupSms.current_receiver++){tConcatSms.current_sending=(0xada+3041-0x16bb);
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"
@@ -127,16 +128,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[(0x334+4081-0x1325)]);(void)
+,ptDelBuff->all_or_count,ptDelBuff->id[(0x7b4+3939-0x1717)]);(void)
zUfiSms_CheckMemoryFull(ZTE_WMS_MEMORY_NV);zUfiSms_ChangeMainState(
-SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0xd24+2882-0x1866),sizeof(
+SMS_STATE_DELING);memset(&g_zUfiSms_DelMsg,(0x1532+1497-0x1b0b),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((0x15f2+2172-0x1e6e)<
+,g_zUfiSms_DelMsg.nv_count,g_zUfiSms_DelMsg.sim_count);if((0xaaf+4318-0x1b8d)<
g_zUfiSms_DelMsg.nv_count){if(g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]){
memoryFullbeforeDelete=TRUE;}unreadBeforeDelete=zUfiSms_IsUnreadSms(
ZTE_WMS_MEMORY_NV);result=(T_zUfiSms_CmdStatus)zUfiSms_DeleteNvSms();(void)
@@ -147,114 +148,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((0xf3d+107-0xfa8));}if(memoryFullbeforeDelete&&!
+);zSms_SendZmenaReq((0x677+3327-0x1376));}if(memoryFullbeforeDelete&&!
g_zUfiSms_MemFullFlag[WMS_STORAGE_TYPE_NV_V01]||unreadBeforeDelete&&!
zUfiSms_IsUnreadSms(ZTE_WMS_MEMORY_NV)){zUfiSms_SendSmsStatusInfo(
-MSG_SMS_DEFAULT);}}if((0x1bf9+122-0x1c73)<g_zUfiSms_DelMsg.sim_count){result=
+MSG_SMS_DEFAULT);}}if((0x223c+662-0x24d2)<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=(0xd11+5268-0x21a5);
-T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0x519+4872-0x17ef)]=
-{(0x992+7483-0x26cd)};if(NULL==ptModifyBuff){at_print(LOG_ERR,
+T_zUfiSms_ModifyFlag*ptModifyBuff){unsigned long i=(0xe33+3657-0x1c7c);
+T_zUfiSms_CmdStatus result=WMS_CMD_SUCCESS;char acStorePos[(0x9a9+4588-0x1b63)]=
+{(0x28d+4153-0x12c6)};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=(0x574+3548-0x1350);i<ptModifyBuff->total_id;i++){if(
-ptModifyBuff->id[i]<(0xa8a+5126-0x1e8f)||ZUFI_FAIL==zUfiSms_UpdateSmsTagInDb(
+WMS_CMD_FAILED;}for(i=(0x179+5593-0x1752);i<ptModifyBuff->total_id;i++){if(
+ptModifyBuff->id[i]<(0x2f4+7370-0x1fbd)||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[(0x667+720-0x937)])){return ZUFI_FAIL;}if((0x2613+128-0x2693)==
-strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){zUfiSms_SendSmsStatusInfo(
-MSG_SMS_READING);}if((0x15e2+4175-0x2631)==strcmp(acStorePos,
-ZTE_WMS_DB_SIM_TABLE)&&ptModifyBuff->total_id>(0x86f+766-0xb6d)){
-zUfiSms_ModifyModemSms(ptModifyBuff);}return result;}T_zUfiSms_CmdStatus
-zUfiSms_SetSmsPara(T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0x6c1+2109-0xefe);
-CHAR sca[ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x29d+7995-0x21d7)]={(0x5d2+8183-0x25c9)
-};CHAR store[(0xff5+5729-0x2642)]={(0x2a8+8033-0x2209)};CHAR defaultStore[
-(0x4c+9861-0x269f)]={(0x1ec2+159-0x1f61)};if(ptParaBuff==ZUFI_NULL){return
-WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x978+859-0xcd3)){strncpy(sca,
-ptParaBuff->sca,sizeof(sca)-(0x70d+3219-0x139f));at_print(LOG_DEBUG,
+ptModifyBuff->id[(0xad+5965-0x17fa)])){return ZUFI_FAIL;}if((0x179f+3855-0x26ae)
+==strcmp(acStorePos,ZTE_WMS_DB_NV_TABLE)){zUfiSms_SendSmsStatusInfo(
+MSG_SMS_READING);}if((0xbb3+5967-0x2302)==strcmp(acStorePos,ZTE_WMS_DB_SIM_TABLE
+)&&ptModifyBuff->total_id>(0xb6d+5898-0x2277)){zUfiSms_ModifyModemSms(
+ptModifyBuff);}return result;}T_zUfiSms_CmdStatus zUfiSms_SetSmsPara(
+T_zUfiSms_ParaInfo*ptParaBuff){int atRes=(0x2cb+2909-0xe28);CHAR sca[
+ZTE_WMS_ADDRESS_DIGIT_MAX_V01+(0x1418+3350-0x212d)]={(0x5e3+920-0x97b)};CHAR
+store[(0x5c6+5816-0x1c6a)]={(0x962+3386-0x169c)};CHAR defaultStore[
+(0x296+6182-0x1a8a)]={(0x17f8+1742-0x1ec6)};if(ptParaBuff==ZUFI_NULL){return
+WMS_CMD_FAILED;}if(strlen(ptParaBuff->sca)!=(0x22a7+449-0x2468)){strncpy(sca,
+ptParaBuff->sca,sizeof(sca)-(0x165+5558-0x171a));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')&&((0x4f6+1915-0xc71)!=strcmp(
+if((*(ptParaBuff->default_store)!='\0')&&((0x3fa+5950-0x1b38)!=strcmp(
defaultStore,ptParaBuff->default_store))){{strncpy(store,ptParaBuff->
-default_store,sizeof(store)-(0x300+2547-0xcf2));}atRes=zSms_SendCnmiReq(store);
-if(atRes!=ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0xf08+6126-0x26f5)==
+default_store,sizeof(store)-(0x252b+303-0x2659));}atRes=zSms_SendCnmiReq(store);
+if(atRes!=ZSMS_RESULT_OK){return WMS_CMD_FAILED;}}if(-(0x92f+1422-0xebc)==
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[(0x1deb+904-0x216e)]={(0x216+4657-0x1447)};char remind_flag[
-(0x18eb+1238-0x1dbc)];int sms_count=(0x884+574-0xac2);int remind_count=
-(0x643+5740-0x1caf);memset(sms_rec_flag,(0xa44+4092-0x1a40),sizeof(sms_rec_flag)
+char sms_rec_flag[(0x1ed2+813-0x21fa)]={(0x1f8+9310-0x2656)};char remind_flag[
+(0x34c+2947-0xeca)];int sms_count=(0x8a6+1669-0xf2b);int remind_count=
+(0x1704+3525-0x24c9);memset(sms_rec_flag,(0x5f3+1272-0xaeb),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<(0xe4+3251-0xd97)||sms_count>INT_MAX-
-(0x1382+4208-0x23f1)){at_print(LOG_ERR,
+sms_count=atoi(sms_rec_flag);if(sms_count<(0x135a+491-0x1545)||sms_count>INT_MAX
+-(0x16a7+3773-0x2563)){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,(0x1796+2471-0x213d),sizeof(sms_rec_flag
-));snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+
-(0x119f+353-0x12ff));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
+,sms_count);return;}memset(sms_rec_flag,(0x1d3a+805-0x205f),sizeof(sms_rec_flag)
+);snprintf(sms_rec_flag,sizeof(sms_rec_flag),"\x25\x64",sms_count+
+(0x33a+8633-0x24f2));sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED,sms_rec_flag);
sc_cfg_set(ZTE_WMS_NVCONFIG_RECEVIED_LED,sms_rec_flag);memset(remind_flag,
-(0x202+2082-0xa24),sizeof(remind_flag));snprintf(remind_flag,sizeof(remind_flag)
-,"\x25\x64",remind_count+(0x85+1263-0x573));sc_cfg_set(
+(0xb2d+4597-0x1d22),sizeof(remind_flag));snprintf(remind_flag,sizeof(remind_flag
+),"\x25\x64",remind_count+(0x2a7+146-0x338));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]={
-(0x2126+801-0x2447)};T_zUfiSms_DbStoreData tDbStoreData={(0x37c+1960-0xb24)};int
- isPushSms=(0xdc3+1503-0x13a2);if(strcmp(ptRespData->pdu,"")==
-(0x13ab+1391-0x191a)){CHAR srState[(0x8b8+6522-0x2200)]={(0x1e24+1348-0x2368)};
-sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x1567+1478-0x1b2d)!=strcmp(
+(0x968+7430-0x266e)};T_zUfiSms_DbStoreData tDbStoreData={(0x3a5+6742-0x1dfb)};
+int isPushSms=(0x2596+301-0x26c3);if(strcmp(ptRespData->pdu,"")==
+(0x69+7576-0x1e01)){CHAR srState[(0x57f+2751-0x100c)]={(0x339+7377-0x200a)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x3+641-0x284)!=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(
-(0x819+1897-0xf7d)==ptRespData->stat){(void)zUfiSms_HandleReport(acFormatPdu);
+(0x9c9+5407-0x1ee3)==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!=
-(0x701+1216-0xbc0)){return(0xba7+217-0xc80);}zUfiSms_GetCurrentRecvTotalSeq(data
-,pmsg);at_print(LOG_DEBUG,
+(0x145f+2536-0x1e46)){return(0x1e83+1121-0x22e4);}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[(0xa65+2187-0x12f0)],data->
-concat_info[(0xa70+5011-0x1e02)],data->concat_info[(0x497+5094-0x187b)]);if(data
-->concat_info[(0x1dd5+192-0x1e94)]==atoi(pmsg->total_seq)){return
-(0x10ab+1261-0x1598);}return-(0x1817+2471-0x21bd);}void
+,pmsg->id,atoi(pmsg->total_seq),data->concat_info[(0x537+3314-0x1229)],data->
+concat_info[(0x4a6+4010-0x144f)],data->concat_info[(0x400+8945-0x26ef)]);if(data
+->concat_info[(0xd3b+2229-0x15ef)]==atoi(pmsg->total_seq)){return
+(0x179c+2359-0x20d3);}return-(0x239+6815-0x1cd7);}void
zUfiSms_TrafficChangeSmsTag(T_zUfiSms_DbStoreData*data){CHAR smsNumber[
-(0x1788+887-0x1acd)]={(0x1351+1556-0x1965)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
-smsNumber,sizeof(smsNumber));if((0x138d+4366-0x249b)==strcmp(smsNumber,data->
+(0x138+4492-0x1292)]={(0xbab+2079-0x13ca)};sc_cfg_get(NV_TRAFFIC_SMS_NUMBER,
+smsNumber,sizeof(smsNumber));if((0x1106+5560-0x26be)==strcmp(smsNumber,data->
number)){data->tag=WMS_TAG_TYPE_MT_READ_V01;data->msg_displaymode=
-(0x150b+1801-0x1c13);}}void zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data)
-{int iSmsId=(0x1140+3012-0x1d04);SMS_MSG_INFO msg={(0x93d+6041-0x20d6)};CHAR
-smsNumber[(0xb7f+4873-0x1e56)]={(0x1060+399-0x11ef)};sc_cfg_get(
+(0x4a7+2256-0xd76);}}void zUfiSms_HandleTrafficSms(T_zUfiSms_DbStoreData*data){
+int iSmsId=(0x269+9282-0x26ab);SMS_MSG_INFO msg={(0xb08+2140-0x1364)};CHAR
+smsNumber[(0xfe9+2203-0x1852)]={(0x28a+5112-0x1682)};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((0xc82+3472-0x1a12)==strcmp(smsNumber,data->number))
-{if((0x1f1b+1777-0x260c)!=zUfiSms_CheckIfWholeSms(data,&msg)){at_print(LOG_DEBUG
-,
+,data->number,smsNumber);if((0x48b+4911-0x17ba)==strcmp(smsNumber,data->number))
+{if((0xa4d+6490-0x23a7)!=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]={
-(0x172+6878-0x1c50)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x23d+6869-0x1d12);SMS_PARAM one_sms={(0x827+566-0xa5d)};int
-unread_sms_before_recv_new_sms=(0x10e8+454-0x12ae);memset(&tDbStoreData,
-(0xbfa+5563-0x21b5),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0xa63+5093-0x1e48)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0xd08+94-0xd66);SMS_PARAM one_sms={(0x1460+1211-0x191b)};int
+unread_sms_before_recv_new_sms=(0x1c+3529-0xde5);memset(&tDbStoreData,
+(0x10a6+2050-0x18a8),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,"")==(0x13df+496-0x15cf)){CHAR srState[
-(0x14f8+482-0x16a8)]={(0x7d5+4020-0x1789)};sc_cfg_get(NV_SR_STATE,srState,sizeof
-(srState));if((0x6a5+6363-0x1f80)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0x104d+1520-0x163d)){CHAR srState[
+(0x1317+901-0x166a)]={(0x10c6+2415-0x1a35)};sc_cfg_get(NV_SR_STATE,srState,
+sizeof(srState));if((0xef4+1886-0x1652)!=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((0x1237+3386-0x1f71));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0x1968+79-0x19b7));}if(
SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG,
"\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n"
,one_sms.index);at_print(LOG_DEBUG,
@@ -266,32 +266,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((0x594+203-0x65a)==ptRespData->stat){(void)
+ptRespData->pdu));if((0xb29+2977-0x16c5)==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=(0x7c+2262-0x951);}else{
-unread_sms_before_recv_new_sms=(0x790+1859-0xed3);}zUfiSms_TrafficChangeSmsTag(&
-tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,
-iStorePos,-(0x1374+2935-0x1eea))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
-(0x41f+3760-0x12ce));return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){
+unread_sms_before_recv_new_sms=(0x270+6486-0x1bc5);}else{
+unread_sms_before_recv_new_sms=(0xeaf+1585-0x14e0);}zUfiSms_TrafficChangeSmsTag(
+&tDbStoreData);if(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,
+iStorePos,-(0xc60+2431-0x15de))){zUfiSms_Ack_new_msg(FALSE);zSms_SendZmenaReq(
+(0x41+160-0xe0));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]={
-(0x3dd+4131-0x1400)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x5b2+3593-0x13bb);SMS_PARAM one_sms={(0xa8d+4890-0x1da7)};CHAR defaultStore[
-(0xbc2+6905-0x2689)]={(0x20b1+1480-0x2679)};memset(&tDbStoreData,
-(0x1250+2639-0x1c9f),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+(0x47a+8530-0x25cc)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x16af+2295-0x1fa6);SMS_PARAM one_sms={(0x714+817-0xa45)};CHAR defaultStore[
+(0x9c1+2471-0x1336)]={(0x205+2672-0xc75)};memset(&tDbStoreData,(0x144+648-0x3cc)
+,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,"")==(0xa59+3374-0x1787)){CHAR srState[
-(0x1027+5108-0x23e9)]={(0x54f+7011-0x20b2)};sc_cfg_get(NV_SR_STATE,srState,
-sizeof(srState));if((0x21ac+730-0x2486)!=strcmp(srState,
+strcmp(ptRespData->pdu,"")==(0x1cf1+1258-0x21db)){CHAR srState[
+(0xd39+3248-0x19b7)]={(0x80f+7223-0x2446)};sc_cfg_get(NV_SR_STATE,srState,sizeof
+(srState));if((0x2d4+2648-0xd2c)!=strcmp(srState,
"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
@@ -300,7 +300,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((0x15bf+3215-0x224e));}if(
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0xe95+3095-0x1aac));}if(
SMS_NO_PUSH!=isPushSms){at_print(LOG_DEBUG,
"\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x69\x6e\x64\x65\x78\x20\x3d\x20\x25\x64" "\n"
,one_sms.index);at_print(LOG_DEBUG,
@@ -311,30 +311,30 @@
"\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x43\x75\x72\x72\x65\x6e\x74\x50\x69\x65\x63\x65\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n"
,one_sms.TP_CurrentPieceNum);zUfiSms_ChangeMainState(SMS_STATE_RECVED);return;}
zUfiSms_GetReportStatus(ptRespData->pdu,&ptRespData->stat);(void)String2Bytes(
-ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if((0x6+1329-0x532)==
-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((0x1f9a+1798-0x26a0)==
-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,-(0x986+6640-0x2375))){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]={
-(0x36d+2646-0xdc3)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
-(0x8e7+1902-0x1055);SMS_PARAM one_sms={(0x511+7306-0x219b)};int
-unread_sms_before_recv_new_sms=(0x7c3+6743-0x221a);memset(&tDbStoreData,
-(0x14f7+2251-0x1dc2),sizeof(T_zUfiSms_DbStoreData));at_print(LOG_DEBUG,
+ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if(
+(0x128a+3295-0x1f64)==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(
+(0x726+2649-0x117f)==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,-
+(0x395+3849-0x129d))){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]={
+(0xc49+6811-0x26e4)};T_zUfiSms_DbStoreData tDbStoreData;int isPushSms=
+(0x914+1549-0xf21);SMS_PARAM one_sms={(0x4a6+643-0x729)};int
+unread_sms_before_recv_new_sms=(0x3cc+914-0x75e);memset(&tDbStoreData,
+(0xc9a+6090-0x2464),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,"")==
-(0x18ed+1486-0x1ebb)){CHAR srState[(0x107+1766-0x7bb)]={(0x6c+1270-0x562)};
-sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0x1a2a+2959-0x25b9)!=strcmp(
+(0x973+6993-0x24c4)){CHAR srState[(0x1e87+1626-0x24af)]={(0x141+8798-0x239f)};
+sc_cfg_get(NV_SR_STATE,srState,sizeof(srState));if((0xdd4+6433-0x26f5)!=strcmp(
srState,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x69\x6e\x67")){sc_cfg_set(
NV_SMS_RECV_RESULT,"\x66\x61\x69\x6c");zUfiSms_ChangeMainState(SMS_STATE_RECVED)
;}else{sc_cfg_set(NV_SR_STATE,"\x73\x72\x5f\x72\x65\x63\x65\x69\x76\x65\x64");}
@@ -343,8 +343,8 @@
,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((0x443+413-0x5e0));}if(SMS_NO_PUSH
-!=isPushSms){at_print(LOG_DEBUG,
+strlen(one_sms.TP_UD));zte_fota_notifyPushMsg((0xd4d+5492-0x22c1));}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,
"\x20\x6f\x6e\x65\x5f\x73\x6d\x73\x2e\x54\x50\x5f\x52\x65\x66\x65\x72\x4e\x75\x6d\x20\x3d\x20\x25\x64" "\n"
@@ -354,81 +354,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((0x264+4593-0x1450)
+ptRespData->pdu,acFormatPdu,(int)strlen(ptRespData->pdu));if((0x20a+2481-0xbb6)
==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=
-(0x339+1183-0x7d7);}else{unread_sms_before_recv_new_sms=(0x1509+228-0x15ed);}if(
-ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
-(0x1+4446-0x115e))){return;}if(tDbStoreData.sms_class!=WMS_MESSAGE_CLASS_2){}
+(0x57a+5766-0x1bff);}else{unread_sms_before_recv_new_sms=(0xe9b+4776-0x2143);}if
+(ZTE_WMS_NV_MEMORY_FULL==zUfiSms_WriteSmsToDb(&tDbStoreData,iStorePos,-
+(0x1d8a+1629-0x23e6))){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={(0x10bd+3813-0x1fa2)};g_zUfiSms_DbStoreData
-->msg_displaymode=g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=
-(0x12e5+2433-0x1c65)){if((0xcb+8406-0x21a1)==zUfiSms_WriteSmsToDb(&
-g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x1458+3509-0x220c)],
-WMS_STORAGE_TYPE_NV_V01,-(0x8f7+4189-0x1953))){g_zUfiSms_MsgRefer++;(void)
+){T_zUfiSms_StatusInfo tStatusInfo={(0x951+4284-0x1a0d)};g_zUfiSms_DbStoreData->
+msg_displaymode=g_displaymode;if(g_zUfiSms_DbStoreData->msg_displaymode!=
+(0x1aac+978-0x1e7d)){if((0xea7+3002-0x1a61)==zUfiSms_WriteSmsToDb(&
+g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x765+3073-0x1365)],
+WMS_STORAGE_TYPE_NV_V01,-(0x1af1+2253-0x23bd))){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=
-(0x8cd+4408-0x1a05);memset((void*)&tStatusInfo,(0x653+2405-0xfb8),sizeof(
+(0x1483+4429-0x25d0);memset((void*)&tStatusInfo,(0xa83+6623-0x2462),sizeof(
T_zUfiSms_StatusInfo));tStatusInfo.err_code=ZTE_SMS_CMS_NONE;tStatusInfo.
send_failed_count=g_zUfiSms_SendFailedCount;tStatusInfo.delete_failed_count=
-(0x203+1471-0x7c2);if(g_zUfiSms_SendFailedCount==(0x338+6524-0x1cb4)){
+(0x151+2514-0xb23);if(g_zUfiSms_SendFailedCount==(0x1f5f+821-0x2294)){
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={(0x1aa1+2025-0x228a)};int
-errs=(0x28c+3229-0xf29);key_t req_id=ftok(
+int zte_fota_notifyPushMsg(int cmd){FOTA_MSG_BUF msg={(0x146f+3400-0x21b7)};int
+errs=(0x135f+2779-0x1e3a);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"
-,(0x285+1285-0x789));int msgid=msgget(req_id,(0x133b+4905-0x2664));if(msgid!=-
-(0xfe6+5350-0x24cb)){msg.mtype=(0x64+7066-0x1bfd);msg.mtext[(0x260+7205-0x1e85)]
-=WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long),
-(0xc3+7913-0x1fac));}return(errs<(0xa08+3615-0x1827)?(0x513+1556-0xb27):
-(0x648+1077-0xa7c));}
-#if (0x10c+4430-0x125a)
+,(0xa43+5655-0x2059));int msgid=msgget(req_id,(0x3a9+6640-0x1d99));if(msgid!=-
+(0xdfa+3662-0x1c47)){msg.mtype=(0x4a0+6510-0x1e0d);msg.mtext[(0x936+5215-0x1d95)
+]=WEBUI_NOTIFY_PUSH_MSG_;errs=msgsnd(msgid,&msg,sizeof(msg)-sizeof(long),
+(0x26a+6711-0x1ca1));}return(errs<(0x1a19+1186-0x1ebb)?(0x531+2562-0xf33):
+(0x80d+5506-0x1d8e));}
+#if (0xdab+2492-0x1767)
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 (0x6f+2283-0x95a)
+#if (0x99d+1098-0xde7)
int atSms_SendZmglReq(PSTR pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){int res
-=(0x1f43+1740-0x260f);pthread_mutex_lock(&smsdb_mutex);res=zSvr_SendAtSyn(
+=(0x91c+5490-0x1e8e);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={(0x38c+513-0x58d)};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={
-(0x7b8+7881-0x2681)};sc_cfg_set(NV_SMS_LOAD_RESULT,"\x66\x61\x69\x6c");
+T_zUfiSms_StatusInfo tStatus={(0x10fc+1182-0x159a)};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={(0x2b8+9102-0x2646)};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={
-(0xabb+553-0xce4)};printf(
+(0x127b+2912-0x1ddb)};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,
-(0xc1f+1353-0x1168),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
-->resParas,sizeof(pResLine->resParas),&tSmsPara,(0x16ab+2319-0x1fb9));printf(
+(0x366+4688-0x15b6),sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine
+->resParas,sizeof(pResLine->resParas),&tSmsPara,(0xdad+3826-0x1c9e));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[(0x5bb+3297-0x1288)
-]={(0xc70+6759-0x26d7)};iSmsIndex=atoi(pAtCmdPara);printf(
+pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x1889+80-0x18c5)]
+={(0xee1+1625-0x153a)};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 (0x5fc+348-0x758)
-static T_zUfiSms_SmsItem tSmsPara={(0x1c07+2628-0x264b)};T_zUfiSms_CmgrSetRsp
-tCmgrRsp={(0x1f5+8789-0x244a)};printf(
+#if (0x688+5078-0x1a5e)
+static T_zUfiSms_SmsItem tSmsPara={(0x7b1+6284-0x203d)};T_zUfiSms_CmgrSetRsp
+tCmgrRsp={(0x772+668-0xa0e)};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(
@@ -437,14 +437,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,(0x8ca+245-0x9bf),sizeof(T_zUfiSms_SmsItem));(void)
-zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0x3fa+6538-0x1d82));tSmsPara.
+{memset(&tSmsPara,(0xa2d+5588-0x2001),sizeof(T_zUfiSms_SmsItem));(void)
+zUfiSms_FormatSms(pResLine->resParas,&tSmsPara,(0x804+1131-0xc6d));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[(0xf3+4636-0x12fb)]={(0x1a0d+2292-0x2301)};iSmsIndex=atoi(pAtCmdPara);
+pAtcmdStr[(0x969+7156-0x2549)]={(0x7ef+584-0xa37)};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),
@@ -457,8 +457,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={(0x592+3998-0x1530)};T_zUfiSms_CmgrSetRsp tCmgrRsp={
-(0x93b+4695-0x1b92)};printf(
+T_zUfiSms_SmsItem tSmsPara={(0xdcf+2804-0x18c3)};T_zUfiSms_CmgrSetRsp tCmgrRsp={
+(0x220+1183-0x6bf)};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(
@@ -466,57 +466,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,(0x1402+4738-0x2684),
-sizeof(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(
-pResLine->resParas),&tSmsPara,(0x11cd+4602-0x23c5));tSmsPara.index=iSmsIndex;
-printf(
+NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,(0x804+2084-0x1028),sizeof
+(T_zUfiSms_SmsItem));(void)zUfiSms_FormatSms(pResLine->resParas,sizeof(pResLine
+->resParas),&tSmsPara,(0x11ac+1547-0x17b5));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[(0x189+1865-0x8be)]
-={(0x5d+5618-0x164f)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+pAtCmdPara,int cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x1a75+426-0x1c0b)
+]={(0xd83+3265-0x1a44)};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[(0x18c3+3320-0x25b1)]={(0x429+903-0x7b0)};
-int used=(0x71+8796-0x22cd);sc_cfg_set(NV_SMS_DEL_RESULT,"\x6f\x6b");printf(
+atSms_RecvCmgdOk(VOID){CHAR strUsed[(0x1115+139-0x1196)]={(0x5d9+5656-0x1bf1)};
+int used=(0x1e24+2260-0x26f8);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)-(0x51c+2813-0x1018);if(used<(0xa99+3522-0x185b)){used=
-(0x5a0+6954-0x20ca);}memset(&strUsed,(0x14c1+2166-0x1d37),(0x207b+301-0x219e));
-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(
+strUsed)-(0x5a1+7-0x5a7);if(used<(0x5d6+1645-0xc43)){used=(0xf41+951-0x12f8);}
+memset(&strUsed,(0xee9+342-0x103f),(0x203a+439-0x21e7));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[(0x10a+3275-0xdcb)]={
-(0xc3d+437-0xdf2)};CHAR strTotal[(0x1208+3058-0x1df0)]={(0x8c0+4596-0x1ab4)};
-CHAR strUsed[(0xb3+1493-0x67e)]={(0x32+3452-0xdae)};int total=(0x2b+982-0x401);
-int used=(0xbf0+2812-0x16ec);int remain=(0x11c1+823-0x14f8);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<(0x417+2573-0xe24)){remain=
-(0x3cf+5681-0x1a00);}memset(&StrValue,(0x178f+23-0x17a6),(0x2131+1158-0x25ad));
+);}VOID atSms_RecvCmgdFinish(VOID){char StrValue[(0x6e5+7669-0x24d0)]={
+(0x18b3+661-0x1b48)};CHAR strTotal[(0x546+1709-0xbe9)]={(0x100d+3963-0x1f88)};
+CHAR strUsed[(0x4a4+8325-0x251f)]={(0x1278+923-0x1613)};int total=
+(0x40c+8112-0x23bc);int used=(0x8c1+5413-0x1de6);int remain=(0x887+604-0xae3);
+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<(0xae4+5309-0x1fa1)){remain=
+(0xba2+4252-0x1c3e);}memset(&StrValue,(0x11b4+876-0x1520),(0xc5+8313-0x2134));
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=(0x1abf+196-0x1b83);CHAR pAtcmdStr[ZSMS_PDU_SIZE
-]={(0xc90+6008-0x2408)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+pAtRst,int atRstSize){int atRes=(0x17fd+2912-0x235d);CHAR pAtcmdStr[
+ZSMS_PDU_SIZE]={(0x1415+418-0x15b7)};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,(0x13c3+1196-0x186f),
-ZSMS_PDU_SIZE);if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-
-(0xff3+1005-0x13df)){memcpy(pAtcmdStr,g_zUfiSms_FinalCmgsBuf.pdu,strlen(
-g_zUfiSms_FinalCmgsBuf.pdu));}else{printf(
+ZAT_RESULT_SMS){return atRes;}memset(pAtcmdStr,(0x6bf+3382-0x13f5),ZSMS_PDU_SIZE
+);if(strlen(g_zUfiSms_FinalCmgsBuf.pdu)<ZSMS_PDU_SIZE-(0x501+2581-0xf15)){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-(0x216c+1401-0x26e3));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.
-pdu))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0xb66+7075-0x2709),atRstSize);return
+ZSMS_PDU_SIZE-(0x1ecd+957-0x2288));}*(pAtcmdStr+strlen(g_zUfiSms_FinalCmgsBuf.
+pdu))=ZSMS_CTRL_Z_CHAR;memset(pAtRst,(0x919+2838-0x142f),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-(0x1183+4280-0x223a)].tag=WMS_TAG_TYPE_MO_SENT_V01;
+g_zUfiSms_CurConcatSegNo-(0x6bc+227-0x79e)].tag=WMS_TAG_TYPE_MO_SENT_V01;
zUfiSms_CmgsRespProc(cid);}VOID atSms_RecvCmgsErr(UINT8*pResLine,int cid){
at_print(LOG_DEBUG,
"\x73\x6d\x73\x20\x73\x65\x6e\x64\x65\x64\x20\x66\x61\x69\x6c\x2e\x20" "\n");
@@ -524,16 +523,16 @@
ZTE_WMS_CONCAT_SMS_COUNT_MAX){return;}g_zUfiSms_SendFailedCount++;at_print(
LOG_DEBUG,
"\x73\x65\x6e\x64\x20\x73\x6d\x73\x20\x66\x61\x69\x6c\x65\x64\x2c\x73\x6f\x20\x77\x72\x69\x74\x65\x20\x73\x6d\x73\x20\x74\x6f\x20\x64\x72\x61\x66\x74\x62\x6f\x78\x2e" "\n"
-);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x1b86+2578-0x2597)].tag=
-WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x1114+1879-0x186a)){
+);g_zUfiSms_DbStoreData[g_zUfiSms_CurConcatSegNo-(0x41d+1217-0x8dd)].tag=
+WMS_TAG_TYPE_MO_NOT_SENT_V01;if(g_zUfiSms_ConcatTotalNum>(0x12c5+3748-0x2168)){
g_zUfiSms_IsConcatSendSuc=FALSE;}zUfiSms_CmgsRespProc(cid);}VOID
atSms_RecvCmgsRsp(T_zAt_AtRes*pResLine){return;}VOID atSms_RecvCmtRsp(
-T_zAt_AtRes*pResLine){CHAR needSMS[(0x14a4+1921-0x1bf3)]={(0x1da0+707-0x2063)};
-sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0xf00+3146-0x1b4a)==
+T_zAt_AtRes*pResLine){CHAR needSMS[(0x1891+2175-0x20de)]={(0xa88+1036-0xe94)};
+sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x170+5234-0x15e2)==
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={(0x2a5+9215-0x26a4)};
-T_zUfiSms_CmtSetRsp tCmtRsp={(0x101b+1559-0x1632)};if(NULL==pResLine){return;}
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0x12f9+3631-0x2128)};
+T_zUfiSms_CmtSetRsp tCmtRsp={(0x12ba+3184-0x1f2a)};if(NULL==pResLine){return;}
printf(
"\x5b\x53\x4d\x53\x5d\x20\x61\x74\x53\x6d\x73\x5f\x52\x65\x63\x76\x43\x6d\x74\x52\x73\x70\x20\x45\x6e\x74\x65\x72\x20\x70\x64\x75\x46\x6c\x61\x67\x3a\x25\x64\x2f\x50\x61\x72\x61\x73\x3a\x25\x73\x2f\x72\x65\x73\x75\x6c\x74\x3a\x25\x64\x2e" "\n"
,pResLine->pduFlag,pResLine->resParas,pResLine->result);if(pResLine->pduFlag==
@@ -543,39 +542,40 @@
"\x25\x35\x30\x30\x73",tCmtRsp.pdu);pthread_mutex_lock(&smsdb_mutex);
zUfiSms_CmtRespProc(&tCmtRsp);zUfiMmi_SendSmsStatus();pthread_mutex_unlock(&
smsdb_mutex);sc_cfg_set(NV_SMS_RECV_RESULT,"\x6f\x6b");}else{memset(&tSmsPara,
-(0x13dc+2346-0x1d06),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0x22d2+556-0x24fe),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[
-(0xc90+4905-0x1f87)]={(0xf4b+429-0x10f8)};sc_cfg_get(NV_NEED_SUPPORT_SMS,needSMS
-,sizeof(needSMS));if((0x1924+229-0x1a09)==strcmp(needSMS,"\x6e\x6f")){printf(
+(0x1d5a+1423-0x22b7)]={(0x204+8938-0x24ee)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0xe70+3807-0x1d4f)==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[(0x1106+485-0x12cd)]={(0x300+6025-0x1a89)};char*
+);return;}char sms_Main_state[(0xa6a+6874-0x2526)]={(0x6a7+222-0x785)};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")==
-(0x11a3+629-0x1418)){printf(
+(0x155d+4397-0x268a)){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(
-(0x5bd+650-0x847)==strncmp("\x53\x4d",memory,(0x21b5+758-0x24a9))){
+(0xb8+9420-0x2584)==strncmp("\x53\x4d",memory,(0x89+4159-0x10c6))){
zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0x933+3578-0x1729);printf(
+SMS_STATE_RECVING);memory+=(0x5c3+190-0x67d);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[(0x16ba+529-0x1899)]={(0x5bd+7491-0x2300)};sc_cfg_get(
-NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x1521+3487-0x22c0)==strcmp(
+){CHAR needSMS[(0x80d+2998-0x1391)]={(0x116+9046-0x246c)};sc_cfg_get(
+NV_NEED_SUPPORT_SMS,needSMS,sizeof(needSMS));if((0x302+3934-0x1260)==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={(0x58+2232-0x910)};
-T_zUfiSms_CmgrSetRsp tCmgrRsp={(0x1b5d+2263-0x2434)};if(NULL==pResLine){return;}
+);return;}static T_zUfiSms_SmsItem tSmsPara={(0xc5+6328-0x197d)};
+T_zUfiSms_CmgrSetRsp tCmgrRsp={(0xaf9+6804-0x258d)};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"
@@ -583,79 +583,80 @@
"\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,
-(0x254b+156-0x25e7),sizeof(T_zUfiSms_SmsItem));atBase_PreProcRes(pResLine->
+(0xdbc+4545-0x1f7d),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[
-(0x12ad+4701-0x24d8)]={(0xd3c+3659-0x1b87)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
-needSMS,sizeof(needSMS));if((0xe45+1334-0x137b)==strcmp(needSMS,"\x6e\x6f")){
+(0x202+5960-0x1918)]={(0x14ff+3704-0x2377)};sc_cfg_get(NV_NEED_SUPPORT_SMS,
+needSMS,sizeof(needSMS));if((0x537+378-0x6b1)==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[(0x1e75+1173-0x22ec)]={(0x18db+310-0x1a11)};char*
+);return;}char sms_Main_state[(0xa5f+3843-0x1944)]={(0x6b7+8152-0x268f)};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")==
-(0x161c+1734-0x1ce2)){printf(
+(0x3d4+5937-0x1b05)){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((0x2ad+5872-0x199d)==strncmp("\x53\x4d",memory,(0x4e4+7972-0x2406)))
-{zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
-SMS_STATE_RECVING);memory+=(0xf68+2040-0x175c);printf(
+,memory);if((0x7b6+3921-0x1707)==strncmp("\x53\x4d",memory,(0xa2a+215-0xaff))){
+zUfiSms_SetSmsLocation(SMS_LOCATION_SIM);zUfiSms_ChangeMainState(
+SMS_STATE_RECVING);memory+=(0xda2+5850-0x2478);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[(0x30+7305-0x1ca5)]={
-(0x12f+4224-0x11af)};snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+ cid,PSTR pAtRst,int atRstSize){CHAR pAtcmdStr[(0x1971+1208-0x1e15)]={
+(0x1472+138-0x14fc)};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=(0x49b+4532-0x164f);CHAR pAtcmdStr[ZSMS_PDU_SIZE
-]={(0xa98+3840-0x1998)};CHAR ackPduStr[(0x233b+238-0x23f7)]={(0x236b+230-0x2451)
-};if(atoi(pAtCmdPara)==(0x1108+2734-0x1bb5)){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=(0x13dc+2369-0x1d1d);CHAR pAtcmdStr[
+ZSMS_PDU_SIZE]={(0x794+6468-0x20d8)};CHAR ackPduStr[(0x133+2486-0xab7)]={
+(0xe3b+4198-0x1ea1)};if(atoi(pAtCmdPara)==(0x1360+4966-0x26c5)){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(0x2481+444-0x263d);}else{zUfiSms_EncodePdu_DeliverReport(
-ackPduStr,(0x15d0+113-0x156e));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
+,pAtcmdStr);return(0x61f+449-0x7e0);}else{zUfiSms_EncodePdu_DeliverReport(
+ackPduStr,(0x1098+1481-0x158e));snprintf(pAtcmdStr,sizeof(pAtcmdStr),
"\x41\x54\x2b\x43\x4e\x4d\x41\x3d\x25\x73\x2c\x25\x64" "\r\n",pAtCmdPara,strlen(
-ackPduStr)/(0x612+5474-0x1b72));atRes=zSvr_SendAtSyn(ZAT_CNMA_CMD,pAtcmdStr,cid,
-pAtRst,atRstSize);if(atRes!=ZAT_RESULT_SMS){return atRes;}printf(
+ackPduStr)/(0x1368+3090-0x1f78));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,(0x796+5156-0x1bba),ZSMS_PDU_SIZE);if(strlen(
-ackPduStr)<ZSMS_PDU_SIZE-(0x8f0+6502-0x2255)){memcpy(pAtcmdStr,ackPduStr,strlen(
+,pAtcmdStr);memset(pAtcmdStr,(0x19a7+2052-0x21ab),ZSMS_PDU_SIZE);if(strlen(
+ackPduStr)<ZSMS_PDU_SIZE-(0xb64+6959-0x2692)){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-(0xb3+1811-0x7c4));}*(
+,ackPduStr);memcpy(pAtcmdStr,ackPduStr,ZSMS_PDU_SIZE-(0xec0+4559-0x208d));}*(
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,(0x105a+507-0x1255),atRstSize);return zSvr_SendAtSyn(
+,pAtcmdStr);memset(pAtRst,(0x12a1+2271-0x1b80),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]={(0x911+735-0xbf0)};int atRes=
-(0x907+3367-0x162e);if(pDatabuf==NULL){return;}atRes=atSms_SendCmgdReq(pDatabuf,
+cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0xc35+4991-0x1fb4)};int atRes=
+(0x53f+5895-0x1c46);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]={(0x89c+6310-0x2142)}
+UINT8*pDatabuf,int cid){CHAR errCode[ZSVR_AT_RES_CODE_LEN]={(0x5a7+7257-0x2200)}
;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]
-={(0xc9+9193-0x24b2)};int atRes=(0x1506+1193-0x19af);if(pDatabuf==NULL){printf(
+={(0xaa6+6301-0x2343)};int atRes=(0x104d+5320-0x2515);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]=
-{(0x3f1+5843-0x1ac4)};if(pDatabuf==NULL){printf(
+{(0xa16+5809-0x20c7)};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/aic_tools/rftest/wifi_test.c b/ap/app/zte_comm/wlan/aic_tools/rftest/wifi_test.c
index af33c6f..164475c 100755
--- a/ap/app/zte_comm/wlan/aic_tools/rftest/wifi_test.c
+++ b/ap/app/zte_comm/wlan/aic_tools/rftest/wifi_test.c
@@ -12,13 +12,25 @@
#define MAX_DRV_CMD_SIZE 1536
#define TXRX_PARA SIOCDEVPRIVATE+1
-static const char IFACE_DIR[] = "";
-static const char DRIVER_MODULE_NAME[] = "rwnx_fdrv";
-static const char DRIVER_MODULE_TAG[] = WIFI_DRIVER_MODULE_NAME " ";
-static const char DRIVER_MODULE_PATH[] = WIFI_DRIVER_MODULE_PATH;
-static const char DRIVER_MODULE_ARG[] = "";
-static const char FIRMWARE_LOADER[] = "";
-static const char DRIVER_PROP_NAME[] = "wlan.driver.status";
+#define CHIP_AIC8800D 0
+#define CHIP_AIC8800DCDW 1
+#define CHIP_AIC8800D80 2
+
+#define CHIP_SELECT CHIP_AIC8800DCDW
+
+#if (CHIP_SELECT != CHIP_AIC8800DCDW)
+#define EFUSE_CMD_OLD_FORMAT_EN 1
+#else
+#define EFUSE_CMD_OLD_FORMAT_EN 0
+#endif
+
+//static const char IFACE_DIR[] = "";
+//static const char DRIVER_MODULE_NAME[] = "rwnx_fdrv";
+//static const char DRIVER_MODULE_TAG[] = WIFI_DRIVER_MODULE_NAME " ";
+//static const char DRIVER_MODULE_PATH[] = WIFI_DRIVER_MODULE_PATH;
+//static const char DRIVER_MODULE_ARG[] = "";
+//static const char FIRMWARE_LOADER[] = "";
+//static const char DRIVER_PROP_NAME[] = "wlan.driver.status";
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(expression) \
@@ -34,7 +46,14 @@
int used_len;
int total_len;
} android_wifi_priv_cmd;
-
+typedef struct cob_result_ptr_t {
+ u_int16_t dut_rcv_golden_num;
+ u_int8_t golden_rcv_dut_num;
+ int8_t rssi_static;
+ int8_t snr_static;
+ int8_t dut_rssi_static;
+ u_int16_t reserved;
+}cob_result_ptr_t;
int wifi_send_cmd_to_net_interface(const char* if_name, int argC, char *argV[])
{
int sock;
@@ -43,9 +62,9 @@
int i = 0;
char buf[MAX_DRV_CMD_SIZE];
struct android_wifi_priv_cmd priv_cmd;
+ struct cob_result_ptr_t *cob_result_ptr;
char is_param_err = 0;
int buf_len = 0;
- int idx = 0;
sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
@@ -90,12 +109,12 @@
|| ((argC == 5) && (argV[3][0] == '0'))) {
is_param_err = 1;
}
- } else if ((strcasecmp(argV[2], "SET_RX") == 0)) {
+ } else if ((strcasecmp(argV[2], "SET_RX") == 0)
+ || (strcasecmp(argV[2], "SET_COB_CAL") == 0)) {
if (argC < 5) {
is_param_err = 1;
}
- } else if ((strcasecmp(argV[2], "SET_POWER") == 0)
- || (strcasecmp(argV[2], "SET_XTAL_CAP") == 0)
+ } else if ((strcasecmp(argV[2], "SET_XTAL_CAP") == 0)
|| (strcasecmp(argV[2], "SET_XTAL_CAP_FINE") == 0)) {
if (argC < 4) {
is_param_err = 1;
@@ -119,16 +138,21 @@
if (argC < 3) {
is_param_err = 1;
}
- } else if ((strcasecmp(argV[2], "RDWR_PWRLVL") == 0)
+ } else if ((strcasecmp(argV[2], "RDWR_PWRIDX") == 0)
+ || (strcasecmp(argV[2], "RDWR_PWRLVL") == 0)
|| (strcasecmp(argV[2], "RDWR_PWROFST") == 0)
- || (strcasecmp(argV[2], "RDWR_EFUSE_PWROFST") == 0)) {
+ || (strcasecmp(argV[2], "RDWR_PWROFSTFINE") == 0)
+ || (strcasecmp(argV[2], "RDWR_EFUSE_PWROFST") == 0)
+ || (strcasecmp(argV[2], "RDWR_EFUSE_PWROFSTFINE") == 0)) {
if (((argC == 4) && (argV[3][0] != '0'))
|| (argC == 5)
|| ((argC == 6) && (argV[3][0] == '0'))) {
is_param_err = 1;
}
} else if ((strcasecmp(argV[2], "RDWR_DRVIBIT") == 0)
- || (strcasecmp(argV[2], "RDWR_EFUSE_DRVIBIT") == 0)) {
+ || (strcasecmp(argV[2], "RDWR_EFUSE_DRVIBIT") == 0)
+ || (strcasecmp(argV[2], "RDWR_EFUSE_SDIOCFG") == 0)
+ || (strcasecmp(argV[2], "RDWR_EFUSE_USBVIDPID") == 0)) {
if (((argC == 4) && (argV[3][0] != '0'))
|| ((argC == 5) && (argV[3][0] == '0'))) {
is_param_err = 1;
@@ -137,7 +161,9 @@
if (argC < 4) {
is_param_err = 1;
}
- } else if ((strcasecmp(argV[2], "SET_NOTCH") == 0)) {
+ } else if ((strcasecmp(argV[2], "SET_NOTCH") == 0)
+ || (strcasecmp(argV[2], "SET_SRRC") == 0)
+ || (strcasecmp(argV[2], "SET_FSS") == 0)) {
if (argC < 4) {
is_param_err = 1;
}
@@ -190,6 +216,12 @@
} else {
is_param_err = 1;
}
+ } else if ((strcasecmp(argV[2], "BT_DATA") == 0)) {
+ //char bt_raw_data_cmd[255];
+ int arg_len = strlen(argV[2]);
+ buf_len = priv_cmd.used_len;
+ memcpy(&priv_cmd.buf[arg_len+1], &priv_cmd.buf[arg_len+1], buf_len - arg_len - 1);
+ priv_cmd.used_len = buf_len - arg_len - 1;
} else {
is_param_err = 0;
}
@@ -200,25 +232,34 @@
}
if ((ret = ioctl(sock, TXRX_PARA, &ifr)) < 0) {
+ printf("cmd or param error\n");
printf("%s: error ioctl[TX_PARA] ret= %d\n", __func__, ret);
return ret;
}
memcpy(&priv_cmd, ifr.ifr_data, sizeof(struct android_wifi_priv_cmd));
if (strcasecmp(argV[2], "SET_FREQ_CAL") == 0) {
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
+ printf("done: freq_cal: 0x%8x\n", *(unsigned int *)priv_cmd.buf);
+ #else
signed char rem_cnt = (signed char)priv_cmd.buf[1];
if (rem_cnt < 0) {
printf("failed to set freq_cal, no room!\n");
} else {
printf("done: freq_cal: 0x%2x (remain:%x)\n", (unsigned char)priv_cmd.buf[0], rem_cnt);
}
+ #endif
} else if (strcasecmp(argV[2], "SET_FREQ_CAL_FINE") == 0) {
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
+ printf("done: freq_cal_fine: 0x%8x\n", *(unsigned int *)priv_cmd.buf);
+ #else
signed char rem_cnt = (signed char)priv_cmd.buf[1];
if (rem_cnt < 0) {
printf("failed to set freq_cal_fine, no room!\n");
} else {
printf("done: freq_cal_fine: 0x%2x (remain:%x)\n", (unsigned char)priv_cmd.buf[0], rem_cnt);
}
+ #endif
} else if (strcasecmp(argV[2], "GET_EFUSE_BLOCK") == 0)
printf("done:efuse: 0x%8x\n", *(unsigned int *)priv_cmd.buf);
else if (strcasecmp(argV[2], "SET_XTAL_CAP") == 0)
@@ -231,21 +272,53 @@
printf("done: get macaddr = %02x : %02x : %02x : %02x : %02x : %02x\n",
*(unsigned char *)&priv_cmd.buf[5], *(unsigned char *)&priv_cmd.buf[4], *(unsigned char *)&priv_cmd.buf[3],
*(unsigned char *)&priv_cmd.buf[2], *(unsigned char *)&priv_cmd.buf[1], *(unsigned char *)&priv_cmd.buf[0]);
+ #if (!EFUSE_CMD_OLD_FORMAT_EN)
+ printf(" (remain:%x)\n", priv_cmd.buf[6]);
+ #endif
} else if (strcasecmp(argV[2], "GET_BT_MAC_ADDR") == 0) {
printf("done: get bt macaddr = %02x : %02x : %02x : %02x : %02x : %02x\n",
*(unsigned char *)&priv_cmd.buf[5], *(unsigned char *)&priv_cmd.buf[4], *(unsigned char *)&priv_cmd.buf[3],
*(unsigned char *)&priv_cmd.buf[2], *(unsigned char *)&priv_cmd.buf[1], *(unsigned char *)&priv_cmd.buf[0]);
+ #if (!EFUSE_CMD_OLD_FORMAT_EN)
+ printf(" (remain:%x)\n", priv_cmd.buf[6]);
+ #endif
} else if (strcasecmp(argV[2], "GET_FREQ_CAL") == 0) {
unsigned int val = *(unsigned int *)&priv_cmd.buf[0];
- printf("done: get_freq_cal: xtal_cap=0x%x (remain:%x), xtal_cap_fine=%x (remain:%x)\n",
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
+ printf("done: get_freq_cal: xtal_cap=0x%x, xtal_cap_fine=0x%x\n", val & 0x000000ff, (val >> 8) & 0x000000ff);
+ #else
+ printf("done: get_freq_cal: xtal_cap=0x%x (remain:%x), xtal_cap_fine=0x%x (remain:%x)\n",
val & 0xff, (val >> 8) & 0xff, (val >> 16) & 0xff, (val >> 24) & 0xff);
+ #endif
} else if (strcasecmp(argV[2], "GET_VENDOR_INFO") == 0) {
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
printf("done: get_vendor_info = 0x%x\n", *(unsigned char *)&priv_cmd.buf[0]);
+ #else
+ printf("done: get_vendor_info = 0x%x (remain:%x)\n", *(unsigned char *)&priv_cmd.buf[0], priv_cmd.buf[1]);
+ #endif
} else if (strcasecmp(argV[2], "RDWR_PWRMM") == 0) {
printf("done: txpwr manual mode = %x\n", *(unsigned int *)&priv_cmd.buf[0]);
+ } else if (strcasecmp(argV[2], "RDWR_PWRIDX") == 0) {
+ char *buff = &priv_cmd.buf[0];
+ printf("done:\n"
+ "txpwr index 2.4g:\n"
+ " [0]=%d(ofdmlowrate)\n"
+ " [1]=%d(ofdm64qam)\n"
+ " [2]=%d(ofdm256qam)\n"
+ " [3]=%d(ofdm1024qam)\n"
+ " [4]=%d(dsss)\n", buff[0], buff[1], buff[2], buff[3], buff[4]);
+ printf("txpwr index 5g:\n"
+ " [0]=%d(ofdmlowrate)\n"
+ " [1]=%d(ofdm64qam)\n"
+ " [2]=%d(ofdm256qam)\n"
+ " [3]=%d(ofdm1024qam)\n", buff[5], buff[6], buff[7], buff[8]);
} else if (strcasecmp(argV[2], "RDWR_PWRLVL") == 0) {
char *buff = &priv_cmd.buf[0];
- int grp, idx;
+ int grp = 0;
+ int idx = 0;
+ int cnt = 0;
+ int tmp_idx = 0;
+
printf("done:\n"
"txpwr index 2.4g: [0]:11b+11a/g, [1]:11n/11ac, [2]:11ax\n");
for (grp = 0; grp < 3; grp++) {
@@ -262,22 +335,77 @@
}
printf("\r\n");
}
+ printf("txpwr index 5g: [0]:11a, [1]:11n/11ac, [2]:11ax\n");
+ for (grp = 0; grp < 3; grp++) {
+ cnt = 12;
+ idx = 0;
+ if (grp == 0) {
+ tmp_idx = 4;
+ }
+ if (grp == 1) {
+ cnt = 10;
+ tmp_idx = 0;
+ }
+ printf(" [%x] =", grp);
+ for (idx = tmp_idx ; idx < cnt; idx++) {
+ if (idx & !(idx & 0x3)) {
+ printf(" ");
+ }
+ printf(" %2d", buff[12 * (grp + 3) + idx]);
+ }
+ printf("\r\n");
+ }
+
} else if (strcasecmp(argV[2], "RDWR_PWROFST") == 0) {
- signed char *buff = &priv_cmd.buf[0];
+ signed char *buff = (signed char *)&priv_cmd.buf[0];
+ #if (CHIP_SELECT != CHIP_AIC8800D80)
printf("done:\n"
- "txpwr offset 2.4g:\n"
+ "txpwr offset 2.4g: \n"
" [0]=%d(ch1~4)\n"
" [1]=%d(ch5~9)\n"
- " [2]=%d(ch10~13)\n", buff[0], buff[1], buff[2]);
- #if 0
+ " [2]=%d(ch10~13)\n", (int8_t)buff[0], (int8_t)buff[1], (int8_t)buff[2]);
printf("txpwr offset 5g:\n"
" [0]=%d(ch36~64)\n"
" [1]=%d(ch100~120)\n"
" [2]=%d(ch122~140)\n"
- " [3]=%d(ch142~165)\n", buff[3], buff[4], buff[5], buff[6]);
+ " [3]=%d(ch142~165)\n", (int8_t)buff[3], (int8_t)buff[4], (int8_t)buff[5], (int8_t)buff[6]);
+ #else
+ int type, ch_grp;
+ printf("done:\n"
+ "pwrofst2x 2.4g: [0]:11b, [1]:ofdm_highrate, [2]:ofdm_lowrate\n"
+ " chan=" "\t1-4" "\t5-9" "\t10-13");
+ for (type = 0; type < 3; type++) {
+ printf("\n [%d] =", type);
+ for (ch_grp = 0; ch_grp < 3; ch_grp++) {
+ printf("\t%d", buff[3 * type + ch_grp]);
+ }
+ }
+ printf("\npwrofst2x 5g: [0]:ofdm_lowrate, [1]:ofdm_highrate, [2]:ofdm_midrate\n"
+ " chan=" "\t36-50" "\t51-64" "\t98-114" "\t115-130" "\t131-146" "\t147-166");
+ buff = (signed char *)&priv_cmd.buf[3 * 3];
+ for (type = 0; type < 3; type++) {
+ printf("\n [%d] =", type);
+ for (ch_grp = 0; ch_grp < 6; ch_grp++) {
+ printf("\t%d", buff[6 * type + ch_grp]);
+ }
+ }
+ printf("\n");
#endif
+ } else if (strcasecmp(argV[2], "RDWR_PWROFSTFINE") == 0) {
+ signed char *buff = (signed char *)&priv_cmd.buf[0];
+ printf("done:\n"
+ "txpwr offset fine 2.4g: \n"
+ " [0]=%d(ch1~4)\n"
+ " [1]=%d(ch5~9)\n"
+ " [2]=%d(ch10~13)\n", (int8_t)buff[0], (int8_t)buff[1], (int8_t)buff[2]);
+ printf("txpwr offset fine 5g:\n"
+ " [0]=%d(ch36~64)\n"
+ " [1]=%d(ch100~120)\n"
+ " [2]=%d(ch122~140)\n"
+ " [3]=%d(ch142~165)\n", (int8_t)buff[3], (int8_t)buff[4], (int8_t)buff[5], (int8_t)buff[6]);
} else if (strcasecmp(argV[2], "RDWR_DRVIBIT") == 0) {
- signed char *buff = &priv_cmd.buf[0];
+ char *buff = &priv_cmd.buf[0];
+ int idx = 0;
printf("done: 2.4g txgain tbl pa drv_ibit:\n");
for (idx = 0; idx < 16; idx++) {
printf(" %x", buff[idx]);
@@ -286,26 +414,146 @@
}
}
} else if (strcasecmp(argV[2], "RDWR_EFUSE_PWROFST") == 0) {
- signed char *buff = &priv_cmd.buf[0];
+ signed char *buff = (signed char *)&priv_cmd.buf[0];
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
+ #if (CHIP_SELECT != CHIP_AIC8800D80)
printf("done:\n"
"efuse txpwr offset 2.4g:\n"
" [0]=%d(ch1~4)\n"
" [1]=%d(ch5~9)\n"
- " [2]=%d(ch10~13)\n", buff[0], buff[1], buff[2]);
- #if 0
+ " [2]=%d(ch10~13)\n", (int8_t)buff[0], (int8_t)buff[1], (int8_t)buff[2]);
printf("efuse txpwr offset 5g:\n"
" [0]=%d(ch36~64)\n"
" [1]=%d(ch100~120)\n"
" [2]=%d(ch122~140)\n"
- " [3]=%d(ch142~165)\n", buff[3], buff[4], buff[5], buff[6]);
+ " [3]=%d(ch142~165)\n", (int8_t)buff[3], (int8_t)buff[4], (int8_t)buff[5], (int8_t)buff[6]);
+ #else
+ int type, ch_grp;
+ printf("done:\n"
+ "pwrofst2x 2.4g: [0]:11b, [1]:ofdm_highrate, [2]:ofdm_lowrate\n"
+ " chan=" "\t1-4" "\t5-9" "\t10-13");
+ for (type = 0; type < 3; type++) {
+ printf("\n [%d] =", type);
+ for (ch_grp = 0; ch_grp < 3; ch_grp++) {
+ printf("\t%d", buff[3 * type + ch_grp]);
+ }
+ }
+ printf("\npwrofst2x 5g: [0]:ofdm_lowrate, [1]:ofdm_highrate, [2]:ofdm_midrate\n"
+ " chan=" "\t36-50" "\t51-64" "\t98-114" "\t115-130" "\t131-146" "\t147-166");
+ buff = (signed char *)&priv_cmd.buf[3 * 3];
+ for (type = 0; type < 3; type++) {
+ printf("\n [%d] =", type);
+ for (ch_grp = 0; ch_grp < 6; ch_grp++) {
+ printf("\t%d", buff[6 * type + ch_grp]);
+ }
+ }
+ printf("\n");
+ #endif
+ #else
+ printf("done:\n"
+ "efuse txpwr offset 2.4g:\n"
+ " [0]=%d(remain:%x, ch1~4)\n"
+ " [1]=%d(remain:%x, ch5~9)\n"
+ " [2]=%d(remain:%x, ch10~13)\n",
+ (int8_t)buff[0], (int8_t)buff[3],
+ (int8_t)buff[1], (int8_t)buff[4],
+ (int8_t)buff[2], (int8_t)buff[5]);
+ if (ret > 6) { // 5g_en
+ printf("efuse txpwr offset 5g:\n"
+ " [0]=%d(remain:%x, ch36~64)\n"
+ " [1]=%d(remain:%x, ch100~120)\n"
+ " [2]=%d(remain:%x, ch122~140)\n"
+ " [3]=%d(remain:%x, ch142~165)\n",
+ (int8_t)buff[6], (int8_t)buff[10],
+ (int8_t)buff[7], (int8_t)buff[11],
+ (int8_t)buff[8], (int8_t)buff[12],
+ (int8_t)buff[9], (int8_t)buff[13]);
+ }
+ #endif
+ } else if (strcasecmp(argV[2], "RDWR_EFUSE_PWROFSTFINE") == 0) {
+ signed char *buff = (signed char *)&priv_cmd.buf[0];
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
+ printf("done:\n"
+ "efuse txpwr offset fine 2.4g:\n"
+ " [0]=%d(ch1~4)\n"
+ " [1]=%d(ch5~9)\n"
+ " [2]=%d(ch10~13)\n", (int8_t)buff[0], (int8_t)buff[1], (int8_t)buff[2]);
+ printf("efuse txpwr offset fine 5g:\n"
+ " [0]=%d(ch36~64)\n"
+ " [1]=%d(ch100~120)\n"
+ " [2]=%d(ch122~140)\n"
+ " [3]=%d(ch142~165)\n", (int8_t)buff[3], (int8_t)buff[4], (int8_t)buff[5], (int8_t)buff[6]);
+ #else
+ printf("done:\n"
+ "efuse txpwr offset fine 2.4g:\n"
+ " [0]=%d(remain:%x, ch1~4)\n"
+ " [1]=%d(remain:%x, ch5~9)\n"
+ " [2]=%d(remain:%x, ch10~13)\n",
+ (int8_t)buff[0], (int8_t)buff[3],
+ (int8_t)buff[1], (int8_t)buff[4],
+ (int8_t)buff[2], (int8_t)buff[5]);
+ if (ret > 6) { // 5g_en
+ printf("efuse txpwr offset fine 5g:\n"
+ " [0]=%d(remain:%x, ch36~64)\n"
+ " [1]=%d(remain:%x, ch100~120)\n"
+ " [2]=%d(remain:%x, ch122~140)\n"
+ " [3]=%d(remain:%x, ch142~165)\n",
+ (int8_t)buff[6], (int8_t)buff[10],
+ (int8_t)buff[7], (int8_t)buff[11],
+ (int8_t)buff[8], (int8_t)buff[12],
+ (int8_t)buff[9], (int8_t)buff[13]);
+ }
#endif
} else if (strcasecmp(argV[2], "RDWR_EFUSE_DRVIBIT") == 0) {
+ #if (EFUSE_CMD_OLD_FORMAT_EN)
printf("done: efsue 2.4g txgain tbl pa drv_ibit: %x\n", priv_cmd.buf[0]);
+ #else
+ int val = *(int *)&priv_cmd.buf[0];
+ if (val < 0) {
+ printf("failed to rd/wr efuse drv_ibit, ret=%d\n", val);
+ } else {
+ printf("done: efsue 2.4g txgain tbl pa drv_ibit: %x (remain: %x)\n", priv_cmd.buf[0], priv_cmd.buf[1]);
+ }
+ #endif
+ } else if (strcasecmp(argV[2], "RDWR_EFUSE_SDIOCFG") == 0) {
+ printf("done: efsue sdio cfg: %x\n", priv_cmd.buf[0]);
+ } else if (strcasecmp(argV[2], "RDWR_EFUSE_USBVIDPID") == 0) {
+ unsigned int val = (unsigned int)priv_cmd.buf[0] |
+ (unsigned int)(priv_cmd.buf[1] << 8) |
+ (unsigned int)(priv_cmd.buf[2] << 16) |
+ (unsigned int)(priv_cmd.buf[3] << 24);
+ printf("done: efsue usb vid/pid: %x\n", val);
+ } else if (strcasecmp(argV[2], "GET_CAL_XTAL_RES") == 0) {
+ unsigned int val = *(unsigned int *)&priv_cmd.buf[0];
+ printf("done: get_cal_xtal_res: cap=0x%x, cap_fine=0x%x\n", val & 0x000000ff, (val >> 8) & 0x000000ff);
+ } else if ((strcasecmp(argV[2], "GET_COB_CAL_RES") == 0) || (strcasecmp(argV[2], "DO_COB_TEST") == 0)){
+ unsigned int val = *(unsigned int *)&priv_cmd.buf[0];
+ unsigned int val0 = *(unsigned int *)&priv_cmd.buf[4];
+ cob_result_ptr = (cob_result_ptr_t *) (unsigned int *)&priv_cmd.buf[8];
+ printf("done:\ncap= 0x%x cap_fine= 0x%x freq_ofst= %d golden_rcv_dut= %d tx_rssi= %d dBm snr= %d dB dut_rcv_godlden= %d rx_rssi= %d dBm\n",
+ val & 0x000000ff, (val >> 8) & 0x000000ff, val0, cob_result_ptr->golden_rcv_dut_num, cob_result_ptr->rssi_static, cob_result_ptr->snr_static, cob_result_ptr->dut_rcv_golden_num, cob_result_ptr->dut_rssi_static);
+ } else if (strcasecmp(argV[2], "RDWR_EFUSE_USRDATA") == 0) {
+ unsigned int usr_data[3];
+ usr_data[0] = *(unsigned int *)&priv_cmd.buf[0];
+ usr_data[1] = *(unsigned int *)&priv_cmd.buf[4];
+ usr_data[2] = *(unsigned int *)&priv_cmd.buf[8];
+ printf("done: efuse usrdata:\n [0]=0x%08x\n [1]=0x%08x\n [2]=0x%08x\n",
+ usr_data[0], usr_data[1], usr_data[2]);
} else if (strcasecmp(argV[2], "GET_BT_RX_RESULT") == 0) {
printf("done: get bt rx total=%d, ok=%d, err=%d\n", *(unsigned int *)priv_cmd.buf,
*(unsigned int *)&priv_cmd.buf[4],
*(unsigned int *)&priv_cmd.buf[8]);
- } else {
+ } else if (strcasecmp(argV[2], "BT_DATA") == 0) {
+ unsigned char *buff = (unsigned char *)&priv_cmd.buf[1];
+ int len = priv_cmd.buf[0];
+ int idx = 0;
+ printf("done: %d\n", len);
+ for (idx = 0; idx < len; idx++) {
+ printf("%02x ", buff[idx]);
+ }
+ printf("\n");
+ }
+ else {
printf("done\n");
}
@@ -315,9 +563,9 @@
int main(int argC, char *argV[])
{
- char* ins = "insmod";
- char* rm = "rmmod";
- char* ko = "rwnx_fdrv.ko";
+ //char* ins = "insmod";
+ //char* rm = "rmmod";
+ //char* ko = "rwnx_fdrv.ko";
// printf("enter!!!AIC argC=%d argV[0]=%s argV[1]=%s argV[2]=%s\n", argC, argV[0], argV[1],argV[2]);
if(argC >= 3)
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 bffde4a..0c398e3 100755
--- a/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
+++ b/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
@@ -25,6 +25,10 @@
#include "wifi_socket.h"
#include "rtk_arch.h"
+#if defined(__AIC_8800DW_CHIP__)
+#define TXRX_PARA SIOCDEVPRIVATE+1
+#endif
+
#define UEVENT_BUFFER_SIZE 1024*2
#define AP_STA_CONNECTED "AP-STA-CONNECTED "
#define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED "
@@ -65,6 +69,14 @@
#define WPS_DEACTIVED "3"
#define WPS_ACTIVE_MAX "4"
+#if defined(__AIC_8800DW_CHIP__)
+typedef struct android_wifi_priv_cmd {
+ char *buf;
+ int used_len;
+ int total_len;
+} android_wifi_priv_cmd;
+#endif
+
static const char ACCEPT_MAC_FILE[] ="/etc_rw/wifi/hostapd.accept";
static const char DENY_MAC_FILE[] ="/etc_rw/wifi/hostapd.deny";
static const char HOSTAPD_CONF_FILE[] = "/etc_rw/wifi/hostapd.conf";
@@ -102,6 +114,9 @@
static void wifi_ap_disable(struct wlan_ap_server *ap_svr);
static int wifi_ap_enable(struct wlan_ap_server *ap_svr);
+static void wlan_set_txpwr(void);
+
+
bool isSoftapStarted(struct wlan_ap_server *ap_svr);
void generate_acl_list_file(char* accesspolicy);
int acl_mode_value_transist(char* accesspolicy0);
@@ -458,6 +473,79 @@
}
+#if defined(__AIC_8800DW_CHIP__)
+static int aic_send_cmd_to_net_iface(char *if_name, char *cmd)
+{
+ int sock;
+ struct ifreq ifr;
+ int ret = 0;
+ char buf[128] = {0};
+ struct android_wifi_priv_cmd priv_cmd;
+
+ wf_log("[%s,%s]!\n", if_name, cmd);
+
+ if (strlen(cmd) >= sizeof(buf)) {
+ wf_log("data too long!\n");
+ }
+
+ sock = socket(PF_INET, SOCK_DGRAM, 0);
+ if (sock < 0) {
+ wf_log("bad sock!\n");
+ return -1;
+ }
+
+ memset(&ifr, 0, sizeof(ifr));
+ strcpy(ifr.ifr_name, if_name);
+
+ if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) {
+ wf_log("Could not read interface %s flags: %s", if_name, strerror(errno));
+ return -1;
+ }
+
+ if (!(ifr.ifr_flags & IFF_UP)) {
+ wf_log("%s is not up!\n", if_name);
+ return -1;
+ }
+
+ memset(&priv_cmd, 0, sizeof(priv_cmd));
+ memset(buf, 0, sizeof(buf));
+
+ snprintf(buf, sizeof(buf), "%s", cmd);
+
+ priv_cmd.buf = buf;
+ priv_cmd.used_len = strlen(buf);
+ priv_cmd.total_len = sizeof(buf);
+ ifr.ifr_data = (void*)&priv_cmd;
+
+ if ((ret = ioctl(sock, TXRX_PARA, &ifr)) < 0) {
+ wf_log("%s:error ioctl[TX_PARA] ret= %d\n", ret);
+ return -1;
+ }
+
+ return 0;
+}
+
+static void wlan_set_wifiConverage_aic(char *if_name, char *wifiCoverage)
+{
+ if (!strcmp (wifiCoverage, "short_mode")) {
+ aic_send_cmd_to_net_iface("wlan0", "SET_TXPWR_LOSS -6");
+ } else if (!strcmp (wifiCoverage, "medium_mode")) {
+ aic_send_cmd_to_net_iface("wlan0", "SET_TXPWR_LOSS -3");
+ } else { //long mode
+ aic_send_cmd_to_net_iface("wlan0", "SET_TXPWR_LOSS 0");
+ }
+}
+#endif
+
+static void wlan_set_txpwr(void)
+{
+#if defined(__AIC_8800DW_CHIP__)
+ char wifi_coverage[NVIO_WIFI_LEN_16] = {0};
+ sc_cfg_get("wifi_coverage", wifi_coverage, sizeof(wifi_coverage)-1);
+ wlan_set_wifiConverage_aic(ap_server->drv_proxy.iface_name, wifi_coverage);
+#endif
+}
+
static void wlan_set_wifiConverage(char *wifiCoverage)
{
@@ -563,8 +651,15 @@
if( flags & ZTE_WLAN_WIRELESS_MODE_SET)
wlan_80211Mode_config(para->WirelessMode);
- if( flags & ZTE_WLAN_POWER_SET)
+ if( flags & ZTE_WLAN_POWER_SET) {
+#if defined(__AIC_8800DW_CHIP__)
+ wlan_set_wifiConverage_aic(ap_svr->drv_proxy.iface_name, para->wifi_coverage);
+ wf_log("ZTE_WLAN_POWER_SET:%08x", flags);
+ return;
+#else
wlan_set_wifiConverage(para->wifi_coverage);
+#endif
+ }
if( flags & ZTE_WLAN_WIRELESS_MODE_SET)
wlan_set_ht(para->wifi_11n_cap);
@@ -573,7 +668,7 @@
//ap_docmd("RELOAD", NULL);
ap_docmd("DISABLE", NULL);
ap_docmd("ENABLE", NULL);
-
+ wlan_set_txpwr();
}
@@ -947,6 +1042,7 @@
sem_post (&g_hostap_id);
ret =0;
wlan_set_state(WLAN_ON,WLAN_OFF);
+ wlan_set_txpwr();
char m_ssid_enable[8] = {0};
sc_cfg_get ("m_ssid_enable", m_ssid_enable, sizeof (m_ssid_enable));
@@ -1074,6 +1170,7 @@
wifi_station_cancel_scan();
#endif
ap_docmd("ENABLE", NULL);
+ wlan_set_txpwr();
sc_cfg_set("tmp_channel", f_channel);
wf_log ("wifi_channel_follow change %s->%s!!", t_channel, f_channel);
}
@@ -1177,6 +1274,8 @@
wf_log ("ap enable failed\n");
return -1;
}
+
+ wlan_set_txpwr();
return 0;
}
@@ -1921,6 +2020,7 @@
sc_cfg_set("wifi_set_flags", "");
ap_docmd_m("DISABLE", NULL);
ap_docmd_m("ENABLE", NULL);
+ wlan_set_txpwr();
}
#endif
@@ -1942,6 +2042,8 @@
wifi_station_cancel_scan();
#endif
ap_docmd("ENABLE", NULL);
+ wlan_set_txpwr();
+
sc_cfg_set("tmp_channel", f_channel);
wf_log ("wifi_channel_follow change %s->%s!!", t_channel, f_channel);
need_channel_follow=0;
diff --git a/ap/app/zte_comm/wlan/src/wlan_main.c b/ap/app/zte_comm/wlan/src/wlan_main.c
index 77fcf48..0e292d8 100755
--- a/ap/app/zte_comm/wlan/src/wlan_main.c
+++ b/ap/app/zte_comm/wlan/src/wlan_main.c
@@ -946,6 +946,13 @@
static void cap_wifi_disable(MSG_BUF *pstMsg)
{
+ if (ap_server->ap0_state) {
+ wf_log("cap disable when ap not closed");
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_DISABLING);
+ basic_deal_all(WIFI_CFG_CLOSE);
+ send_ap_status_to_cap(IN_WIFI_AP_INDEX_AP0, IN_WIFI_AP_STATUS_IDLE);
+ }
+
ap_server->drv_proxy.drv_deinit(&ap_server->drv_proxy);
}
diff --git a/ap/app/zte_comm/zte_mainctrl/net_other.c b/ap/app/zte_comm/zte_mainctrl/net_other.c
index fdebb09..c603ff6 100755
--- a/ap/app/zte_comm/zte_mainctrl/net_other.c
+++ b/ap/app/zte_comm/zte_mainctrl/net_other.c
@@ -1280,12 +1280,12 @@
slog(NET_PRINT, SLOG_NORMAL, "site=%s url_hexstring=%s\n", site, url_hexstring);
snprintf(sys_cmd_bufer, sizeof(sys_cmd_bufer), "iptables -A %s -m mac --mac-source %s -m string --hex-string \"|%s|\" --algo kmp -j ACCEPT", \
CLILDREN_WEB_CHAIN, mac, url_hexstring);//klocwork
- system_cmd_ex(sys_cmd_bufer);
+ system(sys_cmd_bufer);
memset(sys_cmd_bufer, 0, sizeof(sys_cmd_bufer));
snprintf(sys_cmd_bufer, sizeof(sys_cmd_bufer), "iptables -A %s -m mac --mac-source %s -m string --hex-string \"|%s|\" --algo kmp -j ACCEPT", \
CLILDREN_WEB_PHONE_CHAIN, mac, url_hexstring);
- system_cmd_ex(sys_cmd_bufer);
+ system(sys_cmd_bufer);
}
diff --git a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
index 241ad2c..0785d98 100755
--- a/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
+++ b/ap/app/zte_comm/zte_mainctrl/netdev_proc.c
@@ -699,7 +699,7 @@
if(strcmp(nv_value,"acting") == 0)
sc_cfg_set(buffer, "act");
else
- slog(NET_PRINT, SLOG_ERR, "$$$$$net_sendmsg_2_atctl_up 5s=%s\n", buffer, nv_value);
+ slog(NET_PRINT, SLOG_ERR, "$$$$$net_sendmsg_2_atctl_up %s=%s\n", buffer, nv_value);
}else if(cmd == MSG_CMD_LINKDOWN_END){
if(strcmp(nv_value,"deacting") == 0)
sc_cfg_set(buffer, "deact");
@@ -721,6 +721,7 @@
char buffer[128] = {0};
char mtu[16] = {0};
char xlat_enable[4] = {0};
+ char ra_mtu_enable[4] = {0};
sc_cfg_get("tc_enable", tc_enable, sizeof(tc_enable));
snprintf(wan_name,NV_NAME_LEN, "%s%d", ps_wan, actinfo->c_id);
@@ -731,8 +732,11 @@
system_cmd_ex(buffer);
//ifconfig mtu
sc_cfg_get("mtu", mtu, sizeof(mtu));
- snprintf(buffer, sizeof(buffer), "ifconfig %s mtu %s", wan_name, mtu);
- system_cmd_ex(buffer);
+ sc_cfg_get("ra_mtu_enable", ra_mtu_enable, sizeof(ra_mtu_enable));
+ if(1 != atoi(ra_mtu_enable)) {
+ snprintf(buffer, sizeof(buffer), "ifconfig %s mtu %s", wan_name, mtu);
+ system_cmd_ex(buffer);
+ }
//ifconfig ip
if(actinfo->act_info.ip46flag & V4_VALID){
snprintf(buffer, sizeof(buffer), "%s_ip", wan_name);