summaryrefslogtreecommitdiff
path: root/xmpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp.c')
-rw-r--r--xmpp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmpp.c b/xmpp.c
index c586e8b..240dfc1 100644
--- a/xmpp.c
+++ b/xmpp.c
@@ -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");
+ }
}