Commit 18481e80 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Renamed internalDNS to dnsOverride.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3966 b35dd754-fafc-0310-a699-88a17e54d16e
parent 42299356
...@@ -35,7 +35,7 @@ public class DNSUtil { ...@@ -35,7 +35,7 @@ public class DNSUtil {
* Internal DNS that allows to specify target IP addresses and ports to use for domains. * Internal DNS that allows to specify target IP addresses and ports to use for domains.
* The internal DNS will be checked up before performing an actual DNS SRV lookup. * The internal DNS will be checked up before performing an actual DNS SRV lookup.
*/ */
private static Map<String, HostAddress> internalDNS; private static Map<String, HostAddress> dnsOverride;
static { static {
try { try {
...@@ -43,9 +43,9 @@ public class DNSUtil { ...@@ -43,9 +43,9 @@ public class DNSUtil {
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory"); env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
context = new InitialDirContext(env); context = new InitialDirContext(env);
String property = JiveGlobals.getProperty("dnsutil.internalDNS"); String property = JiveGlobals.getProperty("dnsutil.dnsOverride");
if (property != null) { if (property != null) {
internalDNS = decode(property); dnsOverride = decode(property);
} }
} }
catch (Exception e) { catch (Exception e) {
...@@ -72,8 +72,8 @@ public class DNSUtil { ...@@ -72,8 +72,8 @@ public class DNSUtil {
*/ */
public static HostAddress resolveXMPPServerDomain(String domain, int defaultPort) { public static HostAddress resolveXMPPServerDomain(String domain, int defaultPort) {
// Check if there is an entry in the internal DNS for the specified domain // Check if there is an entry in the internal DNS for the specified domain
if (internalDNS != null) { if (dnsOverride != null) {
HostAddress hostAddress = internalDNS.get(domain); HostAddress hostAddress = dnsOverride.get(domain);
if (hostAddress != null) { if (hostAddress != null) {
return hostAddress; return hostAddress;
} }
...@@ -118,8 +118,8 @@ public class DNSUtil { ...@@ -118,8 +118,8 @@ public class DNSUtil {
* @return the internal DNS that allows to specify target IP addresses and ports * @return the internal DNS that allows to specify target IP addresses and ports
* to use for domains. * to use for domains.
*/ */
public static Map<String, HostAddress> getInternalDNS() { public static Map<String, HostAddress> getDnsOverride() {
return internalDNS; return dnsOverride;
} }
/** /**
...@@ -127,12 +127,12 @@ public class DNSUtil { ...@@ -127,12 +127,12 @@ public class DNSUtil {
* to use for domains. The internal DNS will be checked up before performing an * to use for domains. The internal DNS will be checked up before performing an
* actual DNS SRV lookup. * actual DNS SRV lookup.
* *
* @param internalDNS the internal DNS that allows to specify target IP addresses and ports * @param dnsOverride the internal DNS that allows to specify target IP addresses and ports
* to use for domains. * to use for domains.
*/ */
public static void setInternalDNS(Map<String, HostAddress> internalDNS) { public static void setDnsOverride(Map<String, HostAddress> dnsOverride) {
DNSUtil.internalDNS = internalDNS; DNSUtil.dnsOverride = dnsOverride;
JiveGlobals.setProperty("dnsutil.internalDNS", encode(internalDNS)); JiveGlobals.setProperty("dnsutil.dnsOverride", encode(dnsOverride));
} }
private static String encode(Map<String, HostAddress> internalDNS) { private static String encode(Map<String, HostAddress> internalDNS) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment