diff options
author | Tim Potter <tpot@samba.org> | 2002-06-03 06:04:14 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-06-03 06:04:14 +0000 |
commit | 8c64bd92bf3c44599f561abea6abf1841fa88856 (patch) | |
tree | f7427e225a163429f5799c3162ea1e7981f07669 | |
parent | 13abfb606f5e248533f4696777ea593d9201f911 (diff) | |
download | samba-8c64bd92bf3c44599f561abea6abf1841fa88856.tar.gz samba-8c64bd92bf3c44599f561abea6abf1841fa88856.tar.bz2 samba-8c64bd92bf3c44599f561abea6abf1841fa88856.zip |
Added tdb_delete_by_string() function.
(This used to be commit 0cd3952f408e2fcd2c833b9039dff4392ac16cf7)
-rw-r--r-- | source3/tdb/tdbutil.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c index 92a5a9d37f..1a3a8bb9a5 100644 --- a/source3/tdb/tdbutil.c +++ b/source3/tdb/tdbutil.c @@ -208,6 +208,20 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) } /**************************************************************************** + Delete a buffer using a null terminated string key. +****************************************************************************/ + +int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr) +{ + TDB_DATA key; + + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; + + return tdb_delete(tdb, key); +} + +/**************************************************************************** Atomic integer change. Returns old value. To create, set initial value in *oldval. ****************************************************************************/ |