Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 71910 invoked from network); 10 Oct 2006 15:43:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 15:43:56 -0000 Received: (qmail 50756 invoked by uid 500); 10 Oct 2006 15:43:56 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 50738 invoked by uid 500); 10 Oct 2006 15:43:56 -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 50729 invoked by uid 99); 10 Oct 2006 15:43:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 08:43:55 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mcqueenorama@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 08:43:54 -0700 Received: by ug-out-1314.google.com with SMTP id z36so789344uge for ; Tue, 10 Oct 2006 08:43:33 -0700 (PDT) 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:content-transfer-encoding:content-disposition:references; b=XYA1P2csrVOydi7unF9Lq6jFPMhccljlyx1h30SBkFnWmn3cbdfEDQHTOLcHpiRWtPE7iC0LhWNBD1gVz4fY4yZwumQ3jYS5UNdaQCOsZTq9F27cZL4XPRVSZBEiYhG1l+dDTgeqLx5BfKujnpdBiMdxBt/G//3mRDOBhaXYe1U= Received: by 10.67.93.6 with SMTP id v6mr8379905ugl; Tue, 10 Oct 2006 08:43:32 -0700 (PDT) Received: by 10.67.101.6 with HTTP; Tue, 10 Oct 2006 08:43:32 -0700 (PDT) Message-ID: <5b3fa8f0610100843s69da8635ub29470fb00794fb2@mail.gmail.com> Date: Tue, 10 Oct 2006 08:43:32 -0700 From: "Brian McQueen" To: modules-dev@httpd.apache.org Subject: server config apr_table_t In-Reply-To: <5b3fa8f0610091618y20905c5fxf2acfc58fc8c3689@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5b3fa8f0610091618y20905c5fxf2acfc58fc8c3689@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am having a problem with keeping data in my apr_table_t. During a request I obtain the server config structure, store something in there (some statistics which should have the scope of the life of the server), and then when the next request comes along, the data is gone! During the request I store it and retrieve it, just to make sure the mechanism is correct with no problems, but when the request is gone, the data is gone too. Obviously it seems to be a request pool related issue, but I tried to get around that by being very specific about which pool to use. I've made a sub-pool of the pool that created the server config structure and saved that within the server config structure. I've also made sure the tables are "made" with this very same pool. What is happening to my data? I've even created a brand new root pool with the same results. I'm using the apr_tables.h techniques like this: Here is how I'm initializing the table - here with a root pool: ASSERT(apr_pool_create(&server_config_p->stats_pool, NULL) == APR_SUCCESS); server_config_p->approved_items = apr_table_make(server_config_p->stats_pool, 500); Neither of these lasts beyond the request, not even the one with static char strings: apr_table_set(server_config.approved_items, my_key, my_value); apr_table_set(server_config.approved_items, "key2", "value2"); During the request I can loop over the table with apr_table_do and print out all of the data, but by the next request its all gone. Brian McQueen