From 6ac525267be50022ff2116f84363c49c8df6eccf Mon Sep 17 00:00:00 2001 From: Tambet Ingo Date: Wed, 24 Sep 2008 11:45:44 +0000 Subject: [PATCH] 2008-09-24 Tambet Ingo * src/supplicant-manager/nm-supplicant-interface.c (nm_supplicant_interface_disconnect): Don't increment the reference count when disconnecting. The problem is on shutdown, when the replies to these commands do not arrive before NM exits, resulting on never calling supplicant interface's dispose(), which removes the interface from supplicant. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4093 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 9 +++++ .../nm-supplicant-interface.c | 38 +++++-------------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index c96ee60526..5c19340749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-24 Tambet Ingo + + * src/supplicant-manager/nm-supplicant-interface.c + (nm_supplicant_interface_disconnect): Don't increment the reference + count when disconnecting. The problem is on shutdown, when the replies + to these commands do not arrive before NM exits, resulting on never + calling supplicant interface's dispose(), which removes the interface + from supplicant. + 2008-09-24 Tambet Ingo * libnm-glib/nm-vpn-plugin-ui-interface.c: Add type checking to diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 64ef224bb3..4a621200d6 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -902,26 +902,10 @@ disconnect_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) } } -static void -interface_disconnect_done (gpointer data) -{ - NMSupplicantInfo *info = (NMSupplicantInfo *) data; - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); - - if (priv->net_proxy) { - g_object_unref (priv->net_proxy); - priv->net_proxy = NULL; - } - - nm_supplicant_info_destroy (data); -} - void nm_supplicant_interface_disconnect (NMSupplicantInterface * self) { NMSupplicantInterfacePrivate *priv; - NMSupplicantInfo *info; - DBusGProxyCall *call; g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); @@ -951,21 +935,17 @@ nm_supplicant_interface_disconnect (NMSupplicantInterface * self) /* Remove any network that was added by NetworkManager */ if (priv->net_proxy) { - info = nm_supplicant_info_new (self, priv->iface_proxy, priv->other_pcalls); - call = dbus_g_proxy_begin_call (priv->iface_proxy, "removeNetwork", remove_network_cb, - info, - interface_disconnect_done, - DBUS_TYPE_G_OBJECT_PATH, dbus_g_proxy_get_path (priv->net_proxy), - G_TYPE_INVALID); - nm_supplicant_info_set_call (info, call); + dbus_g_proxy_begin_call (priv->iface_proxy, "removeNetwork", remove_network_cb, + NULL, NULL, + DBUS_TYPE_G_OBJECT_PATH, dbus_g_proxy_get_path (priv->net_proxy), + G_TYPE_INVALID); + + g_object_unref (priv->net_proxy); + priv->net_proxy = NULL; } - info = nm_supplicant_info_new (self, priv->iface_proxy, priv->other_pcalls); - call = dbus_g_proxy_begin_call (priv->iface_proxy, "disconnect", disconnect_cb, - info, - nm_supplicant_info_destroy, - G_TYPE_INVALID); - nm_supplicant_info_set_call (info, call); + dbus_g_proxy_begin_call (priv->iface_proxy, "disconnect", disconnect_cb, + NULL, NULL, G_TYPE_INVALID); } static void