aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/carp_sync_client.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/carp_sync_client.php b/packages/carp_sync_client.php
index 8579b709..a3fdf656 100644
--- a/packages/carp_sync_client.php
+++ b/packages/carp_sync_client.php
@@ -36,19 +36,19 @@ require_once("xmlparse_pkg.inc"); /* Include pfSense helper functions. */
require_once("config.inc");
require_once("functions.inc");
+global $config;
+
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 = new XML_RPC_Client('/xmlrpc.php', $url);
$cli->setCredentials('admin', $password);
$resp = $cli->send($msg);
- return true;
}
}
-
if($already_processed != 1) {
if($config['installedpackages']['carpsettings']['config'] != "" and
is_array($config['installedpackages']['carpsettings']['config'])) {
@@ -73,10 +73,11 @@ if($already_processed != 1) {
carp_sync_xml($synchronizetoip, $carp['password'], 'shaper', $current_shaper_section);
}
$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 = new XML_RPC_Client('/xmlrpc.php', $url);
$cli->setCredentials('admin', $carp['password']);
$cli->send($msg);
}
}
}
}
+?>