Skip to content

Commit

Permalink
bugfix in vedgecount, initial run showed undef values
Browse files Browse the repository at this point in the history
  • Loading branch information
lausser committed Nov 5, 2024
1 parent d85b560 commit 4807f14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* 2024-11-04 12.0.2.1
bugfix in vedgecount, initial run showed undef values.
* 2024-10-30 12.0.2
add mode vpn-status for Fortigate
* 2024-10-29 12.0.1.1
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision: 1.150 $)
AC_PREREQ([2.69])
AC_INIT([check_nwc_health],[12.0.2])
AC_INIT([check_nwc_health],[12.0.2.1])
AM_INIT_AUTOMAKE([1.9 tar-pax])
AM_MAINTAINER_MODE([disable])
AC_CANONICAL_HOST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ sub calc {
my $bucket = int($delta / $bucket_size) * $bucket_size;
$bucket_count{$bucket}++;
}
$self->{check_interval} = (sort { $bucket_count{$b} <=> $bucket_count{$a} } keys %bucket_count)[0];
if (%bucket_count) {
$self->{check_interval} = (sort { $bucket_count{$b} <=> $bucket_count{$a} } keys %bucket_count)[0];
} else {
$self->{check_interval} = 0;
}
}

sub check {
Expand Down

0 comments on commit 4807f14

Please sign in to comment.