[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debian JP master SVN www commits (rev.967)



=======================================================
Repository: /org/svn.debian.or.jp/repos
  Revision: 967
  Commiter: kmuto
      Date: 2009-11-28 16:15:46 +0900 (土, 28 11月 2009)
=======================================================
Log:

fallback JPN then default (mainly for jp.cdn.araki.net)

=======================================================
Changed:

U   cdn/trunk/ChangeLog
U   cdn/trunk/DNS-Balance/dns_balance.rb

Modified: cdn/trunk/ChangeLog
===================================================================
--- cdn/trunk/ChangeLog	2009-11-27 23:22:11 UTC (rev 966)
+++ cdn/trunk/ChangeLog	2009-11-28 07:15:46 UTC (rev 967)
@@ -1,3 +1,7 @@
+2009-11-28  Kenshi Muto  <kmuto@debian.org>
+
+	* check-surrogates.rb: fallback JPN then default when name isn't found
+
 2008-02-05  ARAKI Yasuhiro  <ar@debian.org>
 
 	* check-surrogates.rb (CheckSurrogate::make_surrogate_line): Small initialize fix.

Modified: cdn/trunk/DNS-Balance/dns_balance.rb
===================================================================
--- cdn/trunk/DNS-Balance/dns_balance.rb	2009-11-27 23:22:11 UTC (rev 966)
+++ cdn/trunk/DNS-Balance/dns_balance.rb	2009-11-28 07:15:46 UTC (rev 967)
@@ -302,6 +302,13 @@
         name      = dnsstr_to_str(q).downcase
         namespace = select_namespace(client_data["addr"], name)
 
+        if $addr_db[namespace][name].nil?
+          _namespace = namespace
+          namespace = "JPN"
+          namespace = "default" if $addr_db[namespace][name].nil?
+          ML.log("fallback: from #{_namespace} to #{namespace}")
+        end
+
         check_type(q, q_type, q_class, namespace)
 
         if $addr_db[namespace][name].size > 1  # -> NoMethodError -> NoQuery