Forráskód Böngészése

defined another rule of host_name allowance

Paul Klumpp 12 éve
szülő
commit
103bee2777
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      em_server.rb

+ 5 - 2
em_server.rb

@@ -275,8 +275,11 @@ module InterconnectionPointProtocolHandler
               else
                 # if the resulting dns is too long, use ip-address instead.
                 # if the resulting dns has too many dots, use ip-address instead.
-                if host_name.length > 23 || host_name.split(".").size >= 4
-                  #put_log "cutting down host_name #{host_name} #{host_name.size} #{host_name.split(".").size}"
+                if host_name.length > 23 || host_name.split(".").size > 3 || host_name.grep(/\d/).size > 3
+                  #put_log "cutting down host_name: #{host_name}, because:"
+                  #put_log "#{host_name.length}"
+                  #put_log "#{host_name.split(".").size}"
+                  #put_log "#{host_name.grep(/\d/).size}"
 
                   host_name = iphost
                 end