From 40dc29bca749bdacd5631e74a55d74252e87a4fd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 22 Oct 2011 03:09:59 +0200 Subject: [PATCH] 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 --- source4/libcli/finddcs_cldap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.34.1