From: Stefan Metzmacher Date: Sat, 22 Oct 2011 01:09:59 +0000 (+0200) Subject: s4:finddcs_cldap: finddcs_cldap_recv() returns NTSTATUS X-Git-Url: http://git.samba.org/?p=rusty%2Fsamba.git;a=commitdiff_plain;h=40dc29bca749bdacd5631e74a55d74252e87a4fd s4:finddcs_cldap: finddcs_cldap_recv() returns NTSTATUS We need to convert the errno based error to NTSTATUS before calling tevent_req_error (via tevent_req_nterror). metze --- diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c index 6df15a9b4e8..359ec70c8c5 100644 --- a/source4/libcli/finddcs_cldap.c +++ b/source4/libcli/finddcs_cldap.c @@ -213,7 +213,12 @@ static void finddcs_cldap_next_server(struct finddcs_cldap_state *state) state->srv_addresses[state->srv_address_index], 389, &dest); - if (tevent_req_error(state->req, ret)) { + if (ret == 0) { + status = NT_STATUS_OK; + } else { + status = map_nt_error_from_unix_common(errno); + } + if (tevent_req_nterror(state->req, status)) { return; }