Tue Jun 23 09:59:55 CDT 2009 Pekka Pessi <first.last@nokia.com>

* s2dns.c: return CNAME as answer
  Ignore-this: 1beaf31e2a72f2841a097a8d2dea317
  
  Previously, CNAME was returned as an extra record, not as an answer.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13915 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-06-23 19:44:22 +00:00
parent 984d2f9dd1
commit e92f8e4657
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
Wed Jun 10 11:14:52 EDT 2009
Tue Jun 23 14:43:15 CDT 2009

View File

@ -600,7 +600,9 @@ void s2_dns_record(
atype = va_arg(va, unsigned);
if (atype == qtype)
if (arcount == 0 &&
(atype == qtype || atype == sres_type_cname) &&
strcmp(qdomain, domain) == 0)
ancount++;
else
arcount++;
@ -663,4 +665,3 @@ void s2_dns_record(
va_end(va);
}