diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-02-06 08:58:20 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-02-06 08:58:20 +0300 |
commit | d022ed3eecbe4c3bd0c93ee09608c43048e6881a (patch) | |
tree | e1d22eead92455edbcccbd291694bf7354b83b5b /source3/lib/dbwrap_tdb.c | |
parent | d3ee93596f574be2d0263efb92b2c38cf47a1a9d (diff) | |
parent | b3f48266f353fb93fee35bdcadaec3abc0fe0122 (diff) | |
download | samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.gz samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.bz2 samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into dmapi-integration
(This used to be commit f59d3786abcc53065c838a2fa82ec2f4b577b16f)
Diffstat (limited to 'source3/lib/dbwrap_tdb.c')
-rw-r--r-- | source3/lib/dbwrap_tdb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index 18f9495931..da55049e52 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -196,8 +196,15 @@ static NTSTATUS db_tdb_delete(struct db_record *rec) struct db_tdb_ctx *ctx = talloc_get_type_abort(rec->private_data, struct db_tdb_ctx); - return (tdb_delete(ctx->wtdb->tdb, rec->key) == 0) ? - NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; + if (tdb_delete(ctx->wtdb->tdb, rec->key) == 0) { + return NT_STATUS_OK; + } + + if (tdb_error(ctx->wtdb->tdb) == TDB_ERR_NOEXIST) { + return NT_STATUS_NOT_FOUND; + } + + return NT_STATUS_UNSUCCESSFUL; } struct db_tdb_traverse_ctx { |