Retain cs_create_host_proxy and use blank for optional bind host
[yaz-moved-to-github.git] / src / tcpip.c
index 47655a9..3ade82b 100644 (file)
@@ -363,6 +363,8 @@ struct addrinfo *tcpip_getaddrinfo(const char *str, const char *port,
 
     strncpy(host, str, sizeof(host)-1);
     host[sizeof(host)-1] = 0;
+    if ((p = strrchr(host, ' ')))
+        *p = 0;
     if ((p = strchr(host, '/')))
         *p = 0;
     if ((p = strrchr(host, ':')))