Author: jfrederic.clere(a)jboss.com
Date: 2009-07-27 06:09:18 -0400 (Mon, 27 Jul 2009)
New Revision: 2511
Modified:
trunk/mod_cluster/native/include/domain.h
trunk/mod_cluster/native/include/node.h
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange prototyping.
Modified: trunk/mod_cluster/native/include/domain.h
===================================================================
--- trunk/mod_cluster/native/include/domain.h 2009-07-27 07:28:26 UTC (rev 2510)
+++ trunk/mod_cluster/native/include/domain.h 2009-07-27 10:09:18 UTC (rev 2511)
@@ -91,6 +91,15 @@
*/
apr_status_t remove_domain(mem_t *s, domaininfo_t *domain);
+/**
+ * find a domain record from the shared table using JVMRoute and balancer
+ * @param pointer to the shared table.
+ * @param domain address where the node is located in the shared table.
+ * @param route JVMRoute to search
+ * @return APR_SUCCESS if all went well
+ */
+apr_status_t find_domain(mem_t *s, domaininfo_t **domain, const char *route, const char
*balancer);
+
/*
* get the ids for the used (not free) domains in the table
* @param pointer to the shared table.
Modified: trunk/mod_cluster/native/include/node.h
===================================================================
--- trunk/mod_cluster/native/include/node.h 2009-07-27 07:28:26 UTC (rev 2510)
+++ trunk/mod_cluster/native/include/node.h 2009-07-27 10:09:18 UTC (rev 2511)
@@ -120,6 +120,15 @@
*/
apr_status_t remove_node(mem_t *s, nodeinfo_t *node);
+/**
+ * find a node record from the shared table using JVMRoute
+ * @param pointer to the shared table.
+ * @param node address where the node is located in the shared table.
+ * @param route JVMRoute to search
+ * @return APR_SUCCESS if all went well
+ */
+apr_status_t find_node(mem_t *s, nodeinfo_t **node, const char *route);
+
/*
* get the ids for the used (not free) nodes in the table
* @param pointer to the shared table.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-07-27 07:28:26 UTC
(rev 2510)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-07-27 10:09:18 UTC
(rev 2511)
@@ -1507,13 +1507,13 @@
}
/* Given the route find the corresponding domain (if there is a domain) */
-static apr_status_t find_domain(request_rec *r, char **domain, char *route, const char
*balancer)
+static apr_status_t find_nodedomain(request_rec *r, char **domain, char *route, const
char *balancer)
{
nodeinfo_t *ou;
domaininfo_t *dom;
#if HAVE_CLUSTER_EX_DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "find_domain: finding node for %s: %s", route, balancer);
+ "find_nodedomain: finding node for %s: %s", route, balancer);
#endif
if (node_storage->find_node(&ou, route) == APR_SUCCESS) {
if (!strcmp(balancer, ou->mess.balancer)) {
@@ -1526,7 +1526,7 @@
#if HAVE_CLUSTER_EX_DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "find_domain: finding domain for %s: %s", route, balancer);
+ "find_nodedomain: finding domain for %s: %s", route,
balancer);
#endif
/* We can't find the node, because it was removed... */
if (domain_storage->find_domain(&dom, route, balancer ) == APR_SUCCESS) {
@@ -1568,7 +1568,7 @@
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"cluster: Found route %s", route);
#endif
- if (find_domain(r, &domain, route, &balancer->name[11]) ==
APR_SUCCESS) {
+ if (find_nodedomain(r, &domain, route, &balancer->name[11]) ==
APR_SUCCESS) {
#if HAVE_CLUSTER_EX_DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"cluster: Found balancer %s for %s",
&balancer->name[11], route);