Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Im906-0002wR-9H for qemu-devel@nongnu.org; Sun, 28 Oct 2007 10:20:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Im902-0002so-Ks for qemu-devel@nongnu.org; Sun, 28 Oct 2007 10:20:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Im902-0002sJ-CQ for qemu-devel@nongnu.org; Sun, 28 Oct 2007 10:20:22 -0400 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Im900-0002Bp-1h for qemu-devel@nongnu.org; Sun, 28 Oct 2007 10:20:20 -0400 Received: from localhost (karma.qumranet.com [10.0.50.239]) by il.qumranet.com (Postfix) with ESMTP id 4F9FE25028F for ; Sun, 28 Oct 2007 16:20:36 +0200 (IST) Date: Sun, 28 Oct 2007 16:20:36 +0200 From: Dan Kenigsberg Message-ID: <20071028142036.GA22515@karma.qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [Patch] handle VNC v3.7 clients correctly Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org According to http://www.realvnc.com/docs/rfbproto.pdf section 6.2.1, when handling older clients, SecurityResult should not be sent. diff --git a/vnc.c b/vnc.c index 72c8d1c..8ae671a 100644 --- a/vnc.c +++ b/vnc.c @@ -1775,7 +1775,10 @@ static int protocol_client_auth(VncState *vs, char *data, size_t len) switch (vs->auth) { case VNC_AUTH_NONE: VNC_DEBUG("Accept auth none\n"); - vnc_write_u32(vs, 0); /* Accept auth completion */ + if (vs->minor >= 8) { + vnc_write_u32(vs, 0); /* Accept auth completion */ + vnc_flush(vs); + } vnc_read_when(vs, protocol_client_init, 1); break;