From 2566a6ac70cee565d831126448623c26b6795aa4 Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum Date: Sun, 14 Oct 2012 12:56:09 +0200 Subject: [PATCH] chord: avoid duplicate call of MSG_comm_test() Commit caffead (exactly one year ago!) introduced a duplicate call to MSG_comm_test(): MSG_comm_test() could return true on line 336, and then be called again there. That caused a crash since the communication was already finalized in the first MSG_comm_test() call. --- examples/msg/chord/chord.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 5061abd7bd..ec127960ca 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -355,10 +355,7 @@ int node(int argc, char *argv[]) // nothing to do: sleep for a while MSG_process_sleep(5); } - } - - if (node.comm_receive && MSG_comm_test(node.comm_receive)) { - + } else { // a transfer has occured msg_error_t status = MSG_comm_get_status(node.comm_receive); -- 2.20.1