summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-01-17 19:34:01 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-01-17 19:34:01 +0100
commit688b094d3c56408fd6d8d202099ada294839b168 (patch)
tree1c3b60cee7e7eed0f5b4a98c713a32fcfbf494b3
parent9d8acbe9e5edbb1fb9bfdbc47d5fda1631578523 (diff)
downloadlibmbim-688b094d3c56408fd6d8d202099ada294839b168.tar.gz
mbim-proxy: block function error signals when checking if device is opened or notaleksander/internal-open-checks
-rw-r--r--src/libmbim-glib/mbim-proxy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
index e1e0db1..fdbc7d9 100644
--- a/src/libmbim-glib/mbim-proxy.c
+++ b/src/libmbim-glib/mbim-proxy.c
@@ -542,6 +542,11 @@ internal_device_open_caps_query_ready (MbimDevice *device,
{
GError *error = NULL;
MbimMessage *response;
+ GList *l;
+
+ /* Always unblock all signals from all clients */
+ for (l = ctx->self->priv->clients; l; l = g_list_next (l))
+ g_signal_handlers_unblock_by_func (device, client_error_cb, l->data);
response = mbim_device_command_finish (device, res, &error);
if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
@@ -592,6 +597,13 @@ internal_device_open (MbimProxy *self,
* (loading caps in this case). */
if (mbim_device_is_open (device)) {
MbimMessage *message;
+ GList *l;
+
+ /* Avoid getting notified of errors in this internal check, as we're
+ * already going to check for the NotOpened error ourselves in the
+ * ready callback, and we'll reopen silently if we find this. */
+ for (l = self->priv->clients; l; l = g_list_next (l))
+ g_signal_handlers_block_by_func (device, client_error_cb, l->data);
g_debug ("checking device caps during client device open...");
message = mbim_message_device_caps_query_new (NULL);