r22083: opendb backend to ctdb now passes simple tests
authorAndrew Tridgell <tridge@samba.org>
Thu, 5 Apr 2007 04:08:00 +0000 (04:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:49:49 +0000 (14:49 -0500)
source/cluster/ctdb/opendb_ctdb.c

index e12bf3260b661a88c5aa792a080aab21adfbe000..f184f7bb98aad3a7290452ef61d99928b46d3c9c 100644 (file)
@@ -193,9 +193,14 @@ static NTSTATUS odb_pull_record(struct odb_lock *lck, struct opendb_file *file)
        TDB_DATA dbuf;
        DATA_BLOB blob;
        NTSTATUS status;
-               
+
        dbuf = lck->data;
 
+       if (dbuf.dsize == 0) {
+               /* empty record in ctdb means the record isn't there */
+               return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+       }
+
        blob.data = dbuf.dptr;
        blob.length = dbuf.dsize;