]> git.sur5r.net Git - openldap/commitdiff
clean up search limits enforcement
authorPierangelo Masarati <ando@openldap.org>
Sat, 12 Jun 2004 17:31:45 +0000 (17:31 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 12 Jun 2004 17:31:45 +0000 (17:31 +0000)
servers/slapd/search.c

index a22314a6a6de817b725ae7876fcf1e4e775354a9..7f79cf677346a97d85b101049b85c2a1525c87aa 100644 (file)
@@ -401,8 +401,12 @@ do_search(
 #endif /* LDAP_SLAPI */
 
        /* actually do the search and send the result(s) */
-       if ( op->o_bd->be_search && limits_check( op, rs ) == 0 ) {
-               (op->o_bd->be_search)( op, rs );
+       if ( op->o_bd->be_search ) {
+               if ( limits_check( op, rs ) == 0 ) {
+                       (op->o_bd->be_search)( op, rs );
+               }
+               /* else limits_check() sends error */
+
        } else {
                send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
                        "operation not supported within namingContext" );