summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-04-10 10:03:05 -0500
committerDan Williams <dcbw@redhat.com>2013-04-10 10:06:38 -0500
commitcaed13b3ef6e1962e6386905f59a81d5666b8941 (patch)
treedea32e15c952e4b3f574ea6e757565098126d03c
parentb405677a7e7ba82e892de228c5ca329ad2e3ad3e (diff)
downloadNetworkManager-caed13b3ef6e1962e6386905f59a81d5666b8941.tar.gz
mobile: only clear dbus manager on quit
The private reference to the NMDBusManager is created at NMModemManager init time, and should only be cleared when the NMModemManager is disposed. Instead it was getting cleared whenever ModemManager1 was seen on the bus, and thus was unavailable later when it was required to watch for the old ModemManager. This caused NetworkManager to print warnings about NULL object access to the console, and could prevent it from noticing when ModemManager appeared on the system bus.
-rw-r--r--src/modem-manager/nm-modem-manager.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c
index ba038d3533..dd01646eea 100644
--- a/src/modem-manager/nm-modem-manager.c
+++ b/src/modem-manager/nm-modem-manager.c
@@ -102,11 +102,6 @@ clear_modem_manager_support (NMModemManager *self)
g_object_unref (self->priv->proxy);
self->priv->proxy = NULL;
}
-
- if (self->priv->dbus_mgr) {
- g_object_unref (self->priv->dbus_mgr);
- self->priv->dbus_mgr = NULL;
- }
}
static gboolean
@@ -808,6 +803,11 @@ dispose (GObject *object)
g_hash_table_destroy (self->priv->modems);
}
+ if (self->priv->dbus_mgr) {
+ g_object_unref (self->priv->dbus_mgr);
+ self->priv->dbus_mgr = NULL;
+ }
+
/* Chain up to the parent class */
G_OBJECT_CLASS (nm_modem_manager_parent_class)->dispose (object);
}