From 1ea3a3937267a527b6993f7021a4adca918dc30d Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 28 Apr 2006 04:57:07 +0000 Subject: [PATCH] The condition was wrong. The fact that it accept 0 length messages is interpreted as a shutdown of the io channel on the next iteration. Definitively not the good approach. The correct condition is bigger than 0. This commit was SVN r9770. --- orte/mca/iof/base/iof_base_endpoint.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/orte/mca/iof/base/iof_base_endpoint.c b/orte/mca/iof/base/iof_base_endpoint.c index a63d0f57c2..d821fc67ff 100644 --- a/orte/mca/iof/base/iof_base_endpoint.c +++ b/orte/mca/iof/base/iof_base_endpoint.c @@ -515,13 +515,12 @@ int orte_iof_base_endpoint_forward( OPAL_THREAD_UNLOCK(&orte_iof_base.iof_lock); return ORTE_SUCCESS; } - rc = 0; - } else { - frag->frag_len -= rc; + rc = 0; /* don't affect the remaining length of the data */ } + frag->frag_len -= rc; } - if(frag->frag_len > 0 || len == 0) { + if(frag->frag_len > 0) { /* handle incomplete write - also queue up 0 byte message * and recognize this as a request to close the descriptor * when all pending operations complete