Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:uebelhacker
pflogsumm
pflogsumm-fix_uninitialized_value.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pflogsumm-fix_uninitialized_value.patch of Package pflogsumm
--- pflogsumm-1.1.5-orig//pflogsumm.pl 2012-02-05 00:00:00.000000000 +0000 +++ pflogsumm-1.1.5//pflogsumm.pl 2016-08-25 12:12:29.901567363 +0200 @@ -773,13 +773,15 @@ while(<>) { ${$smtpdPerDay{$revMsgDateStr}}[2] = $tSecs if($tSecs > ${$smtpdPerDay{$revMsgDateStr}}[2]); - unless(${$smtpdPerDom{$hostID}}[0]++) { - ${$smtpdPerDom{$hostID}}[1] = 0; - ${$smtpdPerDom{$hostID}}[2] = 0; - } - ${$smtpdPerDom{$hostID}}[1] += $tSecs; - ${$smtpdPerDom{$hostID}}[2] = $tSecs - if($tSecs > ${$smtpdPerDom{$hostID}}[2]); + if($hostID){ + unless(${$smtpdPerDom{$hostID}}[0]++) { + ${$smtpdPerDom{$hostID}}[1] = 0; + ${$smtpdPerDom{$hostID}}[2] = 0; + } + ${$smtpdPerDom{$hostID}}[1] += $tSecs; + ${$smtpdPerDom{$hostID}}[2] = $tSecs + if($tSecs > ${$smtpdPerDom{$hostID}}[2]); + } ++$smtpdConnCnt; $smtpdTotTime += $tSecs; @@ -1546,15 +1548,17 @@ sub gimme_domain { ($domain, $ipAddr) = /^([^\[\(\/]+)[\[\(\/]([^\]\)]+)[\]\)]?:?\s*$/; } - # "mach.host.dom"/"mach.host.do.co" to "host.dom"/"host.do.co" - if($domain eq 'unknown') { - $domain = $ipAddr; - # For identifying the host part on a Class C network (commonly - # seen with dial-ups) the following is handy. - # $domain =~ s/\.\d+$//; - } else { - $domain =~ - s/^(.*)\.([^\.]+)\.([^\.]{3}|[^\.]{2,3}\.[^\.]{2})$/\L$2.$3/; + if($domain){ + # "mach.host.dom"/"mach.host.do.co" to "host.dom"/"host.do.co" + if($domain eq 'unknown') { + $domain = $ipAddr; + # For identifying the host part on a Class C network (commonly + # seen with dial-ups) the following is handy. + # $domain =~ s/\.\d+$//; + } else { + $domain =~ + s/^(.*)\.([^\.]+)\.([^\.]{3}|[^\.]{2,3}\.[^\.]{2})$/\L$2.$3/; + } } return $domain;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor