return result;
}
+static int db_rbt_wipe(struct db_context *db)
+{
+ struct db_rbt_ctx *old_ctx = talloc_get_type_abort(
+ db->private_data, struct db_rbt_ctx);
+ struct db_rbt_ctx *new_ctx = TALLOC_ZERO_P(db, struct db_rbt_ctx);
+ if (new_ctx == NULL) {
+ return -1;
+ }
+ db->private_data = new_ctx;
+ talloc_free(old_ctx);
+ return 0;
+}
+
static bool db_rbt_search_internal(struct db_context *db, TDB_DATA key, TDB_DATA *data)
{
struct db_rbt_ctx *ctx = talloc_get_type_abort(
result->transaction_commit = db_rbt_trans_dummy;
result->transaction_cancel = db_rbt_trans_dummy;
result->exists = db_rbt_exists;
+ result->wipe = db_rbt_wipe;
return result;
}