X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;h=ee80c6beb6edea4b1a678f6954195a7563c57b25;hb=cd5dfe9bb7b6a784a5591d659881a3c6fb428512;hp=0e31fc6274becb128c2b010b1c5e3fd8b5427bfb;hpb=3576736bac485d8f04b2fc4f6b5cfcef7576d741;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index 0e31fc6..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.38 2007-11-30 11:44:47 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)) @@ -820,9 +828,9 @@ COMSTACK tcpip_accept(COMSTACK h) state->ssl = SSL_new (state->ctx); SSL_set_fd (state->ssl, cnew->iofile); } +#endif state->connect_request_buf = 0; state->connect_response_buf = 0; -#endif h = cnew; } if (h->state == CS_ST_ACCEPT)