From f01dc15f98f1751e0f83bce0a0b50286c09a1c99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christophe=20Thi=C3=A9ry?= Date: Wed, 16 Nov 2011 15:47:07 +0100 Subject: [PATCH] MSG_comm_test and MSG_comm_testany did not update isused --- src/msg/msg_gos.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.20.1