summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d584b92)
raw | patch | inline | side by side (parent: d584b92)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2015 16:04:09 +0000 (17:04 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2015 16:04:09 +0000 (17:04 +0100) |
src/client/sock.c | patch | blob | history | |
src/frontend/sock.c | patch | blob | history | |
src/utils/os.c | patch | blob | history |
diff --git a/src/client/sock.c b/src/client/sock.c
index 838dd95d880debea45d0549c5fde06be776308c1..b1efe58e189700fd46c7b77b46c55278c39a150d 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
}
strncpy(host, address, sizeof(host));
- if ((tmp = strchr(host, (int)':')))
+ if ((tmp = strrchr(host, (int)':')))
*tmp = '\0';
if (! host[0])
strncpy(host, "localhost", sizeof(host));
diff --git a/src/frontend/sock.c b/src/frontend/sock.c
index c2a805aa2510fbe168f4e706b52acfec804dabc7..cf187fcb42adc4bffc229f6c20ed208105c9bde5 100644 (file)
--- a/src/frontend/sock.c
+++ b/src/frontend/sock.c
return impl->type;
}
}
- return -1;
+ /* don't report an error, this could be an IPv6 address */
+ return listener_impls[0].type;
} /* get_type */
static void
diff --git a/src/utils/os.c b/src/utils/os.c
index c94e271be545dfe1bf51ec70d34887fc73ff3a19..2b6a51460a67f89122dbee5ec7d75d70e2b3fe82 100644 (file)
--- a/src/utils/os.c
+++ b/src/utils/os.c
if (address) {
host = address;
- port = strchr(host, ':');
+ port = strrchr(host, ':');
if (port) {
*port = '\0';
++port;