/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2013 The OpenLDAP Foundation.
+ * Copyright 1999-2014 The OpenLDAP Foundation.
* Portions Copyright 1999-2003 Howard Chu.
* Portions Copyright 2000-2003 Pierangelo Masarati.
* All rights reserved.
}
}
- if ( rc == -1 && dont_retry == 0 ) {
- if ( do_retry ) {
- do_retry = 0;
- if ( ldap_back_retry( &lc, op, rs, LDAP_BACK_DONTSEND ) ) {
- goto retry;
+ if ( rc == -1 ) {
+ if ( dont_retry == 0 ) {
+ if ( do_retry ) {
+ do_retry = 0;
+ if ( ldap_back_retry( &lc, op, rs, LDAP_BACK_DONTSEND ) ) {
+ goto retry;
+ }
}
+
+ rs->sr_err = LDAP_SERVER_DOWN;
+ rs->sr_err = slap_map_api2result( rs );
+ goto finish;
+
+ } else if ( LDAP_BACK_ONERR_STOP( li ) ) {
+ /* if onerr == STOP */
+ rs->sr_err = LDAP_SERVER_DOWN;
+ rs->sr_err = slap_map_api2result( rs );
+ goto finish;
}
- rs->sr_err = LDAP_SERVER_DOWN;
- rs->sr_err = slap_map_api2result( rs );
- goto finish;
}
/*
rs->sr_matched = pmatch.bv_val;
rs->sr_flags |= REP_MATCHED_MUSTBEFREED;
}
+
+finish:;
if ( !BER_BVISNULL( &match ) ) {
ber_memfree( match.bv_val );
}
rs->sr_err = LDAP_REFERRAL;
}
-finish:;
if ( LDAP_BACK_QUARANTINE( li ) ) {
ldap_back_quarantine( op, rs );
}