diff options
author | Josh Blum | 2012-10-04 21:15:11 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-04 21:15:11 -0700 |
commit | 709f8e97cc642e446d357612a6d6512d5a4c5330 (patch) | |
tree | 203a53e63fca96fe9e9a72d3fe386102d817b8d2 /lib/block_handlers.cpp | |
parent | 3600e927bf31ca46bb99ef2df83512112fa6a8b2 (diff) | |
download | sandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.tar.gz sandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.tar.bz2 sandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.zip |
implementation for the top block global config
Diffstat (limited to 'lib/block_handlers.cpp')
-rw-r--r-- | lib/block_handlers.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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 } |