summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/common/ctdb_daemon.c')
-rw-r--r--ctdb/common/ctdb_daemon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c
index 6c11c7b730..87539dc6c6 100644
--- a/ctdb/common/ctdb_daemon.c
+++ b/ctdb/common/ctdb_daemon.c
@@ -44,6 +44,11 @@ static void daemon_incoming_packet(void *, uint8_t *, uint32_t );
static void ctdb_main_loop(struct ctdb_context *ctdb)
{
+ /* we are the dispatcher process now, so start the protocol going */
+ if (ctdb_init_transport(ctdb)) {
+ exit(1);
+ }
+
ctdb->methods->start(ctdb);
/* go into a wait loop to allow other nodes to complete */
@@ -594,6 +599,12 @@ int ctdb_start(struct ctdb_context *ctdb)
close(fd[0]);
close(ctdb->daemon.sd);
ctdb->daemon.sd = -1;
+
+ /* Added because of ctdb->methods->allocate_pkt calls */
+ /* TODO: clean */
+ int ctdb_tcp_init(struct ctdb_context *ctdb);
+ ctdb_tcp_init(ctdb);
+
return 0;
}