summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-12-17 14:38:31 -0500
committerjim-p <jimp@pfsense.org>2013-12-17 14:41:17 -0500
commitf3512fca87c1b682f336433d2922de78328bb9ac (patch)
treec3b2c66c47683ccf8eddb6b73a1c4fab355db634 /etc/inc/voucher.inc
parent1848a25e0b55b552e043de9140073f0d35c9eb18 (diff)
downloadpfsense-f3512fca87c1b682f336433d2922de78328bb9ac.zip
pfsense-f3512fca87c1b682f336433d2922de78328bb9ac.tar.gz
Reduce the total minutes by the remote minutes used, do not use the value directly. Otherwise the voucher will be cut short or listed invalid when it otherwise should have time left over.
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index e19e121..a2baae9 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -438,7 +438,7 @@ function voucher_auth($voucher_received, $test = 0) {
// If we did a XMLRPC sync earlier check the timeleft
if (!empty($config['voucher'][$cpzone]['vouchersyncdbip']))
if($remote_time_used < $total_minutes)
- $total_minutes = $remote_time_used;
+ $total_minutes -= $remote_time_used;
// All given vouchers were valid and this isn't simply a test.
// Write back the used DB's
OpenPOWER on IntegriCloud