Paul Klumpp 12 years ago
parent
commit
adf288086a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      em_server.rb

+ 2 - 2
em_server.rb

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