Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
smradius
smradius
Commits
b01c9233
Commit
b01c9233
authored
Feb 04, 2017
by
Nigel Kukard
Browse files
Apply caveat to uptime aswell
parent
776283a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/smradius/modules/features/mod_feature_capping.pm
View file @
b01c9233
...
...
@@ -140,6 +140,11 @@ sub post_auth_hook
# Swap around 0 and undef if we need to apply the captrafzero caveat
if
(
$config
->
{'
caveat_captrafzero
'})
{
if
(
!
defined
(
$uptimeLimit
))
{
$uptimeLimit
=
0
;
}
elsif
(
$uptimeLimit
==
0
)
{
$uptimeLimit
=
undef
;
}
if
(
!
defined
(
$trafficLimit
))
{
$trafficLimit
=
0
;
}
elsif
(
$trafficLimit
==
0
)
{
...
...
@@ -356,6 +361,11 @@ sub post_acct_hook
# Swap around 0 and undef if we need to apply the captrafzero caveat
if
(
$config
->
{'
caveat_captrafzero
'})
{
if
(
!
defined
(
$uptimeLimit
))
{
$uptimeLimit
=
0
;
}
elsif
(
$uptimeLimit
==
0
)
{
$uptimeLimit
=
undef
;
}
if
(
!
defined
(
$trafficLimit
))
{
$trafficLimit
=
0
;
}
elsif
(
$trafficLimit
==
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment