From a8decaa768220db733b236e145e1eb8454901eda Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 27 Oct 2007 02:09:27 +0000 Subject: [PATCH] 2007-10-26 Dan Williams * 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 --- ChangeLog | 10 ++++++++++ src/nm-activation-request.c | 28 +++++++++++++++------------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4bf03700..6f429d3f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-10-26 Dan Williams + + * 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 + 2007-10-24 Dan Williams * src/supplicant-manager/nm-supplicant-config.c diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index 91fef415c..d399e222c 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -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