op->o_tag = o_tag;
rs->sr_text = "Proxy can't contact remote server";
send_ldap_result( op, rs );
+ rs->sr_err = SLAPD_DISCONNECT;
}
rc = 0;
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
- rc = rs->sr_err;
goto cleanup;
}
ldap_back_release_conn( li, lc );
}
- return rc;
+ return rs->sr_err;
}
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
- rc = -1;
goto cleanup;
}
ldap_back_release_conn( li, lc );
}
- return rc;
+ return rs->sr_err;
}
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
- rc = -1;
goto cleanup;
}
ldap_back_release_conn( li, lc );
}
- return rc;
+ return rs->sr_err;
}
ldap_back_release_conn( li, lc );
}
+ if ( rs->sr_err == LDAP_UNAVAILABLE )
+ rs->sr_err = SLAPD_DISCONNECT;
return rs->sr_err;
}