summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/include/ctdb_private.h2
-rw-r--r--ctdb/server/ctdb_call.c28
-rw-r--r--ctdb/server/ctdb_keepalive.c27
3 files changed, 27 insertions, 30 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 91e98857a15..7d16c425881 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -511,8 +511,6 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(
int ctdb_daemon_call_recv(struct ctdb_call_state *state,
struct ctdb_call *call);
-void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode);
-
int ctdb_start_revoke_ro_record(struct ctdb_context *ctdb,
struct ctdb_db_context *ctdb_db,
TDB_DATA key, struct ctdb_ltdb_header *header,
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index fa82b49b556..c6bff4954ca 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1542,34 +1542,6 @@ int ctdb_daemon_call_recv(struct ctdb_call_state *state, struct ctdb_call *call)
}
-/*
- send a keepalive packet to the other node
-*/
-void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode)
-{
- struct ctdb_req_keepalive_old *r;
-
- if (ctdb->methods == NULL) {
- DEBUG(DEBUG_INFO,(__location__ " Failed to send keepalive. Transport is DOWN\n"));
- return;
- }
-
- r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REQ_KEEPALIVE,
- sizeof(struct ctdb_req_keepalive_old),
- struct ctdb_req_keepalive_old);
- CTDB_NO_MEMORY_FATAL(ctdb, r);
- r->hdr.destnode = destnode;
- r->hdr.reqid = 0;
-
- CTDB_INCREMENT_STAT(ctdb, keepalive_packets_sent);
-
- ctdb_queue_packet(ctdb, &r->hdr);
-
- talloc_free(r);
-}
-
-
-
struct revokechild_deferred_call {
struct revokechild_deferred_call *prev, *next;
struct ctdb_context *ctdb;
diff --git a/ctdb/server/ctdb_keepalive.c b/ctdb/server/ctdb_keepalive.c
index a8acded6946..5562bffd8ba 100644
--- a/ctdb/server/ctdb_keepalive.c
+++ b/ctdb/server/ctdb_keepalive.c
@@ -37,6 +37,33 @@
/*
+ send a keepalive packet to the other node
+*/
+static void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode)
+{
+ struct ctdb_req_keepalive_old *r;
+
+ if (ctdb->methods == NULL) {
+ DEBUG(DEBUG_INFO,
+ ("Failed to send keepalive. Transport is DOWN\n"));
+ return;
+ }
+
+ r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REQ_KEEPALIVE,
+ sizeof(struct ctdb_req_keepalive_old),
+ struct ctdb_req_keepalive_old);
+ CTDB_NO_MEMORY_FATAL(ctdb, r);
+ r->hdr.destnode = destnode;
+ r->hdr.reqid = 0;
+
+ CTDB_INCREMENT_STAT(ctdb, keepalive_packets_sent);
+
+ ctdb_queue_packet(ctdb, &r->hdr);
+
+ talloc_free(r);
+}
+
+/*
see if any nodes are dead
*/
static void ctdb_check_for_dead_nodes(struct tevent_context *ev,