summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-27 14:22:30 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-27 14:22:30 +0200
commit30238cbff3d72df95ff422ed2fcb48f68f2be3cc (patch)
tree5307921a8a72e0a4a7597b8463000166cc6a0aba
parentb7724f8f803b646d60054cad42e61589505817d0 (diff)
downloadcmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.tar.gz
cmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.tar.bz2
cmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.zip
Check for errors when connecting
-rw-r--r--src/cmumble.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmumble.c b/src/cmumble.c
index 1fa23ca..5824807 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -563,6 +563,11 @@ int main(int argc, char **argv)
ctx.conn = g_socket_client_connect_to_host(ctx.sock_client,
host, port, NULL, &error);
+ if (error) {
+ g_printerr("connect failed: %s\n", error->message);
+ return 1;
+ }
+
g_object_get(G_OBJECT(ctx.conn), "base-io-stream", &ctx.iostream, NULL);
{