From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpEtD-0007Gh-Od for qemu-devel@nongnu.org; Thu, 22 Oct 2015 08:22:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpEtA-0004aq-JM for qemu-devel@nongnu.org; Thu, 22 Oct 2015 08:22:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpEtA-0004am-Br for qemu-devel@nongnu.org; Thu, 22 Oct 2015 08:22:36 -0400 References: <1445509543-30679-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <5628D505.20203@redhat.com> Date: Thu, 22 Oct 2015 06:22:29 -0600 MIME-Version: 1.0 In-Reply-To: <1445509543-30679-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3L0735LOtuB4RBbbinQWcodDrEPSkfGkT" Subject: Re: [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Paolo Bonzini , Knut Omang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3L0735LOtuB4RBbbinQWcodDrEPSkfGkT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/22/2015 04:25 AM, Daniel P. Berrange wrote: > Revert the qapi-schema.json change done in: >=20 > commit 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0 > Author: Daniel P. Berrange > Date: Tue Sep 1 14:46:50 2015 +0100 >=20 > sockets: allow port to be NULL when listening on IP address >=20 > Switching "port" from mandatory to optional causes the QAPI > code generator to add a 'has_port' field to the InetSocketAddress > struct. No code that created InetSocketAddress objects was updated > to set 'has_port =3D true', which caused the non-NULL port strings > to be silently dropped when copying InetSocketAddress objects. >=20 > Reported-by: Knut Omang > Signed-off-by: Daniel P. Berrange > --- > qapi-schema.json | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) Yes, I have plans for a qapi improvement that will let us mark strings where we want the convention of memb =3D=3D NULL rather than has_memb =3D= =3D false (flipping the switch globally would touch too much code in one commit, so a marker saying which structs are okay with the idea will make it possible to convert smaller portions at a time - although we may want to do the cleanup over the entire tree and then drop the marker). But since I haven't posted patches on that front yet, it's missed softfreeze and will be something for 2.6. So this patch is necessary for 2.5. >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index f60be29..702b7b5 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2614,9 +2614,7 @@ > # > # @host: host part of the address > # > -# @port: port part of the address, or lowest port if @to is present. > -# Kernel selects a free port if omitted for listener addresses.= > -# #optional > +# @port: port part of the address, or lowest port if @to is present Don't you still want to allow an empty string as the way to allow kernel port selection? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3L0735LOtuB4RBbbinQWcodDrEPSkfGkT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWKNUFAAoJEKeha0olJ0Nq8SEH/1BZ0SZRlSbzmgKr2CCMp7FT FxaJblOw6XcAet/olOZc1rND3dPQWg875FbQOjcwNiqUKmhlF5cavudUxy/KJpsy jbRpPXouLB/28ST/j/UAR9fwI9L8eCYFdjCT9U2yQCUZJIq7sApJ7RT4pak+Q0Qe mrB85q9Fw7nTpy/j7laVrqRSJBco2XOIdczDzEI7iIw4LFrkWZ+cUHkF5EDkAw2A 817R4/MChu02YqrS2dUsDobM1eefz+VDCkOROunJ9OWWpMx63BoCgmrPzAWam95a BiEaaZJGts2hLVoFos/TaMIVc9+U/loFGJ7hwMyN9aOx6C0rdBm2V0ZMR49waQQ= =8iLf -----END PGP SIGNATURE----- --3L0735LOtuB4RBbbinQWcodDrEPSkfGkT--