diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-11-28 17:56:10 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2006-11-28 17:56:10 +1100 |
commit | fdb317facfdb60c87695b557a4680401c210031a (patch) | |
tree | cbd2b28aab25f51704605d90a00bd466b2b8faf9 /ctdb/tcp/tcp_init.c | |
parent | 5d0ba69e06d2f37788697c3b7c39287334d2fa22 (diff) | |
download | samba-fdb317facfdb60c87695b557a4680401c210031a.tar.gz samba-fdb317facfdb60c87695b557a4680401c210031a.tar.xz samba-fdb317facfdb60c87695b557a4680401c210031a.zip |
- added simple (fake) vnn system
- split up ctdb layer code into 3 modules
- added a simple test suite
- added packet structures for ctdb_call
- switched to an array for ctdb_node to make vnn lookup easy and fast
(This used to be ctdb commit 8a17460a816a5970f2df8244a06aec55d814f186)
Diffstat (limited to 'ctdb/tcp/tcp_init.c')
-rw-r--r-- | ctdb/tcp/tcp_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index b98a92818d..39ecec4dbd 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -30,14 +30,15 @@ */ int ctdb_tcp_start(struct ctdb_context *ctdb) { - struct ctdb_node *node; + 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 (node=ctdb->nodes;node;node=node->next) { + for (i=0;i<ctdb->num_nodes;i++) { + struct ctdb_node *node = *(ctdb->nodes + i); if (ctdb_same_address(&ctdb->address, &node->address)) continue; event_add_timed(ctdb->ev, node, timeval_zero(), ctdb_tcp_node_connect, node); |