summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-06-04 09:35:17 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-06-05 09:10:43 +0200
commit4ca7aa55b88ba2bdfc77259140e229a739a668e1 (patch)
treeba946a2771b80843df9db61512aacfd6373ce0ce
parent998ccfd125ec5afc8aad231440c4ea45ae3c7959 (diff)
libqmi-glib,device: endpoint is cleared when device is closed
#0 qmi_endpoint_is_open (self=0x0) at ../../../libqmi-1.24.8/src/libqmi-glib/qmi-endpoint.c:180 #1 0x00007ffff7caf275 in qmi_device_command_abortable (self=self@entry=0x7fffe8006f00, message=message@entry=0x5555557e7330, message_context=message_context@entry=0x0, timeout=timeout@entry=30, abort_build_request_fn=abort_build_request_fn@entry=0x0, abort_parse_response_fn=abort_parse_response_fn@entry=0x0, abort_user_data=0x0, abort_user_data_free=0x0, cancellable=0x5555557e8a50, callback=0x7ffff7caf620 <transaction_abort_ready>, user_data=0x1120016) at ../../../libqmi-1.24.8/src/libqmi-glib/qmi-device.c:2301 #2 0x00007ffff7caf87b in qmi_device_command_full (self=self@entry=0x7fffe8006f00, message=message@entry=0x5555557e7330, message_context=message_context@entry=0x0, timeout=timeout@entry=30, cancellable=<optimized out>, callback=callback@entry=0x7ffff7caf620 <transaction_abort_ready>, user_data=0x1120016) at ../../../libqmi-1.24.8/src/libqmi-glib/qmi-device.c:2375 #3 0x00007ffff7caf966 in transaction_abort (self=0x7fffe8006f00, tr=tr@entry=0x7fffe0009800, abort_error_take=0x5555557fc3b0) at ../../../libqmi-1.24.8/src/libqmi-glib/qmi-device.c:361 #4 0x00007ffff7cafaf5 in transaction_timed_out (ctx=0x5555557b8690, ctx@entry=<error reading variable: value has been optimized out>) at ../../../libqmi-1.24.8/src/libqmi-glib/qmi-device.c:385 #5 0x00007ffff7809f94 in g_timeout_dispatch (source=0x5555558116b0, callback=<optimized out>, user_data=<optimized out>) at ../glib-2.60.7/glib/gmain.c:4678 #6 0x00007ffff78094ef in g_main_dispatch (context=0x55555570c670) at ../glib-2.60.7/glib/gmain.c:3189 #7 g_main_context_dispatch (context=context@entry=0x55555570c670) at ../glib-2.60.7/glib/gmain.c:3854 #8 0x00007ffff78098c0 in g_main_context_iterate (context=0x55555570c670, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.7/glib/gmain.c:3927 #9 0x00007ffff7809bd3 in g_main_loop_run (loop=0x5555557233e0) at ../glib-2.60.7/glib/gmain.c:4123 #10 0x000055555559bbc0 in main (argc=<optimized out>, argv=<optimized out>) at ../../ModemManager-1.12.8/src/main.c:206 Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/37 (cherry picked from commit ee61c03a76bf390693f04e8a5559c04ad87dac18)
-rw-r--r--src/libqmi-glib/qmi-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libqmi-glib/qmi-device.c b/src/libqmi-glib/qmi-device.c
index 8b1f387..3e1fcba 100644
--- a/src/libqmi-glib/qmi-device.c
+++ b/src/libqmi-glib/qmi-device.c
@@ -2298,7 +2298,7 @@ qmi_device_command_abortable (QmiDevice *self,
tr = transaction_new (self, message, message_context, cancellable, callback, user_data);
/* Device must be open */
- if (!qmi_endpoint_is_open (self->priv->endpoint)) {
+ if (!qmi_device_is_open (self)) {
error = g_error_new (QMI_CORE_ERROR,
QMI_CORE_ERROR_WRONG_STATE,
"Device must be open to send commands");