From: Michael Adam Date: Fri, 11 Dec 2009 23:30:37 +0000 (+0100) Subject: s3:dbwrap_ctdb: fix db_ctdb_fetch_db_seqnum_from_db() when NT_STATUS_NOT_FOUND. X-Git-Tag: release-3-6-0pre1~5381 X-Git-Url: http://git.samba.org/?p=amitay%2Fsamba.git;a=commitdiff_plain;h=10a44ee6930bb51b4b20ce42f35bc455ac1b7293 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 --- diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index fb99e1d9cf5..4c4486c5397 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;