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

Ashley Sanders asteriskteam at digium.com
Mon Jul 6 16:02:41 CDT 2015


Ashley Sanders has posted comments on this change.

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


Patch Set 5:

(1 comment)

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

Line 216: 	if (!ast_dns_query_get_result(query)) {
        : 		res = ast_dns_resolver_set_result(query,                          /* The DNS query */
        : 		                                  0,                              /* Is the result secure? */
        : 		                                  0,                              /* Is the result bogus? */
        : 		                                  rcode,                          /* Optional response code */
        : 		                                  ast_dns_query_get_name(query),  /* Canonical name */
        : 		                                  (const char*) dns_response,     /* The raw DNS answer */
        : 		                                  dns_response_len);              /* The size of the raw DNS answer */
> At this point in time there won't be a result ever, only if either:
While I do not disagree with you, my point of contention lies in the dns core itself. If the results field has been initialized, calling ast_dns_resolver_set_results will wipe it out and reinitialize it. This logic could result in the rug being pulled out from underneath a consumer. 

My question is this: is there ever a case where it would be okay to make a call into ast_dns_resolver_set_results twice? I am sort of leaning towards no, especially based on your feedback above, but there are probably facets that I am not considering.


-- 
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