X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb.c;h=7484695d7ab9a8724eb178e82bf3e1a9e52a58e2;hb=6b7c3c840eafbec211b9f58751c5ff754302a68e;hp=f11701d9ea9c686cfc2b0beefbea069eb3602542;hpb=024a5647e6c81735a93d826b56db0db4bf86fab8;p=ccan
diff --git a/ccan/tdb2/tdb.c b/ccan/tdb2/tdb.c
index f11701d9..7484695d 100644
--- a/ccan/tdb2/tdb.c
+++ b/ccan/tdb2/tdb.c
@@ -1,3 +1,20 @@
+ /*
+ Trivial Database 2: fetch, store and misc routines.
+ Copyright (C) Rusty Russell 2010
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see .
+*/
#include "private.h"
#include
#include
@@ -414,11 +431,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;