summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-01-31 08:47:38 +0100
committerJeremy Allison <jra@samba.org>2012-01-31 21:53:25 +0100
commit6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c (patch)
treed1b1ccc5e291ff87ea1102e29181cf105aa7e231 /source3/client
parent27c686dd70daf6a565c83c037e1ced09212cfff6 (diff)
downloadsamba-6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c.tar.gz
samba-6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c.tar.bz2
samba-6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c.zip
s3:client: ignore SMBecho errors (the server may not support it) (bug #8139)
metze
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 4b7df92877..89fd1d4895 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5032,9 +5032,13 @@ static void readline_callback(void)
/* Ping the server to keep the connection alive using SMBecho. */
memset(garbage, 0xf0, sizeof(garbage));
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("SMBecho failed (%s). Maybe server has closed "
- "the connection\n", nt_errstr(status)));
+ if (NT_STATUS_IS_OK(status)) {
+ return;
+ }
+
+ if (!cli_state_is_connected(cli)) {
+ DEBUG(0,("SMBecho failed (%s). The connection is "
+ "disconnected now\n", nt_errstr(status)));
finished = true;
smb_readline_done();
}