From: Adam Dickmeiss Date: Mon, 21 Jan 2008 13:07:43 +0000 (+0000) Subject: Fix for bug #2037: cs_listen failed - is not handled correctly. X-Git-Tag: YAZ.3.0.24~9 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=01808bebfc2fbd2bd422a01cf14a148714c77e75;p=yaz-moved-to-github.git Fix for bug #2037: cs_listen failed - is not handled correctly. --- diff --git a/src/tcpip.c b/src/tcpip.c index a255eaa..8115be7 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.40 2008-01-21 13:07:43 adam Exp $ */ /** * \file tcpip.c @@ -720,7 +720,11 @@ int tcpip_listen(COMSTACK h, char *raddr, int *addrlen, ) h->cerrno = CSNODATA; else + { + shutdown(h->iofile, SHUT_RD); + listen(h->iofile, SOMAXCONN); h->cerrno = CSYSERR; + } return -1; } if (addrlen && (size_t) (*addrlen) >= sizeof(struct sockaddr_in))