diff options
Diffstat (limited to 'lib/tdb2/tdb.c')
-rw-r--r-- | lib/tdb2/tdb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index be2ff0d676..28d0e03f7d 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -304,6 +304,12 @@ enum TDB_ERROR tdb_delete(struct tdb_context *tdb, struct tdb_data key) struct hash_info h; enum TDB_ERROR ecode; + if (tdb->flags & TDB_VERSION1) { + if (tdb1_delete(tdb, key) == -1) + return tdb->last_error; + return TDB_SUCCESS; + } + off = find_and_lock(tdb, key, F_WRLCK, &h, &rec, NULL); if (TDB_OFF_IS_ERR(off)) { return tdb->last_error = off; |