httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r307380 - /httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c
Date Sun, 09 Oct 2005 08:15:44 GMT
Author: brianp
Date: Sun Oct  9 01:15:40 2005
New Revision: 307380

URL: http://svn.apache.org/viewcvs?rev=307380&view=rev
Log:
Refactored CONN_STATE_WRITE_COMPLETION handling.

Modified:
    httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c

Modified: httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c?rev=307380&r1=307379&r2=307380&view=diff
==============================================================================
--- httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c Sun Oct  9 01:15:40
2005
@@ -644,9 +644,21 @@
          */
         apr_bucket_brigade *bb = apr_brigade_create(c->pool, c->bucket_alloc);
         apr_bucket *b = apr_bucket_flush_create(c->bucket_alloc);
+        ap_filter_t *output_filter = c->output_filters;
+        apr_status_t rv;
         APR_BRIGADE_INSERT_HEAD(bb, b);
-        ap_pass_brigade(c->output_filters, bb);
-        if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted || 
+        while (output_filter->next != NULL) {
+            output_filter = output_filter->next;
+        }
+        rv = output_filter->frec->filter_func.out_func(output_filter, bb);
+        if (rv != APR_SUCCESS) {
+            /* XXX log error */
+            cs->state = CONN_STATE_LINGER;
+        }
+        else if (c->data_in_output_filters) {
+            cs->state = CONN_STATE_WRITE_COMPLETION;
+        }
+        else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted || 
             ap_graceful_stop_signalled()) {
             c->cs->state = CONN_STATE_LINGER;
         }



Mime
View raw message