summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiplexd <multi@in-addr.xyz>2020-02-17 19:50:27 +0000
committerJune McEnroe <june@causal.agency>2020-02-17 23:07:29 -0500
commit460207440b9aff50c4681032315dfb662b5a61de (patch)
tree7e31d22a96ce5bbe596a4f1c41d3b9a24850d4fa
parentIncrease buffer size to 1024 (diff)
downloadcatgirl-460207440b9aff50c4681032315dfb662b5a61de.tar.gz
catgirl-460207440b9aff50c4681032315dfb662b5a61de.zip
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.
-rw-r--r--irc.c2
1 files changed, 1 insertions, 1 deletions
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);
/bin/man1/hilex.1?id=e673ea6deaee59a72c8861a67b10489703f75c61&follow=1'>Don't output a pre in hilex by defaultJune McEnroe 2021-01-12Move hilex out of hilex directoryJune McEnroe 2021-01-12Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe