From c3b9b6c8aae1dea8df5fc7bff873a015aaa92d6e Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 4 Feb 2009 09:07:36 +0100 Subject: async_sock: Use unix errnos instead of NTSTATUS This also switches wb_reqtrans to use wbcErr instead of NTSTATUS as it would be pointless to convert to errno first and to wbcErr later. --- source3/rpc_server/srv_pipe_hnd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 04369d1dd2..6dfe7a0911 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -1220,11 +1220,12 @@ static void np_write_done(struct async_req *subreq) { struct async_req *req = talloc_get_type_abort( subreq->async.priv, struct async_req); - NTSTATUS status; + int err; + ssize_t ret; - status = sendall_recv(subreq); - if (!NT_STATUS_IS_OK(status)) { - async_req_nterror(req, status); + ret = sendall_recv(subreq, &err); + if (ret < 0) { + async_req_nterror(req, map_nt_error_from_unix(err)); return; } async_req_done(req); -- cgit