diff options
author | Ermal <eri@pfsense.org> | 2014-03-20 16:16:59 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-03-20 16:19:15 +0000 |
commit | e3b98f81d16e8d7e4c715b0a76ea0538520af729 (patch) | |
tree | 49b51f2e7c0bfa3358f2b56d052fe070a5de2fed | |
parent | 8b650e57d6bbbf294e844d3a6f226a9bb0d342e2 (diff) | |
download | pfsense-e3b98f81d16e8d7e4c715b0a76ea0538520af729.zip pfsense-e3b98f81d16e8d7e4c715b0a76ea0538520af729.tar.gz |
Do not garble the error logging message
-rw-r--r-- | etc/inc/filter.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index f9cea72..6a63998 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -323,6 +323,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"); @@ -336,13 +337,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; } |