apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r652692 - /apr/apr/trunk/network_io/unix/sendrecv.c
Date Thu, 01 May 2008 22:24:48 GMT
Author: wrowe
Date: Thu May  1 15:24:48 2008
New Revision: 652692

URL: http://svn.apache.org/viewvc?rev=652692&view=rev
Log:
Optimize away a second poll by simply looping on the existing poll

Modified:
    apr/apr/trunk/network_io/unix/sendrecv.c

Modified: apr/apr/trunk/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sendrecv.c?rev=652692&r1=652691&r2=652692&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sendrecv.c (original)
+++ apr/apr/trunk/network_io/unix/sendrecv.c Thu May  1 15:24:48 2008
@@ -507,13 +507,9 @@
                 rv = 0;
             }
         }
-        if ((rv == -1) && (errno == EAGAIN) 
-                       && (sock->timeout > 0)) {
-            apr_status_t arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
-            if (arv != APR_SUCCESS) {
-                *len = 0;
-                return arv;
-            }
+
+        if ((rv == -1) && (errno == EAGAIN) && (sock->timeout > 0))
{
+            sock->options |= APR_INCOMPLETE_WRITE;
         }
     } while (rv == -1 && (errno == EINTR || errno == EAGAIN));
 



Mime
View raw message