Explorar o código

defined another rule of host_name allowance

Paul Klumpp %!s(int64=12) %!d(string=hai) anos
pai
achega
103bee2777
Modificáronse 1 ficheiros con 5 adicións e 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