diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-29 14:49:12 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-29 14:49:12 +0000 |
commit | ec160e0b9db18242b5cc03cfa997f99b89baffb6 (patch) | |
tree | 0aa9777243b9dd5793cc80aab1169f860fd091c7 /etc | |
parent | d0040c727131401a4eeaf5f932fd5a96aff86b23 (diff) | |
download | pfsense-ec160e0b9db18242b5cc03cfa997f99b89baffb6.zip pfsense-ec160e0b9db18242b5cc03cfa997f99b89baffb6.tar.gz |
move carp_sync_xml() out to its own function instead of living in carp_sync_client()
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 73b4b7f..98c0a89 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2028,19 +2028,19 @@ function process_carp_rules() { return $lines; } +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, 'array'), + new XML_RPC_Value($section_xml, 'array')); + $msg = new XML_RPC_Message($method, $params); + $cli = new XML_RPC_Client('/xmlrpc.php', $url); + $cli->setCredentials('admin', $password); + $resp = $cli->send($msg); +} + function carp_sync_client() { global $config; - 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, 'array'), - new XML_RPC_Value($section_xml, 'array')); - $msg = new XML_RPC_Message($method, $params); - $cli = new XML_RPC_Client('/xmlrpc.php', $url); - $cli->setCredentials('admin', $password); - $resp = $cli->send($msg); - } - if($config['installedpackages']['carpsettings']['config'] != "" and is_array($config['installedpackages']['carpsettings']['config'])) { $already_processed = 1; |