mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3-rpc: Return the correct ntstatus depending on the transport.
This commit is contained in:
parent
fae6091f1d
commit
a866dcc4f6
@ -186,7 +186,11 @@ static struct tevent_req *rpc_tstream_read_send(TALLOC_CTX *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
if (!rpc_tstream_is_connected(transp)) {
|
||||
tevent_req_nterror(req, NT_STATUS_CONNECTION_DISCONNECTED);
|
||||
NTSTATUS status = NT_STATUS_CONNECTION_DISCONNECTED;
|
||||
if (tstream_is_cli_np(transp->stream)) {
|
||||
status = NT_STATUS_PIPE_DISCONNECTED;
|
||||
}
|
||||
tevent_req_nterror(req, status);
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
state->transp = transp;
|
||||
@ -270,7 +274,11 @@ static struct tevent_req *rpc_tstream_write_send(TALLOC_CTX *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
if (!rpc_tstream_is_connected(transp)) {
|
||||
tevent_req_nterror(req, NT_STATUS_CONNECTION_DISCONNECTED);
|
||||
NTSTATUS status = NT_STATUS_CONNECTION_DISCONNECTED;
|
||||
if (tstream_is_cli_np(transp->stream)) {
|
||||
status = NT_STATUS_PIPE_DISCONNECTED;
|
||||
}
|
||||
tevent_req_nterror(req, status);
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
state->ev = ev;
|
||||
@ -366,7 +374,11 @@ static struct tevent_req *rpc_tstream_trans_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (!rpc_tstream_is_connected(transp)) {
|
||||
tevent_req_nterror(req, NT_STATUS_CONNECTION_DISCONNECTED);
|
||||
NTSTATUS status = NT_STATUS_CONNECTION_DISCONNECTED;
|
||||
if (tstream_is_cli_np(transp->stream)) {
|
||||
status = NT_STATUS_PIPE_DISCONNECTED;
|
||||
}
|
||||
tevent_req_nterror(req, status);
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
state->ev = ev;
|
||||
|
Loading…
x
Reference in New Issue
Block a user