summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-06-15 20:39:53 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-08-12 17:25:58 +1200
commitd672535551e794574d25a3f553011af5fbb7a0a9 (patch)
treeeb692c073b64f154b9b4dfb462b5d2b273544cfa /source4/libcli
parent2e59d6c37002734887f9d26be2ea078775dc0c1e (diff)
downloadsamba-d672535551e794574d25a3f553011af5fbb7a0a9.tar.gz
samba-d672535551e794574d25a3f553011af5fbb7a0a9.tar.bz2
samba-d672535551e794574d25a3f553011af5fbb7a0a9.zip
libcli: Fix improper use of tevent_req_simple_recv_ntstatus
tevent_req_simple_recv_ntstatus is just for the simple return without anything to do after it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/finddcs_cldap.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index bf8da4e483..ce0e1c7aa9 100644
--- a/source4/libcli/finddcs_cldap.c
+++ b/source4/libcli/finddcs_cldap.c
@@ -431,14 +431,18 @@ NTSTATUS finddcs_cldap_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct
talloc_free(req);
return NT_STATUS_INTERNAL_ERROR;
}
- status = tevent_req_simple_recv_ntstatus(req);
- if (NT_STATUS_IS_OK(status)) {
- talloc_steal(mem_ctx, state->netlogon);
- io->out.netlogon = state->netlogon->out.netlogon;
- io->out.address = talloc_steal(mem_ctx, state->srv_addresses[state->srv_address_index]);
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
}
+
+ talloc_steal(mem_ctx, state->netlogon);
+ io->out.netlogon = state->netlogon->out.netlogon;
+ io->out.address = talloc_steal(
+ mem_ctx, state->srv_addresses[state->srv_address_index]);
+
tevent_req_received(req);
- return status;
+ return NT_STATUS_OK;
}
NTSTATUS finddcs_cldap(TALLOC_CTX *mem_ctx,