From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoWpb-0006c1-26 for qemu-devel@nongnu.org; Tue, 20 Oct 2015 09:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoWpX-0006NW-LZ for qemu-devel@nongnu.org; Tue, 20 Oct 2015 09:19:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoWpX-0006Mx-Fw for qemu-devel@nongnu.org; Tue, 20 Oct 2015 09:19:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 830D6AC1D3 for ; Tue, 20 Oct 2015 13:19:54 +0000 (UTC) Date: Tue, 20 Oct 2015 14:19:50 +0100 From: "Daniel P. Berrange" Message-ID: <20151020131950.GK14616@redhat.com> References: <1444648509-29179-1-git-send-email-berrange@redhat.com> <1444648509-29179-4-git-send-email-berrange@redhat.com> <56256AB0.7000203@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56256AB0.7000203@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 03/16] sockets: allow port to be NULL when listening on IP address Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Paolo Bonzini , qemu-devel@nongnu.org, "Dr. David Alan Gilbert" On Mon, Oct 19, 2015 at 04:12:00PM -0600, Eric Blake wrote: > On 10/12/2015 05:14 AM, Daniel P. Berrange wrote: > > If the port in the SocketAddress struct is NULL, it can allow > > the kernel to automatically select a free port. This is useful > > in particular in unit tests to avoid a race trying to find a > > free port to run a test case on. > > > > Signed-off-by: Daniel P. Berrange > > --- > > util/qemu-sockets.c | 18 +++++++++++++----- > > 1 file changed, 13 insertions(+), 5 deletions(-) > > > > Right now, the qapi documents InetSocketAddress.port as mandatory. > Should we relax it to be optional, rather than special-casing the empty > string "" to mean no port? Yep, I can change qapi-schema.json to mark it optional. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|