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/program@1930
a5681a0c-68f1-0310-ab6d-
d61299d08faa
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)
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)