]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2225_xfrout] update the counter object according since the interface of the counter...
authorNaoki Kambe <kambe@jprs.co.jp>
Thu, 6 Dec 2012 05:10:28 +0000 (14:10 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Mon, 21 Jan 2013 05:27:01 +0000 (14:27 +0900)
src/lib/python/isc/notify/notify_out.py

index 8ff62f644703f92b1227c042fd7a58012f54d424..2f5d1a406ae9642850941ae025a67116ddea67b2 100644 (file)
@@ -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: