diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-05-27 14:22:30 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-05-27 14:22:30 +0200 |
commit | 30238cbff3d72df95ff422ed2fcb48f68f2be3cc (patch) | |
tree | 5307921a8a72e0a4a7597b8463000166cc6a0aba | |
parent | b7724f8f803b646d60054cad42e61589505817d0 (diff) | |
download | cmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.tar.gz cmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.tar.bz2 cmumble-30238cbff3d72df95ff422ed2fcb48f68f2be3cc.zip |
Check for errors when connecting
-rw-r--r-- | src/cmumble.c | 5 |
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); { |