1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

Added tdb_delete_by_string() function.

(This used to be commit 0cd3952f40)
This commit is contained in:
Tim Potter 2002-06-03 06:04:14 +00:00
parent 13abfb606f
commit 8c64bd92bf

View File

@ -207,6 +207,20 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr)
return tdb_fetch(tdb, key);
}
/****************************************************************************
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.
****************************************************************************/