From: Andrew Bartlett Date: Wed, 20 Feb 2008 22:55:13 +0000 (+1100) Subject: Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=774fa12ac1695600710ce9fac18024edd38161ee;hp=910a1cafdf253255510d3aff7cc2385da43331dd Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local (This used to be commit 5cd3310b78a85243eb436d05db3228c3495f9162) --- diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 5f2e5e3ffc7..3c9ef3ff693 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -508,11 +508,17 @@ static int ldb_autotransaction_request(struct ldb_context *ldb, struct ldb_reque int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type) { + int ret; if (!handle) { return LDB_SUCCESS; } - return handle->module->ops->wait(handle, type); + ret = handle->module->ops->wait(handle, type); + if (!ldb_errstring(handle->module->ldb)) { + /* Set a default error string, to place the blame somewhere */ + ldb_asprintf_errstring(handle->module->ldb, "error waiting on module %s: %s (%d)", handle->module->ops->name, ldb_strerror(ret), ret); + } + return ret; } /* set the specified timeout or, if timeout is 0 set the default timeout */