ID id, cursor;
Entry *e;
Entry *matched = NULL;
- struct berval realbase = { 0, NULL };
+ struct berval realbase = BER_BVNULL;
int manageDSAit = get_manageDSAit( op );
#ifdef NEW_LOGGING
}
if ( e == NULL ) {
- struct berval matched_dn = { 0, NULL };
+ struct berval matched_dn = BER_BVNULL;
if ( matched != NULL ) {
BerVarray erefs;
}
/* if candidates exceed to-be-checked entries, abort */
- if ( op->ors_limit /* isroot == TRUE */
+ if ( op->ors_limit /* isroot == FALSE */
&& op->ors_limit->lms_s_unchecked != -1
&& ID_BLOCK_NIDS( candidates ) > (unsigned) op->ors_limit->lms_s_unchecked )
{
}
/* check time limit */
- if ( op->ors_tlimit != -1 && slap_get_time() > stoptime ) {
+ if ( op->ors_tlimit != SLAP_NO_LIMIT
+ && slap_get_time() > stoptime )
+ {
rs->sr_err = LDAP_TIMELIMIT_EXCEEDED;
send_ldap_result( op, rs );
rc = LDAP_SUCCESS;
{
scopeok = dnIsSuffix( &e->e_nname, &realbase );
+#ifdef LDAP_SCOPE_SUBORDINATE
} else if ( !scopeok
&& op->ors_scope == LDAP_SCOPE_SUBORDINATE )
{
scopeok = !dn_match( &e->e_nname, &realbase )
&& dnIsSuffix( &e->e_nname, &realbase );
+#endif
} else {
scopeok = 1;
{
scopeok = dnIsSuffix( &e->e_nname, &realbase );
+#ifdef LDAP_SCOPE_SUBORDINATE
} else if ( !scopeok &&
op->ors_scope == LDAP_SCOPE_SUBORDINATE )
{
scopeok = !dn_match( &e->e_nname, &realbase )
&& dnIsSuffix( &e->e_nname, &realbase );
+#endif
} else {
scopeok = 1;
if ( --op->ors_slimit == -1 ) {
cache_return_entry_r( &li->li_cache, e );
rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
+ rs->sr_entry = NULL;
send_ldap_result( op, rs );
rc = LDAP_SUCCESS;
goto done;
}
if (e) {
+ rs->sr_flags = 0;
result = send_search_entry( op, rs );
switch (result) {