- return attrs;
-}
-
-static void initSearchPlugin( Operation *op,
- char **attrs, int managedsait )
-{
- slapi_x_backend_set_pb( op->o_pb, op->o_bd );
- slapi_x_connection_set_pb( op->o_pb, op->o_conn );
- slapi_x_operation_set_pb( op->o_pb, op );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TARGET, (void *)op->o_req_dn.bv_val );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SCOPE, (void *)op->oq_search.rs_scope );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_DEREF, (void *)op->oq_search.rs_deref );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SIZELIMIT, (void *)op->oq_search.rs_slimit );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TIMELIMIT, (void *)op->oq_search.rs_tlimit );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_FILTER, (void *)op->oq_search.rs_filter );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_STRFILTER, (void *)op->oq_search.rs_filterstr.bv_val );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRS, (void *)attrs );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRSONLY, (void *)op->oq_search.rs_attrsonly );
- slapi_pblock_set( op->o_pb, SLAPI_MANAGEDSAIT, (void *)managedsait );
-}
+ } else if ( op->o_bd->be_search ) {
+ if ( limits_check( op, rs ) == 0 ) {
+ /* actually do the search and send the result(s) */
+ (op->o_bd->be_search)( op, rs );
+ }
+ /* else limits_check() sends error */