]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
add a node->tx_cnt counter
authorRonnie Sahlberg <sahlberg@ronnie>
Sat, 19 May 2007 00:20:19 +0000 (10:20 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Sat, 19 May 2007 00:20:19 +0000 (10:20 +1000)
only send keepalive packets if the count is zero

(This used to be ctdb commit 2cbd424231caccf0a531cf6501761115efe68f3e)

ctdb/common/ctdb_monitor.c
ctdb/include/ctdb_private.h

index 255ea5ee30acdb886d7e58d39332d125577b33a7..0af62eb2d686ecbaf5bfe43d39fcebca8b7cd237 100644 (file)
@@ -64,8 +64,12 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
                        */
                        continue;
                }
+               
+               if (node->tx_cnt == 0) {
+                       ctdb_send_keepalive(ctdb, node->vnn);
+               }
 
-               ctdb_send_keepalive(ctdb, node->vnn);
+               node->tx_cnt = 0;
        }
        
        event_add_timed(ctdb->ev, ctdb, 
index 0149714c8566d2885c8d95d6b4cb4d01b70321d4..a2545ac7a7f6a97f994f4c4575c331eef6e94a45 100644 (file)
@@ -93,6 +93,7 @@ struct ctdb_node {
        /* used by the dead node monitoring */
        uint32_t dead_count;
        uint32_t rx_cnt;
+       uint32_t tx_cnt;
 
        /* a list of controls pending to this node, so we can time them out quickly
           if the node becomes disconnected */