Browse Source

[2225_xfrout] update the counter object according since the interface of the counter class is changed

Naoki Kambe 12 years ago
parent
commit
6392c36a0d
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/lib/python/isc/notify/notify_out.py

+ 5 - 2
src/lib/python/isc/notify/notify_out.py

@@ -143,6 +143,7 @@ class NotifyOut:
         # Use nonblock event to eliminate busy loop
         # If there are no notifying zones, clear the event bit and wait.
         self._nonblock_event = threading.Event()
+        self._counter = Counter()
 
     def _init_notify_out(self, datasrc_file):
         '''Get all the zones name and its notify target's address.
@@ -481,9 +482,11 @@ class NotifyOut:
             sock.sendto(render.get_data(), 0, addrinfo)
             # count notifying by IPv4 or IPv6 for statistics
             if zone_notify_info.get_socket().family == socket.AF_INET:
-                Counter.inc_notifyoutv4(zone_notify_info.zone_name)
+                self._counter.inc('zones', zone_notify_info.zone_name,
+                                  'notifyoutv4')
             elif zone_notify_info.get_socket().family == socket.AF_INET6:
-                Counter.inc_notifyoutv6(zone_notify_info.zone_name)
+                self._counter.inc('zones', zone_notify_info.zone_name,
+                                  'notifyoutv6')
             logger.info(NOTIFY_OUT_SENDING_NOTIFY, addrinfo[0],
                         addrinfo[1])
         except (socket.error, addr.InvalidAddress) as err: