summaryrefslogtreecommitdiffstats
path: root/ctdb/tcp/tcp_init.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-12-01 15:45:24 +1100
committerAndrew Tridgell <tridge@samba.org>2006-12-01 15:45:24 +1100
commitec5d2ddd8e860de584fb572bdb46e58422931010 (patch)
treeb422fe1b5cf478af1b129c241774987da9123107 /ctdb/tcp/tcp_init.c
parent7e21f51b0592ca3ccd858f2c67d314fe28222d02 (diff)
downloadsamba-ec5d2ddd8e860de584fb572bdb46e58422931010.tar.gz
samba-ec5d2ddd8e860de584fb572bdb46e58422931010.tar.xz
samba-ec5d2ddd8e860de584fb572bdb46e58422931010.zip
- added ctdb_set_flags() call
- added --self-connect option to ctdb_test, allowing testing when a node connects to itself. not as efficient as local bypass, but very useful for testing purposes (easier to work with 1 task in gdb than 2) - split the ctdb_call() into an async triple, in the style of Samba4 async functions. So we now have ctdb_call_send(), ctdb_call_recv() and ctdb_call(). - added the main ctdb_call protocol logic. No error checking yet, but seems to work for simple cases - ensure we initialise the length argument to getsockopt() (This used to be ctdb commit 95fad717ef5ab93be3603aa11d2878876fe868d3)
Diffstat (limited to 'ctdb/tcp/tcp_init.c')
-rw-r--r--ctdb/tcp/tcp_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c
index 39ecec4dbdd..b3378677035 100644
--- a/ctdb/tcp/tcp_init.c
+++ b/ctdb/tcp/tcp_init.c
@@ -39,7 +39,8 @@ int ctdb_tcp_start(struct ctdb_context *ctdb)
next event loop */
for (i=0;i<ctdb->num_nodes;i++) {
struct ctdb_node *node = *(ctdb->nodes + i);
- if (ctdb_same_address(&ctdb->address, &node->address)) continue;
+ if (!(ctdb->flags & CTDB_FLAG_SELF_CONNECT) &&
+ ctdb_same_address(&ctdb->address, &node->address)) continue;
event_add_timed(ctdb->ev, node, timeval_zero(),
ctdb_tcp_node_connect, node);
}