Changeset 106
- Timestamp:
- Dec 12, 2011, 2:41:00 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r105 r106 843 843 844 844 my $timestamp_barrier = 3600 * 24 * $days_to_clean; 845 my $timestamp_3month = 3600 * 24 * 90; 845 846 846 847 my %mactimedb = (); … … 878 879 } 879 880 880 if ( $ip_timestamp - $mactimedb{$ip_mac}->{timestamp} > $timestamp_barrier881 elsif ( $ip_timestamp - $mactimedb{$ip_mac}->{timestamp} > $timestamp_barrier 881 882 and ( 882 883 not $ip_hostname_fq =~ m/^float/ 883 884 or $mactimedb{$ip_mac}->{hostname_fq} =~ m/^float/ 885 )) { 886 print "remove ip ".$mactimedb{$ip_mac}->{ip}."\n" if $verbose; 887 delete $computerdb->{$mactimedb{$ip_mac}->{ip}}; 888 $database_has_changed++; 889 } 890 891 elsif ( $mactimedb{$ip_mac}->{timestamp} > $ip_timestamp 892 and $timestamp - $mactimedb{$ip_mac}->{timestamp} > $timestamp_3month 893 and not $mactimedb{$ip_mac}->{hostname_fq} =~ m/^float/ 894 )) { 895 print "remove ip $ip\n" if $verbose; 896 delete $computerdb->{$ip}; 897 $database_has_changed++; 898 } 899 900 elsif ( $ip_timestamp > $mactimedb{$ip_mac}->{timestamp} 901 and $timestamp - $ip_timestamp > $timestamp_3month 902 and not $ip_hostname_fq =~ m/^float/ 884 903 )) { 885 904 print "remove ip ".$mactimedb{$ip_mac}->{ip}."\n" if $verbose;
Note: See TracChangeset
for help on using the changeset viewer.