]> granicus.if.org Git - apache/commitdiff
* Use APR_STATUS_IS_TIMEUP instead of direct compare to APR_TIMEUP to
authorRuediger Pluem <rpluem@apache.org>
Thu, 10 Jun 2010 16:46:35 +0000 (16:46 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 10 Jun 2010 16:46:35 +0000 (16:46 +0000)
  be more safe on different platforms.

Pointed out by: rjung

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@953385 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c

index 7668f0037bc34fa1f57d035d8f47f2090672ac6f..e9dac070a1cdeb1e69b9bc745ae3e70785cf9a43 100644 (file)
@@ -450,15 +450,18 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                         }
                     }
                     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);
                         }