You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by jo...@apache.org on 2004/06/15 22:20:23 UTC
cvs commit: httpd-test/perl-framework/c-modules/nntp_like mod_nntp_like.c
jorton 2004/06/15 13:20:23
Modified: perl-framework/c-modules/nntp_like mod_nntp_like.c
Log:
Fix brigade handling: don't re-use destroyed brigade.
Revision Changes Path
1.6 +5 -6 httpd-test/perl-framework/c-modules/nntp_like/mod_nntp_like.c
Index: mod_nntp_like.c
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/c-modules/nntp_like/mod_nntp_like.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -d -w -u -r1.5 -r1.6
--- mod_nntp_like.c 29 Mar 2002 08:20:40 -0000 1.5
+++ mod_nntp_like.c 15 Jun 2004 20:20:23 -0000 1.6
@@ -121,10 +121,9 @@
return rv;
}
- /* just for testing purposes, this is the same logic as mod_echo */
+ do {
bb = apr_brigade_create(c->pool, c->bucket_alloc);
- for (;;) {
if ((rv = ap_get_brigade(c->input_filters, bb,
AP_MODE_GETLINE,
APR_BLOCK_READ, 0) != APR_SUCCESS ||
@@ -135,8 +134,8 @@
}
APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_flush_create(c->bucket_alloc));
- ap_pass_brigade(c->output_filters, bb);
- }
+ rv = ap_pass_brigade(c->output_filters, bb);
+ } while (rv == APR_SUCCESS);
return OK;
}