From 993198cfbab94f877b3c70571103e23c4513a7ee Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 31 Jan 2014 05:30:51 +0000 Subject: [PATCH] Fix lost message problem - if multiple messages are queued before the connection is formed, we lost all but the first one. Ensure that all messages get properly queued prior to completing the connection cmr=v1.7.4:reviewer=jsquyres:subject=Fix lost message problem This commit was SVN r30516. --- orte/mca/oob/tcp/oob_tcp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index 189ade93d8..8b21022dd0 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -413,10 +413,10 @@ static void process_send(int fd, short args, void *cbdata) orte_process_name_t hop; opal_output_verbose(2, orte_oob_base_framework.framework_output, - "%s:[%s:%d] processing send to peer %s", + "%s:[%s:%d] processing send to peer %s:%d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, - ORTE_NAME_PRINT(&op->msg->dst)); + ORTE_NAME_PRINT(&op->msg->dst), op->msg->tag); /* do we have a route to this peer (could be direct)? */ hop = orte_routed.get_route(&op->msg->dst); @@ -446,12 +446,13 @@ static void process_send(int fd, short args, void *cbdata) goto cleanup; } + /* add the message to the queue for sending after the + * connection is formed + */ + MCA_OOB_TCP_QUEUE_PENDING(op->msg, peer); + if (MCA_OOB_TCP_CONNECTING != peer->state && MCA_OOB_TCP_CONNECT_ACK != peer->state) { - /* add the message to the queue for sending after the - * connection is formed - */ - MCA_OOB_TCP_QUEUE_PENDING(op->msg, peer); /* we have to initiate the connection - again, we do not * want to block while the connection is created. * So throw us into an event that will create