diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-22 13:04:32 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-22 13:56:59 +0100 |
commit | 377691afd431c5cb8994da6e814c083e9e3c180f (patch) | |
tree | 6f08e4d551ef344a738886548b019828ef4e0df9 /src/mm-base-modem.c | |
parent | bf76fcd52627ead57fac6ba64f11b474619bb700 (diff) |
port-qmi: asynchronous close operation always
To be in sync with the qmi_device_close_async() underlying method,
given that the synchronous one is deprecated.
Diffstat (limited to 'src/mm-base-modem.c')
-rw-r--r-- | src/mm-base-modem.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index 81d33038..60ad8b2e 100644 --- a/src/mm-base-modem.c +++ b/src/mm-base-modem.c @@ -1584,6 +1584,14 @@ finalize (GObject *object) G_OBJECT_CLASS (mm_base_modem_parent_class)->finalize (object); } +#if defined WITH_QMI +static void +foreach_port_qmi_close (MMPortQmi *port_qmi) +{ + mm_port_qmi_close (port_qmi, NULL, NULL); +} +#endif + #if defined WITH_MBIM static void foreach_port_mbim_close (MMPortMbim *port_mbim) @@ -1623,7 +1631,7 @@ dispose (GObject *object) * otherwise the allocated CIDs will be kept allocated, and if we end up * allocating too many newer allocations will fail with client-ids-exhausted * errors. */ - g_list_foreach (self->priv->qmi, (GFunc)mm_port_qmi_close, NULL); + g_list_foreach (self->priv->qmi, (GFunc)foreach_port_qmi_close, NULL); g_list_free_full (self->priv->qmi, g_object_unref); self->priv->qmi = NULL; #endif |