on WIN32 function statserv_closedown closes socket(s) to provoke close.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 1 Dec 2000 17:56:41 +0000 (17:56 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 1 Dec 2000 17:56:41 +0000 (17:56 +0000)
server/statserv.c
win/makefile

index 5a2823a..f7d2025 100644 (file)
@@ -7,7 +7,10 @@
  *   Chas Woodfield, Fretwell Downing Informatics.
  *
  * $Log: statserv.c,v $
  *   Chas Woodfield, Fretwell Downing Informatics.
  *
  * $Log: statserv.c,v $
- * Revision 1.68  2000-11-29 14:22:47  adam
+ * 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.
  * 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 +424,7 @@ void statserv_closedown()
             {
                 /* Just destroy the IOCHAN, that should do the trick */
                 iochan_destroy(pCurrentThread->pIOChannel);
             {
                 /* 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++;
 
                 /* Keep a running count of our handles */
                 iHandles++;
@@ -450,6 +454,7 @@ void statserv_closedown()
         /* Now we can really do something */
         if (iHandles > 0)
         {
         /* 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);
 
             /* This will now wait, until all the threads close */
             WaitForMultipleObjects(iHandles, pThreadHandles, TRUE, INFINITE);
 
index 8fd1671..8e7ba8d 100644 (file)
@@ -1,5 +1,5 @@
 # makefile.mak - makefile for MS NMAKE 
 # makefile.mak - makefile for MS NMAKE 
-# $Id: makefile,v 1.19 2000-11-16 13:03:13 adam Exp $
+# $Id: makefile,v 1.20 2000-12-01 17:56:41 adam Exp $
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
@@ -23,7 +23,7 @@
 ############### Parameters 
 ###########################################################
 
 ############### Parameters 
 ###########################################################
 
-DEBUG=0   # 0 for release, 1 for debug
+DEBUG=1   # 0 for release, 1 for debug
 
 NEW_Z3950=1  # 0= use old asn files
              # 1= generate files from *.asn (needs tcl)
 
 NEW_Z3950=1  # 0= use old asn files
              # 1= generate files from *.asn (needs tcl)
@@ -133,9 +133,8 @@ RELEASE_C_OPTIONS=  \
 ### Linker options
 LINK=link.exe
 
 ### Linker options
 LINK=link.exe
 
-LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   winspool.lib \
-           comdlg32.lib advapi32.lib shell32.lib ole32.lib    \
-           oleaut32.lib uuid.lib     odbc32.lib  odbccp32.lib \
+LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   \
+           advapi32.lib uuid.lib \
            wsock32.lib  advapi32.lib
 
 COMMON_LNK_OPTIONS= /nologo \
            wsock32.lib  advapi32.lib
 
 COMMON_LNK_OPTIONS= /nologo \
@@ -675,7 +674,10 @@ $(PROTOH): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
 ###########################################################
 #
 # $Log: makefile,v $
 ###########################################################
 #
 # $Log: makefile,v $
-# Revision 1.19  2000-11-16 13:03:13  adam
+# Revision 1.20  2000-12-01 17:56:41  adam
+# on WIN32 function statserv_closedown closes socket(s) to provoke close.
+#
+# Revision 1.19  2000/11/16 13:03:13  adam
 # Function ccl_rpn_query sets attributeSet to Bib-1.
 #
 # Revision 1.18  2000/11/01 14:47:00  adam
 # Function ccl_rpn_query sets attributeSet to Bib-1.
 #
 # Revision 1.18  2000/11/01 14:47:00  adam