diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-31 23:57:31 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-31 23:57:31 +0000 |
commit | 5586ac1fb66de279faa7e755320e734a661f9be7 (patch) | |
tree | b02c57b25e75963084eed51c5f96d5fbe6a78191 | |
parent | 299021ffefa97a4bdec2024bd0c7fd348b6fb2c8 (diff) | |
download | pfsense-packages-5586ac1fb66de279faa7e755320e734a661f9be7.tar.gz pfsense-packages-5586ac1fb66de279faa7e755320e734a661f9be7.tar.bz2 pfsense-packages-5586ac1fb66de279faa7e755320e734a661f9be7.zip |
Fix CARP rule syncing.
-rw-r--r-- | packages/carp_sync_client.php | 9 |
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); } } } } +?> |