summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ildap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_ildap')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index f309262a55..ceb9c4aafb 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -352,6 +352,9 @@ static int ildb_request_send(struct ldb_module *module, struct ldap_message *msg
h->private_data = (void *)ildb_ac;
+ h->state = LDB_ASYNC_INIT;
+ h->status = LDB_SUCCESS;
+
req = ldap_request_send(ildb->ldap, msg);
if (req == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "async send request failed"));
@@ -922,6 +925,10 @@ static int ildb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_
{
struct ildb_async_context *ac = talloc_get_type(handle->private_data, struct ildb_async_context);
+ if (handle->state == LDB_ASYNC_DONE) {
+ return handle->status;
+ }
+
if (!ac) {
return LDB_ERR_OPERATIONS_ERROR;
}