summaryrefslogtreecommitdiff
path: root/source3/lib/messages_ctdb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-07-25 17:10:27 +0200
committerJeremy Allison <jra@samba.org>2017-12-05 00:56:12 +0100
commit2fdde4a07a4e7f28cd9cbd0ac9a0bae3fa748522 (patch)
tree1e473d7655be5cbe52e8251d428e96da03732692 /source3/lib/messages_ctdb.c
parent84fd51ba6103957f64021e6543314bcbe1f389af (diff)
downloadsamba-2fdde4a07a4e7f28cd9cbd0ac9a0bae3fa748522.tar.gz
messaging: Always register CTDB_SRVID_SAMBA_PROCESS
This will be used to broadcast to all processes, avoiding the costly traverse of serverid.tdb. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib/messages_ctdb.c')
-rw-r--r--source3/lib/messages_ctdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/messages_ctdb.c b/source3/lib/messages_ctdb.c
index a2a7c215f23..66b9f55d256 100644
--- a/source3/lib/messages_ctdb.c
+++ b/source3/lib/messages_ctdb.c
@@ -26,6 +26,7 @@
#include "lib/messages_util.h"
#include "ctdbd_conn.h"
#include "lib/cluster_support.h"
+#include "ctdb_srvids.h"
struct messaging_ctdb_context;
@@ -111,6 +112,14 @@ int messaging_ctdb_init(const char *sockname, int timeout, uint64_t unique_id,
goto fail;
}
+ ret = register_with_ctdbd(ctx->conn, CTDB_SRVID_SAMBA_PROCESS,
+ messaging_ctdb_recv, ctx);
+ if (ret != 0) {
+ DBG_DEBUG("register_with_ctdbd returned %s (%d)\n",
+ strerror(ret), ret);
+ goto fail;
+ }
+
ret = register_with_ctdbd(ctx->conn, unique_id, NULL, NULL);
if (ret != 0) {
DBG_DEBUG("register_with_ctdbd returned %s (%d)\n",