From: Christophe Jaillet Date: Tue, 27 Jan 2015 07:10:52 +0000 (+0000) Subject: Fix doc as spotted by mrskman. X-Git-Tag: 2.4.13~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9a774bb2f9324d453b76ad83184de6146c92a90;p=thirdparty%2Fapache%2Fhttpd.git Fix doc as spotted by mrskman. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1654982 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 6e8e70a6786..49b9a9eae7f 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 ce9a9689146..afa61da162f 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 = ...;