projects
/
project
/
uqmi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7970eb
)
add detection for the class field in the TP-DCS octet
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 18 Feb 2013 22:57:37 +0000
(23:57 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 18 Feb 2013 22:57:37 +0000
(23:57 +0100)
commands-wms.c
patch
|
blob
|
history
diff --git
a/commands-wms.c
b/commands-wms.c
index
9e28f65
..
296f5fb
100644
(file)
--- a/
commands-wms.c
+++ b/
commands-wms.c
@@
-156,7
+156,7
@@
static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req,
char *str;
int i, cur_len;
bool sent;
char *str;
int i, cur_len;
bool sent;
- unsigned char first;
+ unsigned char first
, dcs
;
qmi_parse_wms_raw_read_response(msg, &res);
data = (unsigned char *) res.data.raw_message_data.raw_data;
qmi_parse_wms_raw_read_response(msg, &res);
data = (unsigned char *) res.data.raw_message_data.raw_data;
@@
-197,9
+197,15
@@
static void cmd_wms_get_message_cb(struct qmi_dev *qmi, struct qmi_request *req,
return;
/* Data Encoding */
return;
/* Data Encoding */
- if (*(data++) != 0)
+ dcs = *(data++);
+
+ /* only 7-bit encoding supported for now */
+ if (dcs & 0x0c)
return;
return;
+ if (dcs & 0x10)
+ blobmsg_add_u32(&status, "class", (dcs & 3));
+
if (sent) {
/* Message validity */
data++;
if (sent) {
/* Message validity */
data++;