Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25985

Modified Files:
      Tag: XQuery_0-16
        shttpd.c 
Log Message:
Fix a hanging problem

A connection with FLAG_FINISHED should always be disconnected.  In case
it's an embedded connection, we leave the socket alone, since the socket
close is handled by mapi_client_end.



Index: shttpd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/shttpd.c,v
retrieving revision 1.19.4.5
retrieving revision 1.19.4.6
diff -u -d -r1.19.4.5 -r1.19.4.6
--- shttpd.c    1 Mar 2007 22:31:22 -0000       1.19.4.5
+++ shttpd.c    5 Mar 2007 14:36:25 -0000       1.19.4.6
@@ -950,7 +950,7 @@
        if (c->ssl)             SSL_free(c->ssl);
 #endif /* WITH_SSL */
 
-       if (c->sock >= 0) closesocket(c->sock);
+       if (c->sock >= 0 && c->io != do_embedded) closesocket(c->sock);
        free(c);
 
        /* In inetd mode, exit if request is finished. */
@@ -2954,8 +2954,8 @@
                         * If the connection is removed, keep the previous
                         * connection in chain (pc) unchanged.
                         */
-            if ( (c->io != do_embedded) && 
-                    ((c->flags & FLAG_FINISHED) || c->expire < now) )
+            if ( (c->flags & FLAG_FINISHED) ||
+                    ((c->io != do_embedded) && c->expire < now) )
                 disconnect(c, pc);
             else
                 pc = c;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to