Improve error messages
* be a bit more verbose on `getaddrinfo()` error * fix missing space Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -123,7 +123,8 @@ static void sock_getaddrinfo(xmpp_sock_t *xsock)
|
|||||||
rc = getaddrinfo(xsock->srv_rr_cur->target, service, &hints,
|
rc = getaddrinfo(xsock->srv_rr_cur->target, service, &hints,
|
||||||
&xsock->ainfo_list);
|
&xsock->ainfo_list);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
strophe_debug(xsock->ctx, "sock", "getaddrinfo() failed with %d",
|
strophe_debug(xsock->ctx, "sock",
|
||||||
|
"getaddrinfo() failed with %s (%d)", gai_strerror(rc),
|
||||||
rc);
|
rc);
|
||||||
xsock->ainfo_list = NULL;
|
xsock->ainfo_list = NULL;
|
||||||
}
|
}
|
||||||
@@ -236,7 +237,7 @@ sock_t sock_connect(xmpp_sock_t *xsock)
|
|||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
strophe_debug(xsock->ctx, "sock",
|
strophe_debug(xsock->ctx, "sock",
|
||||||
"User's setsockopt callback"
|
"User's setsockopt callback"
|
||||||
"failed with %d (errno=%d)",
|
" failed with %d (errno=%d)",
|
||||||
rc, errno);
|
rc, errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user