mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 07:01:07 +00:00
dns: Change lookup failures from LOG_ERROR to debug 1.
dns.c and dns_system_resolver.c were spitting out errors for lookup failures for things like not finding a SRV record even though there was an A record. Those have been changed to debug messages. Logging not finding ANY record is left to the higher level caller. Also, dns_system_resolver was using Windows line endings so I converted them to Unix style. The actual log changes are on lines 156 and 159. Change-Id: I65be16ea15304b96f9dcb4d289dbd3e2286fc094
This commit is contained in:
@@ -558,7 +558,7 @@ enum ast_dns_search_result ast_search_dns_ex(void *context, const char *dname, i
|
||||
sizeof(dns_response));
|
||||
|
||||
if (dns_response_len < 0) {
|
||||
ast_log(LOG_ERROR, "DNS search failed for %s\n", dname);
|
||||
ast_debug(1, "DNS search failed for %s\n", dname);
|
||||
response_handler(context, (unsigned char *)"", 0, ns_r_nxdomain);
|
||||
return AST_DNS_SEARCH_FAILURE;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ ASTERISK_REGISTER_FILE()
|
||||
#include "asterisk/dns_resolver.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
#include "asterisk/taskprocessor.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
/*! \brief The consideration priority for this resolver implementation. */
|
||||
#define DNS_SYSTEM_RESOLVER_PRIORITY INT_MAX
|
||||
@@ -152,10 +153,10 @@ static int dns_system_resolver_process_query(void *data)
|
||||
|
||||
/* Handle the possible return values from the DNS search */
|
||||
if (res == AST_DNS_SEARCH_FAILURE) {
|
||||
ast_log(LOG_ERROR, "DNS search failed for query: '%s'\n",
|
||||
ast_debug(1, "DNS search failed for query: '%s'\n",
|
||||
ast_dns_query_get_name(query));
|
||||
} else if (res == AST_DNS_SEARCH_NO_RECORDS) {
|
||||
ast_log(LOG_WARNING, "DNS search failed to yield any results for query: '%s'\n",
|
||||
ast_debug(1, "DNS search failed to yield any results for query: '%s'\n",
|
||||
ast_dns_query_get_name(query));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user