diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-06 20:52:04 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-06 21:32:08 +0200 |
commit | 1c4027678e7300580cdb4122f19261afedcbad6c (patch) | |
tree | 59bf1ff75c5f9c8ddca9567510807d5bff76340a /source3/rpc_client | |
parent | 3084d49cc000dbfeb01d931d737c695dcd392e4a (diff) | |
download | samba-1c4027678e7300580cdb4122f19261afedcbad6c.tar.gz samba-1c4027678e7300580cdb4122f19261afedcbad6c.tar.bz2 samba-1c4027678e7300580cdb4122f19261afedcbad6c.zip |
Correct sync wrappers in cli_pipe.c
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 6b83c170f5..a8cc33f585 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2291,19 +2291,24 @@ NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli, TALLOC_CTX *frame = talloc_stackframe(); struct event_context *ev; struct tevent_req *req; - NTSTATUS status = NT_STATUS_NO_MEMORY; + NTSTATUS status = NT_STATUS_OK; ev = event_context_init(frame); if (ev == NULL) { + status = NT_STATUS_NO_MEMORY; goto fail; } req = rpc_api_pipe_req_send(frame, ev, cli, op_num, in_data); if (req == NULL) { + status = NT_STATUS_NO_MEMORY; goto fail; } - tevent_req_poll(req, ev); + if (!tevent_req_poll(req, ev)) { + status = map_nt_error_from_unix(errno); + goto fail; + } status = rpc_api_pipe_req_recv(req, mem_ctx, out_data); fail: @@ -2905,19 +2910,24 @@ NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli, TALLOC_CTX *frame = talloc_stackframe(); struct event_context *ev; struct tevent_req *req; - NTSTATUS status = NT_STATUS_NO_MEMORY; + NTSTATUS status = NT_STATUS_OK; ev = event_context_init(frame); if (ev == NULL) { + status = NT_STATUS_NO_MEMORY; goto fail; } req = rpc_pipe_bind_send(frame, ev, cli, auth); if (req == NULL) { + status = NT_STATUS_NO_MEMORY; goto fail; } - tevent_req_poll(req, ev); + if (!tevent_req_poll(req, ev)) { + status = map_nt_error_from_unix(errno); + goto fail; + } status = rpc_pipe_bind_recv(req); fail: |