diff options
author | Simo Sorce <idra@samba.org> | 2008-09-11 18:38:40 -0400 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-29 04:22:20 +0200 |
commit | b2901da479f5e711986de48df4910910460fe7db (patch) | |
tree | da33b32d795781a689793b41b76a76a017f06d6a /source4/cldap_server | |
parent | f14a2b3386e9f44111cee010f6864602e5b833cd (diff) | |
download | samba-b2901da479f5e711986de48df4910910460fe7db.tar.gz samba-b2901da479f5e711986de48df4910910460fe7db.tar.bz2 samba-b2901da479f5e711986de48df4910910460fe7db.zip |
LDB ASYNC: misc changes
Diffstat (limited to 'source4/cldap_server')
-rw-r--r-- | source4/cldap_server/rootdse.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/source4/cldap_server/rootdse.c b/source4/cldap_server/rootdse.c index 4ff71c0863..65786e6708 100644 --- a/source4/cldap_server/rootdse.c +++ b/source4/cldap_server/rootdse.c @@ -66,22 +66,19 @@ static void cldapd_rootdse_fill(struct cldapd_server *cldapd, attrs[i] = NULL; } - lreq = talloc(mem_ctx, struct ldb_request); - if (lreq == NULL) goto nomem; - res = talloc_zero(mem_ctx, struct ldb_result); if (res == NULL) goto nomem; - lreq->operation = LDB_SEARCH; - lreq->op.search.base = basedn; - lreq->op.search.scope = scope; - lreq->op.search.tree = search->tree; - lreq->op.search.attrs = attrs; - - lreq->controls = NULL; + ldb_ret = ldb_build_search_req_ex(&lreq, cldapd->samctx, mem_ctx, + basedn, scope, + search->tree, attrs, + NULL, + res, ldb_search_default_callback, + NULL); - lreq->context = res; - lreq->callback = ldb_search_default_callback; + if (ldb_ret != LDB_SUCCESS) { + goto reply; + } /* Copy the timeout from the incoming call */ ldb_set_timeout(cldapd->samctx, lreq, search->timelimit); |