summaryrefslogtreecommitdiff
path: root/fw/fe310/eos
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos')
-rw-r--r--fw/fe310/eos/net/cell.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/fw/fe310/eos/net/cell.c b/fw/fe310/eos/net/cell.c
index b0eb475..b560f52 100644
--- a/fw/fe310/eos/net/cell.c
+++ b/fw/fe310/eos/net/cell.c
@@ -213,9 +213,17 @@ int eos_cell_sms_send(char *num, char *text, unsigned char *buffer, int sync) {
async = !sync;
}
buffer[0] = EOS_CELL_MTYPE_SMS | EOS_CELL_MTYPE_SMS_MSG;
- buffer[1] = (*num == '+' ? EOS_CELL_SMS_ADDRTYPE_INTL : EOS_CELL_SMS_ADDRTYPE_OTHER);
- buffer[2] = num_len;
- len = 3;
+ buffer[1] = 0;
+ buffer[2] = 0;
+ if (*num == '+') {
+ buffer[3] = EOS_CELL_SMS_ADDRTYPE_INTL;
+ num++;
+ num_len--;
+ } else {
+ buffer[3] = EOS_CELL_SMS_ADDRTYPE_OTHER;
+ }
+ buffer[4] = num_len;
+ len = 5;
strcpy(buffer + len, num);
len += num_len;
strcpy(buffer + len, text);