aboutsummaryrefslogtreecommitdiffstats
path: root/packages/carp_sync_client.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-31 15:01:46 +0000
committerColin Smith <colin@pfsense.org>2005-03-31 15:01:46 +0000
commitb65355f148f4137d9538030fa53eb95c192e3646 (patch)
tree45f45f2f1b5aea0bdb66ded03c377a716061799a /packages/carp_sync_client.php
parentd98d979d780126ea5f6ae768e45ce9eff9eef25e (diff)
downloadpfsense-packages-b65355f148f4137d9538030fa53eb95c192e3646.tar.gz
pfsense-packages-b65355f148f4137d9538030fa53eb95c192e3646.tar.bz2
pfsense-packages-b65355f148f4137d9538030fa53eb95c192e3646.zip
Test for carp_sync_xml's presence before attempting to define it.
Diffstat (limited to 'packages/carp_sync_client.php')
-rw-r--r--packages/carp_sync_client.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/carp_sync_client.php b/packages/carp_sync_client.php
index 7cc5d792..8579b709 100644
--- a/packages/carp_sync_client.php
+++ b/packages/carp_sync_client.php
@@ -36,15 +36,17 @@ require_once("xmlparse_pkg.inc"); /* Include pfSense helper functions. */
require_once("config.inc");
require_once("functions.inc");
-function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsense.restore_config_section') {
- $params = array(new XML_RPC_Value($password, 'string'),
- new XML_RPC_Value($section, 'string'),
- new XML_RPC_Value($section_xml, 'string'));
- $msg = new XML_RPC_Message($method, $params);
- $cli = new XML_RPC_Client($url, '/xmlrpc.php');
- $cli->setCredentials('admin', $password);
- $resp = $cli->send($msg);
- return true;
+if(!function_exists('carp_sync_xml')) {
+ function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsense.restore_config_section') {
+ $params = array(new XML_RPC_Value($password, 'string'),
+ new XML_RPC_Value($section, 'string'),
+ new XML_RPC_Value($section_xml, 'string'));
+ $msg = new XML_RPC_Message($method, $params);
+ $cli = new XML_RPC_Client($url, '/xmlrpc.php');
+ $cli->setCredentials('admin', $password);
+ $resp = $cli->send($msg);
+ return true;
+ }
}
if($already_processed != 1) {