httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: PATCH - Uninitialized Variables
Date Fri, 16 May 2003 06:44:06 GMT
At 02:34 AM 5/10/2003, David Deaves wrote:

>I've submitted this patch under BugID 19242, but thought I would submit
>it here as well so it doesn't get overlooked.
>--- modules/ssl/ssl_engine_io-old.c     2003-02-27 22:57:34.000000000 +1100
>+++ modules/ssl/ssl_engine_io.c 2003-05-10 02:35:14.000000000 +1000
>@@ -1360,6 +1360,8 @@
>     inctx->bb = apr_brigade_create(c->pool, c->bucket_alloc);
>     inctx->cbuf.length = 0;
>+    inctx->block = APR_BLOCK_READ;
>+    inctx->mode = AP_MODE_READBYTES;
>     inctx->pool = c->pool;
> }

The reason folks are confused about -why- this is a bug, is that we really
need to reset these on each call to ssl_io_filter_output.  Reason is simple,
ssl output may be both read and write, however we must block on read
when this involves a blocking write through ssl_io_filter_output (ssl needs
a chance to completely handshake the required data.)

So the two line patch above is the right thought in the wrong place, it
needs to go in the ssl_io_filter_output() implementation.  However, it
seems our inctx contains the filter_ctx (output) reference, but that
isn't reciprocal.  

My gut reaction is that they are paired so we should tie them together
as a single filter_ctx_t shared by the input and output filters. Thoughts?


View raw message