summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-01 02:48:00 -0500
committerMichael Adam <obnox@samba.org>2013-02-04 17:14:22 +0100
commita09f3a35519d5be2a7d37dc2a283f84f6eb4e8cc (patch)
tree4fa1a0e0f9ed345d4a46fd3629bd1c14af3cd76d
parent25bdab9c6140a04dfb33e5b4118f45e8d8489d86 (diff)
downloadsamba-a09f3a35519d5be2a7d37dc2a283f84f6eb4e8cc.tar.gz
samba-a09f3a35519d5be2a7d37dc2a283f84f6eb4e8cc.tar.bz2
samba-a09f3a35519d5be2a7d37dc2a283f84f6eb4e8cc.zip
s3:dbwrap_ctdb: add "db_context" to "db_record"
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index dd0f4eac32..ee800a89aa 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -475,6 +475,7 @@ static struct db_record *db_ctdb_fetch_locked_transaction(struct db_ctdb_ctx *ct
return NULL;
}
+ result->db = ctx->db;
result->private_data = ctx->transaction;
result->key.dsize = key.dsize;
@@ -1401,11 +1402,12 @@ static void traverse_read_callback(TDB_DATA key, TDB_DATA data, void *private_da
{
struct traverse_state *state = (struct traverse_state *)private_data;
struct db_record rec;
+ rec.db = state->db;
rec.key = key;
rec.value = data;
rec.store = db_ctdb_store_deny;
rec.delete_rec = db_ctdb_delete_deny;
- rec.private_data = state->db;
+ rec.private_data = NULL;
state->fn(&rec, state->private_data);
state->count++;
}
@@ -1426,11 +1428,12 @@ static int traverse_persistent_callback_read(TDB_CONTEXT *tdb, TDB_DATA kbuf, TD
return 0;
}
+ rec.db = state->db;
rec.key = kbuf;
rec.value = dbuf;
rec.store = db_ctdb_store_deny;
rec.delete_rec = db_ctdb_delete_deny;
- rec.private_data = state->db;
+ rec.private_data = NULL;
if (rec.value.dsize <= sizeof(struct ctdb_ltdb_header)) {
/* a deleted record */