SCTP: Provide more info on getaddrinfo() fail
Upon failure, the error message was saying that something failed (i.e., the reason), but not parameters of the getaddrinfo(). Simplify root cause analysis by providing the parameters for the attempted getaddrinfo() call.
This commit is contained in:
@@ -464,7 +464,7 @@ static void sctp_handle_new_association_req(const instance_t instance,
|
||||
char port[12];
|
||||
snprintf(port, sizeof(port), "%d", req->port);
|
||||
int status = getaddrinfo(remote, port, &hints, &serv);
|
||||
AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status));
|
||||
AssertFatal(status == 0, "getaddrinfo(node %s service %s) failed: %s\n", remote, port, gai_strerror(status));
|
||||
|
||||
struct addrinfo *p = NULL;
|
||||
for (p = serv; p != NULL; p = p->ai_next) {
|
||||
|
||||
Reference in New Issue
Block a user