mirror of
https://github.com/samba-team/samba.git
synced 2025-03-19 18:50:24 +03:00
Simplified code in ctdb_init_transport.
(This used to be ctdb commit 9a30e0fcbdde587cb1f3d854b8f1d22da19d9af4)
This commit is contained in:
parent
e5f2e5e5eb
commit
933cb2efce
@ -39,25 +39,21 @@ int ctdb_init_transport(struct ctdb_context *ctdb)
|
||||
{
|
||||
int i;
|
||||
int ctdb_tcp_init(struct ctdb_context *ctdb);
|
||||
int transport_found = 0;
|
||||
#ifdef USE_INFINIBAND
|
||||
int ctdb_ibw_init(struct ctdb_context *ctdb);
|
||||
#endif /* USE_INFINIBAND */
|
||||
|
||||
if (strcmp(ctdb->transport, "tcp") == 0) {
|
||||
transport_found = 1;
|
||||
if (ctdb_tcp_init(ctdb))
|
||||
return -1;
|
||||
}
|
||||
#ifdef USE_INFINIBAND
|
||||
else if (strcmp(ctdb->transport, "ib") == 0) {
|
||||
transport_found = 1;
|
||||
if (ctdb_ibw_init(ctdb))
|
||||
return -1;
|
||||
}
|
||||
#endif /* USE_INFINIBAND */
|
||||
|
||||
if (!transport_found) {
|
||||
else {
|
||||
ctdb_set_error(ctdb, "Unknown transport '%s'\n", ctdb->transport);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user