From 376511ed4defeeeabcfaa83acd230afd4a46b6fd Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:13:13 +0930 Subject: tdb_compat: adapt to tdb2 API change. Add the ecode arg to all the log functions, and log it. Signed-off-by: Rusty Russell --- source3/lib/util_tdb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c index 93842e4126..1ba5ed4120 100644 --- a/source3/lib/util_tdb.c +++ b/source3/lib/util_tdb.c @@ -472,10 +472,11 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) #ifdef BUILD_TDB2 static void tdb_log(TDB_CONTEXT *tdb, enum tdb_log_level level, - const char *message, void *unused) + enum TDB_ERROR ecode, const char *message, void *unused) { - DEBUG((int)level, ("tdb(%s): %s", - tdb_name(tdb) ? tdb_name(tdb) : "unnamed", message)); + DEBUG((int)level, ("tdb(%s):%s: %s", + tdb_name(tdb) ? tdb_name(tdb) : "unnamed", + tdb_errorstr(ecode), message)); } #else static void tdb_log(TDB_CONTEXT *tdb, enum tdb_debug_level level, const char *format, ...) -- cgit