summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-01 06:50:25 +0000
committerJeremy Allison <jra@samba.org>2002-10-01 06:50:25 +0000
commit5567ef53cb65e6100825ea909d9c35e322e65293 (patch)
tree18684eca781cac862db23cb81301208650ce6df2 /source3/libsmb/clientgen.c
parenta9ccc38c082c3c74050cbbf554cbef027e585fdd (diff)
downloadsamba-5567ef53cb65e6100825ea909d9c35e322e65293.tar.gz
samba-5567ef53cb65e6100825ea909d9c35e322e65293.tar.bz2
samba-5567ef53cb65e6100825ea909d9c35e322e65293.zip
Cope with rw errors and timeout to peer.
Jeremy. (This used to be commit 736a7bab487d7e217eed452e2089adb6b4164ad5)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 4a102097ce..2236d8508d 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -100,7 +100,7 @@ BOOL cli_receive_smb(struct cli_state *cli)
/* If the server is not responding, note that now */
if (!ret) {
- cli->smb_read_error = smb_read_error;
+ cli->smb_rw_error = smb_read_error;
close(cli->fd);
cli->fd = -1;
}
@@ -131,6 +131,7 @@ BOOL cli_send_smb(struct cli_state *cli)
if (ret <= 0) {
close(cli->fd);
cli->fd = -1;
+ cli->smb_rw_error = WRITE_ERROR;
DEBUG(0,("Error writing %d bytes to client. %d (%s)\n",
(int)len,(int)ret, strerror(errno) ));
return False;
@@ -295,7 +296,7 @@ void cli_close_connection(struct cli_state *cli)
if (cli->fd != -1)
close(cli->fd);
cli->fd = -1;
- cli->smb_read_error = 0;
+ cli->smb_rw_error = 0;
}
/****************************************************************************