From 73a5106bd983dd5e0db4c884437f35c55db17aa3 Mon Sep 17 00:00:00 2001 From: Vlad Grigorescu Date: Wed, 21 Aug 2013 07:29:22 -0400 Subject: [PATCH] Fix some reporter.log errors by adding a few extra key membership checks. --- scripts/base/frameworks/sumstats/cluster.bro | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/base/frameworks/sumstats/cluster.bro b/scripts/base/frameworks/sumstats/cluster.bro index 9c343ad15d..0a84ef93ea 100644 --- a/scripts/base/frameworks/sumstats/cluster.bro +++ b/scripts/base/frameworks/sumstats/cluster.bro @@ -357,12 +357,16 @@ function request_all_current_keys(uid: string, ss_name: string, cleanup: bool) event SumStats::send_no_key(uid: string, ss_name: string) { #print "send_no_key"; + + if ( uid !in done_with ) + done_with[uid] = 0; + ++done_with[uid]; if ( Cluster::worker_count == done_with[uid] ) { delete done_with[uid]; - if ( |stats_keys[uid]| > 0 ) + if ( uid in stats_keys && |stats_keys[uid]| > 0 ) { #print "we need more keys!"; # Now that we have a key from each worker, lets @@ -426,6 +430,9 @@ event SumStats::cluster_send_result(uid: string, ss_name: string, key: Key, resu key_requests[uid] = compose_results(key_requests[uid], result); # Mark that a worker is done. + if ( uid !in done_with ) + done_with[uid] = 0; + ++done_with[uid]; #if ( Cluster::worker_count == done_with[uid] )