aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-31 14:57:55 +0000
committerColin Smith <colin@pfsense.org>2005-03-31 14:57:55 +0000
commitd98d979d780126ea5f6ae768e45ce9eff9eef25e (patch)
treecec01f56366f48d98e6139636bd89cce2c18f53a
parentc14709eff865470257d6dc369e5061da0d1580f1 (diff)
downloadpfsense-packages-d98d979d780126ea5f6ae768e45ce9eff9eef25e.tar.gz
pfsense-packages-d98d979d780126ea5f6ae768e45ce9eff9eef25e.tar.bz2
pfsense-packages-d98d979d780126ea5f6ae768e45ce9eff9eef25e.zip
* Minor code cleanup.
* Pass $carp['password'] instead of $password on XMLRPC call to pfsense.filter_configure.
-rw-r--r--packages/carp_sync_client.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/carp_sync_client.php b/packages/carp_sync_client.php
index efe3f256..7cc5d792 100644
--- a/packages/carp_sync_client.php
+++ b/packages/carp_sync_client.php
@@ -1,4 +1,3 @@
-
/*
carp_sync.php
part of pfSense (www.pfSense.com)
@@ -48,7 +47,7 @@ function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsen
return true;
}
-if($already_processed != 1)
+if($already_processed != 1) {
if($config['installedpackages']['carpsettings']['config'] != "" and
is_array($config['installedpackages']['carpsettings']['config'])) {
$already_processed = 1;
@@ -57,24 +56,25 @@ if($already_processed != 1)
$synchronizetoip = $carp['synchronizetoip'];
if($carp['synchronizerules'] != "" and is_array($config['filter'])) {
$current_rules_section = backup_config_section("filter");
- carp_sync_xml($carp['synchronizetoip'], $carp['password'], 'filter', $current_rules_section);
+ carp_sync_xml($synchronizetoip, $carp['password'], 'filter', $current_rules_section);
}
if($carp['synchronizenat'] != "" and is_array($config['nat'])) {
$current_nat_section = backup_config_section("nat");
- carp_sync_xml($carp['synchronizetoip'], $carp['password'], 'nat', $current_nat_section);
+ carp_sync_xml($synchronizetoip, $carp['password'], 'nat', $current_nat_section);
}
if($carp['synchronizealiases'] != "" and is_array($config['aliases'])) {
$current_aliases_section = backup_config_section("aliases");
- carp_sync_xml($carp['synchronizetoip'], $carp['password'], 'alias', $current_aliases_section);
+ carp_sync_xml($synchronizetoip, $carp['password'], 'alias', $current_aliases_section);
}
if($carp['synchronizetrafficshaper'] != "" and is_array($config['shaper'])) {
$current_shaper_section = backup_config_section("shaper");
- carp_sync_xml($carp['synchronizetoip'], $carp['password'], 'shaper', $current_shaper_section);
+ carp_sync_xml($synchronizetoip, $carp['password'], 'shaper', $current_shaper_section);
}
- $msg = new XML_RPC_Message('pfsense.filter_configure', array(new XML_RPC_Value($password, 'string')));
+ $msg = new XML_RPC_Message('pfsense.filter_configure', array(new XML_RPC_Value($carp['password'], 'string')));
$cli = new XML_RPC_Client($url, '/xmlrpc.php');
$cli->setCredentials('admin', $carp['password']);
$cli->send($msg);
}
}
}
+}