[libvirt] [PATCH 2/2] event: make deregister return value match docs
eblake at redhat.com
Mon Jan 6 13:54:10 UTC 2014
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,
>> + 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
> And since either changing the doc or the code could be able break
> changing the code couldn't be worse than changing the doc. Well, who
> knows. :-)
Can you also review 4/2 in the series? I'd like to squash the two
before pushing as a single patch.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 604 bytes
Desc: OpenPGP digital signature
More information about the libvir-list