summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTambet Ingo <tambet@gmail.com>2008-09-24 11:45:44 +0000
committerTambet Ingo <tambet@gmail.com>2008-09-24 11:45:44 +0000
commit6ac525267be50022ff2116f84363c49c8df6eccf (patch)
treef4869e9fb1bf8e2cf14b94665b213278c6fa8c9f
parent66767578e16cb966d9ea473d1ec3b9360120a198 (diff)
2008-09-24 Tambet Ingo <tambet@gmail.com>
* 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
-rw-r--r--ChangeLog9
-rw-r--r--src/supplicant-manager/nm-supplicant-interface.c38
2 files changed, 18 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index c96ee60526..5c19340749 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2008-09-24 Tambet Ingo <tambet@gmail.com>
+ * 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 <tambet@gmail.com>
+
* libnm-glib/nm-vpn-plugin-ui-interface.c: Add type checking to
all the public function arguments.
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