Module: sip-router Branch: master Commit: b56e823ed8e7ac2f88d1020677f5e94546a91516 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b56e823e...
Author: Mihály Mészáros misi@niif.hu Committer: Mihály Mészáros misi@niif.hu Date: Sun Dec 16 13:03:18 2012 +0100
core/dns: fix an issue when using it without dns cache
- fixing an issue what caused that without dns cache we have to use a different function for srv resolution.
---
resolve.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/resolve.c b/resolve.c index d37a74e..34d4ff8 100644 --- a/resolve.c +++ b/resolve.c @@ -1576,7 +1576,12 @@ struct hostent* no_naptr_srv_sip_resolvehost(str* name, unsigned short* port, ch } srv_name.s=tmp_srv; srv_name.len=len; - if ((he=dns_srv_get_he(&srv_name, port, dns_flags))!=0) { + #ifdef USE_DNS_CACHE + he=dns_srv_get_he(&srv_name, port, dns_flags); + #else + he=srv_sip_resolvehost(&srv_name, 0, port, proto, 1, 0); + #endif + if (he!=0) { return he; } }