]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-keepalive: Move ctdb_send_keepalive() to ctdb_keepalive.c
authorAmitay Isaacs <amitay@gmail.com>
Fri, 21 Apr 2017 07:18:49 +0000 (17:18 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 24 May 2017 15:03:28 +0000 (17:03 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/include/ctdb_private.h
ctdb/server/ctdb_call.c
ctdb/server/ctdb_keepalive.c

index 91e98857a15a44d1a9572b18b7e3f6b1e25eae33..7d16c42588107e366fe2cc66ed79c7dd6b8d2078 100644 (file)
@@ -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,
index fa82b49b55690d5015c3afddade4dc43df8b8e20..c6bff4954ca773064c5cb2b7aeb5f7561d26dcc9 100644 (file)
@@ -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;
index a8acded6946262ab4a807a1899308a627af3ec1f..5562bffd8baf1fbe3738ffc6b5fb3f0d6f6dfff8 100644 (file)
 #include "common/logging.h"
 
 
+/*
+   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
  */