From: Christophe ThiƩry Date: Wed, 16 Nov 2011 14:47:07 +0000 (+0100) Subject: MSG_comm_test and MSG_comm_testany did not update isused X-Git-Tag: exp_20120216~248 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f01dc15f98f1751e0f83bce0a0b50286c09a1c99 MSG_comm_test and MSG_comm_testany did not update isused --- diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 608d9d51db..c41dc38d4b 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -522,6 +522,11 @@ int MSG_comm_test(msg_comm_t comm) int finished = 0; TRY { finished = SIMIX_req_comm_test(comm->s_comm); + + if (finished && comm->task_received != NULL) { + /* I am the receiver */ + (*comm->task_received)->simdata->isused = 0; + } } CATCH(e) { switch (e.category) { @@ -603,6 +608,11 @@ int MSG_comm_testany(xbt_dynar_t comms) comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t); /* the communication is finished */ comm->status = status; + + if (status == MSG_OK && comm->task_received != NULL) { + /* I am the receiver */ + (*comm->task_received)->simdata->isused = 0; + } } return finished_index;