You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2005/10/09 10:15:44 UTC

svn commit: r307380 - /httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c

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;
         }