X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;h=ee80c6beb6edea4b1a678f6954195a7563c57b25;hb=1b9e01d65c2e5a8b805c132bc1a043dc4d2c3ec5;hp=a255eaa99d76088a8d55de7148e222fb46d77b4e;hpb=c5058fc7dd740d627c4e058435d7acb6a7d9ed93;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index a255eaa..ee80c6b 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: tcpip.c,v 1.39 2008-01-16 13:01:45 adam Exp $ + * $Id: tcpip.c,v 1.41 2008-01-21 13:34:34 adam Exp $ */ /** * \file tcpip.c @@ -720,7 +720,15 @@ int tcpip_listen(COMSTACK h, char *raddr, int *addrlen, ) h->cerrno = CSNODATA; else + { +#ifdef WIN32 + shutdown(h->iofile, SD_RECEIVE); +#else + shutdown(h->iofile, SHUT_RD); +#endif + listen(h->iofile, SOMAXCONN); h->cerrno = CSYSERR; + } return -1; } if (addrlen && (size_t) (*addrlen) >= sizeof(struct sockaddr_in))