aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-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) {