JBoss Native SVN: r2178 - trunk/httpd/httpd-2.2/modules/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-20 04:18:57 -0500 (Tue, 20 Jan 2009)
New Revision: 2178
Modified:
trunk/httpd/httpd-2.2/modules/mod_manager/NMAKEmanager
Log:
Arrange location of mod_proxy.lib
Modified: trunk/httpd/httpd-2.2/modules/mod_manager/NMAKEmanager
===================================================================
--- trunk/httpd/httpd-2.2/modules/mod_manager/NMAKEmanager 2009-01-20 09:09:05 UTC (rev 2177)
+++ trunk/httpd/httpd-2.2/modules/mod_manager/NMAKEmanager 2009-01-20 09:18:57 UTC (rev 2178)
@@ -33,7 +33,7 @@
!include <..\..\NMAKEhttpd.inc>
LDIRS = /libpath:"$(BUILDLIB)"
-LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib wldap32.lib ole32.lib $(LIBAPR) $(LIBAPU) $(LIBHTTPD) mod_proxy.lib
+LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib wldap32.lib ole32.lib $(LIBAPR) $(LIBAPU) $(LIBHTTPD) $(WORKDIR)\mod_proxy.lib
CFLAGS = $(CFLAGS) -DCLUSTER_DECLARE_EXPORT
INCLUDES = -I$(SRCDIR) -I$(BUILDINC) -I../generators -I../proxy -I../ssl
15 years, 11 months
JBoss Native SVN: r2177 - trunk/httpd/httpd-2.2/modules/mod_slotmem.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-20 04:09:05 -0500 (Tue, 20 Jan 2009)
New Revision: 2177
Modified:
trunk/httpd/httpd-2.2/modules/mod_slotmem/NMAKEslotmem
Log:
Add missing include.
Modified: trunk/httpd/httpd-2.2/modules/mod_slotmem/NMAKEslotmem
===================================================================
--- trunk/httpd/httpd-2.2/modules/mod_slotmem/NMAKEslotmem 2009-01-20 08:54:07 UTC (rev 2176)
+++ trunk/httpd/httpd-2.2/modules/mod_slotmem/NMAKEslotmem 2009-01-20 09:09:05 UTC (rev 2177)
@@ -36,7 +36,7 @@
LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib wldap32.lib ole32.lib $(LIBAPR) $(LIBAPU) $(LIBHTTPD)
CFLAGS = $(CFLAGS) -DCLUSTER_DECLARE_EXPORT
-INCLUDES = -I$(SRCDIR) -I$(BUILDINC)
+INCLUDES = -I$(SRCDIR) -I$(BUILDINC) -I../proxy
PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
BUILDBIN = $(WORKDIR)\$(PROJECT).so
15 years, 11 months
JBoss Native SVN: r2176 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-20 03:54:07 -0500 (Tue, 20 Jan 2009)
New Revision: 2176
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Oops thsi won't compile on windoze.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-19 17:29:09 UTC (rev 2175)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-20 08:54:07 UTC (rev 2176)
@@ -886,8 +886,9 @@
sizenode = node_storage->get_ids_used_node(nodes);
for (n=0; n<sizenode; n++) {
nodeinfo_t *node;
+ char *ret;
node_storage->read_node(nodes[n], &node);
- char *ret = get_balancer_by_node(r, node, conf, NULL);
+ ret = get_balancer_by_node(r, node, conf, NULL);
if (ret != NULL) {
return ret;
}
15 years, 11 months
JBoss Native SVN: r2175 - trunk/mod_cluster/test/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-19 12:29:09 -0500 (Mon, 19 Jan 2009)
New Revision: 2175
Modified:
trunk/mod_cluster/test/java/installhttpd.sh
Log:
When BASEDIR is not found only download if the file doesn't exist.
(Allow to download and test old versions).
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-19 15:08:06 UTC (rev 2174)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-19 17:29:09 UTC (rev 2175)
@@ -108,8 +108,17 @@
# http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-solaris-x86...
TARBALL=http://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuc...
BASELOC=`ant base | grep echo | sed 's:\[echo\]::' | sed 's:^ *::'`
-rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
-wget ${TARBALL}
+if [ "x${BASELOC}" = "x" ]
+then
+ BASELOC=`pwd`
+ if [ ! -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} ]
+ then
+ wget ${TARBALL}
+ fi
+else
+ rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
+ wget ${TARBALL}
+fi
TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
export BASELOC
echo "Base is: $BASELOC !!!"
15 years, 11 months
JBoss Native SVN: r2174 - trunk/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-19 10:08:06 -0500 (Mon, 19 Jan 2009)
New Revision: 2174
Modified:
trunk/mod_cluster/.classpath
trunk/mod_cluster/.project
Log:
Use maven eclipse plugin for build path.
Modified: trunk/mod_cluster/.classpath
===================================================================
--- trunk/mod_cluster/.classpath 2009-01-19 11:15:47 UTC (rev 2173)
+++ trunk/mod_cluster/.classpath 2009-01-19 15:08:06 UTC (rev 2174)
@@ -1,21 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" output="target/demo/classes" path="src/demo/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.0.GA/jboss-ha-server-api-1.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/easymock/easymock/2.4/easymock-2.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/jfree/jcommon/1.0.12/jcommon-1.0.12.jar"/>
- <classpathentry kind="var" path="M2_REPO/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.1.GA/jbossweb-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.2.GA/jboss-kernel-2.0.2.GA.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: trunk/mod_cluster/.project
===================================================================
--- trunk/mod_cluster/.project 2009-01-19 11:15:47 UTC (rev 2173)
+++ trunk/mod_cluster/.project 2009-01-19 15:08:06 UTC (rev 2174)
@@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
15 years, 11 months
JBoss Native SVN: r2173 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-19 06:15:47 -0500 (Mon, 19 Jan 2009)
New Revision: 2173
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Arrange case where we remove the wrong context or the wrong host.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:37:23 UTC (rev 2172)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-19 11:15:47 UTC (rev 2173)
@@ -1060,7 +1060,7 @@
return (process_node_cmd(r, status, errtype, node));
}
- /* Read the ID of the virtual corresponding to the first Alias */
+ /* Read the ID of the virtual host corresponding to the first Alias */
hostinfo.node = node->mess.id;
if (vhost->host != NULL)
strcpy(hostinfo.host, vhost->host);
@@ -1105,7 +1105,7 @@
break;
}
if (i==size) {
- hostinfo.id = host->vhost;
+ hostinfo.id = host->id;
remove_host(hoststatsmem, &hostinfo);
}
}
@@ -1278,7 +1278,7 @@
}
/*
- * Process the parameter and display corresponding information.
+ * Process the parameters and display corresponding informations.
*/
static void manager_info_contexts(request_rec *r, int node, int host)
{
@@ -1295,7 +1295,7 @@
char *status;
if (get_context(contextstatsmem, &ou, id[i]) != APR_SUCCESS)
continue;
- if (ou->node != node && ou->vhost != host)
+ if (ou->node != node || ou->vhost != host)
continue;
status = "REMOVED";
switch (ou->status) {
15 years, 11 months
JBoss Native SVN: r2172 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-15 12:37:23 -0500 (Thu, 15 Jan 2009)
New Revision: 2172
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Add a count of "active" sessions for each node.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:21:49 UTC (rev 2171)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:37:23 UTC (rev 2172)
@@ -1363,6 +1363,25 @@
ap_rprintf(r, "</pre>");
}
+static int count_sessionid(request_rec *r, char *route)
+{
+ int size, i;
+ int *id;
+ int count = 0;
+
+ /* Count the sessionid corresponding to the route */
+ size = get_max_size_sessionid(sessionidstatsmem);
+ id = apr_palloc(r->pool, sizeof(int) * size);
+ size = get_ids_used_sessionid(sessionidstatsmem, id);
+ for (i=0; i<size; i++) {
+ sessionidinfo_t *ou;
+ if (get_sessionid(sessionidstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
+ if (strcmp(route, ou->JVMRoute) == 0)
+ count++;
+ }
+ return count;
+}
static int manager_info(request_rec *r)
{
int size, i;
@@ -1447,9 +1466,9 @@
flushpackets, ou->mess.flushwait,
ou->mess.ping, ou->mess.smax, ou->mess.ttl);
proxystat = (proxy_worker_stat *) ou->stat;
- ap_rprintf(r, ",Elected: %d,Read: %d,Transfered: %d,Connected: %d,Load: %d\n",
+ ap_rprintf(r, ",Elected: %d,Read: %d,Transfered: %d,Connected: %d,Load: %d Num sessions: %d\n",
proxystat->elected, proxystat->read, proxystat->transferred,
- proxystat->busy, proxystat->lbfactor);
+ proxystat->busy, proxystat->lbfactor, count_sessionid(r, ou->mess.JVMRoute));
/* Process the Vhosts */
manager_info_hosts(r, id[i]);
15 years, 11 months
JBoss Native SVN: r2171 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-15 12:21:49 -0500 (Thu, 15 Jan 2009)
New Revision: 2171
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Skip element when read fails.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:04:27 UTC (rev 2170)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:21:49 UTC (rev 2171)
@@ -172,7 +172,8 @@
size = get_ids_used_node(nodestatsmem, id);
for (i=0; i<size; i++) {
nodeinfo_t *ou;
- get_node(nodestatsmem, &ou, id[i]);
+ if (get_node(nodestatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
if (ou->updatetime > last)
last = ou->updatetime;
}
@@ -792,7 +793,8 @@
size = get_ids_used_balancer(balancerstatsmem, id);
for (i=0; i<size; i++) {
balancerinfo_t *ou;
- get_balancer(balancerstatsmem, &ou, id[i]);
+ if (get_balancer(balancerstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "balancer: [%d] Name: %s Sticky: %d [%s]/[%s] remove: %d force: %d Timeout: %d Maxtry: %d\n",
id[i], ou->balancer, ou->StickySession,
ou->StickySessionCookie, ou->StickySessionPath,
@@ -805,7 +807,8 @@
size = get_ids_used_node(nodestatsmem, id);
for (i=0; i<size; i++) {
nodeinfo_t *ou;
- get_node(nodestatsmem, &ou, id[i]);
+ if (get_node(nodestatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "node: [%d:%d],Balancer: %s,JVMRoute: %s,Domain: [%s],Host: %s,Port: %s,Type: %s,flushpackets: %d,flushwait: %d,ping: %d,smax: %d,ttl: %d,timeout: %d\n",
id[i], ou->mess.id, ou->mess.balancer, ou->mess.JVMRoute, ou->mess.Domain,
ou->mess.Host, ou->mess.Port, ou->mess.Type,
@@ -818,7 +821,8 @@
size = get_ids_used_host(hoststatsmem, id);
for (i=0; i<size; i++) {
hostinfo_t *ou;
- get_host(hoststatsmem, &ou, id[i]);
+ if (get_host(hoststatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "host: %d [%s] vhost: %d node: %d\n", id[i], ou->host, ou->vhost,
ou->node);
}
@@ -828,7 +832,8 @@
size = get_ids_used_context(contextstatsmem, id);
for (i=0; i<size; i++) {
contextinfo_t *ou;
- get_context(contextstatsmem, &ou, id[i]);
+ if (get_context(contextstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "context: %d [%s] vhost: %d node: %d status: %d\n", id[i], ou->context,
ou->vhost, ou->node,
ou->status);
@@ -853,7 +858,8 @@
nodeinfo_t *ou;
proxy_worker_stat *proxystat;
char *flushpackets;
- get_node(nodestatsmem, &ou, id[i]);
+ if (get_node(nodestatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "Node: [%d],Name: %s,Balancer: %s,Domain: %s,Host: %s,Port: %s,Type: %s",
id[i], ou->mess.JVMRoute, ou->mess.balancer, ou->mess.Domain,
ou->mess.Host, ou->mess.Port, ou->mess.Type);
@@ -881,7 +887,8 @@
size = get_ids_used_host(hoststatsmem, id);
for (i=0; i<size; i++) {
hostinfo_t *ou;
- get_host(hoststatsmem, &ou, id[i]);
+ if (get_host(hoststatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "Vhost: [%d:%d:%d], Alias: %s\n",
ou->node, ou->vhost, id[i], ou->host);
}
@@ -893,7 +900,8 @@
for (i=0; i<size; i++) {
contextinfo_t *ou;
char *status;
- get_context(contextstatsmem, &ou, id[i]);
+ if (get_context(contextstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
status = "REMOVED";
switch (ou->status) {
case ENABLED:
@@ -930,7 +938,8 @@
int sizecontext;
int *idcontext;
- get_host(hoststatsmem, &ou, id[i]);
+ if (get_host(hoststatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
if (ou->node != node->mess.id)
continue;
/* If the host corresponds to a node process all contextes */
@@ -939,7 +948,8 @@
sizecontext = get_ids_used_context(contextstatsmem, idcontext);
for (j=0; j<sizecontext; j++) {
contextinfo_t *context;
- get_context(contextstatsmem, &context, idcontext[j]);
+ if (get_context(contextstatsmem, &context, idcontext[j]) != APR_SUCCESS)
+ continue;
if (context->vhost == ou->vhost &&
context->node == ou->node) {
/* Process the context */
@@ -1088,7 +1098,8 @@
size = get_ids_used_context(contextstatsmem, id);
for (i=0; i<size; i++) {
contextinfo_t *ou;
- get_context(contextstatsmem, &ou, id[i]);
+ if (get_context(contextstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
if (ou->vhost == host->vhost &&
ou->node == node->mess.id)
break;
@@ -1282,7 +1293,8 @@
for (i=0; i<size; i++) {
contextinfo_t *ou;
char *status;
- get_context(contextstatsmem, &ou, id[i]);
+ if (get_context(contextstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
if (ou->node != node && ou->vhost != host)
continue;
status = "REMOVED";
@@ -1313,7 +1325,8 @@
size = get_ids_used_host(hoststatsmem, id);
for (i=0; i<size; i++) {
hostinfo_t *ou;
- get_host(hoststatsmem, &ou, id[i]);
+ if (get_host(hoststatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
if (ou->node != node)
continue;
if (ou->vhost != vhost) {
@@ -1343,7 +1356,8 @@
size = get_ids_used_sessionid(sessionidstatsmem, id);
for (i=0; i<size; i++) {
sessionidinfo_t *ou;
- get_sessionid(sessionidstatsmem, &ou, id[i]);
+ if (get_sessionid(sessionidstatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "id: %s route: %s\n", ou->sessionid, ou->JVMRoute);
}
ap_rprintf(r, "</pre>");
@@ -1414,7 +1428,8 @@
nodeinfo_t *ou;
proxy_worker_stat *proxystat;
char *flushpackets;
- get_node(nodestatsmem, &ou, id[i]);
+ if (get_node(nodestatsmem, &ou, id[i]) != APR_SUCCESS)
+ continue;
ap_rprintf(r, "<h1> Node %s (%s://%s:%s):</h1>\n",
ou->mess.JVMRoute, ou->mess.Type, ou->mess.Host, ou->mess.Port);
15 years, 11 months
JBoss Native SVN: r2170 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-15 12:04:27 -0500 (Thu, 15 Jan 2009)
New Revision: 2170
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
Also displays sessionid.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:00:47 UTC (rev 2169)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2009-01-15 17:04:27 UTC (rev 2170)
@@ -1330,6 +1330,25 @@
ap_rprintf(r, "</pre>");
}
+static void manager_sessionid(request_rec *r)
+{
+ int size, i;
+ int *id;
+
+ /* Process the Sessionids */
+ ap_rprintf(r, "<h1>SessionIDs:</h1>");
+ ap_rprintf(r, "<pre>");
+ size = get_max_size_sessionid(sessionidstatsmem);
+ id = apr_palloc(r->pool, sizeof(int) * size);
+ size = get_ids_used_sessionid(sessionidstatsmem, id);
+ for (i=0; i<size; i++) {
+ sessionidinfo_t *ou;
+ get_sessionid(sessionidstatsmem, &ou, id[i]);
+ ap_rprintf(r, "id: %s route: %s\n", ou->sessionid, ou->JVMRoute);
+ }
+ ap_rprintf(r, "</pre>");
+
+}
static int manager_info(request_rec *r)
{
int size, i;
@@ -1420,6 +1439,8 @@
/* Process the Vhosts */
manager_info_hosts(r, id[i]);
}
+ /* Display the sessions */
+ manager_sessionid(r);
ap_rputs("</body></html>\n", r);
15 years, 11 months
JBoss Native SVN: r2169 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-15 12:00:47 -0500 (Thu, 15 Jan 2009)
New Revision: 2169
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange timeout handling for sessionid and check return codes.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-15 10:39:14 UTC (rev 2168)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-15 17:00:47 UTC (rev 2169)
@@ -70,7 +70,7 @@
#define WAITFORREMOVE 10 /* seconds */
#define TIMEINTERVAL apr_time_from_sec(1) /* recalcul the lbstatus based on number of request in the time interval */
-#define TIMESESSIONID apr_time_from_sec(300) /* after 5 minutes the sessionid have probably timeout */
+#define TIMESESSIONID 300 /* after 5 minutes the sessionid have probably timeout */
/* reslist constructor */
/* XXX: Should use the proxy_util one. */
@@ -612,7 +612,8 @@
/* update lbstatus if needed */
for (i=0; i<size; i++) {
nodeinfo_t *ou;
- node_storage->read_node(id[i], &ou);
+ if (node_storage->read_node(id[i], &ou) != APR_SUCCESS)
+ continue;
if (ou->mess.updatetimelb < (now - TIMEINTERVAL)) {
/* The lbstatus needs to be updated */
int elected, oldelected;
@@ -639,7 +640,7 @@
apr_time_t now;
int notok = 0;
- now = apr_time_now();
+ now = apr_time_sec(apr_time_now());
/* read the ident of the sessionid */
id = apr_pcalloc(pool, sizeof(int) * sessionid_storage->get_max_size_sessionid());
@@ -648,7 +649,8 @@
/* update lbstatus if needed */
for (i=0; i<size; i++) {
sessionidinfo_t *ou;
- sessionid_storage->read_sessionid(id[i], &ou);
+ if (sessionid_storage->read_sessionid(id[i], &ou) != APR_SUCCESS)
+ continue;
if (ou->updatetime < (now - TIMESESSIONID)) {
/* Remove it */
sessionid_storage->remove_sessionid(ou);
15 years, 11 months