diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-06-27 22:55:22 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2015-07-03 02:00:28 +0200 |
commit | 7e095eb334068a9c25064a52fd3e9c995ddf220e (patch) | |
tree | 8b340e05bcea96c0286afbf0033d4356b48d294a /libcli | |
parent | 793af3f2aeb036727981e00b709b88b9996fc25d (diff) | |
download | samba-7e095eb334068a9c25064a52fd3e9c995ddf220e.tar.gz |
libcli/smb: let tstream_smbXcli_np report connection errors as EPIPE instead of EIO
This maps to NT_STATUS_CONNECTION_DISCONNECTED instead of
NT_STATUS_IO_DEVICE_ERROR.
EPIPE, NT_STATUS_CONNECTION_DISCONNECTED matches what other tstream backends
e.g. tcp and unix report.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/tstream_smbXcli_np.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c index 77a326b012d..9cd6302c8c7 100644 --- a/libcli/smb/tstream_smbXcli_np.c +++ b/libcli/smb/tstream_smbXcli_np.c @@ -632,7 +632,7 @@ static void tstream_smbXcli_np_writev_write_done(struct tevent_req *subreq) } TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - tstream_smbXcli_np_writev_disconnect_now(req, EIO, __location__); + tstream_smbXcli_np_writev_disconnect_now(req, EPIPE, __location__); return; } @@ -980,7 +980,7 @@ static void tstream_smbXcli_np_readv_trans_done(struct tevent_req *subreq) status = NT_STATUS_OK; } if (!NT_STATUS_IS_OK(status)) { - tstream_smbXcli_np_readv_disconnect_now(req, EIO, __location__); + tstream_smbXcli_np_readv_disconnect_now(req, EPIPE, __location__); return; } @@ -1064,7 +1064,7 @@ static void tstream_smbXcli_np_readv_read_done(struct tevent_req *subreq) } if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(subreq); - tstream_smbXcli_np_readv_disconnect_now(req, EIO, __location__); + tstream_smbXcli_np_readv_disconnect_now(req, EPIPE, __location__); return; } @@ -1290,7 +1290,7 @@ static void tstream_smbXcli_np_disconnect_done(struct tevent_req *subreq) } TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - tevent_req_error(req, EIO); + tevent_req_error(req, EPIPE); return; } |