From: Naoki Kambe Date: Thu, 6 Dec 2012 05:10:28 +0000 (+0900) Subject: [2225_xfrout] update the counter object according since the interface of the counter... X-Git-Tag: bind10-1.1.0beta1-release~72^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6392c36a0df416bf4476e2d5d3427105cbea98d7;p=thirdparty%2Fkea.git [2225_xfrout] update the counter object according since the interface of the counter class is changed --- diff --git a/src/lib/python/isc/notify/notify_out.py b/src/lib/python/isc/notify/notify_out.py index 8ff62f6447..2f5d1a406a 100644 --- a/src/lib/python/isc/notify/notify_out.py +++ b/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: