Author: jfrederic.clere(a)jboss.com
Date: 2008-05-05 10:43:08 -0400 (Mon, 05 May 2008)
New Revision: 1592
Modified:
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Clean useless code.
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-05-02 12:33:30 UTC (rev 1591)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-05-05 14:43:08 UTC (rev 1592)
@@ -39,12 +39,6 @@
module AP_MODULE_DECLARE_DATA manager_module;
-struct baldata {
- char *balancer;
- int port;
- struct baldata *next;
-};
-
typedef struct mod_manager_config
{
/* base name for the shared memory */
@@ -56,11 +50,7 @@
/* max munber of host supported */
int maxhost;
/* Balancer name */
- /* Balancer name */
char *balancername;
- /* store the balancer names */
- struct baldata *baldata;
-
} mod_manager_config;
/*
@@ -137,29 +127,6 @@
};
/*
- * read the balancer name from the conf and the port of client address
- */
-char * getbalancer(server_rec *s, struct baldata *baldata, apr_sockaddr_t *local_addr)
-{
- char a[128];
- char *ptr;
- int port;
- apr_snprintf(a, sizeof(a), "%pI", local_addr);
- ptr = &a[strlen(a)];
- while (*ptr != ':')
- ptr--;
- port = atoi(ptr+1);
-
- while (baldata && baldata->port != port) {
- baldata = baldata->next;
- }
- if (baldata) {
- return baldata->balancer;
- } else
- return NULL;
-}
-
-/*
* call after parser the configuration.
* create the shared memory.
* XXX: add some code there
@@ -807,7 +774,6 @@
mconf->maxnode = DEFMAXNODE;
mconf->maxhost = DEFMAXHOST;
mconf->balancername = NULL;
- mconf->baldata = NULL;
return mconf;
}
/* XXX: Not needed
@@ -832,7 +798,6 @@
mconf->maxcontext = DEFMAXCONTEXT;
mconf->maxnode = DEFMAXNODE;
mconf->balancername = NULL;
- mconf->baldata = NULL;
if (mconf2->basefilename)
mconf->basefilename = apr_pstrdup(p, mconf2->basefilename);
@@ -859,12 +824,6 @@
else if (mconf1->balancername)
mconf->balancername = mconf1->balancername;
- /* XXX: Shouldn't be the baldata chains duplicated */
- if (mconf2->baldata)
- mconf->baldata = mconf2->baldata;
- else if (mconf1->baldata)
- mconf->baldata = mconf1->baldata;
-
return mconf;
}
Show replies by date