[OpenWrt-Devel] [PATCH uqmi] Fix encoding phone number on sending sms

Sławomir Demeszko s.demeszko at wireless-instruments.com
Thu Dec 18 10:12:15 EST 2014


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 at wireless-instruments.com>
---
 commands-wms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands-wms.c b/commands-wms.c
index b85cd70..02874f0 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
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list