mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-tools: Fix CID 1414746
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
eb16d4a61c
commit
83039d6a5c
@ -4142,6 +4142,7 @@ static int control_restoredb(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
ssize_t n;
|
||||
int fd, i;
|
||||
int count, ret;
|
||||
uint8_t db_flags;
|
||||
|
||||
if (argc < 1 || argc > 2) {
|
||||
usage("restoredb");
|
||||
@ -4185,8 +4186,9 @@ static int control_restoredb(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
|
||||
localtime(&db_hdr.timestamp));
|
||||
printf("Restoring database %s from backup @ %s\n", db_name, timebuf);
|
||||
|
||||
db_flags = db_hdr.flags & 0xff;
|
||||
ret = ctdb_attach(ctdb->ev, ctdb->client, TIMEOUT(), db_name,
|
||||
db_hdr.flags, &db);
|
||||
db_flags, &db);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Failed to attach to DB %s\n", db_name);
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user