On 08/03/2009 08:02 PM, Paul Querna wrote:
On Thu, Jul 30, 2009 at 8:37 AM,<[email protected]>  wrote:
Author: jfclere
Date: Thu Jul 30 15:37:22 2009
New Revision: 799334

URL: http://svn.apache.org/viewvc?rev=799334&view=rev
Log:
Add the file logic for the handler.
(Next step add the slotmem logic for the multicast socket).

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=799334&r1=799333&r2=799334&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Thu Jul 30 15:37:22 
2009
@@ -203,6 +203,188 @@
     }
     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);
+    }
+}


This function already exists in this file. it is called qs_to_table.
It is 60 lines above in the same file.

Stop copying and pasting code.

Fixed.

Cheers

Jean-Frederic

Reply via email to