Re: Callbacks help please

From: <squid3@dont-contact.us>
Date: Mon, 25 Jun 2007 11:10:24 +1200 (NZST)

> sön 2007-06-24 klockan 23:41 +1200 skrev Amos Jeffries:
>
>> > I'm trying to add CNAME capability so the absence of additional A or
>> > AAAA will failover to looking them up.
>> > (This is presently showing me the same 'can't connect to X website' we
>> > get so many complaints about, maybe the same problem.)
>
> Should work fine to continue ignoring CNAME and do the failover to an A
> when seeing a reply only having a CNAME and no AAAA.
>
>> Never mind. I think I have mucked up a suitable alternative.
>
> So what did you end up doing?
>
> Regards
> Henrik
>

Altered ipcacheParse so that it returned -1 for *all* errors, 0 for 'no
data yet', and N for data.

Changed dummy_handler which did nothing to ipcacheHandleCnameRecurse which
accepts the cbdata parameter as either an generic_cbdata(ipcache_entry) or
null. On NULL it behaves as dummy_handler used to.
With data it adds the DNS addrs found from the subquery to the entry
passed in as parent. Then calls the parents callback instead.

The single function, (name just slips my mind), which calls ipcacheParse
altered to handle the new return cases and NOT add the entry to the live
cache or call its callback IFF 0 received. Thus waiting until the child
call returns.

Amos
Received on Sun Jun 24 2007 - 17:10:28 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Jul 01 2007 - 12:00:07 MDT