X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;fp=src%2Ftcpip.c;h=3ade82b428689ec4deea7c6acd257bce911be280;hb=c62c26d35e1eaf2ab04c4c64a3548e355059ebe3;hp=47655a94cc18d5b3da2dba7c642f4d3a3110f9b6;hpb=8f3a251b076d7438bac8e23db9b50a639425ddab;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index 47655a9..3ade82b 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -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, ':')))