diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-04 04:57:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:47 -0500 |
commit | a78be2150ba06738f4c7e85ca2980200d4a3c533 (patch) | |
tree | bc30c417b22a8cd51692635134f4c865a6023235 /source4/cluster/ctdb/common/ctdb.c | |
parent | 690df3ccd98c586610cc5e528b05f7863b334a3c (diff) | |
download | samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.tar.gz samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.tar.bz2 samba-a78be2150ba06738f4c7e85ca2980200d4a3c533.zip |
r22070: merge in the changes from the bzr ctdb tree, and convert the brlock
ctdb backend to use the updated multi-database API
(This used to be commit 44dcac9e4d81bfc078512248967b6240db9d1bd8)
Diffstat (limited to 'source4/cluster/ctdb/common/ctdb.c')
-rw-r--r-- | source4/cluster/ctdb/common/ctdb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/cluster/ctdb/common/ctdb.c b/source4/cluster/ctdb/common/ctdb.c index 59a14d4dbd..e4f7289550 100644 --- a/source4/cluster/ctdb/common/ctdb.c +++ b/source4/cluster/ctdb/common/ctdb.c @@ -32,10 +32,19 @@ int ctdb_set_transport(struct ctdb_context *ctdb, const char *transport) { int ctdb_tcp_init(struct ctdb_context *ctdb); +#ifdef USE_INFINIBAND + int ctdb_ibw_init(struct ctdb_context *ctdb); +#endif /* USE_INFINIBAND */ if (strcmp(transport, "tcp") == 0) { return ctdb_tcp_init(ctdb); } +#ifdef USE_INFINIBAND + if (strcmp(transport, "ib") == 0) { + return ctdb_ibw_init(ctdb); + } +#endif /* USE_INFINIBAND */ + ctdb_set_error(ctdb, "Unknown transport '%s'\n", transport); return -1; } @@ -141,15 +150,15 @@ int ctdb_set_address(struct ctdb_context *ctdb, const char *address) /* add a node to the list of active nodes */ -int ctdb_set_call(struct ctdb_context *ctdb, ctdb_fn_t fn, int id) +int ctdb_set_call(struct ctdb_db_context *ctdb_db, ctdb_fn_t fn, int id) { struct ctdb_registered_call *call; - call = talloc(ctdb, struct ctdb_registered_call); + call = talloc(ctdb_db, struct ctdb_registered_call); call->fn = fn; call->id = id; - DLIST_ADD(ctdb->calls, call); + DLIST_ADD(ctdb_db->calls, call); return 0; } |