diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-30 14:46:14 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-05-30 14:46:14 +1000 |
commit | c833b06a35afd2de5edc237df0b1a461a649d9e3 (patch) | |
tree | f0923caf347f4abfcf60771c46f3add653d45bf8 /ctdb/tcp/tcp_init.c | |
parent | 3c062bb5aee3b66c2669c88e0a4536c6b9697837 (diff) | |
download | samba-c833b06a35afd2de5edc237df0b1a461a649d9e3.tar.gz samba-c833b06a35afd2de5edc237df0b1a461a649d9e3.tar.xz samba-c833b06a35afd2de5edc237df0b1a461a649d9e3.zip |
we need to listen at transport initialise stage to find our own node number
(This used to be ctdb commit 4a9455dfbe95e53884b46ad26dba0c33e3432ba9)
Diffstat (limited to 'ctdb/tcp/tcp_init.c')
-rw-r--r-- | ctdb/tcp/tcp_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 665336e947..3ccf580188 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -52,6 +52,9 @@ static int ctdb_tcp_initialise(struct ctdb_context *ctdb) { int i; + /* listen on our own address */ + if (ctdb_tcp_listen(ctdb) != 0) return -1; + for (i=0; i<ctdb->num_nodes; i++) { if (ctdb_tcp_add_node(ctdb->nodes[i]) != 0) { DEBUG(0, ("methods->add_node failed at %d\n", i)); @@ -69,9 +72,6 @@ static int ctdb_tcp_start(struct ctdb_context *ctdb) { int i; - /* listen on our own address */ - if (ctdb_tcp_listen(ctdb) != 0) return -1; - /* startup connections to the other servers - will happen on next event loop */ for (i=0;i<ctdb->num_nodes;i++) { |