From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msr9J-0006OY-Ax for qemu-devel@nongnu.org; Wed, 30 Sep 2009 00:50:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msr9E-0006N6-IS for qemu-devel@nongnu.org; Wed, 30 Sep 2009 00:50:44 -0400 Received: from [199.232.76.173] (port=55546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msr9E-0006Mz-As for qemu-devel@nongnu.org; Wed, 30 Sep 2009 00:50:40 -0400 Received: from mx20.gnu.org ([199.232.41.8]:5515) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Msr9D-0007gE-TF for qemu-devel@nongnu.org; Wed, 30 Sep 2009 00:50:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msr9C-0004BT-SW for qemu-devel@nongnu.org; Wed, 30 Sep 2009 00:50:39 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8U4obeD017188 for ; Wed, 30 Sep 2009 00:50:37 -0400 Date: Wed, 30 Sep 2009 10:20:02 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 6/6] vnc: Add a virtio-console-bus device to send / receive guest clipboard Message-ID: <20090930045002.GC28188@amit-x200.redhat.com> References: <1254225888-17093-1-git-send-email-amit.shah@redhat.com> <1254225888-17093-2-git-send-email-amit.shah@redhat.com> <1254225888-17093-3-git-send-email-amit.shah@redhat.com> <1254225888-17093-4-git-send-email-amit.shah@redhat.com> <1254225888-17093-5-git-send-email-amit.shah@redhat.com> <1254225888-17093-6-git-send-email-amit.shah@redhat.com> <1254225888-17093-7-git-send-email-amit.shah@redhat.com> <4AC24E64.2020907@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AC24E64.2020907@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On (Tue) Sep 29 2009 [20:13:56], Gerd Hoffmann wrote: >> static void client_cut_text(VncState *vs, size_t len, uint8_t *text) >> { >> + virtio_console_write(&virtcon_vnc->port, text, len); > > Needs "if (virtcon_vnc)" ? Yes. >> + if (virtcon_vnc) { >> + virtio_console_open(&virtcon_vnc->port); >> + } > > Like it is done here? > > There is no virtio_console_close() in this patch. Does this work > correctly after multiple connects + disconnects (with multiple vnc > clients connected at the same time)? Yes, I actually don't propose this for inclusion. It's just a way to show how the api works. I've only done some very basic testing with this vnc patch (and found some bug in the vnc code that I reported about a while back). > I think when moving the buffering and host_connected state tracking into > the port driver (patch 4/6) which is the only user of the facility you > don't need these open/close calls at all. True for vnc, but may not be for the future users. Amit