[OpenWrt-Devel] [PATCH uqmi] Fix improper characters after reading Escape code for switching extension table in SMS

Sławomir Demeszko s.demeszko at wireless-instruments.com
Wed Dec 17 11:14:53 EST 2014


Escape code 0x1b is a prefix indicating that next character should be
represented from extension table, but it only applies to one character,
so switching it off is needed to read further characters correctly.

Signed-off-by: Sławomir Demeszko <s.demeszko at wireless-instruments.com>
---
 commands-wms.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/commands-wms.c b/commands-wms.c
index 6ac52eb..b85cd70 100644
--- a/commands-wms.c
+++ b/commands-wms.c
@@ -70,6 +70,7 @@ pdu_decode_7bit_char(char *dest, int len, unsigned char c, bool *escape)
 	fprintf(stderr, " %02x", c);
 	dest += len;
 	if (*escape) {
+		*escape = false;
 		switch(c) {
 		case 0x0A:
 			*dest = 0x0C;
-- 
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