You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Paul Sutton <pa...@ukweb.com> on 1997/07/27 00:26:39 UTC

Listen on Windows

There's still something wrong with listens on Windows. Here's a fix.
But this area of code needs a bit more work to bring it into line with the
Unix listen/accept model.

//pcs

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.187
diff -u -r1.187 http_main.c
--- http_main.c	1997/07/24 04:35:47	1.187
+++ http_main.c	1997/07/26 22:17:21
@@ -3312,6 +3312,8 @@
     /* main loop */
     for(;;)
     {
+        listen_rec *lr;
+
         if(max_jobs_per_exe && (total_jobs > max_jobs_per_exe) && !start_exit)
         {
             start_exit = 1;
@@ -3367,22 +3369,16 @@
 
         if (srv < 0)
             continue;
-        if(srv == 0)
-        {
-            if(start_exit)
+        if (srv == 0) {
+	    if (start_exit)
                 break;
             else
                 continue;
         }
 
-        {
-	    listen_rec *lr;
-
-	    lr = find_ready_listener (&listenfds);
-	    if (lr != NULL) {
-		sd = lr->fd;
-	    }
-	}
+        lr = find_ready_listener(&main_fds);
+        if (!lr) continue;
+        sd = lr->fd;
 
         do {
             clen = sizeof(sa_client);