diff options
-rw-r--r-- | etc/inc/filter.inc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 05ab659..4554e04 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2349,19 +2349,15 @@ function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsen new XML_RPC_Value($section, 'array'), new XML_RPC_Value($section_xml, 'array')); $msg = new XML_RPC_Message($method, $params); - if($config['system']['webgui']['port'] != "") { - $port = $config['system']['webgui']['port']; - /* if port is empty lets rely on the protocol selection */ - if($port == "") { - if($config['system']['webgui']['protocol'] == "http") - $port = "80"; - else - $port = "443"; - } - $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); - } else { - $cli = new XML_RPC_Client('/xmlrpc.php', $url); + $port = $config['system']['webgui']['port']; + /* if port is empty lets rely on the protocol selection */ + if($port == "") { + if($config['system']['webgui']['protocol'] == "http") + $port = "80"; + else + $port = "443"; } + $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); $cli->setCredentials('admin', $password); $resp = $cli->send($msg); log_error("synchronize XML to $url on port $port"); @@ -2450,4 +2446,4 @@ function return_vpn_subnet($adr) { return " # error - {$adr['network']} "; } -?> +?>
\ No newline at end of file |