From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtBBI-00049z-Fi for qemu-devel@nongnu.org; Mon, 02 Nov 2015 04:13:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtBBF-0002PV-3f for qemu-devel@nongnu.org; Mon, 02 Nov 2015 04:13:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtBBE-0002PO-U6 for qemu-devel@nongnu.org; Mon, 02 Nov 2015 04:13:33 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 81253C0B2ECA for ; Mon, 2 Nov 2015 09:13:32 +0000 (UTC) From: Markus Armbruster Date: Mon, 2 Nov 2015 10:13:06 +0100 Message-Id: <1446455610-15739-2-git-send-email-armbru@redhat.com> In-Reply-To: <1446455610-15739-1-git-send-email-armbru@redhat.com> References: <1446455610-15739-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL v2 01/25] qapi-schema: mark InetSocketAddress as mandatory again List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: "Daniel P. Berrange" Revert the qapi-schema.json change done in: commit 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0 Author: Daniel P. Berrange Date: Tue Sep 1 14:46:50 2015 +0100 sockets: allow port to be NULL when listening on IP address 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 = true', which caused the non-NULL port strings to be silently dropped when copying InetSocketAddress objects. Reported-by: Knut Omang Signed-off-by: Daniel P. Berrange Message-Id: <1445509543-30679-1-git-send-email-berrange@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- qapi-schema.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 # # @to: highest port to try # @@ -2631,7 +2629,7 @@ { 'struct': 'InetSocketAddress', 'data': { 'host': 'str', - '*port': 'str', + 'port': 'str', '*to': 'uint16', '*ipv4': 'bool', '*ipv6': 'bool' } } -- 2.4.3