mirror of https://github.com/jimsalterjrs/sanoid
Merge pull request #292 from phreaker0/validate-send-size
check for valid estimated send size to prevent a perl warning on syst…
This commit is contained in:
commit
173816351a
5
syncoid
5
syncoid
|
|
@ -1154,6 +1154,11 @@ sub getsendsize {
|
||||||
}
|
}
|
||||||
chomp $sendsize;
|
chomp $sendsize;
|
||||||
|
|
||||||
|
# check for valid value
|
||||||
|
if ($sendsize !~ /^\d+$/) {
|
||||||
|
$sendsize = '';
|
||||||
|
}
|
||||||
|
|
||||||
# to avoid confusion with a zero size pv, give sendsize
|
# to avoid confusion with a zero size pv, give sendsize
|
||||||
# a minimum 4K value - or if empty, make sure it reads UNKNOWN
|
# a minimum 4K value - or if empty, make sure it reads UNKNOWN
|
||||||
if ($debug) { print "DEBUG: sendsize = $sendsize\n"; }
|
if ($debug) { print "DEBUG: sendsize = $sendsize\n"; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue