From fd92456cd2d2388153a2f8ddc7eaff2ed9e53167 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Tue, 27 Jan 2015 07:11:37 +0000 Subject: [PATCH] Fix doc as spotted by mrskman. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1654983 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/developer/output-filters.html.en | 6 +++--- docs/manual/developer/output-filters.xml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 111ed7c18e..0aab5b4f1a 100644 --- a/docs/manual/developer/output-filters.html.en +++ b/docs/manual/developer/output-filters.html.en @@ -305,10 +305,10 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { temporary brigade in such a structure, to avoid having to allocate a new brigade per invocation as described in the Brigade structure section.

-

Example code to maintain filter state

struct dummy_state {
+    

Example code to maintain filter state

struct dummy_state {
    apr_bucket_brigade *tmpbb;
    int filter_state;
-   ....
+   ...
 };
 
 apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
@@ -321,7 +321,7 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
     
        /* First invocation for this response: initialise state structure.
         */
-       f->ctx = state = apr_palloc(sizeof *state, f->r->pool);
+       f->ctx = state = apr_palloc(f->r->pool, sizeof *state);
 
        state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
        state->filter_state = ...;
diff --git a/docs/manual/developer/output-filters.xml b/docs/manual/developer/output-filters.xml
index ce9a968914..afa61da162 100644
--- a/docs/manual/developer/output-filters.xml
+++ b/docs/manual/developer/output-filters.xml
@@ -309,12 +309,12 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
     a new brigade per invocation as described in the Brigade structure section.

- Example code to maintain filter state - + Example code to maintain filter state + struct dummy_state { apr_bucket_brigade *tmpbb; int filter_state; - .... + ... }; apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) @@ -327,7 +327,7 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) /* First invocation for this response: initialise state structure. */ - f->ctx = state = apr_palloc(sizeof *state, f->r->pool); + f->ctx = state = apr_palloc(f->r->pool, sizeof *state); state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); state->filter_state = ...; -- 2.40.0