s3:client: ignore SMBecho errors (the server may not support it) (bug #8139) Signed...
authorStefan Metzmacher <metze@samba.org>
Tue, 31 Jan 2012 18:02:18 +0000 (10:02 -0800)
committerKarolin Seeger <kseeger@samba.org>
Fri, 3 Feb 2012 19:21:51 +0000 (20:21 +0100)
(cherry picked from commit bb28a9387d3c76f6f8c7f79ec61d37a499d6c8f6)

source3/client/client.c

index cf43171a595e8c4376f19a17559320580e79257a..189b6323412f96a5779356938a575088e0114c89 100644 (file)
@@ -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();
                }