summaryrefslogtreecommitdiff
path: root/source3/tdb/tdbtest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-28 13:29:06 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-28 13:29:06 +0000
commitc0561ff58efa9efd0389718dc1e0fe82068b486e (patch)
tree79c2c30bdf0c2343ea2515c840c1aaa4b29d36dc /source3/tdb/tdbtest.c
parent22242c5038008171631c2625b2fd8b6d4b991078 (diff)
downloadsamba-c0561ff58efa9efd0389718dc1e0fe82068b486e.tar.gz
samba-c0561ff58efa9efd0389718dc1e0fe82068b486e.tar.bz2
samba-c0561ff58efa9efd0389718dc1e0fe82068b486e.zip
try to make the tailer code much more robust. When a record
can't be merged don't fail the operation, instead just add it to the free list anyway added logging to tdb (This used to be commit dda086fdf92fded016afc785f7965a375faae5aa)
Diffstat (limited to 'source3/tdb/tdbtest.c')
-rw-r--r--source3/tdb/tdbtest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/tdb/tdbtest.c b/source3/tdb/tdbtest.c
index 9e636eef83..2cc7e88729 100644
--- a/source3/tdb/tdbtest.c
+++ b/source3/tdb/tdbtest.c
@@ -4,6 +4,7 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
+#include <stdarg.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -40,6 +41,14 @@ static void fatal(char *why)
exit(1);
}
+static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ vfprintf(stdout, format, ap);
+ va_end(ap);
+}
static void compare_db(void)
{
@@ -230,6 +239,7 @@ int main(int argc, char *argv[])
fatal("db open failed");
}
+ tdb_logging_function(db, tdb_log);
#if 1
srand(seed);