Browse Source

When xfrin can't connect with one zone's master, it should tell the bad news to zonemgr, so that zonemgr can reset the timer for that zone.

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3170 e5f2f494-b856-4b98-b285-d166d9295462
Likun Zhang 14 years ago
parent
commit
dba62177ce
2 changed files with 11 additions and 2 deletions
  1. 5 0
      ChangeLog
  2. 6 2
      src/bin/xfrin/xfrin.py.in

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+  106.  [bug]       zhang likun
+	When xfrin can't connect with one zone's master, it should tell
+	the bad news to zonemgr, so that zonemgr can reset the timer for
+	that zone. (Trac #329, r3169)
+
   105.  [bug]       Michal Vaner
 	Python processes: they no longer take 100% CPU while idle
 	due to a busy loop in reading command session in a nonblocking way.

+ 6 - 2
src/bin/xfrin/xfrin.py.in

@@ -330,10 +330,14 @@ def process_xfrin(server, xfrin_recorder, zone_name, rrclass, db_file,
     sock_map = {}
     conn = XfrinConnection(sock_map, zone_name, rrclass, db_file,
                            shutdown_event, master_addrinfo, verbose)
+    ret = XFRIN_FAIL
     if conn.connect_to_master():
         ret = conn.do_xfrin(check_soa)
-        server.publish_xfrin_news(zone_name, rrclass, ret)
-
+    
+    # Publish the zone transfer result news, so zonemgr can reset the
+    # zone timer, and xfrout can notify the zone's slaves if the result
+    # is success.
+    server.publish_xfrin_news(zone_name, rrclass, ret)
     xfrin_recorder.decrement(zone_name)