]> git.sur5r.net Git - openldap/commitdiff
ITS#6758 Do not set sr_err=error before be_search.
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 30 Dec 2010 23:59:23 +0000 (23:59 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 30 Dec 2010 23:59:23 +0000 (23:59 +0000)
glue_op_search() set LDAP_UNWILLING_TO_PERFORM before be_search() as
well as when there was no be_search.

servers/slapd/backglue.c

index e9a337de64f34ba825248a2b991f6f0699f91843..8eca88e8e492e979b06bf9298f631636da052c9c 100644 (file)
@@ -419,9 +419,10 @@ glue_op_search ( Operation *op, SlapReply *rs )
                if ( op->o_bd == b0 )
                        return SLAP_CB_CONTINUE;
 
-               rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
                if (op->o_bd && op->o_bd->be_search) {
                        rs->sr_err = op->o_bd->be_search( op, rs );
+               } else {
+                       rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
                }
                return rs->sr_err;