Use the correct hostname in error message
Previously, the remote host to which catgirl(1) is connecting was used in error reporting instead of the local bind address if the latter could not be resolved.
Tento commit je obsažen v:
rodič
6be9aa9901
revize
460207440b
2
irc.c
2
irc.c
@ -111,7 +111,7 @@ int ircConnect(const char *bindHost, const char *host, const char *port) {
|
|||||||
|
|
||||||
if (bindHost) {
|
if (bindHost) {
|
||||||
error = getaddrinfo(bindHost, NULL, &hints, &head);
|
error = getaddrinfo(bindHost, NULL, &hints, &head);
|
||||||
if (error) errx(EX_NOHOST, "%s: %s", host, gai_strerror(error));
|
if (error) errx(EX_NOHOST, "%s: %s", bindHost, gai_strerror(error));
|
||||||
|
|
||||||
for (struct addrinfo *ai = head; ai; ai = ai->ai_next) {
|
for (struct addrinfo *ai = head; ai; ai = ai->ai_next) {
|
||||||
sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
||||||
|
|||||||
Načítá se…
x
Odkázat v novém úkolu
Zablokovat Uživatele