summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/ctdb_cluster.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-04-16 00:18:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:40 -0500
commitc9f04d8648cfdd573d45d47467bc964ef01f754d (patch)
tree115acf98b7b136f07dd8b16bbd50c9f7cbcdd3bb /source4/cluster/ctdb/ctdb_cluster.c
parentbb36705c8d360a2ba865a3d8118c52afa1e46f4e (diff)
downloadsamba-c9f04d8648cfdd573d45d47467bc964ef01f754d.tar.gz
samba-c9f04d8648cfdd573d45d47467bc964ef01f754d.tar.bz2
samba-c9f04d8648cfdd573d45d47467bc964ef01f754d.zip
r22231: merge from bzr ctdb tree
(This used to be commit 807b959082d3b9a929c9f6597714e636638a940e)
Diffstat (limited to 'source4/cluster/ctdb/ctdb_cluster.c')
-rw-r--r--source4/cluster/ctdb/ctdb_cluster.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c
index ceff53ee5d..aee47c6281 100644
--- a/source4/cluster/ctdb/ctdb_cluster.c
+++ b/source4/cluster/ctdb/ctdb_cluster.c
@@ -141,6 +141,17 @@ static NTSTATUS ctdb_message_init(struct cluster_ops *ops,
{
struct cluster_state *state = ops->private;
struct cluster_messaging_list *m;
+ int ret;
+
+ /* setup messaging handler */
+ ret = ctdb_set_message_handler(state->ctdb, ctdb_message_handler,
+ server.id, state);
+ if (ret == -1) {
+ DEBUG(0,("ctdb_set_message_handler failed - %s\n",
+ ctdb_errstr(state->ctdb)));
+ exit(1);
+ }
+
m = talloc(msg, struct cluster_messaging_list);
NT_STATUS_HAVE_NO_MEMORY(m);
@@ -248,14 +259,6 @@ void cluster_ctdb_init(struct event_context *ev)
goto failed;
}
- /* setup messaging handler */
- ret = ctdb_set_message_handler(state->ctdb, ctdb_message_handler, state);
- if (ret == -1) {
- DEBUG(0,("ctdb_set_message_handler failed - %s\n",
- ctdb_errstr(state->ctdb)));
- goto failed;
- }
-
/* attach all the databases we will need */
for (i=0;i<ARRAY_SIZE(db_list);i++) {
struct ctdb_db_context *ctdb_db;