From: Andrew Bartlett Date: Fri, 12 May 2017 00:30:01 +0000 (+0200) Subject: ldb: Use the private event context in ldb_tdb and ldb_wait() X-Git-Tag: ldb-1.1.30~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e67d3568e5853387d0675ed13d51df21e6274770;p=thirdparty%2Fsamba.git ldb: Use the private event context in ldb_tdb and ldb_wait() This enables the previous commits, and ensures that ldb_tdb is safe from operations while locks are held Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Garming Sam --- diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c index 3b2dbe79a2e..a0333826724 100644 --- a/lib/ldb/common/ldb.c +++ b/lib/ldb/common/ldb.c @@ -605,7 +605,7 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type) return handle->status; } - ev = ldb_get_event_context(handle->ldb); + ev = ldb_handle_get_event_context(handle); if (NULL == ev) { return ldb_oom(handle->ldb); } diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index aed6044ab6f..261011eb99c 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1476,7 +1476,7 @@ static int ltdb_handle_request(struct ldb_module *module, return LDB_ERR_TIME_LIMIT_EXCEEDED; } - ev = ldb_get_event_context(ldb); + ev = ldb_handle_get_event_context(req->handle); ac = talloc_zero(ldb, struct ltdb_context); if (ac == NULL) {