Commit faef608a authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#8142 drop client connection on remote failure

also cleanup of return-code handling
parent 01e71f21
......@@ -1575,6 +1575,7 @@ retry:;
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;
......
......@@ -53,7 +53,6 @@ retry:
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
rc = rs->sr_err;
goto cleanup;
}
......@@ -82,5 +81,5 @@ cleanup:
ldap_back_release_conn( li, lc );
}
return rc;
return rs->sr_err;
}
......@@ -98,7 +98,6 @@ retry:;
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
rc = -1;
goto cleanup;
}
......@@ -132,6 +131,6 @@ cleanup:;
ldap_back_release_conn( li, lc );
}
return rc;
return rs->sr_err;
}
......@@ -85,7 +85,6 @@ retry:
rc = ldap_back_controls_add( op, rs, lc, &ctrls );
if ( rc != LDAP_SUCCESS ) {
send_ldap_result( op, rs );
rc = -1;
goto cleanup;
}
......@@ -119,6 +118,6 @@ cleanup:
ldap_back_release_conn( li, lc );
}
return rc;
return rs->sr_err;
}
......@@ -645,6 +645,8 @@ finish:;
ldap_back_release_conn( li, lc );
}
if ( rs->sr_err == LDAP_UNAVAILABLE )
rs->sr_err = SLAPD_DISCONNECT;
return rs->sr_err;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment