X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_client.c;h=b018ee0aa4fc1d86c4c35a2eec47efdb9d5cb2af;hb=7412ab0c1230f2609313913793f9e6c0a93b28b1;hp=287f642db4754253eba0134679bf1e650f60ad45;hpb=6f5e93c0c08c5ed796d8d079f0eba2d16c6a4bdb;p=rrdtool.git diff --git a/src/rrd_client.c b/src/rrd_client.c index 287f642..b018ee0 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -21,8 +21,8 @@ **/ #include "rrd.h" -#include "rrd_client.h" #include "rrd_tool.h" +#include "rrd_client.h" #include #include @@ -436,8 +436,8 @@ static int rrdc_connect_network (const char *addr_orig) /* {{{ */ 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)