summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-09-04 15:28:29 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-09-04 15:28:29 +0200
commita5379fbbd397f6d0d9d585efb34a65629440f41b (patch)
tree01a0dfb456ebff100c39907d4db8d2ab330c38a8
parent9495539021fc0e4bc80cc9ae28bd7b8980bff393 (diff)
mbim-proxy: if client subscribes using wildcard, don't match cid
Patch by Michael O'Dwyer. https://gitlab.freedesktop.org/mobile-broadband/libmbim/issues/5
-rw-r--r--src/libmbim-glib/mbim-proxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
index 06e65f2..79d059a 100644
--- a/src/libmbim-glib/mbim-proxy.c
+++ b/src/libmbim-glib/mbim-proxy.c
@@ -295,6 +295,12 @@ client_indication_cb (MbimDevice *device,
if (!entry)
return;
+ /* if client subscribed using the wildcard, no need to match specific cid */
+ if (entry->cids_count == 0) {
+ forward_indication (client, message);
+ return;
+ }
+
/* Look for the specific cid in the event list */
for (i = 0; i < entry->cids_count; i++) {
if (mbim_message_indicate_status_get_cid (message) == entry->cids[i]) {