int ldb_async_wait(struct ldb_context *ldb, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
- struct ldb_module *module;
-
- FIRST_OP(ldb, async_wait);
-
- return module->ops->async_wait(module, handle, type);
+ return handle->module->ops->async_wait(handle, type);
}
/*
FIND_OP(module, del_transaction);
return module->ops->del_transaction(module);
}
-
-int ldb_next_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
-{
- FIND_OP(module, async_wait);
- return module->ops->async_wait(module, handle, type);
-}
int status;
enum ldb_async_state state;
void *private_data;
+ struct ldb_module *module;
};
struct ldb_search {
int (*start_transaction)(struct ldb_module *);
int (*end_transaction)(struct ldb_module *);
int (*del_transaction)(struct ldb_module *);
- int (*async_wait)(struct ldb_module *, struct ldb_async_handle *, enum ldb_async_wait_type);
+ int (*async_wait)(struct ldb_async_handle *, enum ldb_async_wait_type);
};
typedef int (*ldb_connect_fn) (struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[]);
return LDB_ERR_OPERATIONS_ERROR;
}
+ h->module = module;
+
ildb_ac = talloc(h, struct ildb_async_context);
if (ildb_ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
}
}
-static int ildb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int ildb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
struct ildb_async_context *ac = talloc_get_type(handle->private_data, struct ildb_async_context);
return NULL;
}
+ h->module = module;
+
ac = talloc(h, struct lldb_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
return handle->status;
}
-static int lldb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int lldb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
struct lldb_async_context *ac = talloc_get_type(handle->private_data, struct lldb_async_context);
- struct lldb_private *lldb = talloc_get_type(ac->module->private_data, struct lldb_private);
+ struct lldb_private *lldb = talloc_get_type(handle->module->private_data, struct lldb_private);
struct timeval timeout;
LDAPMessage *result;
int ret = LDB_ERR_OPERATIONS_ERROR;
return NULL;
}
+ h->module = module;
+
ac = talloc(h, struct lsql_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
return 0;
}
-static int lsql_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int lsql_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
return handle->status;
}
return NULL;
}
+ h->module = module;
+
ac = talloc_zero(h, struct ltdb_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
return LDB_SUCCESS;
}
-static int ltdb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int ltdb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
return handle->status;
}