[PATCH v2] mbim-proxy: Don't enable all the CID's in global device service subscribe list.

Roshan Pius rpius at chromium.org
Fri Feb 6 14:33:22 PST 2015


Since we're enabling all the CID's in the global device service
subscribe list during init, any new clients connecting to the proxy and
requesting a change in the device subscribe list doesn't take effect
since all the CID's are always enabled. This results in mbim-proxy
never sending the device-service-subscribe set command to the device
after bootup.

Change-Id: I028ba5f8d6801374022a5c93d985e59fbc3ad93a
---
 src/libmbim-glib/mbim-proxy.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
index fdbc7d9..892e980 100644
--- a/src/libmbim-glib/mbim-proxy.c
+++ b/src/libmbim-glib/mbim-proxy.c
@@ -853,16 +853,11 @@ merge_client_service_subscribe_lists (MbimProxy *self,
                                       gsize     *out_size)
 {
     GList *l;
-    MbimEventEntry **updated;
+    MbimEventEntry **updated = NULL;
     gsize updated_size = 0;
 
     g_assert (out_size != NULL);
 
-    /* Add previous global list */
-    updated = _mbim_proxy_helper_service_subscribe_list_merge (NULL, 0,
-                                                               self->priv->mbim_event_entry_array, self->priv->mbim_event_entry_array_size,
-                                                               &updated_size);
-
     for (l = self->priv->clients; l; l = g_list_next (l)) {
         Client *client;
 
@@ -1362,8 +1357,9 @@ mbim_proxy_init (MbimProxy *self)
                                               MBIM_TYPE_PROXY,
                                               MbimProxyPrivate);
 
-    /* By default, we assume we have all default services enabled */
-    self->priv->mbim_event_entry_array = _mbim_proxy_helper_service_subscribe_standard_list_new (&self->priv->mbim_event_entry_array_size);
+    /* By default, all services are disabled untill a client makes a service-subscribe request */
+    self->priv->mbim_event_entry_array = NULL;
+    self->priv->mbim_event_entry_array_size = 0;
 }
 
 static void
-- 
2.2.0.rc0.207.ga3a616c



More information about the libmbim-devel mailing list