Re: [PATCH 2/2] event: make deregister return value match docs

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

 



On 01/06/2014 04:16 AM, Osier Yang wrote:
> On 04/01/14 03:31, Eric Blake wrote:
>> Ever since their introduction (commit 1509b80 in v0.5.0 for
>> virConnectDomainEventRegister, commit 4445723 in v0.8.0 for
>> virConnectDomainEventDeregisterAny), the event deregistration
>> functions have been documented as returning 0 on success;
>> likewise for older registration (only the newer RegisterAny
>> must return a non-zero callbackID).  And now that we are
>> adding virConnectNetworkEventDeregisterAny for v1.2.1, it
>> should have the same semantics.
>>

>> @@ -7371,6 +7375,9 @@ static int
>> vboxConnectDomainEventDeregister(virConnectPtr conn,
>>
>>       vboxDriverUnlock(data);
>>
>> +    if (cnt >= 0)
>> +        ret = 0;
> 
> This actually fixes bug,  otherwise it always returns -1.

Yes, vbox deregistration was broken and always failed; I'll update the
commit message to call out this a bug fix.

> 
> The changes themselvs are just sane.
> 
> Assuming that the application followed the documentation instead of the
> code.
> And since either changing the doc or the code could be able break
> something,
> changing the code couldn't be worse than changing the doc. Well, who
> knows. :-)
> 
> ACK.

Can you also review 4/2 in the series?  I'd like to squash the two
before pushing as a single patch.

https://www.redhat.com/archives/libvir-list/2014-January/msg00119.html

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]