summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap_ctdb.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index bdcec3985d..0c5e624411 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -186,22 +186,17 @@ static NTSTATUS db_ctdb_store_persistent(struct db_record *rec, TDB_DATA data, i
static NTSTATUS db_ctdb_delete(struct db_record *rec)
{
- struct db_ctdb_rec *crec = talloc_get_type_abort(
- rec->private_data, struct db_ctdb_rec);
TDB_DATA data;
- int ret;
/*
* We have to store the header with empty data. TODO: Fix the
* tdb-level cleanup
*/
- data.dptr = (uint8 *)&crec->header;
- data.dsize = sizeof(crec->header);
+ ZERO_STRUCT(data);
- ret = tdb_store(crec->ctdb_ctx->wtdb->tdb, rec->key, data, TDB_REPLACE);
+ return db_ctdb_store(rec, data, 0);
- return (ret == 0) ? NT_STATUS_OK : NT_STATUS_INTERNAL_DB_CORRUPTION;
}
static int db_ctdb_record_destr(struct db_record* data)