summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-09 22:46:59 -0700
committerJeremy Allison <jra@samba.org>2009-04-09 22:46:59 -0700
commit7f10bf980edef3ace1522d0c9c082b35e225c950 (patch)
treed4e9af21de194cca812e754b28f9358a3651f4ce /source3/rpc_client/cli_pipe.c
parentf8f68703da58cf7f61b655b48bbbc45cda647748 (diff)
parentf930f504e1d5e78d2f6f36cab9ce36dbeb34e955 (diff)
downloadsamba-7f10bf980edef3ace1522d0c9c082b35e225c950.tar.gz
samba-7f10bf980edef3ace1522d0c9c082b35e225c950.tar.bz2
samba-7f10bf980edef3ace1522d0c9c082b35e225c950.zip
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/rpc_client/cli_pipe.c')
-rw-r--r--source3/rpc_client/cli_pipe.c18
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: