Author: jfrederic.clere(a)jboss.com
Date: 2009-05-26 05:50:55 -0400 (Tue, 26 May 2009)
New Revision: 2451
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
balancer:// = 11 cluster:// 10
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-05-26 07:25:30 UTC
(rev 2450)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-05-26 09:50:55 UTC
(rev 2451)
@@ -1471,7 +1471,7 @@
"cluster: Found route %s", route);
#endif
if (node_storage->find_node(&ou, route) == APR_SUCCESS) {
- if (strlen(balancer->name)>10 &&
!strcmp(&balancer->name[10], ou->mess.balancer)) {
+ if (strlen(balancer->name)>11 &&
!strcmp(&balancer->name[11], ou->mess.balancer)) {
#if HAVE_CLUSTER_EX_DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"cluster: Found balancer %s for %s",
ou->mess.balancer, route);
@@ -1491,7 +1491,7 @@
#endif
apr_table_setn(r->notes, "CLUSTER_DOMAIN",
ou->mess.Domain);
}
- return &balancer->name[10];
+ return &balancer->name[11];
}
}
}
@@ -1857,8 +1857,13 @@
*worker = NULL;
#if HAVE_CLUSTER_EX_DEBUG
+ if (*balancer) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "proxy_cluster_pre_request: url %s balancer %s", *url,
(*balancer)->name);
+ } else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy_cluster_pre_request: url %s", *url);
+ }
#endif
/* Step 1: check if the url is for us
* The url we can handle starts with 'balancer://'
@@ -1868,7 +1873,11 @@
if (*balancer) {
/* Adjust the helper->count corresponding to the previous try */
const char *worker_name = apr_table_get(r->subprocess_env,
"BALANCER_WORKER_NAME");
- if (domain && *domain) {
+ if (worker_name && *worker_name) {
+#if HAVE_CLUSTER_EX_DEBUG
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "proxy_cluster_pre_request: worker %s", worker_name);
+#endif
int i;
runtime = (proxy_worker *)(*balancer)->workers->elts;
for (i = 0; i < (*balancer)->workers->nelts; i++, runtime++) {
Show replies by date