From 49d25f58656a2124f38dacd1c3c769c8feccec8d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 21 Jul 2009 14:38:04 +0000 Subject: (clean_distro_cache) factorize code --- mdkapplet | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mdkapplet b/mdkapplet index 00c9a743..623e099f 100755 --- a/mdkapplet +++ b/mdkapplet @@ -353,6 +353,10 @@ sub is_there_a_new_distributions() { my ($mdv_update_pid, $checker_pid, $media_manager_pid, $locked_count); +sub clean_distro_cache() { + undef $new_distro; + } + # Signal management sub harvester { my ($_signame, $_clean) = @_; @@ -364,7 +368,7 @@ sub harvester { if ($mdv_update_pid && $mdv_update_pid == $childpid) { undef $mdv_update_pid; # make sure to not report new distro after distro upgrade: - undef $new_distro; + clean_distro_cache(); $schedule_checks = 1; } elsif ($checker_pid && $checker_pid == $childpid) { undef $checker_pid; @@ -485,7 +489,7 @@ sub silentCheck() { state $check_time; my $new_time = time(); if (!$check_time || $new_time - $check_time > $config{DISTRO_CHECK_DELAY}) { - undef $new_distro; + clean_distro_cache(); $check_time = $new_time; is_there_a_new_distributions(); } -- cgit v1.2.1