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

Debian JP master SVN www commits (rev.1187)



=======================================================
Repository: /org/svn.debian.or.jp/repos
  Revision: 1187
  Commiter: yasu
      Date: 2011-07-24 21:53:00 +0900 (日, 24  7月 2011)
=======================================================
Log:

fix for CnameQRV4



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

U   cdn/trunk/ChangeLog
U   cdn/trunk/gae-surrogates.rb
U   cdn/trunk/maxmind/GeoIP.dat
U   cdn/trunk/maxmind/GeoIPASNum.dat
U   cdn/trunk/maxmind/GeoLiteCity.dat

Modified: cdn/trunk/ChangeLog
===================================================================
--- cdn/trunk/ChangeLog	2011-07-11 10:35:15 UTC (rev 1186)
+++ cdn/trunk/ChangeLog	2011-07-24 12:53:00 UTC (rev 1187)
@@ -1,3 +1,7 @@
+2011-07-24  ARAKI Yasuhiro  <ar@debian.org>
+
+	* gae-surrogates.rb: Fix for using JSON files which are generated by CnameQRV4.
+
 2010-09-26  ARAKI Yasuhiro  <ar@debian.org>
 
 	* gae-surrogates.rb: ASNum.

Modified: cdn/trunk/gae-surrogates.rb
===================================================================
--- cdn/trunk/gae-surrogates.rb	2011-07-11 10:35:15 UTC (rev 1186)
+++ cdn/trunk/gae-surrogates.rb	2011-07-24 12:53:00 UTC (rev 1187)
@@ -18,6 +18,7 @@
 #
 # == How to run this script
 # 
+# ruby gae-surrogates.rb http://check1-tokyo.s.araki.net/status/alive
 # ruby gae-surrogates.rb http://debiancdn.appspot.com/json/alive
 # ruby gae-surrogates.rb http://localhost:8080/json/alive
 #   OR
@@ -46,6 +47,9 @@
   addr = Hash.new
 
   pj.each do |hs|
+    if hs['_data']
+      hs = hs['_data']
+    end
     country = hs['country']
     hostname = hs['hostname']
     if addr[country]
@@ -84,9 +88,9 @@
     end
     addr[targetnet][hostname].push([hs['ip'].split('.').map{|x| x.to_i}, hs['preference']])
 
-
-    targetasnum = 'AS' + hs['targetasnum']
-
+    if hs['targetasnum']
+      targetasnum = 'AS' + hs['targetasnum']
+    end
     if addr[targetasnum]
     else
       addr[targetasnum] = Hash.new

Modified: cdn/trunk/maxmind/GeoIP.dat
===================================================================
(Binary files differ)

Modified: cdn/trunk/maxmind/GeoIPASNum.dat
===================================================================
(Binary files differ)

Modified: cdn/trunk/maxmind/GeoLiteCity.dat
===================================================================
(Binary files differ)