summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2023-12-04 11:52:30 +0000
committerAleksander Morgado <aleksander@aleksander.es>2023-12-04 12:35:57 +0000
commitda129826d2ae9e9a7746d1e637905012002bcf77 (patch)
tree4a99d7f38637766a168a77916e4a38dba726d8ed
parentc445aee9e5f97eab235f2a54b106bd00ff416ca1 (diff)
libmbim-glib,proxy: no need to block MBIM_DEVICE_SIGNAL_ERROR during open
If the proxy is checking whether a given device is really open or not, it sends a caps query request, which may be replied with a FUNCTION_ERROR stating that the device is not open. If this happens, the proxy will explicitly force close the device, and try to reopen it again. The MBIM_DEVICE_SIGNAL_ERROR is always scheduled to be emitted after the response processor has been executed. In the case of the proxy, the response processor force-closes the MBIM device, which in turn would cancel any scheduled MBIM_DEVICE_SIGNAL_ERROR emission. There is really no need to block MBIM_DEVICE_SIGNAL_ERROR any more due to this.
-rw-r--r--src/libmbim-glib/mbim-proxy.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
index e9ff36a..e3304ef 100644
--- a/src/libmbim-glib/mbim-proxy.c
+++ b/src/libmbim-glib/mbim-proxy.c
@@ -503,10 +503,6 @@ internal_open (GTask *task)
g_object_ref (self));
}
-static void proxy_device_error_cb (MbimDevice *device,
- GError *error,
- MbimProxy *self);
-
static void
internal_device_open_caps_query_ready (MbimDevice *device,
GAsyncResult *res,
@@ -518,9 +514,6 @@ internal_device_open_caps_query_ready (MbimDevice *device,
self = g_task_get_source_object (task);
- /* Always unblock error signals */
- g_signal_handlers_unblock_by_func (device, proxy_device_error_cb, self);
-
response = mbim_device_command_finish (device, res, &error);
if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
/* If we get a not-opened error, well, force closing right away and reopen */
@@ -567,11 +560,6 @@ internal_device_open (MbimProxy *self,
if (mbim_device_is_open (device)) {
MbimMessage *message;
- /* 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. */
- g_signal_handlers_block_by_func (device, proxy_device_error_cb, self);
-
g_debug ("[%s] checking device caps during client device open...",
mbim_device_get_path (device));
message = mbim_message_device_caps_query_new (NULL);