Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 34686 invoked from network); 17 Nov 2006 01:31:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2006 01:31:58 -0000 Received: (qmail 71146 invoked by uid 500); 17 Nov 2006 01:32:08 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 70976 invoked by uid 500); 17 Nov 2006 01:32:08 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 70967 invoked by uid 99); 17 Nov 2006 01:32:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 17:32:08 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of djwortham@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO py-out-1112.google.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 17:31:55 -0800 Received: by py-out-1112.google.com with SMTP id p76so416275pyb for ; Thu, 16 Nov 2006 17:31:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WRISHemhO3EzFyK65W+7tu5daLp+IlbTUbmp9ZC9hPCfPBwI/5kFkPpgUjld+4EsAxnR95/gBpBxOh+xpeUTAiZacI+4dOkbfbJEomaS19hcj/ly3gFdeHhgkOvwajL5ypShgeab30UxZDTgsOVal9Q8LqdoQKv4xWFOj7ft61g= Received: by 10.35.41.14 with SMTP id t14mr2293201pyj.1163727084511; Thu, 16 Nov 2006 17:31:24 -0800 (PST) Received: by 10.35.79.1 with HTTP; Thu, 16 Nov 2006 17:31:24 -0800 (PST) Message-ID: <5280fae50611161731nf99b62bh483891b1e9167374@mail.gmail.com> Date: Thu, 16 Nov 2006 18:31:24 -0700 From: "David Wortham" To: modules-dev@httpd.apache.org Subject: Re: Setting both Server and Directory Config Structs from the same config function In-Reply-To: <20061117002632.7db17c44@grimnir> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_100166_15414640.1163727084329" References: <5280fae50611161539x7c730eearb28b86372319aa27@mail.gmail.com> <20061117002632.7db17c44@grimnir> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_100166_15414640.1163727084329 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Nick, I was almost done copy-pasting and simplifying my code when I re-read your response. 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 www.google.com/codesearch !), 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! Dave 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 > http://www.apachetutor.org/ > ------=_Part_100166_15414640.1163727084329--