g_slice_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,
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
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;
}
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;
}