summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSławomir Demeszko <s.demeszko@wireless-instruments.com>2014-12-18 16:12:15 +0100
committerFelix Fietkau <nbd@openwrt.org>2014-12-22 21:44:14 +0100
commit320675a242ace4bc8a4aa33fe0d5ae360119e476 (patch)
tree8080ee6f7cfae29b69c7ad44d22b8b0b737b78ea
parentdc1dfedccc6cfa0205feecdbb5eb2c51d9aa3a4d (diff)
Fix encoding phone number on sending sms
Return proper length of encoded phone number with odd count of digits, without this patch number is encoded in memory but length returned by function is not incremented and sms cannot be send. Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
-rw-r--r--commands-wms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands-wms.c b/commands-wms.c
index 345b812..e3bcbc8 100644
--- a/commands-wms.c
+++ b/commands-wms.c
@@ -512,7 +512,7 @@ pdu_encode_semioctet(unsigned char *dest, const char *str)
str++;
}
- return len;
+ return lower ? len : (len + 1);
}
static int