From d06b30eaf66753e1324e4432c4d4b7b89e2cd4f5 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 6 Feb 2013 19:46:15 +0000 Subject: Correct url creation for xmlrpc. Fix lock order with voucher expire. Bring from master fixes for exec_php xmlrpc code generation --- etc/inc/voucher.inc | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'etc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index a1c5841..adc9488 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -40,17 +40,19 @@ if(!function_exists('captiveportal_syslog')) function xmlrpc_sync_voucher_expire($vouchers, $syncip, $port, $password, $username) { global $g, $config; require_once("xmlrpc.inc"); - if($port == "443") + if ($port == "443") $url = "https://{$syncip}"; - else + else if ($port == "80") $url = "http://{$syncip}"; + else + $url = "http://{$syncip}:{$port}"; /* Construct code that is run on remote machine */ $method = 'pfsense.exec_php'; $execcmd = <<