[Date Prev][Date Next] [Chronological] [Thread] [Top]

using callback mechanism


I'm trying to use callback mechanism and I need a little help.
I need to perform search during the delete operation before calling
be->be_search. So I've got to use callback to get the results to myself.
I've been using slap_sasl_match() function code as a reference, but
still couldn't make it work properly. The code looks like this:

slap_callback cb = {
	sasl_sort_search_entry,// instead of send_search_entry

Operation op = {0};

op.o_tag = LDAP_REQ_SEARCH;
op.o_protocol = LDAP_VERSION3;
op.o_ndn = *my_dn;
op.o_callback = &cb;
op.o_time = slap_get_time();
op.o_do_not_cache = 1;
op.o_is_auth_check = 0;
op.o_threadctx = ??? // was conn->c_sasl_bindop->o_threadctx;

Could anyone tell me, what should op.o_threadctx be and what other
fields in 'op' I should specify in my case.

Thanks in advance,