svn commit: samba r16917 - in
branches/SAMBA_4_0/source/lib/tdb/tools: .
abartlet at samba.org
abartlet at samba.org
Mon Jul 10 13:35:59 GMT 2006
Author: abartlet
Date: 2006-07-10 13:35:58 +0000 (Mon, 10 Jul 2006)
New Revision: 16917
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16917
Log:
Fix compile errors found by the testing of tdb on the build farm.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c 2006-07-10 12:51:36 UTC (rev 16916)
+++ branches/SAMBA_4_0/source/lib/tdb/tools/tdbtool.c 2006-07-10 13:35:58 UTC (rev 16917)
@@ -193,7 +193,7 @@
}
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 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 @@
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 @@
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;
More information about the samba-cvs
mailing list