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
This commit is contained in:
Tambet Ingo 2008-09-24 11:45:44 +00:00
parent 66767578e1
commit 6ac525267b
2 changed files with 18 additions and 29 deletions

View file

@ -1,3 +1,12 @@
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

View file

@ -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