summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2012-09-29 12:11:46 -0700
committerJosh Blum2012-09-29 12:11:46 -0700
commitb194049a9fb5ab60f15bfcca1a53e39a42339244 (patch)
tree0b66215aae27dff36e05ff5ccd385ce5703f5873
parentabfb98c1e4e468b994aecc0899dae9064d2477da (diff)
downloadsandhi-b194049a9fb5ab60f15bfcca1a53e39a42339244.tar.gz
sandhi-b194049a9fb5ab60f15bfcca1a53e39a42339244.tar.bz2
sandhi-b194049a9fb5ab60f15bfcca1a53e39a42339244.zip
fix for the tokens, were going the wrong direction
-rw-r--r--lib/block_actor.cpp2
-rw-r--r--lib/block_handlers.cpp4
-rw-r--r--lib/input_handlers.cpp2
-rw-r--r--lib/output_handlers.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/block_actor.cpp b/lib/block_actor.cpp
index 61660f9..6fc3e25 100644
--- a/lib/block_actor.cpp
+++ b/lib/block_actor.cpp
@@ -40,5 +40,5 @@ BlockActor::BlockActor(void):
BlockActor::~BlockActor(void)
{
- //NOP
+ this->mark_done();
}
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index 68cb8d3..f386804 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -65,7 +65,7 @@ void BlockActor::handle_top_token(
for (size_t i = 0; i < this->get_num_inputs(); i++)
{
this->input_tokens[i] = Token::make();
- InputTokenMessage token_msg;
+ OutputTokenMessage token_msg;
token_msg.token = this->input_tokens[i];
this->post_upstream(i, token_msg);
@@ -83,7 +83,7 @@ void BlockActor::handle_top_token(
for (size_t i = 0; i < this->get_num_outputs(); i++)
{
this->output_tokens[i] = Token::make();
- OutputTokenMessage token_msg;
+ InputTokenMessage token_msg;
token_msg.token = this->output_tokens[i];
this->post_downstream(i, token_msg);
}
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp
index d2d12d5..f01ad28 100644
--- a/lib/input_handlers.cpp
+++ b/lib/input_handlers.cpp
@@ -43,7 +43,7 @@ void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Th
void BlockActor::handle_input_token(const InputTokenMessage &message, const Theron::Address)
{
MESSAGE_TRACER();
- //const size_t index = message.index;
+ ASSERT(message.index < this->get_num_inputs());
//store the token of the upstream producer
this->token_pool.insert(message.token);
diff --git a/lib/output_handlers.cpp b/lib/output_handlers.cpp
index e8099bb..bf63470 100644
--- a/lib/output_handlers.cpp
+++ b/lib/output_handlers.cpp
@@ -35,7 +35,7 @@ void BlockActor::handle_output_buffer(const OutputBufferMessage &message, const
void BlockActor::handle_output_token(const OutputTokenMessage &message, const Theron::Address)
{
MESSAGE_TRACER();
- //const size_t index = message.index;
+ ASSERT(message.index < this->get_num_outputs());
//store the token of the downstream consumer
this->token_pool.insert(message.token);