summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-06 13:14:29 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-06 15:47:47 +0100
commitc5ef21c08359eb9cc7e03d2ae8ec852e717deac7 (patch)
tree884cf7788a57f0dadbff71950dc9063fb762b5d2 /examples
parentc4ac0a8300be1e5770c49feb57f977feaad4a58d (diff)
downloadtelepathy-glib-c5ef21c08359eb9cc7e03d2ae8ec852e717deac7.tar.gz
tube offering examples: don't dump core on invalid arguments
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54061 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Diffstat (limited to 'examples')
-rw-r--r--examples/client/dbus-tubes/offerer.c5
-rw-r--r--examples/client/stream-tubes/offerer.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/examples/client/dbus-tubes/offerer.c b/examples/client/dbus-tubes/offerer.c
index 9ff053fad..70d9103d2 100644
--- a/examples/client/dbus-tubes/offerer.c
+++ b/examples/client/dbus-tubes/offerer.c
@@ -191,7 +191,10 @@ main (int argc,
g_type_init ();
if (argc != 3)
- g_error ("Usage: offerer gabble/jabber/ladygaga t-pain@example.com");
+ {
+ g_printerr ("Usage: offerer gabble/jabber/ladygaga t-pain@example.com\n");
+ return 2;
+ }
factory = TP_SIMPLE_CLIENT_FACTORY (tp_automatic_client_factory_new (NULL));
diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c
index 85e14a7b6..d6361b078 100644
--- a/examples/client/stream-tubes/offerer.c
+++ b/examples/client/stream-tubes/offerer.c
@@ -140,7 +140,11 @@ main (int argc,
TpAccountChannelRequest *req;
GHashTable *request;
- g_assert (argc == 3);
+ if (argc != 3)
+ {
+ g_printerr ("Usage: offerer gabble/jabber/ladygaga t-pain@example.com\n");
+ return 2;
+ }
g_type_init ();