Commit 571cb627 authored by Franco Fichtner's avatar Franco Fichtner

www: zap some spurious assigments

Most of the time, there is no return value from the functions,
sometimes $retval is not evaluated, and sometimes it just seems
totally convoluted to do it when 99% of the configuration code
does not do it and works fine wihout it.

It's also not practical, because there is no no notion of a
rollback that would have to ensue in such cases.

(cherry picked from commit 1eb5dae7)
parent e1c88160
......@@ -172,13 +172,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config();
$retval = 0;
$retval = system_syslogd_start();
system_syslogd_start();
if (($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock']))
|| ($oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass']))
|| ($oldnologbogons !== isset($config['syslog']['nologbogons']))
|| ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets'])))
$retval |= filter_configure();
|| ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets']))) {
filter_configure();
}
$savemsg = get_std_save_message();
......
......@@ -43,10 +43,8 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
$retval |= relayd_configure();
$retval |= filter_configure();
relayd_configure();
filter_configure();
$savemsg = get_std_save_message();
clear_subsystem_dirty('loadbalancer');
}
......
......@@ -44,10 +44,8 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
$retval |= relayd_configure();
$retval |= filter_configure();
relayd_configure();
filter_configure();
$savemsg = get_std_save_message();
clear_subsystem_dirty('loadbalancer');
}
......
......@@ -40,12 +40,9 @@ if (!is_array($config['load_balancer']['setting'])) {
$lbsetting = &$config['load_balancer']['setting'];
if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
$retval |= relayd_configure();
$retval |= filter_configure();
relayd_configure();
filter_configure();
$savemsg = get_std_save_message();
clear_subsystem_dirty('loadbalancer');
} else {
......
......@@ -82,9 +82,8 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
$retval |= relayd_configure();
$retval |= filter_configure();
relayd_configure();
filter_configure();
$savemsg = get_std_save_message();
/* Wipe out old relayd anchors no longer in use. */
cleanup_lb_marked();
......
......@@ -61,9 +61,8 @@ $relay_hosts = get_lb_summary();
if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
$retval |= filter_configure();
$retval |= relayd_configure();
relayd_configure();
filter_configure();
$savemsg = get_std_save_message();
clear_subsystem_dirty('loadbalancer');
} else {
......
......@@ -216,13 +216,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
killbypid('/var/run/filterdns.pid');
}
$retval = 0;
$retval = filter_configure();
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message();
} else {
$savemsg = $retval;
}
$savemsg = get_std_save_message();
filter_configure();
}
}
......
......@@ -94,14 +94,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
@unlink('/tmp/.system_routes.apply');
}
$retval = system_routing_configure();
$retval |= filter_configure();
/* reconfigure our gateway monitor */
system_routing_configure();
filter_configure();
setup_gateways_monitor();
if ($retval == 0) {
clear_subsystem_dirty('staticroutes');
}
clear_subsystem_dirty('staticroutes');
} elseif (isset($id) && $act == 'del') {
delete_static_route($id);
unset($a_routes[$id]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment