diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2023-01-10 12:23:22 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2023-01-10 12:31:11 +0000 |
commit | 8b8ee0acfe4f74714ab21c31edc590f4d2c9aa6f (patch) | |
tree | ee76b5d0d9bfd954f525211ee17f31a90c936699 | |
parent | 871a073c5374d54a6c6d4e5c297c2ce18af37b39 (diff) | |
download | libqmi-8b8ee0acfe4f74714ab21c31edc590f4d2c9aa6f.tar.gz |
libqmi-glib,device: schedule indications with G_PRIORITY_DEFAULT
The response processing operations are scheduled by
g_simple_async_result_complete_in_idle(), which creates an idle source
with G_PRIORITY_DEFAULT priority.
We should schedule the indications with the same priority (instead of
the default G_PRIORITY_DEFAULT_IDLE) so that the processing of
indications and responses are ordered corectly.
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/951
-rw-r--r-- | src/libqmi-glib/qmi-device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libqmi-glib/qmi-device.c b/src/libqmi-glib/qmi-device.c index 69a9b448..01e7ba13 100644 --- a/src/libqmi-glib/qmi-device.c +++ b/src/libqmi-glib/qmi-device.c @@ -1659,6 +1659,7 @@ report_indication (QmiClient *client, ctx->message = qmi_message_ref (message); source = g_idle_source_new (); + g_source_set_priority (source, G_PRIORITY_DEFAULT); g_source_set_callback (source, (GSourceFunc)process_indication_idle, ctx, NULL); g_source_attach (source, g_main_context_get_thread_default ()); g_source_unref (source); |