diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-08 13:46:15 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-05-09 10:52:46 +0200 |
commit | 0c9211b0c58220c5a78e372ff734bd583eab4cc9 (patch) | |
tree | 4349a9301ccf228caef6a90cb30c602bdce94496 | |
parent | 5093f3a167c74273a81da4adbcf298c4f5af4e02 (diff) |
libqmi-glib,proxy: forward broadcast messages to all clients of the service
Reported by Eric Caruso <ejcaruso@chromium.org>
https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/merge_requests/116#note_492339
(cherry picked from commit 088997b6e407f539f1e1ba6afb7ffa62f83c8958)
-rw-r--r-- | src/libqmi-glib/qmi-proxy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libqmi-glib/qmi-proxy.c b/src/libqmi-glib/qmi-proxy.c index d81dd51..11801a0 100644 --- a/src/libqmi-glib/qmi-proxy.c +++ b/src/libqmi-glib/qmi-proxy.c @@ -306,8 +306,10 @@ indication_cb (QmiDevice *device, QmiClientInfo *info; info = &g_array_index (client->qmi_client_info_array, QmiClientInfo, i); + /* If service and CID match; or if service and broadcast, forward to - * the remote client */ + * the remote client. This message may therefore be forwarded to multiple + * clients, all that match the conditions. */ if ((qmi_message_get_service (message) == info->service) && (qmi_message_get_client_id (message) == info->cid || qmi_message_get_client_id (message) == QMI_CID_BROADCAST)) { @@ -317,9 +319,6 @@ indication_cb (QmiDevice *device, g_warning ("couldn't forward indication to client: %s", error->message); g_error_free (error); } - - /* Avoid forwarding broadcast messages multiple times */ - break; } } } |