diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-07-10 13:35:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:10:00 -0500 |
commit | fabc6ae74ded03faac1ed23d79a61e205cd78daa (patch) | |
tree | ad34301b007480906c36bd74dcc4ff636cbfcdf3 /source4/lib/tdb | |
parent | 35fda6c5f344e71b1ed0bd195a62161e31401149 (diff) | |
download | samba-fabc6ae74ded03faac1ed23d79a61e205cd78daa.tar.gz samba-fabc6ae74ded03faac1ed23d79a61e205cd78daa.tar.xz samba-fabc6ae74ded03faac1ed23d79a61e205cd78daa.zip |
r16917: Fix compile errors found by the testing of tdb on the build farm.
Andrew Bartlett
(This used to be commit a6e0846d9b5f1adc2ff137247a5c3f32746e43b5)
Diffstat (limited to 'source4/lib/tdb')
-rw-r--r-- | source4/lib/tdb/tools/tdbtool.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/lib/tdb/tools/tdbtool.c b/source4/lib/tdb/tools/tdbtool.c index 7f7dce8c3cc..f8105ad9419 100644 --- a/source4/lib/tdb/tools/tdbtool.c +++ b/source4/lib/tdb/tools/tdbtool.c @@ -193,7 +193,7 @@ static void create_tdb(void) } if (tdb) tdb_close(tdb); tdb = tdb_open_ex(tok, 0, TDB_CLEAR_IF_FIRST, - O_RDWR | O_CREAT | O_TRUNC, 0600, log_ctx, NULL); + O_RDWR | O_CREAT | O_TRUNC, 0600, &log_ctx, NULL); if (!tdb) { printf("Could not create %s: %s\n", tok, strerror(errno)); } @@ -201,13 +201,16 @@ static void create_tdb(void) static void open_tdb(void) { + struct tdb_logging_context log_ctx; + log_ctx.log_fn = tdb_log; + char *tok = get_token(1); if (!tok) { help(); return; } if (tdb) tdb_close(tdb); - tdb = tdb_open_ex(tok, 0, 0, O_RDWR, 0600, tdb_log, NULL, NULL); + tdb = tdb_open_ex(tok, 0, 0, O_RDWR, 0600, &log_ctx, NULL); if (!tdb) { printf("Could not open %s: %s\n", tok, strerror(errno)); } @@ -316,6 +319,9 @@ static void move_rec(void) TDB_DATA key, dbuf; struct tdb_context *dst_tdb; + struct tdb_logging_context log_ctx; + log_ctx.log_fn = tdb_log; + if (!k) { help(); return; @@ -343,7 +349,7 @@ static void move_rec(void) print_rec(tdb, key, dbuf, NULL); - dst_tdb = tdb_open_ex(file, 0, 0, O_RDWR, 0600, tdb_log, NULL, NULL); + dst_tdb = tdb_open_ex(file, 0, 0, O_RDWR, 0600, &log_ctx, NULL); if ( !dst_tdb ) { terror("unable to open destination tdb"); return; |