[sr-dev] git:5.4:75cb64a7: core: dns cache - removed disabled code between #if 0 ... #endif

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 12 10:16:59 CEST 2020


Module: kamailio
Branch: 5.4
Commit: 75cb64a768d187baf5730067503a708959284827
URL: https://github.com/kamailio/kamailio/commit/75cb64a768d187baf5730067503a708959284827

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-12T10:09:50+02:00

core: dns cache - removed disabled code between #if 0 ... #endif

(cherry picked from commit 298aeb7f93bfa75ec78bc941f2c76167525b2e61)

---

Modified: src/core/dns_cache.c

---

Diff:  https://github.com/kamailio/kamailio/commit/75cb64a768d187baf5730067503a708959284827.diff
Patch: https://github.com/kamailio/kamailio/commit/75cb64a768d187baf5730067503a708959284827.patch

---

diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index c8567813e5..923c65049d 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -2488,37 +2488,6 @@ struct hostent* dns_resolvehost(char* name)
 }
 
 
-
-
-#if 0
-/* resolves a host name trying  NAPTR,  SRV, A & AAAA lookups, for details
- *  see dns_sip_resolve()
- *  FIXME: this version will return only the first ip
- * returns: hostent struct & *port filled with the port from the SRV record;
- *  0 on error
- */
-struct hostent* dns_sip_resolvehost(str* name, unsigned short* port,
-										char* proto)
-{
-	struct dns_srv_handle h;
-	struct ip_addr ip;
-	int ret;
-
-	if ((cfg_get(core, core_cfg, use_dns_cache==0)) || (dns_hash==0)){
-		/* not init or off => use normal, non-cached version */
-		return _sip_resolvehost(name, port, proto);
-	}
-	dns_srv_handle_init(&h);
-	ret=dns_sip_resolve(&h, name, &ip, port, proto, dns_flags);
-	dns_srv_handle_put(&h);
-	if (ret>=0)
-		return ip_addr2he(name, &ip);
-	return 0;
-}
-#endif
-
-
-
 /* resolves a host name trying SRV lookup if *port==0 or normal A/AAAA lookup
  * if *port!=0.
  * when performing SRV lookup (*port==0) it will use proto to look for




More information about the sr-dev mailing list