From d526314b97fbabb2fb4fe65d4986b4d3977041bb Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 22 Dec 2010 13:48:33 +0000 Subject: Be consistent on having 1K == 1024 --- etc/inc/shaper.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'etc/inc/shaper.inc') diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 0bebd6b..37fb8d0 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -122,20 +122,20 @@ function get_bandwidthtype_scale($type) { switch ($type) { case "Gb": - $factor = 1000 * 1000 * 1000; + $factor = 1024 * 1024 * 1024; break; case "Mb": - $factor = 1000 * 1000; + $factor = 1024 * 1024; break; case "Kb": - $factor = 1000; + $factor = 1024; break; case "b": default: $factor = 1; break; } - return floatval($factor); + return intval($factor); } function get_hfsc_bandwidth($object, $bw) @@ -4004,4 +4004,4 @@ $dn_default_shaper_msg .= "buttons at the bottom represent queue actions and are $dn_default_shaper_msg .= "

"; $dn_default_shaper_msg .= ""; -?> \ No newline at end of file +?> -- cgit v1.1