aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mm-iface-modem-3gpp.c8
-rw-r--r--src/mm-iface-modem-cdma.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index a2bbf20d..feb798c4 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -1868,6 +1868,14 @@ mm_iface_modem_3gpp_shutdown (MMIfaceModem3gpp *self)
{
g_return_if_fail (MM_IS_IFACE_MODEM_3GPP (self));
+ /* Remove RegistrationCheckContext object to make sure any pending
+ * invocation of periodic_registration_check is cancelled before the
+ * DBus skeleton is removed. */
+ if (G_LIKELY (registration_check_context_quark))
+ g_object_set_qdata (G_OBJECT (self),
+ registration_check_context_quark,
+ NULL);
+
/* Unexport DBus interface and remove the skeleton */
mm_gdbus_object_skeleton_set_modem3gpp (MM_GDBUS_OBJECT_SKELETON (self), NULL);
g_object_set (self,
diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c
index 57914df1..c09905b1 100644
--- a/src/mm-iface-modem-cdma.c
+++ b/src/mm-iface-modem-cdma.c
@@ -1551,6 +1551,14 @@ mm_iface_modem_cdma_shutdown (MMIfaceModemCdma *self)
{
g_return_if_fail (MM_IS_IFACE_MODEM_CDMA (self));
+ /* Remove RegistrationCheckContext object to make sure any pending
+ * invocation of periodic_registration_check is cancelled before the
+ * DBus skeleton is removed. */
+ if (G_LIKELY (registration_check_context_quark))
+ g_object_set_qdata (G_OBJECT (self),
+ registration_check_context_quark,
+ NULL);
+
/* Unexport DBus interface and remove the skeleton */
mm_gdbus_object_skeleton_set_modem_cdma (MM_GDBUS_OBJECT_SKELETON (self), NULL);
g_object_set (self,