From 89ad93905228adf3c0e7a7960efc43cc3f0d5286 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 6 Feb 2013 20:01:42 +0000 Subject: Actually let xmlrpc construct the url internally from the passed info it is doing same checks --- etc/inc/voucher.inc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'etc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index adc9488..17ff4bb 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -42,10 +42,8 @@ function xmlrpc_sync_voucher_expire($vouchers, $syncip, $port, $password, $usern require_once("xmlrpc.inc"); if ($port == "443") $url = "https://{$syncip}"; - else if ($port == "80") - $url = "http://{$syncip}"; else - $url = "http://{$syncip}:{$port}"; + $url = "http://{$syncip}"; /* Construct code that is run on remote machine */ $method = 'pfsense.exec_php'; @@ -91,10 +89,8 @@ function xmlrpc_sync_voucher_disconnect($dbent, $syncip, $port, $password, $user require_once("xmlrpc.inc"); if ($port == "443") $url = "https://{$syncip}"; - else if ($port == "80") - $url = "http://{$syncip}"; else - $url = "http://{$syncip}:{$port}"; + $url = "http://{$syncip}"; /* Construct code that is run on remote machine */ $tmp_stop_time = (isset($stop_time)) ? $stop_time : "null"; @@ -145,10 +141,8 @@ function xmlrpc_sync_used_voucher($voucher_received, $syncip, $port, $password, require_once("xmlrpc.inc"); if ($port == "443") $url = "https://{$syncip}"; - else if ($port == "80") - $url = "http://{$syncip}"; else - $url = "http://{$syncip}:{$port}"; + $url = "http://{$syncip}"; /* Construct code that is run on remote machine */ $method = 'pfsense.exec_php'; -- cgit v1.1