httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <b...@wstoddard.com>
Subject Re: interesting Win32 PR 23982: "Apache 2.xx is incompatible with Winsock 2.0"
Date Mon, 21 Jun 2004 22:16:29 GMT
Playing with this patch... seems to work w/minimal performance penalty...

Bill

Index: sendrecv.c
===================================================================
RCS file: /home/cvs/apr/network_io/win32/sendrecv.c,v
retrieving revision 1.64.2.1
diff -u -r1.64.2.1 sendrecv.c
--- sendrecv.c	13 Feb 2004 09:33:51 -0000	1.64.2.1
+++ sendrecv.c	21 Jun 2004 22:15:42 -0000
@@ -204,6 +204,7 @@
  }


+#define WAIT_FOR_EVENT
  #if APR_HAS_SENDFILE
  /*
   *#define WAIT_FOR_EVENT
@@ -352,10 +353,21 @@
                  if (rv == WAIT_OBJECT_0) {
                      status = APR_SUCCESS;
                      if (!disconnected) {
+#if 0
                          if (!GetOverlappedResult(wait_event, &overlapped,
                                                   &nbytes, FALSE)) {
                              status = apr_get_os_error();
                          }
+#else
+                        if (!WSAGetOverlappedResult(sock->socketdes,
+                                                    &overlapped,
+                                                    &nbytes,
+                                                    FALSE,
+                                                    &dwFlags)) {
+                            status = apr_get_netos_error();
+                        }
+
+#endif
                          /* Ugly code alert: GetOverlappedResult returns
                           * a count of all bytes sent. This loop only
                           * tracks bytes sent out of the file.

Mime
View raw message