[getdns-api] Notification callbacks

Murray S. Kucherawy superuser
Wed Mar 13 17:27:49 CET 2013


I'm still confused.  I am assuming the possible values of a getdns_return_t
are listed in Section 5.2 (e.g., GETDNS_RETURN_BAD_CONTEXT).  What would it
mean for this callback to receive a context handle and
GETDNS_RETURN_BAD_CONTEXT as arguments?  That doesn't tell me anything
about which part of the context was modified, which I think is what this
callback is for.

The text describing the callback suggests the second argument should
receive a value as defined in Section 8.10 (e.g.,
GETDNS_CONTEXT_CODE_UPSTREAM_RECURSIVE_SERVERS).  I don't know what type
that would be, however.



On Wed, Mar 13, 2013 at 11:09 AM, Paul Hoffman <paul.hoffman at vpnc.org>wrote:

> On Mar 12, 2013, at 5:48 PM, Murray S. Kucherawy <superuser at gmail.com>
> wrote:
>
> > Section 8.2 describes the prototype for a function that will be notified
> of context changes, automatic or otherwise.  The prototype is:
> >
> > void (*value)(getdns_context_t context, getdns_return_t changed_item)
> >
> > So the callback will receive as its first argument the context that was
> modified, and the second is the item that was modified.  Is
> "getdns_return_t" the right type there?
>
> I believe so, yes. The return from the call to
> getdns_context_set_context_update_callback() would be
> GETDNS_RETURN_BAD_CONTEXT if you passed this function a bad context.
>
> --Paul Hoffman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vpnc.org/pipermail/getdns-api/attachments/20130313/8e29f1bb/attachment.html>



More information about the spec mailing list