From 10a44ee6930bb51b4b20ce42f35bc455ac1b7293 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 12 Dec 2009 00:30:37 +0100 Subject: s3:dbwrap_ctdb: fix db_ctdb_fetch_db_seqnum_from_db() when NT_STATUS_NOT_FOUND. Don't treat this as an error but return seqnum 0 instead. Michael --- source3/lib/dbwrap_ctdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index fb99e1d9cf..4c4486c539 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -685,10 +685,14 @@ static NTSTATUS db_ctdb_fetch_db_seqnum_from_db(struct db_ctdb_ctx *db, key.dsize = strlen(keyname) + 1; status = db_ctdb_ltdb_fetch(db, key, &header, mem_ctx, &data); - if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status) && + !NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) + { goto done; } + status = NT_STATUS_OK; + if (data.dsize != sizeof(uint64_t)) { *seqnum = 0; goto done; -- cgit