uint32_t hash;
/* find which hash bucket it is in */
- hash = tdb->hash_fn(&key);
+ hash = tdb_hash(tdb, key.dptr, key.dsize);
if (!(rec_ptr = tdb1_find_lock_hash(tdb,key,hash,F_RDLCK,&rec)))
return tdb1_null;
uint32_t hash;
/* find which hash bucket it is in */
- hash = tdb->hash_fn(&key);
+ hash = tdb_hash(tdb, key.dptr, key.dsize);
if (!(rec_ptr = tdb1_find_lock_hash(tdb,key,hash,F_RDLCK,&rec))) {
/* record not found */
int tdb1_exists(struct tdb1_context *tdb, TDB_DATA key)
{
- uint32_t hash = tdb->hash_fn(&key);
+ uint32_t hash = tdb_hash(tdb, key.dptr, key.dsize);
int ret;
ret = tdb1_exists_hash(tdb, key, hash);
int tdb1_delete(struct tdb1_context *tdb, TDB_DATA key)
{
- uint32_t hash = tdb->hash_fn(&key);
+ uint32_t hash = tdb_hash(tdb, key.dptr, key.dsize);
int ret;
ret = tdb1_delete_hash(tdb, key, hash);
}
/* find which hash bucket it is in */
- hash = tdb->hash_fn(&key);
+ hash = tdb_hash(tdb, key.dptr, key.dsize);
if (tdb1_lock(tdb, TDB1_BUCKET(hash), F_WRLCK) == -1)
return -1;
int ret = -1;
/* find which hash bucket it is in */
- hash = tdb->hash_fn(&key);
+ hash = tdb_hash(tdb, key.dptr, key.dsize);
if (tdb1_lock(tdb, TDB1_BUCKET(hash), F_WRLCK) == -1)
return -1;