Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 12849 invoked from network); 4 Aug 2009 06:50:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Aug 2009 06:50:08 -0000 Received: (qmail 51823 invoked by uid 500); 4 Aug 2009 06:50:13 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 51746 invoked by uid 500); 4 Aug 2009 06:50:13 -0000 Mailing-List: contact cvs-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 cvs@httpd.apache.org Received: (qmail 51737 invoked by uid 99); 4 Aug 2009 06:50:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 06:50:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 06:50:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 048AE2388872; Tue, 4 Aug 2009 06:49:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r800685 - /httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Date: Tue, 04 Aug 2009 06:49:48 -0000 To: cvs@httpd.apache.org From: jfclere@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090804064949.048AE2388872@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jfclere Date: Tue Aug 4 06:49:48 2009 New Revision: 800685 URL: http://svn.apache.org/viewvc?rev=800685&view=rev Log: Oops my bad: Stop copying and pasting code. Remove argstr_to_table and use qs_to_table. Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=800685&r1=800684&r2=800685&view=diff ============================================================================== --- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original) +++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Tue Aug 4 06:49:48 2009 @@ -124,6 +124,7 @@ return APR_SUCCESS; } +/* XXX: The same exists in mod_lbmethod_heartbeat.c where it is named argstr_to_table */ static void qs_to_table(const char *input, apr_table_t *parms, apr_pool_t *p) { @@ -203,34 +204,6 @@ } return APR_SUCCESS; } -/* Copied from mod_lbmethod_heartbeat.c... */ -static void -argstr_to_table(apr_pool_t *p, char *str, apr_table_t *parms) -{ - char *key; - char *value; - char *strtok_state; - - key = apr_strtok(str, "&", &strtok_state); - while (key) { - value = strchr(key, '='); - if (value) { - *value = '\0'; /* Split the string in two */ - value++; /* Skip passed the = */ - } - else { - value = "1"; - } - ap_unescape_url(key); - ap_unescape_url(value); - apr_table_set(parms, key, value); - /* - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, - "Found query arg: %s = %s", key, value); - */ - key = apr_strtok(NULL, "&", &strtok_state); - } -} static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_t *pool) { apr_status_t rv; @@ -310,7 +283,7 @@ unsigned int seen; /* Update seen time according to the last file modification */ apr_table_clear(hbt); - argstr_to_table(pool, apr_pstrdup(pool, t), hbt); + qs_to_table(apr_pstrdup(pool, t), hbt, pool); if (apr_table_get(hbt, "busy")) { node.busy = atoi(apr_table_get(hbt, "busy")); } else {