> On March 16, 2015, 2:55 p.m., Mark Michelson wrote:
> > /trunk/include/asterisk/dns_core.h, line 225
> > <https://reviewboard.asterisk.org/r/4474/diff/3/?file=72477#file72477line225>
> >
> >     First off, apologies for bringing this up now rather than earlier, but 
> > I did not think of this until over this past weekend.
> >     
> >     The main reason that ast_dns_resolve_async() returns an ast_dns_query 
> > is so that the query can be canceled by calling ast_dns_resolve_cancel(). 
> > The problem is that there is nothing that prevents the caller of 
> > ast_dns_resolve_async() from doing unwanted operations such as adding DNS 
> > results/records, or attempting to read results from the query while an 
> > async thread is currently writing them.
> >     
> >     What I propose here is returning something other than an ast_dns_query 
> > from this function. The structure returned from ast_dns_resolve_async() 
> > could be passed to ast_dns_resolve_cancel(), and that's it. This would be 
> > similar to how ast_dns_resolve_recurring() works.

I'm not sure how that would stop the reading of results though. We'd need to 
add a lock in, which is something I was trying to avoid for the core. How hard 
do we want to enforce things?


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4474/#review14705
-----------------------------------------------------------


On March 16, 2015, 2:33 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4474/
> -----------------------------------------------------------
> 
> (Updated March 16, 2015, 2:33 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24834
>     https://issues.asterisk.org/jira/browse/ASTERISK-24834
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change implements the basic API as described on the DNS API wiki page. 
> Minimal changes have been made as required based on real usage and getting a 
> feel for it. As it is the core functionality is present. Resolvers can 
> register, queries can be made (async / sync).
> 
> As the API was basically copy/pasted from the wiki page there still remain 
> stubs to be filled in for higher level functionality (such as parsing and 
> query sets).
> 
> 
> Diffs
> -----
> 
>   /trunk/main/dns_tlsa.c PRE-CREATION 
>   /trunk/main/dns_srv.c PRE-CREATION 
>   /trunk/main/dns_recurring.c PRE-CREATION 
>   /trunk/main/dns_query_set.c PRE-CREATION 
>   /trunk/main/dns_naptr.c PRE-CREATION 
>   /trunk/main/dns_core.c PRE-CREATION 
>   /trunk/include/asterisk/dns_tlsa.h PRE-CREATION 
>   /trunk/include/asterisk/dns_srv.h PRE-CREATION 
>   /trunk/include/asterisk/dns_resolver.h PRE-CREATION 
>   /trunk/include/asterisk/dns_recurring.h PRE-CREATION 
>   /trunk/include/asterisk/dns_query_set.h PRE-CREATION 
>   /trunk/include/asterisk/dns_naptr.h PRE-CREATION 
>   /trunk/include/asterisk/dns_internal.h PRE-CREATION 
>   /trunk/include/asterisk/dns_core.h PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/4474/diff/
> 
> 
> Testing
> -------
> 
> Ran DNS unit tests as done by Mark, they are happy.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to