Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 85591 invoked from network); 24 Jul 2008 09:06:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jul 2008 09:06:24 -0000 Received: (qmail 57126 invoked by uid 500); 24 Jul 2008 09:06:21 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 57109 invoked by uid 500); 24 Jul 2008 09:06:21 -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 57098 invoked by uid 99); 24 Jul 2008 09:06:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2008 02:06:21 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2008 09:05:26 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KLwlj-0008KD-GJ for modules-dev@httpd.apache.org; Thu, 24 Jul 2008 02:05:51 -0700 Message-ID: <18627988.post@talk.nabble.com> Date: Thu, 24 Jul 2008 02:05:51 -0700 (PDT) From: lusob To: modules-dev@httpd.apache.org Subject: Child init process is not initialized with the data stored by master process MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: luis.sobrecueva@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have initialized a struct by a directive and I need to access to it in child init proceses. But in the child init proceses the struct is not initialized with the data stored in setServer. This is the struct to initialize: typedef struct { const char* pszServer; const char* pszUser; const char* pszPass; } my_svr_cfg; And this is the function command called by a directive: /////////////////////////////////////// // setServer extern "C" const char* setServer(cmd_parms* pCmdParams, void* pConfig, const char* pszServer, const char* pszUser,const char* pszPass) { my_svr_cfg* pStructServerConfig; // per-server server_rec* pServerRec = pCmdParams->server; pStructServerConfig = (my_svr_cfg*)ap_get_module_config( pServerRec->module_config,&my_module ); pStructServerConfig->pszServer = pszServer; pStructServerConfig->pszUser = pszUser; pStructServerConfig->pszPass = pszPass; return NULL; } This is the child init function: /////////////////////////////////////// // my_child_init extern "C" void my_child_init(apr_pool_t* pool, server_rec* pServerRec ) { my_svr_cfg* pStructServerConfig; pStructServerConfig = (my_svr_cfg*)ap_get_module_config( pServerRec->module_config,&my_module ); // Here pStructServerConfig is not initialized with the data stored in setServer } I use per-server config (VirtualHost ) in httpd.conf Which is the problem? thanks in advance!! -- View this message in context: http://www.nabble.com/Child-init-process-is-not-initialized-with-the-data-stored-by-master-process-tp18627988p18627988.html Sent from the Apache HTTP Server - Module Writers mailing list archive at Nabble.com.