From 713e9271ba4fb26646a251b9fcd9adeac7721a56 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 31 Jan 2012 10:02:18 -0800 Subject: [PATCH] s3:client: ignore SMBecho errors (the server may not support it) (bug #8139) Signed-off-by: Jeremy Allison (cherry picked from commit bb28a9387d3c76f6f8c7f79ec61d37a499d6c8f6) (cherry picked from commit 461adc665aaadc730d7705b3785d45f787f98425) --- source3/client/client.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index cf43171a595..189b6323412 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4482,9 +4482,13 @@ static void readline_callback(void) 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. Maybe server has closed " - "the connection\n")); + 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(); } -- 2.11.4.GIT