Skip to content

Commit

Permalink
Initialize accounting time to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Feb 16, 2016
1 parent 0d7c136 commit 6f9633a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pf/radius.pm
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ sub accounting {

# On accounting stop/update, check the usage duration of the node
if ($mac && $user_name) {
my $session_time = int $radius_request->{'Acct-Session-Time'};
my $session_time = int ($radius_request->{'Acct-Session-Time'} // 0);
if ($session_time > 0) {
my $node_attributes = node_attributes($mac);
if (defined $node_attributes->{'time_balance'}) {
Expand Down

0 comments on commit 6f9633a

Please sign in to comment.