aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-uoa-auth-handler.c
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-08-23 21:02:10 +0800
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-08-27 21:47:21 +0800
commit26aa1b3654cab66d91e0ada194be547e790a847b (patch)
tree5e6070e97821d7ce49e42361925b93701ec89177 /libempathy/empathy-uoa-auth-handler.c
parentfb84a9d544c27f11c3c91efdad8adc4096471a79 (diff)
downloadgsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar.gz
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar.bz2
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar.lz
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar.xz
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.tar.zst
gsoc2013-empathy-26aa1b3654cab66d91e0ada194be547e790a847b.zip
UOA auth: Wait for callback when requesting password
signon_auth_session_process() does not keep its own ref on the session object, so freeing the AuthContext before callback cancels the call. https://bugzilla.gnome.org/show_bug.cgi?id=680776
Diffstat (limited to 'libempathy/empathy-uoa-auth-handler.c')
-rw-r--r--libempathy/empathy-uoa-auth-handler.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/libempathy/empathy-uoa-auth-handler.c b/libempathy/empathy-uoa-auth-handler.c
index ee377349d..16d664fb6 100644
--- a/libempathy/empathy-uoa-auth-handler.c
+++ b/libempathy/empathy-uoa-auth-handler.c
@@ -139,6 +139,23 @@ auth_context_done (AuthContext *ctx)
}
static void
+request_password_session_process_cb (SignonAuthSession *session,
+ GHashTable *session_data,
+ const GError *error,
+ gpointer user_data)
+{
+ AuthContext *ctx = user_data;
+
+ if (error != NULL)
+ {
+ DEBUG ("Error processing the session to request user's attention: %s",
+ error->message);
+ }
+
+ auth_context_done (ctx);
+}
+
+static void
auth_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
@@ -166,16 +183,15 @@ auth_cb (GObject *source,
signon_auth_session_process (ctx->session,
ag_auth_data_get_parameters (ctx->auth_data),
ag_auth_data_get_mechanism (ctx->auth_data),
- NULL, NULL);
+ request_password_session_process_cb, ctx);
g_hash_table_unref (extra_params);
}
else
{
DEBUG ("Auth on %s suceeded", tp_proxy_get_object_path (channel));
+ auth_context_done (ctx);
}
-
- auth_context_done (ctx);
}
static void