hackage
[org.ibex.jinetd.git] / src / org / ibex / jinetd / Host.java
index 96dcf13..97942a8 100644 (file)
@@ -32,25 +32,13 @@ public class Host extends TreeClassLoader {
         init(org.ibex.jinetd.Main.ROOT + "/host", "", 0, Main.getRootClassLoader());
     }
     public static void init(String path, String host, int depth, ClassLoader pcl) {
+       if (!new File(path).exists() || !new File(path).isDirectory()) return;
         try {
-            InetAddress addr = InetAddress.getByName(host);
-            /*
-            boolean good = false;
-            try {
-                if (NetworkInterface.getByInetAddress(addr) != null) good = true;
-                if (!good) Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local");
-            } catch (Exception e) {
-                Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local because:");
-                Log.warn(Host.class, e);
-            }
-            if (!good) return;
-            */
-            if (new File(path + File.separatorChar + "WEB-INF").exists()) {
-                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));
-            }
+            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));
         } catch (UnknownHostException e) {
             if (depth >= 3) return;
         }