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.
This commit is contained in:
Aleksander Morgado
2012-07-13 09:09:15 +02:00
parent 9ddcf92a18
commit 209f4d4420
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -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,
+8
View File
@@ -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,