X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/25ddc16712ea8fd2048f4ed4232f088f69ec5896..2d217ae8001c61739609ce56c8c815c0791303cc:/examples/msg/actions/actions.c diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 7e21014c57..4542163ade 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -129,8 +129,7 @@ static void action_recv(xbt_dynar_t action) char mailbox_name[250]; m_task_t task = NULL; double clock = MSG_get_clock(); - //FIXME: argument of action ignored so far; semantic not clear - //char *from=xbt_dynar_get_as(action,2,char*); + sprintf(mailbox_name, "%s_%s", xbt_dynar_get_as(action, 2, char *), MSG_process_get_name(MSG_process_self())); @@ -219,6 +218,7 @@ static void action_wait(xbt_dynar_t action) comm = xbt_dynar_pop_as(globals->irecvs,msg_comm_t); MSG_comm_wait(comm,-1); task = xbt_dynar_pop_as(globals->tasks,m_task_t); + MSG_comm_destroy(comm); MSG_task_destroy(task); VERB2("%s %f", name, MSG_get_clock() - clock); @@ -518,6 +518,8 @@ static void action_finalize(xbt_dynar_t action) process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self()); if (globals){ xbt_dynar_free_container(&(globals->isends)); + xbt_dynar_free_container(&(globals->irecvs)); + xbt_dynar_free_container(&(globals->tasks)); free(globals); } }