h = talloc_zero(mem_ctx, struct ldb_handle);
if (h == NULL) {
- ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
+ ldb_set_errstring(module->ldb, "Out of Memory");
return NULL;
}
ac = talloc_zero(h, struct sort_context);
if (ac == NULL) {
- ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
+ ldb_set_errstring(module->ldb, "Out of Memory");
talloc_free(h);
return NULL;
}
struct sort_context *ac = NULL;
if (!context || !ares) {
- ldb_set_errstring(ldb, talloc_asprintf(ldb, "NULL Context or Result in callback"));
+ ldb_set_errstring(ldb, "NULL Context or Result in callback");
goto error;
}
return ldb_next_request(module, req);
}
- req->async.handle = NULL;
+ req->handle = NULL;
- if (!req->async.callback || !req->async.context) {
- ldb_set_errstring(module->ldb, talloc_asprintf(module, "Async interface called with NULL callback function or NULL context"));
+ if (!req->callback || !req->context) {
+ ldb_set_errstring(module->ldb,
+ "Async interface called with NULL callback function or NULL context");
return LDB_ERR_OPERATIONS_ERROR;
}
- h = init_handle(req, module, req->async.context, req->async.callback);
+ h = init_handle(req, module, req->context, req->callback);
if (!h) {
return LDB_ERR_OPERATIONS_ERROR;
}
return LDB_ERR_OPERATIONS_ERROR;
}
- ac->req->async.context = ac;
- ac->req->async.callback = server_sort_search_callback;
+ ac->req->context = ac;
+ ac->req->callback = server_sort_search_callback;
ldb_set_timeout_from_prev_req(module->ldb, req, ac->req);
- req->async.handle = h;
+ req->handle = h;
return ldb_next_request(module, ac->req);
}
ac = talloc_get_type(handle->private_data, struct sort_context);
- ret = ldb_wait(ac->req->async.handle, type);
+ ret = ldb_wait(ac->req->handle, type);
if (ret != LDB_SUCCESS) {
handle->status = ret;
return ret;
}
- handle->state = ac->req->async.handle->state;
- handle->status = ac->req->async.handle->status;
+ handle->state = ac->req->handle->state;
+ handle->status = ac->req->handle->status;
if (handle->status != LDB_SUCCESS) {
return handle->status;