From 0eb04ef20fbaf4f46bdb4389c4ff24c32b23b040 Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Fri, 7 Jan 2011 08:23:56 +0000 Subject: [PATCH] Bugfix: the result of waitany calls should be determined by SIMIX_comm_finish git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9380 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/simix/smx_network.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 41192b6e23..008da750ec 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -408,7 +408,6 @@ void SIMIX_pre_comm_waitany(smx_req_t req, unsigned int idx) /* Associate this request to the action */ xbt_fifo_push(action->request_list, req); if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING){ - req->comm_waitany.result = cursor; SIMIX_comm_finish(action); break; } @@ -481,6 +480,8 @@ void SIMIX_comm_finish(smx_action_t action) return it as the result of the call */ if (req->call == REQ_COMM_WAITANY) { SIMIX_waitany_req_remove_from_actions(req); + if(!MC_IS_ENABLED) + req->comm_waitany.result = xbt_dynar_search(req->comm_waitany.comms, &action); } /* If the action is still in a rendez-vous point then remove from it */ -- 2.20.1