check for valid estimated send size to prevent a perl warning on systems which doesn't output size informations

This commit is contained in:
Christoph Klaffl 2018-11-21 23:14:30 +01:00
parent 22160deb8e
commit f153810d08
No known key found for this signature in database
GPG Key ID: FC1C525C2A47CC28
1 changed files with 5 additions and 0 deletions

View File

@ -1154,6 +1154,11 @@ sub getsendsize {
}
chomp $sendsize;
# check for valid value
if ($sendsize !~ /^\d+$/) {
$sendsize = '';
}
# to avoid confusion with a zero size pv, give sendsize
# a minimum 4K value - or if empty, make sure it reads UNKNOWN
if ($debug) { print "DEBUG: sendsize = $sendsize\n"; }