summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/shaper.inc10
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
+?>
OpenPOWER on IntegriCloud