diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-06-24 12:04:25 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-07-09 04:19:12 +0200 |
commit | 91be76dbe93a2be763a93163bec8c17d35057944 (patch) | |
tree | a25c38487ca03efbc5d62108f65228c14f82b946 | |
parent | 1ed330f7cbd753b6c29246d522c5ddca5160d8bb (diff) | |
download | samba-91be76dbe93a2be763a93163bec8c17d35057944.tar.gz samba-91be76dbe93a2be763a93163bec8c17d35057944.tar.xz samba-91be76dbe93a2be763a93163bec8c17d35057944.zip |
ctdb-daemon: Simplify code a bit
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | ctdb/server/ctdb_ltdb_server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index 14bfdc32a6..bec27c8992 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -1065,6 +1065,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, struct ctdb_db_context *db; struct ctdb_node *node = ctdb->nodes[ctdb->pnn]; struct ctdb_client *client = NULL; + bool with_jenkinshash; if (ctdb->tunable.allow_client_db_attach == 0) { DEBUG(DEBUG_ERR, ("DB Attach to database %s denied by tunable " @@ -1134,7 +1135,10 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, return 0; } - if (ctdb_local_attach(ctdb, db_name, persistent, NULL, (tdb_flags&TDB_INCOMPATIBLE_HASH)?true:false) != 0) { + with_jenkinshash = (tdb_flags & TDB_INCOMPATIBLE_HASH) ? true : false; + + if (ctdb_local_attach(ctdb, db_name, persistent, NULL, + with_jenkinshash) != 0) { return -1; } |