aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-08-23 21:01:16 +0800
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-08-27 21:47:21 +0800
commit9ce89862ae5bead69519f3238794ffbf3988dcf9 (patch)
tree3ca80ff02c5100a3a888e76446fce71fbb5afd2e
parentc8a0a072d122b86306e47044bf36553c74baf9df (diff)
downloadgsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar.gz
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar.bz2
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar.lz
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar.xz
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.tar.zst
gsoc2013-empathy-9ce89862ae5bead69519f3238794ffbf3988dcf9.zip
UOA auth: factor out auth_context_done()
https://bugzilla.gnome.org/show_bug.cgi?id=680776
-rw-r--r--libempathy/empathy-uoa-auth-handler.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libempathy/empathy-uoa-auth-handler.c b/libempathy/empathy-uoa-auth-handler.c
index 7ef435f85..f88acf120 100644
--- a/libempathy/empathy-uoa-auth-handler.c
+++ b/libempathy/empathy-uoa-auth-handler.c
@@ -117,6 +117,13 @@ auth_context_free (AuthContext *ctx)
}
static void
+auth_context_done (AuthContext *ctx)
+{
+ tp_channel_close_async (ctx->channel, NULL, NULL);
+ auth_context_free (ctx);
+}
+
+static void
auth_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
@@ -153,8 +160,7 @@ auth_cb (GObject *source,
DEBUG ("Auth on %s suceeded", tp_proxy_get_object_path (channel));
}
- tp_channel_close_async (channel, NULL, NULL);
- auth_context_free (ctx);
+ auth_context_done (ctx);
}
static void
@@ -170,8 +176,7 @@ session_process_cb (SignonAuthSession *session,
if (error != NULL)
{
DEBUG ("Error processing the session: %s", error->message);
- tp_channel_close_async (ctx->channel, NULL, NULL);
- auth_context_free (ctx);
+ auth_context_done (ctx);
return;
}
@@ -215,8 +220,7 @@ identity_query_info_cb (SignonIdentity *identity,
if (error != NULL)
{
DEBUG ("Error querying info from identity: %s", error->message);
- tp_channel_close_async (ctx->channel, NULL, NULL);
- auth_context_free (ctx);
+ auth_context_done (ctx);
return;
}