diff options
author | Ermal <eri@pfsense.org> | 2010-12-22 13:48:33 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-12-22 13:59:05 +0000 |
commit | d526314b97fbabb2fb4fe65d4986b4d3977041bb (patch) | |
tree | b0a2e0735d10d3dd76ef392e8ab1b720b720b4bd /etc | |
parent | 9b4e01686d766ae1a7610921ef22741ca0ba61de (diff) | |
download | pfsense-d526314b97fbabb2fb4fe65d4986b4d3977041bb.zip pfsense-d526314b97fbabb2fb4fe65d4986b4d3977041bb.tar.gz |
Be consistent on having 1K == 1024
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/shaper.inc | 10 |
1 files changed, 5 insertions, 5 deletions
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 .= " </p></strong></span>"; $dn_default_shaper_msg .= "</td></tr>"; -?>
\ No newline at end of file +?> |