[MM] [PATCH v2] iface-modem: Fix crash in expire_signal_quality due to removed skeleton.
- From: Ben Chan <benchan chromium org>
- To: networkmanager-list gnome org
- Subject: [MM] [PATCH v2] iface-modem: Fix crash in expire_signal_quality due to removed skeleton.
- Date: Wed, 11 Jul 2012 23:02:34 -0700
expire_signal_quality() may be called after the DBus object skeleton is
removed in mm_iface_modem_shutdown() and before
signal_quality_update_context_free() is called due to the destruction of
the modem object. This patch fixes the issue by canceling any pending
invocation of expire_signal_quality() before the skeleton is removed.
---
src/mm-iface-modem.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 49a18a5..7b44d6a 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -3676,6 +3676,14 @@ mm_iface_modem_shutdown (MMIfaceModem *self)
{
g_return_if_fail (MM_IS_IFACE_MODEM (self));
+ /* Remove SignalQualityUpdateContext object to make sure any pending
+ * invocation of expire_signal_quality is canceled before the DBus skeleton
+ * is removed. */
+ if (G_LIKELY (signal_quality_update_context_quark))
+ g_object_set_qdata (G_OBJECT (self),
+ signal_quality_update_context_quark,
+ NULL);
+
/* Remove SIM object */
g_object_set (self,
MM_IFACE_MODEM_SIM, NULL,
--
1.7.7.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]