diff options
author | Michael Adam <obnox@samba.org> | 2009-12-12 00:30:37 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-04-01 09:39:15 +0200 |
commit | 8d81f930dbf5c076956be844af87d78232ce07ec (patch) | |
tree | f0ff51c88461f3e01d4446bab6ddfd665bda523f /source3/lib | |
parent | 17ba211072e629eb1692e6b1b942b0857cab7c70 (diff) | |
download | samba-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.c | 6 |
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; |