From 709f8e97cc642e446d357612a6d6512d5a4c5330 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 4 Oct 2012 21:15:11 -0700 Subject: implementation for the top block global config --- lib/block_handlers.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/block_handlers.cpp') diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp index 2e71ac1..1366e68 100644 --- a/lib/block_handlers.cpp +++ b/lib/block_handlers.cpp @@ -108,13 +108,20 @@ void BlockActor::handle_top_token( this->Send(0, from); //ACK } -void BlockActor::handle_top_hint( - const TopHintMessage &message, +void BlockActor::handle_top_config( + const GlobalBlockConfig &message, const Theron::Address from ){ MESSAGE_TRACER(); - this->hint = message.hint; + //overwrite with global config only if maxium_items is not set (zero) + for (size_t i = 0; i < this->output_configs.size(); i++) + { + if (this->output_configs[i].maximum_items == 0) + { + this->output_configs[i].maximum_items = message.maximum_output_items; + } + } this->Send(0, from); //ACK } -- cgit