summaryrefslogtreecommitdiff
path: root/source4/lib/db_wrap.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-07-10 12:51:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:59 -0500
commit35fda6c5f344e71b1ed0bd195a62161e31401149 (patch)
tree6fd96d68dceac6bdde0ddf557b66103207e7be33 /source4/lib/db_wrap.c
parentbfc02627ceb02046fb23c62f28dc69765c8aa8f0 (diff)
downloadsamba-35fda6c5f344e71b1ed0bd195a62161e31401149.tar.gz
samba-35fda6c5f344e71b1ed0bd195a62161e31401149.tar.bz2
samba-35fda6c5f344e71b1ed0bd195a62161e31401149.zip
r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and makes the argument list for tdb_open_ex a bit shorter. Andrew Bartlett (This used to be commit 5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
Diffstat (limited to 'source4/lib/db_wrap.c')
-rw-r--r--source4/lib/db_wrap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c
index 4a21648403..9fabd58caa 100644
--- a/source4/lib/db_wrap.c
+++ b/source4/lib/db_wrap.c
@@ -200,6 +200,8 @@ struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
int open_flags, mode_t mode)
{
struct tdb_wrap *w;
+ struct tdb_logging_context log_ctx;
+ log_ctx.log_fn = tdb_wrap_log;
for (w=tdb_list;w;w=w->next) {
if (strcmp(name, w->name) == 0) {
@@ -215,7 +217,7 @@ struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
w->name = talloc_strdup(w, name);
w->tdb = tdb_open_ex(name, hash_size, tdb_flags,
- open_flags, mode, tdb_wrap_log, NULL, NULL);
+ open_flags, mode, &log_ctx, NULL);
if (w->tdb == NULL) {
talloc_free(w);
return NULL;