FW: [getdns-api] getdns_return_t for destroy methods

Goyal, Neel ngoyal at verisign.com
Mon Mar 10 14:26:07 CET 2014


FYI, I already put these changes in the repo :)

On 3/10/14, 8:30 AM, "Willem Toorop" <willem at nlnetlabs.nl> wrote:

>op 10-03-14 08:51, Paul Hoffman schreef:
>> On Mar 9, 2014, at 8:45 PM, Goyal, Neel <ngoyal at verisign.com> wrote:
>>>
>>> getdns_return_t getdns_context_destroy(struct getdns_context* context);
>>>
>>> Returns GETDNS_RETURN_GOOD if the context was successfully destroyed.
>>>In the event that the context cannot be destroyed,
>>>GETDNS_RETURN_GENERIC_ERROR is returned.  Some implementations may
>>>return this if getdns_context_destroy is called within a
>>>getdns_callback_t.
>> 
>> "Some implementations"? Can any implementation destroy the context
>>within the callback?
>
>The implementation can not.  But, the application using the
>implementation/library *can* do it from within a callback, because the
>callbacks are part of that application.
>
>What we propose, is to let a getdns_context_destroy, when used from
>within a callback, return GETDNS_RETURN_GOOD if the
>library/implementation can deal with it, and GETDNS_RETURN_GENERIC_ERROR
>if it can not.
>
>Our implementation currently deals with it, but it is administratively
>cumbersome (implementation wise) and therefore susceptible for bugs in
>the future.  For robustness we would rather disallow it.
>
>-- Willem
>_______________________________________________
>getdns-api mailing list
>getdns-api at vpnc.org




More information about the spec mailing list