diff options
Diffstat (limited to 'xmpp.c')
-rw-r--r-- | xmpp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -124,4 +124,11 @@ void xmpp_connect(void) } else { printf("Got socket number %d from OS.\n", sock); } + + if (connect(sock, addr->ai_addr, addr->ai_addrlen) == -1) { + printf("Failed to connect!\n"); + return; + } else { + printf("Successfully connected.\n"); + } } |