httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_include.c
Date Sun, 17 Sep 2000 01:16:20 GMT
On 16 Sep 2000, Jeff Trawick wrote:
> Here is your original loop:
> 
>         if ((tagbuck = find_string(dptr, STARTING_SEQUENCE, AP_BRIGADE_LAST(bb))) !=
NULL) {
>             dptr2 = tagbuck;
>             dptr = tagbuck;
>             while (dptr2 && 
>                   (endsec = find_string(dptr2, ENDING_SEQUENCE, AP_BRIGADE_LAST(bb)))
== NULL) {
>                 dptr2 = AP_BUCKET_NEXT(dptr2);
>             }
>             if (endsec == NULL) {
>                 /** No ending tag, needs to become an error bucket */
>             }
> 
> The conditions for your while loop make no sense.  dptr2 will never
> become NULL and there is no guarantee that we'll find the ending
> sequence in this brigade.

No, that's wrong.  dptr2 is NULL if the starting sequence is not found.

> Hmmm... Why is there a loop at all?  find_string() loops through the
> brigade so there is no sense in looking further.  The loop needs to go
> away...  Either we find ENDING_SEQUENCE in the current brigade or we
> don't.

In this, you are correct.  I hadn't thought of that.  Thank you.

> I'm starting to get the hang of this code...  I just need to find a
> quiet spot for a while.  (If you are actively working in the code,
> let me know because I've got better things to do.  Otherwise, I'll
> keep working on it as time allows.)

I'm actually more likely to start re-writing mod_include from
scratch.  I'm going to try to work on this again, but I also have other
projects I am trying to get through.  I am likely to look at mod_include
again in a week or two.  Currently, it is almost completely wrong, but I
wanted to get it compiling again.  It really needs a complete
re-write.  If you have other projects that are a better way to spend your
time, then I suggest doing those.  Otherwise, let me know and I'll back
off mod_include all together.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message