aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-port-mbim.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c
index dbc70fef..51f6fb7a 100644
--- a/src/mm-port-mbim.c
+++ b/src/mm-port-mbim.c
@@ -424,6 +424,20 @@ mm_port_mbim_close (MMPortMbim *self,
#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED
if (self->priv->qmi_device) {
GError *error = NULL;
+ GList *l;
+
+ /* Release all allocated clients */
+ for (l = self->priv->qmi_clients; l; l = g_list_next (l)) {
+ QmiClient *qmi_client = QMI_CLIENT (l->data);
+
+ mm_dbg ("Releasing client for service '%s'...", qmi_service_get_string (qmi_client_get_service (qmi_client)));
+ qmi_device_release_client (self->priv->qmi_device,
+ qmi_client,
+ QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID,
+ 3, NULL, NULL, NULL);
+ }
+ g_list_free_full (self->priv->qmi_clients, g_object_unref);
+ self->priv->qmi_clients = NULL;
if (!qmi_device_close (self->priv->qmi_device, &error)) {
mm_warn ("Couldn't properly close QMI device: %s", error->message);