summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-22 03:09:59 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-22 03:11:57 +0200
commit40dc29bca749bdacd5631e74a55d74252e87a4fd (patch)
treebdd7004dd06b0cda5a8962ec6aab64a18b000806
parent662e9c04fbdf8e01036ab98783693051b0eb9c7e (diff)
downloadsamba-40dc29bca749bdacd5631e74a55d74252e87a4fd.tar.gz
samba-40dc29bca749bdacd5631e74a55d74252e87a4fd.tar.bz2
samba-40dc29bca749bdacd5631e74a55d74252e87a4fd.zip
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
-rw-r--r--source4/libcli/finddcs_cldap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index 6df15a9b4e..359ec70c8c 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;
}