From patchwork Thu Nov 1 19:05:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 196375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 351502C0172 for ; Fri, 2 Nov 2012 07:02:44 +1100 (EST) Received: from localhost ([::1]:38260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU06t-0000md-BQ for incoming@patchwork.ozlabs.org; Thu, 01 Nov 2012 15:07:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU05l-0006PI-EB for qemu-devel@nongnu.org; Thu, 01 Nov 2012 15:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TU05k-0007QW-41 for qemu-devel@nongnu.org; Thu, 01 Nov 2012 15:06:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU05j-0007QK-Qe for qemu-devel@nongnu.org; Thu, 01 Nov 2012 15:06:11 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1J65JM008086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Nov 2012 15:06:06 -0400 Received: from localhost (ovpn-112-23.ams2.redhat.com [10.36.112.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA1J64jb025744; Thu, 1 Nov 2012 15:06:04 -0400 From: Stefan Hajnoczi To: Anthony Liguori Date: Thu, 1 Nov 2012 20:05:41 +0100 Message-Id: <1351796754-21703-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1351796754-21703-1-git-send-email-stefanha@redhat.com> References: <1351796754-21703-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Joel Martin , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 1/6] ui/vnc: Only report/use TIGHT_PNG encoding if enabled. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Joel Martin If TIGHT_PNG is not enabled by the --enable-vnc-png configure flag then do not report to the client that it is supported. Also, since TIGHT_PNG is the same as the TIGHT encoding but with the filter/copy replaced with PNG data, adding it to the supported encodings list when it is disabled will cause the TIGHT encoding to be used even though the client requested TIGHT_PNG. Signed-off-by: Joel Martin Signed-off-by: Stefan Hajnoczi --- ui/vnc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index 33e6386..66ae930 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1806,10 +1806,12 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->features |= VNC_FEATURE_TIGHT_MASK; vs->vnc_encoding = enc; break; +#ifdef CONFIG_VNC_PNG case VNC_ENCODING_TIGHT_PNG: vs->features |= VNC_FEATURE_TIGHT_PNG_MASK; vs->vnc_encoding = enc; break; +#endif case VNC_ENCODING_ZLIB: vs->features |= VNC_FEATURE_ZLIB_MASK; vs->vnc_encoding = enc;