X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fstatserv.c;h=2af20bf8344e28097e9526a30489cee7ae86c4d6;hb=03c1d6e9c2c2c0bb2ee01e38d7f464a311bfe9e9;hp=5a2823ae0dba16a6e2a9429b46c5178d3a3ade80;hpb=43801085d371c69455730182f72c4e53d8c8218f;p=yaz-moved-to-github.git diff --git a/server/statserv.c b/server/statserv.c index 5a2823ae0..2af20bf 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2000, Index Data + * Copyright (c) 1995-2001, Index Data * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * @@ -7,7 +7,13 @@ * Chas Woodfield, Fretwell Downing Informatics. * * $Log: statserv.c,v $ - * Revision 1.68 2000-11-29 14:22:47 adam + * Revision 1.70 2001-02-01 08:52:26 adam + * Fixed bug regarding inetd mode. + * + * Revision 1.69 2000/12/01 17:56:41 adam + * on WIN32 function statserv_closedown closes socket(s) to provoke close. + * + * Revision 1.68 2000/11/29 14:22:47 adam * Implemented XML/SGML attributes for data1 so that d1_read reads them * and d1_write generates proper attributes for XML/SGML records. Added * register locking for threaded version. @@ -421,6 +427,7 @@ void statserv_closedown() { /* Just destroy the IOCHAN, that should do the trick */ iochan_destroy(pCurrentThread->pIOChannel); + closesocket(pCurrentThread->pIOChannel->fd); /* Keep a running count of our handles */ iHandles++; @@ -450,6 +457,7 @@ void statserv_closedown() /* Now we can really do something */ if (iHandles > 0) { + logf (LOG_LOG, "waiting for %d to die", iHandles); /* This will now wait, until all the threads close */ WaitForMultipleObjects(iHandles, pThreadHandles, TRUE, INFINITE); @@ -777,6 +785,7 @@ static void inetd_connection(int what) iochan_settimeout(chan, control_block.idle_timeout * 60); addr = cs_addrstr(line); yaz_log(LOG_LOG, "Inetd association from %s", addr ? addr : "[UNKNOWN]"); + assoc->cs_get_mask = EVENT_INPUT; } else {