]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1396] Use RRset::getLength() in xfrout
authorMukund Sivaraman <muks@isc.org>
Tue, 28 Jan 2014 05:55:13 +0000 (11:25 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 28 Jan 2014 05:55:13 +0000 (11:25 +0530)
src/bin/xfrout/xfrout.py.in

index aa8458778559fd6ce1dd0580f3c16656d07237f0..a776690dca55d66db0648fc4db67e478131ef678 100755 (executable)
@@ -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.