From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcVRu-0004j7-1s for qemu-devel@nongnu.org; Wed, 15 May 2013 02:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcVRm-00087H-UX for qemu-devel@nongnu.org; Wed, 15 May 2013 02:44:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcVRm-00086t-Lx for qemu-devel@nongnu.org; Wed, 15 May 2013 02:44:22 -0400 Message-ID: <51932F4C.9000008@redhat.com> Date: Wed, 15 May 2013 08:46:36 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1366867752-11578-1-git-send-email-lilei@linux.vnet.ibm.com> <1366867752-11578-3-git-send-email-lilei@linux.vnet.ibm.com> <51922170.8070808@redhat.com> <5193259F.9020803@linux.vnet.ibm.com> In-Reply-To: <5193259F.9020803@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] vnc: Support for LED state extension List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: lagarcia@br.ibm.com, aliguori@us.ibm.com, Gerd Hoffmann , qemu-devel@nongnu.org On 05/15/13 08:05, Lei Li wrote: > On 05/14/2013 07:35 PM, Gerd Hoffmann wrote: >> On 04/25/13 07:29, Lei Li wrote: >>> + /* Sending the current led state message to the client */ >>> + if (ledstate != current_led_state(vs)) { >>> + vnc_led_state_change(vs); >>> + } >> This check never becomes true as the vnc modifier/led state just got >> updated to match ledstate ... > > Oh... then how about get rid of this check, let vnc_led_state_change send > the current led state message directly? You could do the comparison and save the result before updating the modifiers array, and call vnc_led_state_change() in its current location, dependent on the saved comparison result. Just my two cents. Laszlo