Author: jfrederic.clere(a)jboss.com
Date: 2009-01-21 12:37:24 -0500 (Wed, 21 Jan 2009)
New Revision: 2194
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Skip entry when node_storage->read_node() fails.
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-21 16:47:05 UTC
(rev 2193)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-21 17:37:24 UTC
(rev 2194)
@@ -890,7 +890,8 @@
for (n=0; n<sizenode; n++) {
nodeinfo_t *node;
char *ret;
- node_storage->read_node(nodes[n], &node);
+ if (node_storage->read_node(nodes[n], &node) != APR_SUCCESS)
+ continue;
ret = get_balancer_by_node(r, node, conf, NULL);
if (ret != NULL) {
return ret;
@@ -1002,7 +1003,8 @@
nodeinfo_t *node1;
int lbstatus, lbstatus1;
- node_storage->read_node(mycandidate->id, &node1);
+ if (node_storage->read_node(mycandidate->id, &node1) !=
APR_SUCCESS)
+ continue;
lbstatus1 = ((mycandidate->s->elected -
node1->mess.oldelected) * 1000)/mycandidate->s->lbfactor;
lbstatus = ((worker->s->elected -
node->mess.oldelected) * 1000)/worker->s->lbfactor;
lbstatus1 = lbstatus1 + mycandidate->s->lbstatus;
@@ -1321,7 +1323,8 @@
size = node_storage->get_ids_used_node(id);
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.remove && (now - ou->updatetime) >=
apr_time_from_sec(WAITFORREMOVE) &&
(now - ou->mess.lastcleantry) >= apr_time_from_sec(WAITFORREMOVE)) {
/* remove the node from the shared memory */
Show replies by date