summaryrefslogtreecommitdiff
path: root/telepathy-farstream
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-12-07 18:06:53 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-12-07 18:06:56 +0000
commit30a272d6b04de58b21af1999f251c1338cacb25e (patch)
tree0bdc423dd55c367225bafc913d642a36f6c43bc2 /telepathy-farstream
parentee1affb1828c3de3bf807ac73a13bb8ddd9154ca (diff)
downloadtelepathy-farstream-30a272d6b04de58b21af1999f251c1338cacb25e.tar.gz
Actually complete the async init operation on success
On error and normal finishing of the async operation the same operations need to happen, so no need to duplicate the code. As a side-effect this cause the async operation to actually finish in the success cases.
Diffstat (limited to 'telepathy-farstream')
-rw-r--r--telepathy-farstream/call-channel.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/telepathy-farstream/call-channel.c b/telepathy-farstream/call-channel.c
index 8d1de5d..cb66b90 100644
--- a/telepathy-farstream/call-channel.c
+++ b/telepathy-farstream/call-channel.c
@@ -413,7 +413,7 @@ channel_prepared (GObject *proxy, GAsyncResult *prepare_res, gpointer user_data)
g_warning ("Preparing the channel: %s",
error->message);
g_simple_async_result_take_error (res, error);
- goto error;
+ goto out;
}
if (tp_call_channel_has_hardware_streaming (TP_CALL_CHANNEL (proxy)))
@@ -422,7 +422,7 @@ channel_prepared (GObject *proxy, GAsyncResult *prepare_res, gpointer user_data)
g_simple_async_result_set_error (res, TP_ERROR, TP_ERROR_NOT_CAPABLE,
"This channel does hardware streaming, not handled here");
- goto error;
+ goto out;
}
contents = tp_call_channel_get_contents (TP_CALL_CHANNEL (proxy));
@@ -435,11 +435,7 @@ channel_prepared (GObject *proxy, GAsyncResult *prepare_res, gpointer user_data)
g_simple_async_result_set_op_res_gboolean (res, TRUE);
- g_object_unref (self);
-
- return;
-
-error:
+out:
g_simple_async_result_complete (res);
g_object_unref (res);
g_object_unref (self);