Commit dde3755f authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed prepaid/unlimited/limit logic

parent e40b3e30
......@@ -212,7 +212,7 @@ sub post_auth_hook
#
# Uptime..
if (defined($uptimeLimit) && $uptimeLimit > 0) {
if (!defined($uptimeLimit) || $uptimeLimit > 0) {
# Capped
if ($accountingUsage->{'TotalSessionTime'} >= $uptimeLimitWithTopups) {
......@@ -237,7 +237,7 @@ sub post_auth_hook
}
# Traffic
if (defined($trafficLimit) && $trafficLimit > 0) {
if (!defined($trafficLimit) || $trafficLimit > 0) {
# Capped
if ($accountingUsage->{'TotalDataUsage'} >= $trafficLimitWithTopups) {
......@@ -390,7 +390,7 @@ sub post_acct_hook
#
# Uptime..
if (defined($uptimeLimit) && $uptimeLimit > 0) {
if (!defined($uptimeLimit) || $uptimeLimit > 0) {
# Capped
if ($accountingUsage->{'TotalSessionTime'} >= $uptimeLimitWithTopups) {
......@@ -401,7 +401,7 @@ sub post_acct_hook
}
# Traffic
if (defined($trafficLimit) && $trafficLimit > 0) {
if (!defined($trafficLimit) || $trafficLimit > 0) {
# Capped
if ($accountingUsage->{'TotalDataUsage'} >= $trafficLimitWithTopups) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment