httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wortham" <>
Subject Re: Setting both Server and Directory Config Structs from the same config function
Date Fri, 17 Nov 2006 01:31:24 GMT
I was almost done copy-pasting and simplifying my code when I re-read your

I had previously tried an if/else in the directive handling function (as in:
if (dir->path is set) { set dir_struct; } else { set svr_struct; } ).
For some reason, I didn't think that the call had to be mutually exclusive
(only DIR or SVR, not both).

I read through the 2.0 code (thanks !), which has
different comments than 1.3.  In there, the path is what determines if the
directive-handling function was called via a DIR or a SVR context (and I now
realize they are mutually exclusive).  A simple test to see if the
cmd_parms->module_config is not NULL apparently is not sufficient.

I am still testing some cases, but it looks like I was able to eliminate the
case that causes a Sef Fault.

Thx Nick!

On 11/16/06, Nick Kew <> wrote:
> On Thu, 16 Nov 2006 16:39:26 -0700
> "David Wortham" <> wrote:
> > Hello fellow module developers!
> > I am trying to debug one of my directive-handling functions.
> You haven't really told us enough to make a diagnosis.
> However, the thing that springs to mind from the above is that
> you might need to check your command's context.  A simple first
> test for that would be to test whether there are some contexts
> where it works and others where it crashes.
> --
> Nick Kew
> Application Development with Apache - the Apache Modules Book

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message