Browse code

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

Daniel-Constantin Mierla authored on 24/09/2020 08:04:08
Showing 1 changed files
... ...
@@ -2488,37 +2488,6 @@ struct hostent* dns_resolvehost(char* name)
2488 2488
 }
2489 2489
 
2490 2490
 
2491
-
2492
-
2493
-#if 0
2494
-/* resolves a host name trying  NAPTR,  SRV, A & AAAA lookups, for details
2495
- *  see dns_sip_resolve()
2496
- *  FIXME: this version will return only the first ip
2497
- * returns: hostent struct & *port filled with the port from the SRV record;
2498
- *  0 on error
2499
- */
2500
-struct hostent* dns_sip_resolvehost(str* name, unsigned short* port,
2501
-										char* proto)
2502
-{
2503
-	struct dns_srv_handle h;
2504
-	struct ip_addr ip;
2505
-	int ret;
2506
-
2507
-	if ((cfg_get(core, core_cfg, use_dns_cache==0)) || (dns_hash==0)){
2508
-		/* not init or off => use normal, non-cached version */
2509
-		return _sip_resolvehost(name, port, proto);
2510
-	}
2511
-	dns_srv_handle_init(&h);
2512
-	ret=dns_sip_resolve(&h, name, &ip, port, proto, dns_flags);
2513
-	dns_srv_handle_put(&h);
2514
-	if (ret>=0)
2515
-		return ip_addr2he(name, &ip);
2516
-	return 0;
2517
-}
2518
-#endif
2519
-
2520
-
2521
-
2522 2491
 /* resolves a host name trying SRV lookup if *port==0 or normal A/AAAA lookup
2523 2492
  * if *port!=0.
2524 2493
  * when performing SRV lookup (*port==0) it will use proto to look for