From 460207440b9aff50c4681032315dfb662b5a61de Mon Sep 17 00:00:00 2001 From: multiplexd Date: Mon, 17 Feb 2020 19:50:27 +0000 Subject: 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. --- irc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 6a65c79..1a118da 100644 --- a/irc.c +++ b/irc.c @@ -111,7 +111,7 @@ int ircConnect(const char *bindHost, const char *host, const char *port) { if (bindHost) { 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) { sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); -- cgit 1.4.1-2-gfad0