ldb: Use the private event context in ldb_tdb and ldb_wait()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 12 May 2017 00:30:01 +0000 (02:30 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 May 2017 04:34:27 +0000 (06:34 +0200)
This enables the previous commits, and ensures that ldb_tdb is safe from operations while locks
are held

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/common/ldb.c
lib/ldb/ldb_tdb/ldb_tdb.c

index 3b2dbe79a2ec1a67bfac6a28630cec038a0291c1..a033382672406c144d5d4e8d6657feb9b3466838 100644 (file)
@@ -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);
        }
index aed6044ab6fe76a8a091bc1c5839bbb7b04d7c42..261011eb99cb69ffb3339f5f0549d8e1222e5d49 100644 (file)
@@ -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) {