git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fae6091
)
s3-rpc: Return the correct ntstatus depending on the transport.
author
Andreas Schneider
<asn@samba.org>
Tue, 3 Jul 2012 11:01:47 +0000
(13:01 +0200)
committer
Andreas Schneider
<asn@cryptomilk.org>
Fri, 6 Jul 2012 08:00:57 +0000
(10:00 +0200)
source3/rpc_client/rpc_transport_tstream.c
patch
|
blob
|
history
diff --git
a/source3/rpc_client/rpc_transport_tstream.c
b/source3/rpc_client/rpc_transport_tstream.c
index 01e7a5edc87a16947ecba1c9ac440787f03c5534..11cd8d44eb65186a965f7a5a32c84c45c1e9e10a 100644
(file)
--- a/
source3/rpc_client/rpc_transport_tstream.c
+++ b/
source3/rpc_client/rpc_transport_tstream.c
@@
-186,7
+186,11
@@
static struct tevent_req *rpc_tstream_read_send(TALLOC_CTX *mem_ctx,
return NULL;
}
if (!rpc_tstream_is_connected(transp)) {
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;
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)) {
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;
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)) {
}
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;
return tevent_req_post(req, ev);
}
state->ev = ev;