From: Alex Rousskov Date: Thu, 21 Jun 2012 20:59:23 +0000 (-0600) Subject: Do not report the same job multiple times. X-Git-Tag: sourceformat-review-1~209 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=95adbb710300ae9621ca69db40704661c6e61cb7;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');