From ab61a57e0177ff50a22a8feea38abbf02edfd5da Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:12:13 +0930 Subject: tdb2: Hand error code to logging function. Since we've deprecated tdb_error() function (and it didn't work right from inside the logging function anyway, since we didn't set tdb->ecode yet) we need to hand it to the log function. (Imported from CCAN commit 6e3d9e8a66bf8b45150500f176452ee8e9ee9927) Signed-off-by: Rusty Russell --- lib/tdb2/test/logging.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/tdb2/test/logging.c') diff --git a/lib/tdb2/test/logging.c b/lib/tdb2/test/logging.c index f2e675e922..6927592b8a 100644 --- a/lib/tdb2/test/logging.c +++ b/lib/tdb2/test/logging.c @@ -15,12 +15,14 @@ union tdb_attribute tap_log_attr = { void tap_log_fn(struct tdb_context *tdb, enum tdb_log_level level, + enum TDB_ERROR ecode, const char *message, void *priv) { if (suppress_logging) return; - diag("tdb log level %u: %s%s", level, log_prefix, message); + diag("tdb log level %u: %s: %s%s", + level, tdb_errorstr(ecode), log_prefix, message); if (log_last) free(log_last); log_last = strdup(message); -- cgit