]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
adjust bytes/sec calculation to not loose precision
authorMark Andrews <marka@isc.org>
Sun, 2 Dec 2007 23:55:01 +0000 (23:55 +0000)
committerMark Andrews <marka@isc.org>
Sun, 2 Dec 2007 23:55:01 +0000 (23:55 +0000)
lib/dns/xfrin.c

index 086afaa298af6d0ff68b1c8c1a7dc62c34d20887..35ab8eddbfedcf6206e96a969ce3b6cdda07df3b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: xfrin.c,v 1.156 2007/12/02 23:47:01 marka Exp $ */
+/* $Id: xfrin.c,v 1.157 2007/12/02 23:55:01 marka Exp $ */
 
 /*! \file */
 
@@ -1408,7 +1408,7 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
        msecs = isc_time_microdiff(&xfr->end, &xfr->start) / 1000;
        if (msecs == 0)
                msecs = 1;
-       persec = xfr->nbytes / msecs / 1000;
+       persec = (xfr->nbytes * 1000) / msecs;
        xfrin_log(xfr, ISC_LOG_INFO, 
                  "Transfer completed: %d messages, %d records, "
                  "%" ISC_PRINT_QUADFORMAT "u bytes, "