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:20:34 +0000 (20:20 +0100)
source3/client/client.c

index b2cb911424c596711af5d10294bb2c801965122d..05c4f910b9f62b3b7fef18c52afdd2f0663b4441 100644 (file)
@@ -4844,9 +4844,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();
                }