summaryrefslogtreecommitdiffstats
path: root/modules/cluster/mod_heartmonitor.c
diff options
context:
space:
mode:
authorJean-Frederic Clere <jfclere@apache.org>2009-08-04 08:49:48 +0200
committerJean-Frederic Clere <jfclere@apache.org>2009-08-04 08:49:48 +0200
commitdcd3a1ebfba8552b13ee92bad0e820064aa6b8fa (patch)
treeb4990ccb41eba461f581bdb8af9d3ce392a3cffd /modules/cluster/mod_heartmonitor.c
parentbuildconf: (diff)
downloadapache2-dcd3a1ebfba8552b13ee92bad0e820064aa6b8fa.tar.xz
apache2-dcd3a1ebfba8552b13ee92bad0e820064aa6b8fa.zip
Oops my bad: Stop copying and pasting code.
Remove argstr_to_table and use qs_to_table. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@800685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/cluster/mod_heartmonitor.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c
index 68453f8ecd..901efc2de1 100644
--- a/modules/cluster/mod_heartmonitor.c
+++ b/modules/cluster/mod_heartmonitor.c
@@ -124,6 +124,7 @@ static apr_status_t hm_listen(hm_ctx_t *ctx)
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 @@ static apr_status_t hm_slotmem_update_stat(hm_server_t *s, request_rec *r)
}
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 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
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 {