httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark J Cox <M.J....@bradford.ac.uk>
Subject Re: Apache module advice (fwd)
Date Mon, 25 Sep 1995 07:50:54 GMT
Patch on hyperreal;  /httpd/incoming/patch.0.8.14.config_decline

---------- Forwarded message ----------
Date: Sat, 23 Sep 95 19:21:00 PDT
From: Bill Radcliffe <billr@corbis.com>
To: Mark J Cox <M.J.Cox@bradford.ac.uk>
Subject: Re: Apache module advice

Thanks for the response .  I finally found the problem. I am using gcc 
 2.6.1 on SunOS 4.1.3. The code that dispatches to the various handlers 
either does not compile right or is actually erroneous.

int
run_method (request_rec *r, int offset, int run_all)
{
   module *modp;
   for (modp = top_module; modp; modp = modp->next) {
       handler mod_handler = *(handler *)(offset + (char *)(modp));

       if (mod_handler) {
           int result = (*mod_handler)(r);

           if (result != DECLINED  && (!run_all || result != OK))
               return result;
       }
   }

   return run_all ? OK : DECLINED;
}

The line "if (result != DECLINED  && (!run_all || result != OK))" need to be 
changed to " if ((result != DECLINED)  && (!run_all || result != OK))"

The effect is that you could not REALLY decline from the translate phase and 
have the next module pick up where you left off. This was driving me 
crazy!!! I kept staring at it and staring at it and it looked correct!


Mime
View raw message