merged tdb from ctdb bzr tree
[ira/wip.git] / source / lib / tdb / common / traverse.c
index 6fc576a55a324b942973356cc371a352a1cb88fb..2bde1270a078f2df05ddf235fb14cd6fd5218df0 100644 (file)
@@ -238,7 +238,9 @@ int tdb_traverse(struct tdb_context *tdb,
                return -1;
        }
 
+       tdb->traverse_write++;
        ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
+       tdb->traverse_write--;
 
        tdb_transaction_unlock(tdb);
 
@@ -330,3 +332,4 @@ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA oldkey)
                TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_nextkey: WARNING tdb_unlock failed!\n"));
        return key;
 }
+