aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-13 09:09:15 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-13 09:09:15 +0200
commit209f4d4420d531cf56fa7691977869bdd02a2d15 (patch)
tree1c4dea767281d1d5022c44a82727a329b036a773
parent9ddcf92a18f94e4d4e38c2807311ad8518b5e9a7 (diff)
iface-modem-[3gpp|cdma]: remove contexts with timeouts when shutting down
Following the same logic as in commit 9ddcf92a, those contexts in the interface which contain the setup of a timeout are cleared before removing the DBus skeleton objects, so that we make sure they are not fired out once these have been disposed.
-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,