qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1] monitor: correct socket listen port


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/1] monitor: correct socket listen port
Date: Thu, 29 Oct 2015 07:26:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Sam Bobroff <address@hidden> writes:

> Currently when constructing an inet socket monitor (e.g. via "-monitor
> telent:localhost:12345,server,nowait") the port is ignored and a
> random one is used instead. It appears this behaviour was accidentally
> introduced by commit dafd325d "qemu-char: Convert socket backend to
> QAPI".
>
> The cause is that the has_port field is not set in the address, so
> later it is not copied by qapi_copy_SocketAddress(). This patch simply
> adds the missing "has_port = true".
>
> Signed-off-by: Sam Bobroff <address@hidden>
> ---
>
>  qemu-char.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index c4eb4ee..4fb9279 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -3605,6 +3605,7 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
> ChardevBackend *backend,
>          addr->kind = SOCKET_ADDRESS_KIND_INET;
>          addr->inet = g_new0(InetSocketAddress, 1);
>          addr->inet->host = g_strdup(host);
> +        addr->inet->has_port = true;
>          addr->inet->port = g_strdup(port);
>          addr->inet->has_to = qemu_opt_get(opts, "to");
>          addr->inet->to = qemu_opt_get_number(opts, "to", 0);

Please see "[PATCH] qapi-schema: mark InetSocketAddress as mandatory
again"
Message-Id: <address@hidden>
http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05222.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]