On Nov 20, 2012, at 10:21 AM, Seth Hall <[email protected]> wrote:
> I'm seeing Bro actually crash for the
> scripts.base.frameworks.metrics.cluster-intermediate-update test and I'm
> having a hard time figuring out why it's crashing. Would someone mind taking
> a look at that soon?
See if the patch below makes sense. Also not sure if that index_requests table
is missing some initialization somewhere.
diff --git a/scripts/base/frameworks/metrics/cluster.bro
b/scripts/base/frameworks/metrics/cluster.bro
index 9650b80..d23b9cd 100644
--- a/scripts/base/frameworks/metrics/cluster.bro
+++ b/scripts/base/frameworks/metrics/cluster.bro
@@ -190,7 +190,12 @@ event Metrics::cluster_index_response(uid: string, id:
string, filter_name: stri
{
#print fmt("%0.6f MANAGER: receiving index data from %s - %s=%s",
network_time(), get_event_peer()$descr, index2str(index), val);
- local merged_val = merge_result_vals(index_requests[uid, id, filter_name,
index], val);
+ local merged_val: ResultVal;
+
+ if ( [uid, id, filter_name, index] in index_requests )
+ merged_val = merge_result_vals(index_requests[uid, id, filter_name,
index], val);
+ else
+ merged_val = val;
index_requests[uid, id, filter_name, index] = merged_val;
local ir = index_requests[uid, id, filter_name, index];
And as an optimization, maybe that "local ir" isn't needed since that index was
just assigned in the line above?
Jon
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev