]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix problem with lingering_close() on Windows. Issuing read() on the
authorBill Stoddard <stoddard@apache.org>
Sat, 2 Jun 2001 20:34:03 +0000 (20:34 +0000)
committerBill Stoddard <stoddard@apache.org>
Sat, 2 Jun 2001 20:34:03 +0000 (20:34 +0000)
socket descriptor on Windows always fails. Should be calling
recv() instead of read() on Windows. Thanks to Bill Rowe (and bounds checker :-)
for pointing this out.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89259 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/main/http_main.c

index 5cbee4c2dd0527388b7430f0f58c8c7539de2592..41c910a4cdde1513292ab5bda6d16749ed33f40f 100644 (file)
@@ -1,4 +1,8 @@
 Changes with Apache 1.3.21
+  *) Fix problem with lingering_close() on Windows.  Issuing read() on the
+     socket descriptor on Windows always fails. Should be calling
+     recv() instead of read() on Windows.
+     [Bill Stoddard, Bill Rowe]
 
   *) Added an abnormal exit clean up routine to make sure that ApacheC NLM
      is always unloaded cleanly.  This fixes the "Ouch! out of memory"
index f79c9a8f3859656e1d35d43772fb2dcfd0bc6287..260fb2e426c318a5d5124cd4b448045dafffc8bc 100644 (file)
@@ -1565,7 +1565,11 @@ static void lingering_close(request_rec *r)
        select_rv = ap_select(lsd + 1, &lfds, NULL, NULL, &tv);
 
     } while ((select_rv > 0) &&
+#ifdef WIN32
+             (recv(lsd, dummybuf, sizeof dummybuf, 0) > 0));
+#else
              (read(lsd, dummybuf, sizeof dummybuf) > 0));
+#endif
 
     /* Should now have seen final ack.  Safe to finally kill socket */