qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 04/16] ui: convert VNC startup code to use So


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 04/16] ui: convert VNC startup code to use SocketAddress
Date: Tue, 20 Oct 2015 18:01:37 +0100

On 20 October 2015 at 14:39, Daniel P. Berrange <address@hidden> wrote:
> On Mon, Oct 19, 2015 at 04:20:09PM -0600, Eric Blake wrote:
>> On 10/12/2015 05:14 AM, Daniel P. Berrange wrote:
>> > The VNC code is currently using QemuOpts to configure the
>> > sockets connections / listeners it needs. Convert it to
>> > use SocketAddress to bring it in line with modern QAPI
>> > based code elsewhere in QEMU.

>>
>> > +            if (to) {
>> > +                saddr->inet->has_to = true;
>> > +                saddr->inet->to = to;
>> > +            }
>> > +            saddr->inet->ipv4 = saddr->inet->has_ipv4 = has_ipv4;
>> > +            saddr->inet->ipv6 = saddr->inet->has_ipv6 = has_ipv6;
>>
>> Do we want to specify has_ipvX as true even when setting inet->ipvX to
>> false?
>
> This saddr instance is passed into 'socket_connect' which then
> converts it back into a QemuOpts object using
>
>     bool ipv4 = addr->has_ipv4 && addr->ipv4;
>
> So, we don't need to set has_ipvX to true, when ipvX is false.

That is not the *only* thing that inet_addr_to_opts does with
the has_* flags... this kind of thing can be the difference
between "force ipv4" and "use ipv4 or ipv6".

-- PMM



reply via email to

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