httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r953385 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Date Thu, 10 Jun 2010 16:46:35 GMT
Author: rpluem
Date: Thu Jun 10 16:46:35 2010
New Revision: 953385

URL: http://svn.apache.org/viewvc?rev=953385&view=rev
Log:
* Use APR_STATUS_IS_TIMEUP instead of direct compare to APR_TIMEUP to
  be more safe on different platforms.

Pointed out by: rjung

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=953385&r1=953384&r2=953385&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Thu Jun 10 16:46:35 2010
@@ -450,15 +450,18 @@ static int ap_proxy_ajp_request(apr_pool
                         }
                     }
                     else {
+                        apr_status_t rv;
+
                         e = apr_bucket_transient_create(send_body_chunk_buff, size,
                                                     r->connection->bucket_alloc);
                         APR_BRIGADE_INSERT_TAIL(output_brigade, e);
 
                         if ((conn->worker->flush_packets == flush_on) ||
                             ((conn->worker->flush_packets == flush_auto) &&
-                            (apr_poll(conn_poll, 1, &conn_poll_fd,
-                                      conn->worker->flush_wait)
-                                        == APR_TIMEUP) ) ) {
+                            ((rv = apr_poll(conn_poll, 1, &conn_poll_fd,
+                                             conn->worker->flush_wait))
+                                             != APR_SUCCESS) &&
+                              APR_STATUS_IS_TIMEUP(rv))) {
                             e = apr_bucket_flush_create(r->connection->bucket_alloc);
                             APR_BRIGADE_INSERT_TAIL(output_brigade, e);
                         }



Mime
View raw message