From: Stefan Metzmacher Date: Tue, 31 Jan 2012 07:47:38 +0000 (+0100) Subject: s3:client: ignore SMBecho errors (the server may not support it) (bug #8139) X-Git-Tag: tevent-0.9.15~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b8a4c96e8b2294c48bbf8ad8a3422d98448dd6c;p=thirdparty%2Fsamba.git s3:client: ignore SMBecho errors (the server may not support it) (bug #8139) metze --- diff --git a/source3/client/client.c b/source3/client/client.c index 4b7df92877d..89fd1d48957 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(); }