Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 3291 invoked from network); 24 Mar 2006 15:33:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Mar 2006 15:33:07 -0000 Received: (qmail 3072 invoked by uid 500); 24 Mar 2006 15:33:03 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 3018 invoked by uid 500); 24 Mar 2006 15:33:03 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 3006 invoked by uid 99); 24 Mar 2006 15:33:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 07:33:03 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [193.252.22.54] (HELO smtp13.wanadoo.fr) (193.252.22.54) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2006 07:33:02 -0800 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1303.wanadoo.fr (SMTP Server) with ESMTP id 2E6E170000A3 for ; Fri, 24 Mar 2006 16:32:41 +0100 (CET) Received: from binarysecfb111 (AStDenis-102-1-13-2.w80-8.abo.wanadoo.fr [80.8.166.2]) by mwinf1303.wanadoo.fr (SMTP Server) with SMTP id E2BB37000085 for ; Fri, 24 Mar 2006 16:32:39 +0100 (CET) X-ME-UUID: 20060324153239928.E2BB37000085@mwinf1303.wanadoo.fr Message-ID: <01b501c64f58$212b4cc0$6600a8c0@binarysecfb111> From: "Michael Vergoz" To: Subject: Fw: merging server config bug ? Date: Fri, 24 Mar 2006 16:32:14 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N From: "Michael Vergoz" To: Sent: Friday, March 24, 2006 2:38 PM Subject: merging server config bug ? > Hi > I must embark a pointer (different) in each server_rec to allow to > differentiate the server env. > I thus use the callback create_server_config which return a pointer which > will be written in a vector server_rec->module_config. > The problem arises at the ap_fixup_virtual_hosts() (main.c +540) > This function executes for each server the function merge_server_configs() > and the bug reside in this function. > > At the time to associate the vectors of configuration modulates if a > vector of module is available it will be automatically replaced by that > basic. > If not and if a callback merge_server_config is available then this one is > executed. > Blow at the time of the child_init I have the same pointer of > configuration modulates in all server interfaces. Whereas I should have a > different for each servers. > All that to say to you that when you use the callback create_server_config > and that this one return a pointer the callback merge_server_config will > never be executed. It is nothing like bug, but that gives many problems to > me. > > server/config.c in merge_server_configs() : > > for (modp = ap_top_module; modp; modp = modp->next) { > merger_func df = modp->merge_server_config; > int i = modp->module_index; > > if (!virt_vector[i]) > virt_vector[i] = base_vector[i]; > else if (df) > virt_vector[i] = (*df)(p, base_vector[i], virt_vector[i]); > } > > > Should to be > > > for (modp = ap_top_module; modp; modp = modp->next) { > merger_func df = modp->merge_server_config; > int i = modp->module_index; > if (df) > virt_vector[i] = (*df)(p, base_vector[i], virt_vector[i]); > else if (!virt_vector[i]) > virt_vector[i] = base_vector[i]; > } > > > Thanks > Michael Vergoz > >