diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-02 05:17:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-02 05:17:13 +0000 |
commit | c1d769276103330ff68531633df7eb22f39f3da5 (patch) | |
tree | 75416b7f81653fc398400c3f18814087205b3278 /dns.c | |
parent | 2e5cc3c5e270fac3bf67507728e0770cd6cb5059 (diff) |
Fix ENUM documentation (bug #3698)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5115 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'dns.c')
-rwxr-xr-x | dns.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -89,9 +89,10 @@ static int skip_name(u_char *s, int len) return x; } +/*--- dns_parse_answer: Parse DNS lookup result, call callback */ static int dns_parse_answer(void *context, - int class, int type, u_char *answer, int len, - int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer)) + int class, int type, u_char *answer, int len, + int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer)) { u_char *fullanswer = answer; struct dn_answer *ans; @@ -160,9 +161,10 @@ AST_MUTEX_DEFINE_STATIC(res_lock); #endif #endif +/*--- ast_search_dns: Lookup record in DNS */ int ast_search_dns(void *context, - const char *dname, int class, int type, - int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer)) + const char *dname, int class, int type, + int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer)) { #ifdef HAS_RES_NINIT struct __res_state dnsstate; @@ -180,11 +182,11 @@ int ast_search_dns(void *context, #endif if (res > 0) { if ((res = dns_parse_answer(context, class, type, answer, res, callback)) < 0) { - ast_log(LOG_WARNING, "Parse error\n"); + ast_log(LOG_WARNING, "DNS Parse error for %s\n", dname); ret = -1; } else if (ret == 0) { - ast_log(LOG_DEBUG, "No matches found\n"); + ast_log(LOG_DEBUG, "No matches found in DNS for %s\n", dname); ret = 0; } else |