[Asterisk-code-review] DNS: Create a system-level DNS resolver (asterisk[master])

Mark Michelson asteriskteam at digium.com
Mon Jul 6 11:30:43 CDT 2015


Mark Michelson has posted comments on this change.

Change subject: DNS: Create a system-level DNS resolver
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/749/5/include/asterisk/dns.h
File include/asterisk/dns.h:

Line 73: int ast_search_dns_ex(void *context, const char *dname, int rr_class, int rr_type,
Sorry if I was unclear earlier with one of my suggestions, but in addition to placing AST_DNS_SEARCH_FAILURE, AST_DNS_SEARCH_NO_RECORDS, and AST_DNS_SEARCH_SUCCESS in an enum, I was expecting that this function could return that enum instead of just int. i.e.:

    enum ast_dns_search_result ast_search_dns_ex(<parameters>);

This way, people looking at the API will know that they should be comparing the results that this returns to the values provided by the enum.


https://gerrit.asterisk.org/#/c/749/5/main/dns_system_resolver.c
File main/dns_system_resolver.c:

Line 145: 	int res = ast_search_dns_ex(query,
If ast_search_dns_ex() has its signature changed, then you'd also want to change res to be of type enum ast_dns_search_result.


-- 
To view, visit https://gerrit.asterisk.org/749
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3b36ea17b889a98df4f8d80d50bb7ee175afa077
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list