From e67d3568e5853387d0675ed13d51df21e6274770 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 12 May 2017 02:30:01 +0200 Subject: [PATCH] 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 --- lib/ldb/common/ldb.c | 2 +- lib/ldb/ldb_tdb/ldb_tdb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.47.2