Author: jfrederic.clere(a)jboss.com
Date: 2008-04-30 05:24:39 -0400 (Wed, 30 Apr 2008)
New Revision: 1571
Modified:
sandbox/httpd/src/native/common/context.c
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Improve the context "key" logic.
Modified: sandbox/httpd/src/native/common/context.c
===================================================================
--- sandbox/httpd/src/native/common/context.c 2008-04-30 09:23:43 UTC (rev 1570)
+++ sandbox/httpd/src/native/common/context.c 2008-04-30 09:24:39 UTC (rev 1571)
@@ -87,7 +87,8 @@
{
contextinfo_t *in = (contextinfo_t *)*data;
contextinfo_t *ou = (contextinfo_t *)mem;
- if (strcmp(in->context, ou->context) == 0 && in->vhost ==
ou->vhost) {
+ if (strcmp(in->context, ou->context) == 0 &&
+ in->vhost == ou->vhost && in->node == ou->node) {
memcpy(ou, in, sizeof(contextinfo_t));
ou->id = id;
ou->updatetime = apr_time_sec(apr_time_now());
@@ -129,7 +130,8 @@
static apr_status_t loc_read_context(void* mem, void **data, int id, apr_pool_t *pool) {
contextinfo_t *in = (contextinfo_t *)*data;
contextinfo_t *ou = (contextinfo_t *)mem;
- if (strcmp(in->context, ou->context) == 0 && in->vhost ==
ou->vhost) {
+ if (strcmp(in->context, ou->context) == 0 &&
+ in->vhost == ou->vhost && ou->node == in->node) {
*data = ou;
return APR_SUCCESS;
}
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-30 09:23:43 UTC (rev 1570)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-30 09:24:39 UTC (rev 1571)
@@ -429,8 +429,9 @@
for (i=0; i<size; i++) {
nodeinfo_t *ou;
get_node(nodestatsmem, &ou, id[i]);
- ap_rprintf(r, "node: [%d:%d] %s %s %s %s %s\n", id[i], ou->mess.id,
ou->mess.JVMRoute, ou->mess.Domain,
- ou->mess.Host, ou->mess.Port, ou->mess.Type);
+ ap_rprintf(r, "node: [%d:%d] JVMRoute: %s Domain: [%s] Host: %s Port: %s
Type: %s\n",
+ id[i], ou->mess.id, ou->mess.JVMRoute, ou->mess.Domain,
+ ou->mess.Host, ou->mess.Port, ou->mess.Type);
}
size = get_max_size_host(hoststatsmem);
@@ -439,7 +440,7 @@
for (i=0; i<size; i++) {
hostinfo_t *ou;
get_host(hoststatsmem, &ou, id[i]);
- ap_rprintf(r, "host: %d [%s] %d %d\n", id[i], ou->host,
ou->vhost,
+ ap_rprintf(r, "host: %d [%s] vhost: %d node: %d\n", id[i], ou->host,
ou->vhost,
ou->node);
}
@@ -449,8 +450,9 @@
for (i=0; i<size; i++) {
contextinfo_t *ou;
get_context(contextstatsmem, &ou, id[i]);
- ap_rprintf(r, "context: %d [%s] %d %d status: %d\n", id[i],
ou->context, ou->vhost,
- ou->node, ou->status);
+ ap_rprintf(r, "context: %d [%s] vhost: %d node: %d status: %d\n",
id[i], ou->context,
+ ou->vhost, ou->node,
+ ou->status);
}
return OK;
}