From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaoSy-0008JC-4I for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:20:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaoSt-0008Ht-DK for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:20:27 -0400 Received: from [199.232.76.173] (port=54777 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaoSt-0008Hm-35 for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:20:23 -0400 Received: from mx1.redhat.com ([66.187.233.31]:33012) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaoSs-0001wa-Df for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:20:22 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7BAKLE5013999 for ; Tue, 11 Aug 2009 06:20:21 -0400 Date: Tue, 11 Aug 2009 11:20:19 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH] Migration via unix sockets. Message-ID: <20090811102019.GI18703@redhat.com> References: <1249485869-23590-1-git-send-email-clalance@redhat.com> <4A7FF53F.2000106@redhat.com> <4A8005B4.9030600@redhat.com> <4A8136CF.5040304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8136CF.5040304@redhat.com> Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Lalancette Cc: Avi Kivity , qemu-devel@nongnu.org On Tue, Aug 11, 2009 at 11:15:59AM +0200, Chris Lalancette wrote: > +static void fd_accept_incoming_migration(void *opaque) > +{ > + struct sockaddr addr; > + socklen_t addrlen = sizeof(addr); > + int s = (unsigned long)opaque; > + QEMUFile *f; > + int c, ret; > + > + do { > + c = accept(s, &addr, &addrlen); > + } while (c == -1 && socket_error() == EINTR); This bit doesn't make sense if we're just passing an open FD, since it may not be a socket. Just declare that if passing a socket FD, the FD must be a pre-accepted client, and remove this line. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|