2007-10-26 Dan Williams <dcbw@redhat.com>

* src/nm-activation-request.c
		- (dispose): clean up indentation; get the right DBusGProxy object to
			cancel the GetSecrets pending call on.  Need to use the Secrets
			proxy, not the regular connection proxy.  Otherwise the GetSecrets
			pending call doesn't get canceled, and pressing Cancel in the
			applet's password dialog could cause get_secrets_cb() to be called
			after the activation request has already been destroyed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3028 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2007-10-27 02:09:27 +00:00
parent 5bb465f845
commit a8decaa768
2 changed files with 25 additions and 13 deletions

View File

@@ -58,24 +58,26 @@ static void
dispose (GObject *object)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
DBusGProxy *proxy;
DBusGProxyCall *call;
if (!priv->connection)
goto out;
if (priv->connection) {
DBusGProxy *proxy;
DBusGProxyCall *call;
proxy = g_object_get_data (G_OBJECT (priv->connection),
NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
call = g_object_get_data (G_OBJECT (priv->connection),
CONNECTION_GET_SECRETS_CALL_TAG);
proxy = g_object_get_data (G_OBJECT (priv->connection),
NM_MANAGER_CONNECTION_PROXY_TAG);
call = g_object_get_data (G_OBJECT (priv->connection),
CONNECTION_GET_SECRETS_CALL_TAG);
if (proxy && call)
dbus_g_proxy_cancel_call (proxy, call);
if (proxy && call)
dbus_g_proxy_cancel_call (proxy, call);
g_object_set_data (G_OBJECT (priv->connection),
CONNECTION_GET_SECRETS_CALL_TAG, NULL);
g_object_unref (priv->connection);
g_object_set_data (G_OBJECT (priv->connection),
CONNECTION_GET_SECRETS_CALL_TAG, NULL);
g_object_unref (priv->connection);
}
out:
G_OBJECT_CLASS (nm_act_request_parent_class)->dispose (object);
}
static void