From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCA0g-0003XV-T9 for qemu-devel@nongnu.org; Mon, 26 Mar 2012 09:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCA0f-0006mt-4V for qemu-devel@nongnu.org; Mon, 26 Mar 2012 09:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCA0e-0006mf-Sc for qemu-devel@nongnu.org; Mon, 26 Mar 2012 09:30:57 -0400 Date: Mon, 26 Mar 2012 15:30:49 +0200 From: Alon Levy Message-ID: <20120326133049.GD32389@garlic> References: <1332766053-9063-1-git-send-email-alevy@redhat.com> <1332766053-9063-3-git-send-email-alevy@redhat.com> <4F7069CE.5040905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F7069CE.5040905@redhat.com> Subject: Re: [Qemu-devel] [PATCH] spice_info: add mouse_mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, spice-devel@freedesktop.org On Mon, Mar 26, 2012 at 03:06:22PM +0200, Gerd Hoffmann wrote: > > +#if SPICE_SERVER_VERSION >= 0x000a03 /* 0.10.3 */ > > + info->has_mouse_mode = true; > > + info->mouse_mode = g_strdup(spice_server_is_server_mouse(spice_server) ? > > + "server" : "client"); > > #else > info->mouse_mode = "unknown"; > #endif Why? I don't set has_mouse_mode in this case, which defaults to 0 == false because of the malloc0, and then I check has_mouse_mode in the hmp command, and the qmp just won't send the field because has == false. > > cheers, > Gerd