[asterisk-dev] [Code Review] 4474: core: Add basic DNS API implementation

Matt Jordan reviewboard at asterisk.org
Mon Mar 16 09:32:15 CDT 2015



> On March 16, 2015, 9:12 a.m., Matt Jordan wrote:
> > /trunk/main/dns_recurring.c, lines 89-91
> > <https://reviewboard.asterisk.org/r/4474/diff/2/?file=72132#file72132line89>
> >
> >     This could result in an explosion later if this is the last ref to hold recurring.
> 
> Joshua Colp wrote:
>     This can't be the last ref, the callback holds its own ref which is only released at the end of the function.

Maybe a comment then? Generally, seeing a deref followed by an access is an anti-pattern, unless something has explicit knowledge about the refs that have to be held.


- Matt


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


On March 13, 2015, 11:04 a.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4474/
> -----------------------------------------------------------
> 
> (Updated March 13, 2015, 11:04 a.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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150316/75ae7a04/attachment.html>


More information about the asterisk-dev mailing list