summaryrefslogtreecommitdiff
path: root/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:13:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:13:13 +0930
commit376511ed4defeeeabcfaa83acd230afd4a46b6fd (patch)
tree645c7363da2368089f947d872f14f98bb6752a00 /lib/ldb/ldb_tdb
parentab61a57e0177ff50a22a8feea38abbf02edfd5da (diff)
downloadsamba-376511ed4defeeeabcfaa83acd230afd4a46b6fd.tar.gz
samba-376511ed4defeeeabcfaa83acd230afd4a46b6fd.tar.bz2
samba-376511ed4defeeeabcfaa83acd230afd4a46b6fd.zip
tdb_compat: adapt to tdb2 API change.
Add the ecode arg to all the log functions, and log it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ldb/ldb_tdb')
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb_wrap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
index 16a037a6c3..3ddcba5cea 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
@@ -28,6 +28,7 @@
#if BUILD_TDB2
static void ltdb_log_fn(struct tdb_context *tdb,
enum tdb_log_level level,
+ enum TDB_ERROR ecode,
const char *message,
struct ldb_context *ldb)
{
@@ -45,7 +46,8 @@ static void ltdb_log_fn(struct tdb_context *tdb,
ldb_level = LDB_DEBUG_FATAL;
}
- ldb_debug(ldb, ldb_level, "ltdb: tdb(%s): %s", name, message);
+ ldb_debug(ldb, ldb_level, "ltdb: tdb(%s): %s: %s", name,
+ tdb_errorstr(ecode), message);
}
#else /* !TDB2 */
static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);