diff options
author | Uros Majstorovic <majstor@majstor.org> | 2023-04-21 21:18:57 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2023-04-21 21:18:57 +0200 |
commit | 34f60314bedce036f982aa6591b5473ea4b0fa8b (patch) | |
tree | 9a779a703c7c8a2d4905bd0a7c06cb1ec36c9fb5 /fw/fe310/eos/net | |
parent | 9cb8a37e71945800da5aa6fc05a9a32dc7bd0b69 (diff) |
fixed SMS app
Diffstat (limited to 'fw/fe310/eos/net')
-rw-r--r-- | fw/fe310/eos/net/cell.c | 14 |
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); |