From 320675a242ace4bc8a4aa33fe0d5ae360119e476 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C5=82awomir=20Demeszko?= Date: Thu, 18 Dec 2014 16:12:15 +0100 Subject: [PATCH] Fix encoding phone number on sending sms MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- commands-wms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.0