Project

General

Profile

Bug #350

Wrong count of used vouchers

Added by Jirka Dutka over 9 years ago. Updated about 9 years ago.

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

0%

Estimated time:
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

Associated revisions

Revision 7ec341cb (diff)
Added by Ermal Luçi over 9 years ago

Ticket #350. Correct calculation to be the same as in the voucher_auth.

History

#1 Updated by Ermal Luçi over 9 years ago

  • Status changed from New to Feedback

Committed thanks.

#2 Updated by Chris Buechler about 9 years ago

  • Status changed from Feedback to Resolved

fixed

Also available in: Atom PDF