summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0378d30)
raw | patch | inline | side by side (parent: 0378d30)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 11:37:25 +0000 (11:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 11:37:25 +0000 (11:37 +0000) |
Non-FQDN (e.g. "localhost") are now supported as well. Anything that does not
start with '[' should be (and is now) treated as <name>[:<port>]. -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1930 a5681a0c-68f1-0310-ab6d-d61299d08faa
start with '[' should be (and is now) treated as <name>[:<port>]. -- Sebastian Harl
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1930 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_client.c | patch | blob | history | |
program/src/rrd_daemon.c | patch | blob | history |
index 287f642db4754253eba0134679bf1e650f60ad45..a4f1ba9c86fd8022db488da266547af6b8fba4f9 100644 (file)
--- a/program/src/rrd_client.c
+++ b/program/src/rrd_client.c
rrd_set_error("garbage after address: %s", port);
return (-1);
}
- } /* if (*addr = ']') */
- else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+ } /* if (*addr == '[') */
+ else
{
port = rindex(addr, ':');
if (port != NULL)
index 81c58e1ad1c3380b27cf5e6739d43f161d8b409a..0ca1818d462b40e0bdd766c2de45eda6003178ef 100644 (file)
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
fprintf (stderr, "rrdcached: Garbage after address: %s\n", port);
return (-1);
}
- } /* if (*addr = ']') */
- else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+ } /* if (*addr == '[') */
+ else
{
port = rindex(addr, ':');
if (port != NULL)