summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/ctdb_cluster.c
diff options
context:
space:
mode:
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;