1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-13 08:23:49 +03:00

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.
This commit is contained in:
Kai Blin
2009-02-04 09:07:36 +01:00
parent 3a4c8cd492
commit c3b9b6c8aa
11 changed files with 373 additions and 211 deletions

View File

@@ -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);