diff options
Diffstat (limited to 'xmpp.c')
-rw-r--r-- | xmpp.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -115,5 +115,13 @@ void xmpp_connect(void) char *domain = get_domainpart(jid); printf("Domainpart is '%s'.\n", domain); - get_addrinfo(domain); + struct addrinfo *addr = get_addrinfo(domain); + + int sock = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol); + if (sock == -1) { + printf("Failed to get socket from OS!."); + return; + } else { + printf("Got socket number %d from OS.\n", sock); + } } |