]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not report the same job multiple times.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 28 Jun 2012 05:13:09 +0000 (23:13 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 28 Jun 2012 05:13:09 +0000 (23:13 -0600)
scripts/trace-master.pl

index 5653a4bf9a53993b862c98a02076b86ea8505ecb..11effd994f8fbb37fda88355e6bc1635644872f2 100755 (executable)
@@ -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');