diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:12:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:12:13 +0930 |
commit | ab61a57e0177ff50a22a8feea38abbf02edfd5da (patch) | |
tree | fed80e291b6f924d76019914ae9dc65c5f742207 /lib/tdb2/tdb.c | |
parent | fb37849abda31b77a05718a316f52ed3fb0a8acd (diff) | |
download | samba-ab61a57e0177ff50a22a8feea38abbf02edfd5da.tar.gz samba-ab61a57e0177ff50a22a8feea38abbf02edfd5da.tar.bz2 samba-ab61a57e0177ff50a22a8feea38abbf02edfd5da.zip |
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2/tdb.c')
-rw-r--r-- | lib/tdb2/tdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index 82b9c323d6..6f334a264b 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -433,11 +433,11 @@ enum TDB_ERROR COLD tdb_logerr(struct tdb_context *tdb, va_end(ap); if (len < 0) { - tdb->log_fn(tdb, TDB_LOG_ERROR, + tdb->log_fn(tdb, TDB_LOG_ERROR, TDB_ERR_OOM, "out of memory formatting message:", tdb->log_data); - tdb->log_fn(tdb, level, fmt, tdb->log_data); + tdb->log_fn(tdb, level, ecode, fmt, tdb->log_data); } else { - tdb->log_fn(tdb, level, message, tdb->log_data); + tdb->log_fn(tdb, level, ecode, message, tdb->log_data); free(message); } errno = saved_errno; |