Skip to content
Snippets Groups Projects
Commit ed1dd9cc authored by Robert Anderson's avatar Robert Anderson
Browse files

* Fixed typo with hash key name

parent 6ad7d78c
No related branches found
No related tags found
No related merge requests found
...@@ -171,14 +171,14 @@ sub post_auth_hook ...@@ -171,14 +171,14 @@ sub post_auth_hook
# Uptime usage # Uptime usage
if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) { if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) {
if (!defined($uptimeLimit->{':='}->{'Value'})) { if (!defined($uptimeLimit->{':='}->{'Value'})) {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: Prepaid, Topups: ".$uptimeTopup."Min)"); "Min (Cap: Prepaid, Topups: ".$uptimeTopup."Min)");
} else { } else {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: ".$uptimeLimit->{':='}->{'Value'}."Min, Topups: ".$uptimeTopup."Min)"); "Min (Cap: ".$uptimeLimit->{':='}->{'Value'}."Min, Topups: ".$uptimeTopup."Min)");
} }
} else { } else {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: Uncapped, Topups: ".$uptimeTopup."Min)"); "Min (Cap: Uncapped, Topups: ".$uptimeTopup."Min)");
} }
...@@ -241,8 +241,8 @@ sub post_auth_hook ...@@ -241,8 +241,8 @@ sub post_auth_hook
# If uptime limit exceeded, cap user # If uptime limit exceeded, cap user
if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) { if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) {
if ($accountingUsage->{'TotalTimeUsage'} >= $alteredUptimeLimit) { if ($accountingUsage->{'TotalSessionTime'} >= $alteredUptimeLimit) {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Usage of ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Usage of ".$accountingUsage->{'TotalSessionTime'}.
"Min exceeds allowed limit of ".$alteredUptimeLimit."Min. Capped."); "Min exceeds allowed limit of ".$alteredUptimeLimit."Min. Capped.");
return MOD_RES_NACK; return MOD_RES_NACK;
} }
...@@ -364,14 +364,14 @@ sub post_acct_hook ...@@ -364,14 +364,14 @@ sub post_acct_hook
# Uptime usage # Uptime usage
if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) { if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) {
if (!defined($uptimeLimit->{':='}->{'Value'})) { if (!defined($uptimeLimit->{':='}->{'Value'})) {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: Prepaid, Topups: ".$uptimeTopup."Min)"); "Min (Cap: Prepaid, Topups: ".$uptimeTopup."Min)");
} else { } else {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: ".$uptimeLimit->{':='}->{'Value'}."Min, Topups: ".$uptimeTopup."Min)"); "Min (Cap: ".$uptimeLimit->{':='}->{'Value'}."Min, Topups: ".$uptimeTopup."Min)");
} }
} else { } else {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Uptime => Usage total: ".$accountingUsage->{'TotalSessionTime'}.
"Min (Cap: Uncapped, Topups: ".$uptimeTopup."Min)"); "Min (Cap: Uncapped, Topups: ".$uptimeTopup."Min)");
} }
...@@ -434,8 +434,8 @@ sub post_acct_hook ...@@ -434,8 +434,8 @@ sub post_acct_hook
# If uptime limit exceeded, cap user # If uptime limit exceeded, cap user
if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) { if (!(defined($uptimeLimit->{':='}->{'Value'}) && $uptimeLimit->{':='}->{'Value'} == 0)) {
if ($accountingUsage->{'TotalTimeUsage'} >= $alteredUptimeLimit) { if ($accountingUsage->{'TotalSessionTime'} >= $alteredUptimeLimit) {
$server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Usage of ".$accountingUsage->{'TotalTimeUsage'}. $server->log(LOG_DEBUG,"[MOD_FEATURE_CAPPING] Usage of ".$accountingUsage->{'TotalSessionTime'}.
"Min exceeds allowed limit of ".$alteredUptimeLimit."Min. Capped."); "Min exceeds allowed limit of ".$alteredUptimeLimit."Min. Capped.");
return MOD_RES_NACK; return MOD_RES_NACK;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment