Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
* be a bit more verbose on `getaddrinfo()` error
* fix missing space

Signed-off-by: Steffen Jaeckel <[email protected]>
  • Loading branch information
sjaeckel committed May 23, 2024
1 parent 4ec4f09 commit 5dd9e4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ static void sock_getaddrinfo(xmpp_sock_t *xsock)
rc = getaddrinfo(xsock->srv_rr_cur->target, service, &hints,
&xsock->ainfo_list);
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);
xsock->ainfo_list = NULL;
}
Expand Down Expand Up @@ -236,7 +237,7 @@ sock_t sock_connect(xmpp_sock_t *xsock)
if (rc != 0) {
strophe_debug(xsock->ctx, "sock",
"User's setsockopt callback"
"failed with %d (errno=%d)",
" failed with %d (errno=%d)",
rc, errno);
}
}
Expand Down

0 comments on commit 5dd9e4b

Please sign in to comment.