You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2001/12/28 05:07:22 UTC
f->c and f->r->connection
Why are there some circumstances when f->c is NULL but f->r and
f->r->connection are valid? I could understand f->r being NULL while f->c
would not be, but the other way around took me totally by surprise.
Thanks,
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA
Re: [PATCH] Re: f->c and f->r->connection
Posted by Brian Pane <br...@cnet.com>.
Justin Erenkrantz wrote:
>On Thu, Dec 27, 2001 at 11:07:22PM -0500, Cliff Woolley wrote:
>
>>Why are there some circumstances when f->c is NULL but f->r and
>>f->r->connection are valid? I could understand f->r being NULL while f->c
>>would not be, but the other way around took me totally by surprise.
>>
>
>I agree. I wonder if this patch would break anything. It seems
>sane. -- justin
>
>Index: server/util_filter.c
>===================================================================
>RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
>retrieving revision 1.73
>diff -u -r1.73 util_filter.c
>--- server/util_filter.c 2001/12/28 05:46:21 1.73
>+++ server/util_filter.c 2001/12/28 05:49:22
>@@ -277,7 +277,7 @@
> f->frec = node->frec;
> f->ctx = ctx;
> f->r = r;
>- f->c = c;
>+ f->c = r ? r->connection : c;
>
> if (INSERT_BEFORE(f, *outf)) {
> f->next = *outf;
>
+1
--Brian
Re: [PATCH] Re: f->c and f->r->connection
Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 27 Dec 2001, Justin Erenkrantz wrote:
> On Thu, Dec 27, 2001 at 11:07:22PM -0500, Cliff Woolley wrote:
> >
> > Why are there some circumstances when f->c is NULL but f->r and
> > f->r->connection are valid? I could understand f->r being NULL while f->c
> > would not be, but the other way around took me totally by surprise.
>
> I agree. I wonder if this patch would break anything. It seems
> sane. -- justin
> - f->c = c;
> + f->c = r ? r->connection : c;
But you shouldn't have to do that... most callers seem to pass in
r->connection anyway. There's just a bug somewhere I think. I'll track
it down when I get back to town.
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA
[PATCH] Re: f->c and f->r->connection
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Thu, Dec 27, 2001 at 11:07:22PM -0500, Cliff Woolley wrote:
>
> Why are there some circumstances when f->c is NULL but f->r and
> f->r->connection are valid? I could understand f->r being NULL while f->c
> would not be, but the other way around took me totally by surprise.
I agree. I wonder if this patch would break anything. It seems
sane. -- justin
Index: server/util_filter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
retrieving revision 1.73
diff -u -r1.73 util_filter.c
--- server/util_filter.c 2001/12/28 05:46:21 1.73
+++ server/util_filter.c 2001/12/28 05:49:22
@@ -277,7 +277,7 @@
f->frec = node->frec;
f->ctx = ctx;
f->r = r;
- f->c = c;
+ f->c = r ? r->connection : c;
if (INSERT_BEFORE(f, *outf)) {
f->next = *outf;