From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36667 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJWBa-0000qF-RB for qemu-devel@nongnu.org; Tue, 01 Jun 2010 14:27:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJWBZ-0005kw-L8 for qemu-devel@nongnu.org; Tue, 01 Jun 2010 14:27:34 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:34491) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJWBZ-0005ke-Hh for qemu-devel@nongnu.org; Tue, 01 Jun 2010 14:27:33 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o51ID9qS001580 for ; Tue, 1 Jun 2010 14:13:09 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o51IRHt5123982 for ; Tue, 1 Jun 2010 14:27:17 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o51IRGwT015398 for ; Tue, 1 Jun 2010 15:27:16 -0300 Message-ID: <4C0550FC.6010203@linux.vnet.ibm.com> Date: Tue, 01 Jun 2010 13:27:08 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 01/12] Revert "vnc: set the right prefered encoding" References: <1274253852-16068-1-git-send-email-corentincj@iksaif.net> <1274253852-16068-2-git-send-email-corentincj@iksaif.net> In-Reply-To: <1274253852-16068-2-git-send-email-corentincj@iksaif.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Adam Litke , qemu-devel@nongnu.org, Alexander Graf On 05/19/2010 02:24 AM, Corentin Chary wrote: > This patch was wrong, because the loop was already reversed, > so the first encoding was correctly set at the end of the loopp. > > This reverts commit 14eb8b6829ad9dee7035de729e083844a425f274. > > Signed-off-by: Corentin Chary > Applied all. Thanks. Regards, Anthony Liguori > --- > vnc.c | 14 ++++---------- > 1 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/vnc.c b/vnc.c > index 1f7ad73..b1a3fdb 100644 > --- a/vnc.c > +++ b/vnc.c > @@ -1594,7 +1594,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) > > vnc_zlib_init(vs); > vs->features = 0; > - vs->vnc_encoding = -1; > + vs->vnc_encoding = 0; > vs->tight_compression = 9; > vs->tight_quality = 9; > vs->absolute = -1; > @@ -1603,24 +1603,18 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) > enc = encodings[i]; > switch (enc) { > case VNC_ENCODING_RAW: > - if (vs->vnc_encoding != -1) { > - vs->vnc_encoding = enc; > - } > + vs->vnc_encoding = enc; > break; > case VNC_ENCODING_COPYRECT: > vs->features |= VNC_FEATURE_COPYRECT_MASK; > break; > case VNC_ENCODING_HEXTILE: > vs->features |= VNC_FEATURE_HEXTILE_MASK; > - if (vs->vnc_encoding != -1) { > - vs->vnc_encoding = enc; > - } > + vs->vnc_encoding = enc; > break; > case VNC_ENCODING_ZLIB: > vs->features |= VNC_FEATURE_ZLIB_MASK; > - if (vs->vnc_encoding != -1) { > - vs->vnc_encoding = enc; > - } > + vs->vnc_encoding = enc; > break; > case VNC_ENCODING_DESKTOPRESIZE: > vs->features |= VNC_FEATURE_RESIZE_MASK; >