resolve
[org.ibex.jinetd.git] / src / org / ibex / jinetd / Host.java
index 97942a8..0a27734 100644 (file)
@@ -34,11 +34,14 @@ public class Host extends TreeClassLoader {
     public static void init(String path, String host, int depth, ClassLoader pcl) {
        if (!new File(path).exists() || !new File(path).isDirectory()) return;
         try {
-            InetAddress.getByName(host);
+           Log.warn(Host.class, "resolving " + host);
+            InetAddress ia = InetAddress.getByName(host);
             String pad = "";
             while(pad.length() + host.length() < 30) pad += " ";
-            Log.info(Main.class, pad + host + " => " + path);
-            hosts.put(host, pcl = new Host(path, host, pcl));
+            if (ia.equals(InetAddress.getLocalHost())) {
+                Log.info(Main.class, pad + host + " => " + path);
+                hosts.put(host, pcl = new Host(path, host, pcl));
+            }
         } catch (UnknownHostException e) {
             if (depth >= 3) return;
         }