]> granicus.if.org Git - apache/commitdiff
drop dependency on apr_wait_for_io_or_timeout()
authorJeff Trawick <trawick@apache.org>
Sun, 13 Nov 2005 23:15:06 +0000 (23:15 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 13 Nov 2005 23:15:06 +0000 (23:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@343999 13f79535-47bb-0310-9956-ffa450edef68

server/core_filters.c

index 52ee917486654ff72d4934009e054f1e5b98054c..0c06b90c4197afc03d71b3682a894d42a489f544 100644 (file)
@@ -26,7 +26,6 @@
 #include "apr_hash.h"
 #include "apr_thread_proc.h"    /* for RLIMIT stuff */
 #include "apr_hooks.h"
-#include "apr_support.h"
 
 #define APR_WANT_IOVEC
 #define APR_WANT_STRFUNC
@@ -624,7 +623,17 @@ static apr_status_t send_brigade_blocking(apr_socket_t *s,
         rv = send_brigade_nonblocking(s, bb, bytes_written, c);
         if (rv != APR_SUCCESS) {
             if (APR_STATUS_IS_EAGAIN(rv)) {
-                rv = apr_wait_for_io_or_timeout(NULL, s, 0);
+                /* Wait until we can send more data */
+                apr_int32_t nsds;
+                apr_interval_time_t timeout;
+                apr_pollfd_t pollset;
+
+                pollset.p = c->pool;
+                pollset.desc_type = APR_POLL_SOCKET;
+                pollset.reqevents = APR_POLLOUT;
+                pollset.desc.s = s;
+                apr_socket_timeout_get(s, &timeout);
+                rv = apr_poll(&pollset, 1, &nsds, timeout);
                 if (rv != APR_SUCCESS) {
                     break;
                 }