From: Alex Rousskov Date: Thu, 28 Jun 2012 05:13:09 +0000 (-0600) Subject: Do not report the same job multiple times. X-Git-Tag: SQUID_3_2_0_18~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e388a30dde91db476e3fa6543a7beb0744e16550;p=thirdparty%2Fsquid.git Do not report the same job multiple times. --- diff --git a/scripts/trace-master.pl b/scripts/trace-master.pl index 5653a4bf9a..11effd994f 100755 --- a/scripts/trace-master.pl +++ b/scripts/trace-master.pl @@ -106,6 +106,8 @@ sub getJob { start => undef(), history => '', + + reported => 0, }; $Jobs{$id} = $job; @@ -118,6 +120,10 @@ sub reportJob { my $job = $Jobs{$id} or die("Did not see job$id\n"); + # several kids may try to report their common parent + return if $job->{reported}; + $job->{reported} = 1; + &reportJob($job->{parent}, 0) if $job->{parent}; &reportJobParam($id, 'parent');