summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-12-12 00:30:37 +0100
committerKarolin Seeger <kseeger@samba.org>2010-04-01 09:39:15 +0200
commit8d81f930dbf5c076956be844af87d78232ce07ec (patch)
treef0ff51c88461f3e01d4446bab6ddfd665bda523f /source3/lib
parent17ba211072e629eb1692e6b1b942b0857cab7c70 (diff)
downloadsamba-8d81f930dbf5c076956be844af87d78232ce07ec.tar.gz
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 (cherry picked from commit 10a44ee6930bb51b4b20ce42f35bc455ac1b7293) (cherry picked from commit 8926082d096b2a6e8688b1668bd7293632ebb508)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap_ctdb.c6
1 files changed, 5 insertions, 1 deletions
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;