Lines Matching refs:op
67 Operation *op,
75 assert( op != NULL );
78 ndns[0] = &op->o_ndn;
79 ndns[1] = &op->o_req_ndn;
82 op->o_log_prefix,
88 *limit = &op->o_bd->be_def_limit;
90 if ( op->o_bd->be_limits == NULL ) {
94 for ( lm = op->o_bd->be_limits; lm[0] != NULL; lm++ ) {
114 int rc = backend_group( op, NULL,
1060 limits_check( Operation *op, SlapReply *rs )
1062 assert( op != NULL );
1065 assert( op->o_tag == LDAP_REQ_SEARCH);
1076 if ( op->ors_tlimit == SLAP_NO_LIMIT && op->ors_slimit == SLAP_NO_LIMIT ) {
1081 if ( be_isroot( op ) ) {
1082 op->ors_limit = NULL;
1084 if ( op->ors_tlimit == 0 ) {
1085 op->ors_tlimit = SLAP_NO_LIMIT;
1088 if ( op->ors_slimit == 0 ) {
1089 op->ors_slimit = SLAP_NO_LIMIT;
1093 if ( get_pagedresults( op ) > SLAP_CONTROL_IGNORED &&
1094 op->ors_slimit != SLAP_NO_LIMIT ) {
1095 PagedResultsState *ps = op->o_pagedresults_state;
1096 int total = op->ors_slimit - ps->ps_count;
1098 op->ors_slimit = total;
1100 op->ors_slimit = 0;
1106 ( void ) limits_get( op, &op->ors_limit );
1108 assert( op->ors_limit != NULL );
1111 if ( op->ors_tlimit == 0 ) {
1112 op->ors_tlimit = op->ors_limit->lms_t_soft;
1116 if ( op->ors_limit->lms_t_hard == 0 ) {
1117 if ( op->ors_limit->lms_t_soft > 0
1118 && ( op->ors_tlimit > op->ors_limit->lms_t_soft ) ) {
1119 op->ors_tlimit = op->ors_limit->lms_t_soft;
1122 } else if ( op->ors_limit->lms_t_hard > 0 ) {
1124 if ( op->ors_tlimit == SLAP_MAX_LIMIT ) {
1125 op->ors_tlimit = op->ors_limit->lms_t_hard;
1127 } else if ( op->ors_tlimit > op->ors_limit->lms_t_hard ) {
1130 send_ldap_result( op, rs );
1135 if ( op->ors_tlimit > op->ors_limit->lms_t_hard ) {
1136 op->ors_tlimit = op->ors_limit->lms_t_hard;
1145 if ( op->ors_limit->lms_s_unchecked == 0 ) {
1147 send_ldap_result( op, rs );
1153 if ( get_pagedresults( op ) > SLAP_CONTROL_IGNORED ) {
1156 PagedResultsState *ps = op->o_pagedresults_state;
1159 if ( op->ors_limit->lms_s_pr_total == -2 ) {
1162 send_ldap_result( op, rs );
1168 if ( op->ors_limit->lms_s_pr > 0
1169 && ps->ps_size > op->ors_limit->lms_s_pr )
1173 send_ldap_result( op, rs );
1179 if ( op->ors_limit->lms_s_pr_total == 0 ) {
1180 if ( op->ors_limit->lms_s_hard == 0 ) {
1181 pr_total = op->ors_limit->lms_s_soft;
1183 pr_total = op->ors_limit->lms_s_hard;
1186 pr_total = op->ors_limit->lms_s_pr_total;
1190 if ( op->ors_slimit == 0 || op->ors_slimit == SLAP_MAX_LIMIT ) {
1194 slimit = op->ors_slimit - ps->ps_count;
1198 } else if ( pr_total > 0 && op->ors_slimit != SLAP_MAX_LIMIT
1199 && ( op->ors_slimit == SLAP_NO_LIMIT
1200 || op->ors_slimit > pr_total ) )
1203 send_ldap_result( op, rs );
1219 if ( op->ors_slimit == SLAP_MAX_LIMIT )
1221 if ( op->ors_slimit == SLAP_MAX_LIMIT
1222 || op->ors_slimit > pr_total )
1225 slimit2 = op->ors_slimit = pr_total;
1227 } else if ( op->ors_slimit == 0 ) {
1231 slimit2 = op->ors_slimit;
1237 if ( op->ors_limit->lms_s_pr > 0 ) {
1239 if ( total < op->ors_limit->lms_s_pr ) {
1245 slimit = op->ors_limit->lms_s_pr + 1;
1253 } else if ( op->ors_limit->lms_s_pr > 0 ) {
1256 slimit = op->ors_limit->lms_s_pr + 1;
1260 slimit = op->ors_limit->lms_s_hard;
1266 if ( op->ors_slimit == 0 ) {
1267 op->ors_slimit = slimit;
1270 if ( op->ors_slimit - ps->ps_count > slimit ) {
1272 send_ldap_result( op, rs );
1276 op->ors_slimit = slimit;
1279 op->ors_slimit = 0;
1284 op->ors_slimit = pr_total;
1288 } else if ( op->ors_slimit == 0 ) {
1289 op->ors_slimit = op->ors_limit->lms_s_soft;
1294 if ( op->ors_limit->lms_s_hard == 0 ) {
1295 if ( op->ors_limit->lms_s_soft > 0
1296 && op->ors_slimit > op->ors_limit->lms_s_soft ) {
1297 op->ors_slimit = op->ors_limit->lms_s_soft;
1301 } else if ( op->ors_limit->lms_s_hard > 0 ) {
1303 if ( op->ors_slimit == SLAP_MAX_LIMIT ) {
1304 op->ors_slimit = op->ors_limit->lms_s_hard;
1306 } else if ( op->ors_slimit > op->ors_limit->lms_s_hard ) {
1309 send_ldap_result( op, rs );
1314 if ( op->ors_slimit > op->ors_limit->lms_s_hard ) {
1315 op->ors_slimit = op->ors_limit->lms_s_hard;