quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: connobject.c broke with apr 1.3.2
Date Mon, 30 Jun 2008 22:01:42 GMT
Cyrille Froehlich wrote:
> Hi,
> 
>   Upgrading apr to the latest 1.3.2 broke the compilation of mod_python (I use
> mod_python 3.3.1 but this file is the same in svn). Since b is a bucket and bb
> the bucket brigade object, I suppose we must read APR_BRIGADE_SENTINEL(bb)
> instead of APR_BRIGADE_SENTINEL(b). Any APR lib expert confirmation ?
> 
> diff -r -u -p mod_python-3.3.1.orig/src/connobject.c
> mod_python-3.3.1/src/connobject.c
> --- mod_python-3.3.1.orig/src/connobject.c      2008-06-25 16:16:41 +0200
> +++ mod_python-3.3.1/src/connobject.c   2008-06-25 16:20:32 +0200
> @@ -139,7 +139,7 @@ static PyObject * _conn_read(conn_rec *c
>      bytes_read = 0;
> 
>      while ((bytes_read < len || len == 0) &&
> -           !(b == APR_BRIGADE_SENTINEL(b) ||
> +           !(b == APR_BRIGADE_SENTINEL(bb) ||
>               APR_BUCKET_IS_EOS(b) || APR_BUCKET_IS_FLUSH(b))) {
> 
>          const char *data;

According to Tom Donovan, the only reason this worked before was the fact
that both contain a .list member.  But you never should have passed a
bucket, so the existing code was (silently) broken.  Patch looks good.


Mime
View raw message