summaryrefslogtreecommitdiff
path: root/examples/client
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-07 14:21:13 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-28 10:15:26 +0200
commit4a6034b7f6cb2fcaba7885c0ae9968681da5b55c (patch)
tree31dc1fb1bfbcd2932c432eb70ce6ea59600f3c5f /examples/client
parent98b3f3e63c2ecf10f3b7d7ac5d90d56e58b055df (diff)
offerer: display error if something went wrong
Diffstat (limited to 'examples/client')
-rw-r--r--examples/client/stream-tubes/offerer.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c
index 04a519f05..e2450e222 100644
--- a/examples/client/stream-tubes/offerer.c
+++ b/examples/client/stream-tubes/offerer.c
@@ -44,8 +44,13 @@ _tube_offered (GObject *tube,
{
GError *error = NULL;
- tp_stream_tube_offer_finish (TP_STREAM_TUBE (tube), res, &error);
- g_assert_no_error (error);
+ if (!tp_stream_tube_offer_finish (TP_STREAM_TUBE (tube), res, &error))
+ {
+ g_debug ("Failed to offer tube: %s", error->message);
+
+ g_error_free (error);
+ return;
+ }
g_debug ("Tube offered");
}
@@ -61,7 +66,13 @@ _channel_created (GObject *source,
channel = tp_account_channel_request_create_and_handle_channel_finish (
TP_ACCOUNT_CHANNEL_REQUEST (source), result, NULL, &error);
- g_assert_no_error (error);
+ if (channel == NULL)
+ {
+ g_debug ("Failed to create channel: %s", error->message);
+
+ g_error_free (error);
+ return;
+ }
g_debug ("Channel created: %s", tp_proxy_get_object_path (channel));