X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fcompare.c;h=41034b732de2af4b34736193611a39d77c2a56ad;hb=19838fe2ef8161be435454490284baf98d73df88;hp=9dc1af8d939523cad8ea5f62ad404599517f382d;hpb=53a6e46dec19169e7588b2bb66218249cd1e59c4;p=openldap diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 9dc1af8d93..41034b732d 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2005 The OpenLDAP Foundation. + * Copyright 1998-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -138,6 +138,7 @@ fe_op_compare( Operation *op, SlapReply *rs ) Entry *entry = NULL; int manageDSAit; AttributeAssertion ava = *op->orc_ava; + BackendDB *bd = op->o_bd; if( strcasecmp( op->o_req_ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) { Debug( LDAP_DEBUG_ARGS, @@ -214,9 +215,8 @@ fe_op_compare( Operation *op, SlapReply *rs ) rs->sr_err = LDAP_REFERRAL; if (!rs->sr_ref) rs->sr_ref = default_referral; - op->o_bd = frontendDB; + op->o_bd = bd; send_ldap_result( op, rs ); - op->o_bd = NULL; if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref ); rs->sr_err = 0; @@ -369,6 +369,7 @@ fe_op_compare( Operation *op, SlapReply *rs ) } cleanup:; + op->o_bd = bd; return rs->sr_err; }