summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-03-20 16:16:59 +0000
committerErmal <eri@pfsense.org>2014-03-20 16:18:48 +0000
commit311464a18a8ee4e0d220c3bfb126c7b54125df46 (patch)
treea82bc6b272a423cea302735bdb0f542899acb5dc
parentb6f67168fffd453604178e8c68ede6910f15c7dd (diff)
downloadpfsense-311464a18a8ee4e0d220c3bfb126c7b54125df46.zip
pfsense-311464a18a8ee4e0d220c3bfb126c7b54125df46.tar.gz
Do not garble the error logging message
-rw-r--r--etc/inc/filter.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 19fad2f..fe923e9 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -326,6 +326,7 @@ function filter_configure_sync($delete_states_if_needed = true) {
* then output the contents of the error to the caller
*/
if($rules_loading <> 0) {
+ $saved_line_error = $rules_error[0];
$line_error = explode(":", $rules_error[0]);
$line_number = $line_error[1];
$line_split = file("{$g['tmp_path']}/rules.debug");
@@ -339,13 +340,13 @@ function filter_configure_sync($delete_states_if_needed = true) {
$error_msg = gettext("PF was wedged/busy and has been reset.");
file_notice("pf_busy", $error_msg, "pf_busy", "");
} else {
- $_grbg = exec("/sbin/pfctl -o basic -f {$g['tmp_path']}/rules.debug.old 2>&1", $rules_error, $rules_loading);
+ $_grbg = exec("/sbin/pfctl -o basic -f {$g['tmp_path']}/rules.debug.old 2>&1");
}
unset($rules_loading, $rules_error);
if ($line_error and $line_number) {
- file_notice("filter_load", sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $rules_error[0], $line_error), "Filter Reload", "");
- update_filter_reload_status(sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $rules_error[0], $line_error));
+ file_notice("filter_load", sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error), "Filter Reload", "");
+ update_filter_reload_status(sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error));
unlock($filterlck);
return;
}
OpenPOWER on IntegriCloud