httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: [Beta blocker] Can't open config file on
Date Tue, 30 Jan 2001 11:26:24 GMT
"William A. Rowe, Jr." <> writes:

> From: "Jeff Trawick" <>
> Sent: Monday, January 29, 2001 3:21 PM
> > I agree with Greg Ames' off-line suggestion to back out the
> > optimization, since among the various ways to fix it that way results
> > in the simplest code.
> That's a terribly useful answer :-)  

I guess you mean that I wasn't clear?  I thought we were talking about
the same line of code and that there was no ambiguity.  Sorry...

Here is the portion of your patch (what I thought we both called the
"optimization") which broke it.

-    if (ap_is_rdirectory(ptemp, fname)) {
+    if (finfo.filetype == APR_DIR) {

Greg and I discussed various ways to do the lstat only once, but the
point I tried to make before was that the code was always clearer if
we just called ap_is_rdirectory() again here.  We don't need to worry
about saving an lstat() in this function.

>                                       Yes - backing out for today is the
> right approach.  It is the wrong answer once I tie down what was
> going on.

Is there any question in your mind that prior to Greg's commit we
checked finfo.filetype in cases where we didn't call apr_lstat()?

> I will toss up the patch to be tested before I 'turn it back on'
> again.

Coolness, just don't worry about saving an lstat() here at the expense
of making the code hairier.

Take care...
Jeff Trawick | | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message