Project

General

Profile

Actions

Bug #350

closed

Wrong count of used vouchers

Added by Jirka Dutka almost 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Captive Portal
Target version:
Start date:
02/10/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

Voucher is never counted as used if it is assigned to any leftmost bit in voucher_used.db (eg. 10000000 10110001). I think there is an error in file /etc/inc/voucher.inc.

Line 326, function voucher_used_count($roll):

          $mask = 1 << (($i % 8)-1);  // mask to test bit in octet

should look like this:

          $mask = 1 << ($i % 8);  // mask to test bit in octet

to calculate correctly

Actions #1

Updated by Ermal Luçi almost 12 years ago

  • Status changed from New to Feedback

Committed thanks.

Actions #2

Updated by Chris Buechler almost 12 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF