diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-05-04 11:39:21 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-05-31 06:34:26 +0200 |
commit | a83df55693bf04fb65d776af2591c8c82f211d6c (patch) | |
tree | 518879262d8fbad8a8fa146710024110f781ec29 /lib/ldb/include/ldb_module.h | |
parent | 1ba6b9aae88f369c58f250aa53223d98aad8564c (diff) | |
download | samba-a83df55693bf04fb65d776af2591c8c82f211d6c.tar.gz |
ldb: Add ldb_handle_get_event_context()
This will allow us to obtain a private event context for use while we hold
locks in ldb_tdb, that is not shared with the global state of the application.
This will ensure we do not perform other operations while we hold the lock
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'lib/ldb/include/ldb_module.h')
-rw-r--r-- | lib/ldb/include/ldb_module.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h index 75f3fcb2bf8..fc8575c22d8 100644 --- a/lib/ldb/include/ldb_module.h +++ b/lib/ldb/include/ldb_module.h @@ -210,6 +210,13 @@ int ldb_register_backend(const char *url_prefix, ldb_connect_fn, bool); struct ldb_handle *ldb_handle_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb); +/* + * This function obtains the private event context for the handle, + * which may have been created to avoid nested event loops during + * ldb_tdb with the locks held + */ +struct tevent_context *ldb_handle_get_event_context(struct ldb_handle *handle); + int ldb_module_send_entry(struct ldb_request *req, struct ldb_message *msg, struct ldb_control **ctrls); |