summaryrefslogtreecommitdiffstats
path: root/etc/rc.filter_synchronize
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-10 18:34:56 +0000
committerErmal <eri@pfsense.org>2010-12-10 18:34:56 +0000
commit0567899d3d024618ad4b7d8274ef78c0f7669052 (patch)
tree54ed13c7a14c2130a3e8f5c5413c3599c4f1b7e9 /etc/rc.filter_synchronize
parent4ecc2263d1fb9c66571af192d4d40da362ab4bd3 (diff)
downloadpfsense-0567899d3d024618ad4b7d8274ef78c0f7669052.zip
pfsense-0567899d3d024618ad4b7d8274ef78c0f7669052.tar.gz
Fix config synchronization. Also unbreak the config when erroring out because it will loop indefinitely.
Diffstat (limited to 'etc/rc.filter_synchronize')
-rwxr-xr-xetc/rc.filter_synchronize20
1 files changed, 9 insertions, 11 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize
index 6350791..7a4f1e1 100755
--- a/etc/rc.filter_synchronize
+++ b/etc/rc.filter_synchronize
@@ -95,7 +95,7 @@ function carp_check_version($url, $password, $port = 80, $method = 'pfsense.host
return;
$params = array(
- XML_RPC_encode($password),
+ XML_RPC_encode($password)
);
$numberofruns = 0;
@@ -113,7 +113,7 @@ function carp_check_version($url, $password, $port = 80, $method = 'pfsense.host
} elseif($resp->faultCode()) {
$error = "An error code was received while attempting XMLRPC sync with username {$username} {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
} else {
- $parsed_response = XML_RPC_Decode($resp->value());
+ $parsed_response = XML_RPC_decode($resp->value());
if(!is_array($parsed_response)) {
if (trim($parsed_response) == "Authentication failed") {
$error = "A authentication failure occurred while trying to access {$url}:{$port} ({$method}).";
@@ -244,22 +244,20 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens
$error = "A communications error occured while attempting XMLRPC sync with username {$username} {$url}:{$port}.";
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
- continue;
} elseif($resp->faultCode()) {
$error = "An error code was received while attempting XMLRPC sync with username {$username} {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
- continue;
} else {
- log_error("XMLRPC sync successfully completed with {$url}:{$port}.");
+ $parsed_response = XML_RPC_decode($resp->value());
+ if(!is_array($parsed_response) && trim($parsed_repsonse) == "Authentication failed") {
+ $error = "A authentication failure occurred while trying to access {$url}:{$port} ($method).";
+ log_error($error);
+ break;
+ } else
+ log_error("XMLRPC sync successfully completed with {$url}:{$port}.");
$numberofruns = 3;
}
- $parsed_response = XML_RPC_Decode($resp->value());
- if(!is_array($parsed_response) && trim($parsed_repsonse) == "Authentication failed") {
- $error = "A authentication failure occurred while trying to access {$url}:{$port} ($method).";
- log_error($error);
- break;
- }
$numberofruns++;
}
}
OpenPOWER on IntegriCloud