Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Traffic Shaper GUI text typos #796

Merged
merged 1 commit into from

2 participants

@phil-davis

and note the Queue Limit is a number of packets (not packets per second)

Phil Davis Traffic Shaper GUI text typos
and note the Queue Limit is a number of packets (not packets per second)
794195d
@phil-davis phil-davis commented on the diff
etc/inc/shaper.inc
((9 lines not shown))
$input_errors[] = "Bandwidth cannot be negative.";
- if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
- $input_errors[] = "Qlimit must be an integer.";
- if ($data['qlimit'] < 0)
- $input_errors[] = "Qlimit must be an positive.";

These above 4 lines were duplicated a little further down. The error messages were coming out twice on the GUI. So these lines are deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@phil-davis phil-davis commented on the diff
etc/inc/shaper.inc
@@ -3047,6 +3043,8 @@ class dnpipe_class extends dummynet_class {
if (!empty($data["bandwidth{$i}"])) {
if (!is_numeric($data["bandwidth{$i}"]))
$input_errors[] = sprintf(gettext("Bandwidth for schedule %s must be an integer."), $data["bwsched{$i}"]);
+ else if (($data["burst{$i}"] != "") && (!is_numeric($data["burst{$i}"])))
+ $input_errors[] = sprintf(gettext("Burst for schedule %s must be an integer."), $data["bwsched{$i}"]);

Hmmm - these extra lines came from the code in the 2.1 branch. Somehow they are not in the master branch, but they should be IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@phil-davis

This shaper.inc should/can also be applied exactly the same to 2.1 branch. It tidies up minor stuff I noticed while playing with the shaper today.

@cbuechler cbuechler merged commit faf4b1f into pfsense:master
@cbuechler
Owner

Thanks, also merged to RELENG_2_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 3, 2013
  1. Traffic Shaper GUI text typos

    Phil Davis authored
    and note the Queue Limit is a number of packets (not packets per second)
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 15 deletions.
  1. +13 −15 etc/inc/shaper.inc
View
28 etc/inc/shaper.inc
@@ -331,11 +331,11 @@ class altq_root_queue {
if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
$input_errors[] = gettext("Qlimit must be an integer.");
if ($data['qlimit'] < 0)
- $input_errors[] = gettext("Qlimit must be an positive.");
+ $input_errors[] = gettext("Qlimit must be positive.");
if ($data['tbrconfig'] && (!is_numeric($data['tbrconfig'])))
$input_errors[] = gettext("Tbrsize must be an integer.");
if ($data['tbrconfig'] < 0)
- $input_errors[] = gettext("Tbrsize must be an positive.");
+ $input_errors[] = gettext("Tbrsize must be positive.");
}
/* Implement this to shorten some code on the frontend page */
@@ -1002,14 +1002,10 @@ class priq_queue {
$reqdfieldsn[] = gettext("Name");
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
- if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
+ if ($data['bandwidth'] && (!is_numeric($data['bandwidth'])))
$input_errors[] = "Bandwidth must be an integer.";
- if ($data['bandwidth'] < 0)
+ if ($data['bandwidth'] < 0)
$input_errors[] = "Bandwidth cannot be negative.";
- if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
- $input_errors[] = "Qlimit must be an integer.";
- if ($data['qlimit'] < 0)
- $input_errors[] = "Qlimit must be an positive.";

These above 4 lines were duplicated a little further down. The error messages were coming out twice on the GUI. So these lines are deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
if ($data['priority'] && (!is_numeric($data['priority'])
|| ($data['priority'] < 1) || ($data['priority'] > 15))) {
$input_errors[] = gettext("The priority must be an integer between 1 and 15.");
@@ -1196,7 +1192,7 @@ class priq_queue {
$form .= "<td width=\"78%\" class=\"vtable\"> <input name=\"qlimit\" type=\"text\" id=\"qlimit\" size=\"8\" value=\"";
$form .= htmlspecialchars($this->GetQlimit());
$form .= "\" />";
- $form .= "<br/> <span class=\"vexpl\">" . gettext("Queue limit in packets per second.");
+ $form .= "<br/> <span class=\"vexpl\">" . gettext("Queue limit in packets.");
$form .= "</span></td></tr>";
$form .= "<tr>";
$form .= "<td width=\"22%\" valign=\"middle\" class=\"vncell\">" . gettext("Scheduler options") . "</td>";
@@ -1648,7 +1644,7 @@ class hfsc_queue extends priq_queue {
$input_errors[] = ("upperlimit m1 cannot be smaller than m2");
if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
- $input_errors[] = ("upperlimit specification excedd 80% of allowable allocation.");
+ $input_errors[] = ("upperlimit specification exceeds 80% of allowable allocation.");
}
*/
if ($data['linkshare1'] <> "" && $data['linkshare2'] == "")
@@ -1674,7 +1670,7 @@ class hfsc_queue extends priq_queue {
$input_errors[] = ("linkshare m1 cannot be smaller than m2");
if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
- $input_errors[] = ("linkshare specification excedd 80% of allowable allocation.");
+ $input_errors[] = ("linkshare specification exceeds 80% of allowable allocation.");
}
*/
@@ -1693,7 +1689,7 @@ class hfsc_queue extends priq_queue {
$input_errors[] = ("realtime m1 cannot be smaller than m2");
if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
- $input_errors[] = ("realtime specification excedd 80% of allowable allocation.");
+ $input_errors[] = ("realtime specification exceeds 80% of allowable allocation.");
}
*/
}
@@ -3047,6 +3043,8 @@ class dnpipe_class extends dummynet_class {
if (!empty($data["bandwidth{$i}"])) {
if (!is_numeric($data["bandwidth{$i}"]))
$input_errors[] = sprintf(gettext("Bandwidth for schedule %s must be an integer."), $data["bwsched{$i}"]);
+ else if (($data["burst{$i}"] != "") && (!is_numeric($data["burst{$i}"])))
+ $input_errors[] = sprintf(gettext("Burst for schedule %s must be an integer."), $data["bwsched{$i}"]);

Hmmm - these extra lines came from the code in the 2.1 branch. Somehow they are not in the master branch, but they should be IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
else
$entries++;
}
@@ -4109,7 +4107,7 @@ function layer7_start_l7daemon() {
$path = "{$g['tmp_path']}/" . $filename;
unset($l7pid);
- /* Only reread the configuration rather than restart to avoid loosing information. */
+ /* Only reread the configuration rather than restart to avoid losing information. */
exec("/bin/pgrep -f 'ipfw-classifyd .* -p ". $l7rules->GetRPort() . "'", $l7pid);
if (count($l7pid) > 0) {
log_error(sprintf(gettext("Sending HUP signal to %s"), $l7pid[0]));
@@ -4293,7 +4291,7 @@ function read_altq_config() {
foreach ($conf['queue'] as $key1 => $q) {
array_push($path, $key1);
/*
- * XXX: we compeletely ignore errors here but anyway we must have
+ * XXX: we completely ignore errors here but anyway we must have
* checked them before so no harm should be come from this.
*/
$root->add_queue($root->GetInterface(), $q, &$path, $input_errors);
@@ -4332,7 +4330,7 @@ function read_dummynet_config() {
foreach ($conf['queue'] as $key1 => $q) {
array_push($path, $key1);
/*
- * XXX: we compeletely ignore errors here but anyway we must have
+ * XXX: we completely ignore errors here but anyway we must have
* checked them before so no harm should be come from this.
*/
$root->add_queue($root->GetQname(), $q, &$path, $input_errors);
Something went wrong with that request. Please try again.