Browse code

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.

Mihály Mészáros authored on 16/12/2012 12:03:18
Showing 1 changed files
... ...
@@ -1576,7 +1576,12 @@ struct hostent* no_naptr_srv_sip_resolvehost(str* name, unsigned short* port, ch
1576 1576
 			}
1577 1577
 			srv_name.s=tmp_srv;
1578 1578
 			srv_name.len=len;
1579
-			if ((he=dns_srv_get_he(&srv_name, port, dns_flags))!=0) {
1579
+			#ifdef USE_DNS_CACHE
1580
+			he=dns_srv_get_he(&srv_name, port, dns_flags);
1581
+			#else
1582
+			he=srv_sip_resolvehost(&srv_name, 0, port, proto, 1, 0);
1583
+			#endif
1584
+			if (he!=0) {
1580 1585
 				return he;
1581 1586
 			}
1582 1587
 		}