From e793e4e6d8a4db844ffb138cd72eff1185c5fec2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 22 Jan 2020 13:06:31 +0100 Subject: base-modem: fix list iteration closing MBIM ports The mm_port_mbim_close() operation needs 3 arguments explicitly, so make sure we provide the two additional ones as NULL. --- src/mm-base-modem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index 2b96f1a6..81d33038 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_MBIM +static void +foreach_port_mbim_close (MMPortMbim *port_mbim) +{ + mm_port_mbim_close (port_mbim, NULL, NULL); +} +#endif + static void dispose (GObject *object) { @@ -1621,7 +1629,7 @@ dispose (GObject *object) #endif #if defined WITH_MBIM /* We need to close the MBIM port cleanly when disposing the modem object */ - g_list_foreach (self->priv->mbim, (GFunc)mm_port_mbim_close, NULL); + g_list_foreach (self->priv->mbim, (GFunc)foreach_port_mbim_close, NULL); g_list_free_full (self->priv->mbim, g_object_unref); self->priv->mbim = NULL; #endif -- cgit v1.2.3-70-g09d2