Explorar el Código

defined another rule of host_name allowance

Paul Klumpp hace 12 años
padre
commit
103bee2777
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  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