mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
cldap: Save a few lines in cldap_netlogon
Follow recent convention to write sync wrappers Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Oct 25 09:04:11 UTC 2024 on atb-devel-224
This commit is contained in:
parent
5619633c9e
commit
0e08e63ae8
@ -1069,7 +1069,7 @@ NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
|
||||
TALLOC_CTX *frame;
|
||||
struct tevent_req *req;
|
||||
struct tevent_context *ev;
|
||||
NTSTATUS status;
|
||||
NTSTATUS status = NT_STATUS_NO_MEMORY;
|
||||
|
||||
if (cldap->searches.list) {
|
||||
return NT_STATUS_PIPE_BUSY;
|
||||
@ -1083,29 +1083,22 @@ NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
|
||||
|
||||
ev = samba_tevent_context_init(frame);
|
||||
if (ev == NULL) {
|
||||
TALLOC_FREE(frame);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
req = cldap_netlogon_send(mem_ctx, ev, cldap, io);
|
||||
if (req == NULL) {
|
||||
TALLOC_FREE(frame);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
|
||||
TALLOC_FREE(frame);
|
||||
return status;
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = cldap_netlogon_recv(req, mem_ctx, io);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(frame);
|
||||
return status;
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
TALLOC_FREE(frame);
|
||||
return NT_STATUS_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user