[Spice-devel] [PATCHv2 1/3] reds: add Unix socket support

Uri Lublin uril at redhat.com
Thu Jan 15 09:18:04 PST 2015


On 01/13/2015 04:12 PM, Marc-André Lureau wrote:
> Hi
>
> On Mon, Jan 12, 2015 at 5:35 PM, Marc-André Lureau
> <marcandre.lureau at gmail.com> wrote:
>> +    } else if (flags == SPICE_ADDR_FLAG_IPV6_ONLY) {
>>           spice_family = PF_INET6;
>> +    } else if (flags == SPICE_ADDR_FLAG_UNIX_ONLY) {
>> +        spice_family = AF_UNIX;
>> +    } else {
> Here I added if (state != 0), since it's valid to call with 0 flags.

Yeah, adding  -- if (flags != 0) -- is good here.
With flags=0, spice_family keeps its initial value PF_UNSPEC
and getaddrinfo is happy.

>
>> +        spice_warning("unknown address flag: 0x%X", flags);
>>       }
>
>



More information about the Spice-devel mailing list