Lines Matching refs:op
53 #define get_chaining(op) ((op)->o_chaining & SLAP_CONTROL_MASK)
54 #define get_chainingBehavior(op) ((op)->o_chaining & (SLAP_CH_RESOLVE_MASK|SLAP_CH_CONTINUATION_MASK))
55 #define get_resolveBehavior(op) ((op)->o_chaining & SLAP_CH_RESOLVE_MASK)
56 #define get_continuationBehavior(op) ((op)->o_chaining & SLAP_CH_CONTINUATION_MASK)
127 Operation *op,
135 Operation *op,
146 Operation *op,
152 *oldctrlsp = op->o_ctrls;
160 if ( get_chaining( op ) > SLAP_CONTROL_IGNORED ) {
167 if ( op->o_ctrls ) {
168 for ( c = 0; op->o_ctrls[ c ]; c++ )
174 if ( op->o_ctrls ) {
175 for ( c = 0; op->o_ctrls[ c ]; c++ ) {
176 ctrls[ c + 1 ] = op->o_ctrls[ c ];
181 op->o_ctrls = ctrls;
183 op->o_chaining = lc->lc_chaining_ctrlflag;
190 Operation *op,
198 if ( op->o_ctrls != oldctrls ) {
199 assert( op->o_ctrls != NULL );
200 assert( op->o_ctrls[ 0 ] != NULL );
202 free( op->o_ctrls );
204 op->o_chaining = 0;
205 op->o_ctrls = oldctrls;
256 ldap_chain_cb_search_response( Operation *op, SlapReply *rs )
258 ldap_chain_cb_t *lb = (ldap_chain_cb_t *)op->o_callback->sc_private;
260 assert( op->o_tag == LDAP_REQ_SEARCH );
296 rs->sr_err = ldap_chain_search( op, rs, rs->sr_ref, lb->lb_depth );
300 if ( rs->sr_err == LDAP_REFERRAL && get_chaining( op ) > SLAP_CONTROL_IGNORED ) {
301 switch ( get_continuationBehavior( op ) ) {
318 rs->sr_err = ldap_chain_op( op, rs, lb->lb_op_f, rs->sr_ref, lb->lb_depth );
333 ldap_chain_cb_response( Operation *op, SlapReply *rs )
335 ldap_chain_cb_t *lb = (ldap_chain_cb_t *)op->o_callback->sc_private;
347 if ( op->o_tag != LDAP_REQ_COMPARE ) {
358 rs->sr_err = ldap_chain_op( op, rs, lb->lb_op_f, rs->sr_ref, lb->lb_depth );
363 if ( get_chaining( op ) > SLAP_CONTROL_IGNORED ) {
364 switch ( get_continuationBehavior( op ) ) {
380 } else if ( op->o_tag == LDAP_REQ_SEARCH && rs->sr_type == REP_SEARCH )
383 (void)ldap_chain_cb_search_response( op, rs );
391 Operation *op,
397 slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
398 ldap_chain_cb_t *lb = (ldap_chain_cb_t *)op->o_callback->sc_private;
400 struct berval odn = op->o_req_dn,
401 ondn = op->o_req_ndn;
412 (void)chaining_control_add( lc, op, &ctrls );
420 req_search_s save_oq_search = op->oq_search,
450 op->o_log_prefix, ref->bv_val, 0 );
457 if ( op->o_tag == LDAP_REQ_SEARCH ) {
464 tmp_oq_search.rs_scope = op->ors_scope;
481 rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn, op->o_tmpmemctx );
492 if ( rc == LDAP_SUCCESS && op->o_tag == LDAP_REQ_SEARCH ) {
500 tmp_oq_search.rs_filter = str2filter_x( op, srv->lud_filter );
502 filter2bv_x( op, tmp_oq_search.rs_filter, &tmp_oq_search.rs_filterstr );
506 op->o_log_prefix, ref->bv_val, srv->lud_filter );
529 op->o_log_prefix, ref->bv_val, 0 );
537 op->o_log_prefix, ref->bv_val, li.li_uri );
539 op->o_req_dn = pdn;
540 op->o_req_ndn = ndn;
542 if ( op->o_tag == LDAP_REQ_SEARCH ) {
543 op->ors_scope = tmp_oq_search.rs_scope;
545 op->ors_filter = tmp_oq_search.rs_filter;
546 op->ors_filterstr = tmp_oq_search.rs_filterstr;
559 op->o_bd->be_private = (void *)lip;
562 op->o_log_prefix, ref->bv_val, li.li_uri );
565 rc = ldap_chain_db_init_one( op->o_bd );
568 op->o_log_prefix, ref->bv_val, li.li_uri );
571 lip = (ldapinfo_t *)op->o_bd->be_private;
574 rc = ldap_chain_db_open_one( op->o_bd );
577 op->o_log_prefix, ref->bv_val, li.li_uri );
580 (void)ldap_chain_db_destroy_one( op->o_bd, NULL);
601 op->o_log_prefix, ref->bv_val, temporary ? "temporary" : "caching" );
607 rc = op_f( op, &rs2 );
621 (void)ldap_chain_db_close_one( op->o_bd );
622 (void)ldap_chain_db_destroy_one( op->o_bd, NULL );
627 op->o_tmpfree( pdn.bv_val, op->o_tmpmemctx );
628 op->o_tmpfree( ndn.bv_val, op->o_tmpmemctx );
631 if ( op->o_tag == LDAP_REQ_SEARCH ) {
633 filter_free_x( op, tmp_oq_search.rs_filter, 1 );
637 slap_sl_free( tmp_oq_search.rs_filterstr.bv_val, op->o_tmpmemctx );
640 op->oq_search = save_oq_search;
651 op->o_req_dn = odn;
652 op->o_req_ndn = ondn;
655 (void)chaining_control_remove( op, &ctrls );
667 Operation *op,
673 slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
674 ldap_chain_cb_t *lb = (ldap_chain_cb_t *)op->o_callback->sc_private;
679 struct berval odn = op->o_req_dn,
680 ondn = op->o_req_ndn;
690 (void)chaining_control_add( lc, op, &ctrls );
706 req_search_s save_oq_search = op->oq_search,
709 pdn = op->o_req_dn,
710 ndn = op->o_req_ndn;
720 op->o_log_prefix, ref->bv_val, 0 );
734 if ( op->ors_scope == LDAP_SCOPE_ONELEVEL )
737 tmp_oq_search.rs_scope = op->ors_scope;
760 rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn, op->o_tmpmemctx );
779 tmp_oq_search.rs_filter = str2filter_x( op, srv->lud_filter );
781 filter2bv_x( op, tmp_oq_search.rs_filter, &tmp_oq_search.rs_filterstr );
785 op->o_log_prefix, ref->bv_val, srv->lud_filter );
802 op->o_log_prefix, ref->bv_val, 0 );
810 op->o_log_prefix, ref->bv_val, li.li_uri );
812 op->o_req_dn = pdn;
813 op->o_req_ndn = ndn;
814 op->ors_scope = tmp_oq_search.rs_scope;
816 op->ors_filter = tmp_oq_search.rs_filter;
817 op->ors_filterstr = tmp_oq_search.rs_filterstr;
829 op->o_bd->be_private = (void *)lip;
832 op->o_log_prefix, ref->bv_val, li.li_uri );
836 rc = ldap_chain_db_init_one( op->o_bd );
839 op->o_log_prefix, ref->bv_val, li.li_uri );
842 lip = (ldapinfo_t *)op->o_bd->be_private;
845 rc = ldap_chain_db_open_one( op->o_bd );
848 op->o_log_prefix, ref->bv_val, li.li_uri );
851 (void)ldap_chain_db_destroy_one( op->o_bd, NULL );
872 op->o_log_prefix, ref->bv_val, temporary ? "temporary" : "caching" );
880 rc = lback->bi_op_search( op, &rs2 );
892 (void)ldap_chain_db_close_one( op->o_bd );
893 (void)ldap_chain_db_destroy_one( op->o_bd, NULL );
898 op->o_tmpfree( pdn.bv_val, op->o_tmpmemctx );
899 op->o_tmpfree( ndn.bv_val, op->o_tmpmemctx );
902 op->o_req_dn = odn;
903 op->o_req_ndn = ondn;
906 filter_free_x( op, tmp_oq_search.rs_filter, 1 );
910 slap_sl_free( tmp_oq_search.rs_filterstr.bv_val, op->o_tmpmemctx );
913 op->oq_search = save_oq_search;
924 (void)chaining_control_remove( op, &ctrls );
927 op->o_req_dn = odn;
928 op->o_req_ndn = ondn;
947 ldap_chain_response( Operation *op, SlapReply *rs )
949 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
951 BackendDB db, *bd = op->o_bd;
953 slap_callback *sc = op->o_callback,
959 struct berval ndn = op->o_ndn;
973 if ( rs->sr_err == LDAP_REFERRAL && get_chaining( op ) > SLAP_CONTROL_IGNORED ) {
974 switch ( get_resolveBehavior( op ) ) {
985 } else if ( rs->sr_type == REP_SEARCHREF && get_chaining( op ) > SLAP_CONTROL_IGNORED ) {
986 switch ( get_continuationBehavior( op ) ) {
1008 db = *op->o_bd;
1010 op->o_bd = &db;
1024 op->o_callback = &sc2;
1035 switch ( op->o_tag ) {
1037 struct berval rndn = op->o_req_ndn;
1038 Connection *conn = op->o_conn;
1041 op->o_req_ndn = slap_empty_bv;
1042 op->o_conn = NULL;
1043 rc = ldap_chain_op( op, rs, lback->bi_op_bind, ref, 0 );
1044 op->o_req_ndn = rndn;
1045 op->o_conn = conn;
1050 rc = ldap_chain_op( op, rs, lback->bi_op_add, ref, 0 );
1054 rc = ldap_chain_op( op, rs, lback->bi_op_delete, ref, 0 );
1058 rc = ldap_chain_op( op, rs, lback->bi_op_modrdn, ref, 0 );
1062 rc = ldap_chain_op( op, rs, lback->bi_op_modify, ref, 0 );
1066 rc = ldap_chain_op( op, rs, lback->bi_op_compare, ref, 0 );
1075 rc = ldap_chain_search( op, rs, ref, 0 );
1082 if ( op->ors_limit != NULL || limits_check( op, rs ) == 0 ) {
1083 rc = ldap_chain_op( op, rs, lback->bi_op_search, ref, 0 );
1092 rc = ldap_chain_op( op, rs, lback->bi_extended, ref, 0 );
1099 send_ldap_extended( op, rs );
1118 if ( !op->o_abandon && lb.lb_status != LDAP_CH_RES ) {
1123 op->o_log_prefix, 0, 0 );
1133 switch ( ( get_chainingBehavior( op ) & chain_mask ) >> chain_shift ) {
1136 op->o_callback = NULL;
1137 send_ldap_error( op, rs, LDAP_X_CANNOT_CHAIN,
1163 op->o_callback = sc->sc_next;
1165 send_ldap_result( op, rs );
1174 op->o_bd = bd;
1175 op->o_callback = sc;
1176 op->o_ndn = ndn;
1184 Operation *op,
1385 Operation *op;
1406 config_build_entry( lca->op, lca->rs, lca->p->e_private, lca->ca,
1415 chain_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca )
1425 lca.op = op;
1444 chain_lddel( CfEntryInfo *ce, Operation *op )
1499 if ( c->op == SLAP_CONFIG_EMIT ) {
1551 } else if ( c->op == LDAP_MOD_DELETE ) {
1584 Operation op = { 0 };
1671 if ( ldap_chain_parse_ctrl( &op, &rs, &lc->lc_chaining_ctrl ) != LDAP_SUCCESS )
1680 lc->lc_chaining_ctrlflag = op.o_chaining;
2150 Operation *op,
2159 if ( get_chaining( op ) != SLAP_CONTROL_NONE ) {
2164 if ( op->o_pagedresults != SLAP_CONTROL_NONE ) {
2267 op->o_chaining = mode | ( ctrl->ldctl_iscritical