From: Mukund Sivaraman Date: Tue, 28 Jan 2014 05:55:13 +0000 (+0530) Subject: [1396] Use RRset::getLength() in xfrout X-Git-Tag: bind10-1.2.0beta1-release~100^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e762fa3653c39e649f1b8cf66f17c0bdd8bdfa7;p=thirdparty%2Fkea.git [1396] Use RRset::getLength() in xfrout --- diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in index aa84587785..a776690dca 100755 --- a/src/bin/xfrout/xfrout.py.in +++ b/src/bin/xfrout/xfrout.py.in @@ -143,11 +143,11 @@ def format_addrinfo(addrinfo): raise TypeError("addrinfo argument to format_addrinfo() does not " "appear to be consisting of (family, socktype, (addr, port))") +# This function is not inlined as it is replaced with a mock function +# during testing. def get_rrset_len(rrset): """Returns the wire length of the given RRset""" - bytes = bytearray() - rrset.to_wire(bytes) - return len(bytes) + return rrset.get_length() def get_soa_serial(soa_rdata): '''Extract the serial field of an SOA RDATA and returns it as an Serial object.