+ if (*port == ':')
+ port++;
+ else if (*port == 0)
+ port = NULL;
+ else
+ {
+ RRDD_LOG (LOG_ERR, "open_listen_socket: Garbage after address: %s",
+ port);
+ return (-1);
+ }
+ } /* if (*addr = ']') */
+ else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+ {
+ port = rindex(addr, ':');
+ if (port != NULL)
+ {
+ *port = 0;
+ port++;
+ }
+ }