summaryrefslogtreecommitdiff
path: root/lib/tdb2
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/tdb2
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/tdb2')
-rw-r--r--lib/tdb2/pytdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tdb2/pytdb.c b/lib/tdb2/pytdb.c
index c760045508..c03f00d58c 100644
--- a/lib/tdb2/pytdb.c
+++ b/lib/tdb2/pytdb.c
@@ -74,10 +74,12 @@ static PyObject *PyString_FromTDB_DATA(TDB_DATA data)
static void stderr_log(struct tdb_context *tdb,
enum tdb_log_level level,
+ enum TDB_ERROR ecode,
const char *message,
void *data)
{
- fprintf(stderr, "%s:%s\n", tdb_name(tdb), message);
+ fprintf(stderr, "%s:%s:%s\n",
+ tdb_name(tdb), tdb_errorstr(ecode), message);
}
static PyObject *py_tdb_open(PyTypeObject *type, PyObject *args, PyObject *kwargs)