diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-28 13:29:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-28 13:29:06 +0000 |
commit | c0561ff58efa9efd0389718dc1e0fe82068b486e (patch) | |
tree | 79c2c30bdf0c2343ea2515c840c1aaa4b29d36dc /source3/tdb/tdbtest.c | |
parent | 22242c5038008171631c2625b2fd8b6d4b991078 (diff) | |
download | samba-c0561ff58efa9efd0389718dc1e0fe82068b486e.tar.gz samba-c0561ff58efa9efd0389718dc1e0fe82068b486e.tar.xz 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.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/tdb/tdbtest.c b/source3/tdb/tdbtest.c index 9e636eef83a..2cc7e887297 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); |