HomeFreeBSD

net-mgmt/p5-SNMP_Session: permit fractional timeout backoff values

Description

net-mgmt/p5-SNMP_Session: permit fractional timeout backoff values

This perl module allows to change default timeout backoff and
validates new value with its set_backoff() function.
This function contains obvious copy-paste error from previous functions
set_timeout()/set_retries() that deal with integer values.
So, set_backoff() erroneously check the value to be integer
but it should accept fractional numbers, too.

This change corrects the check eliminating int($backoff) call.
Corrected code compares new value with 1.0 just like old one
but catches possible warning on argument being non-numeric
(non-floating point) and rejects non-numeric allowing fractional numbers.

The change makes it possible to use the following within
mrtg configuration file:

SnmpOptions: backoff => 1.1

PR: 249015
Approved by: demon (maintainer)

Details

Provenance
eugenAuthored on
Parents
rP547074: archivers/par2cmdline: fix build on GCC architectures
Branches
Unknown
Tags
Unknown