X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/14ad54e6f735bfec4e8feb60a6089ef866fd2554..c25a26b26202c93dc2bfa44d214b8f804b78b8b3:/teshsuite/msg/app-pingpong/app-pingpong.c diff --git a/teshsuite/msg/app-pingpong/app-pingpong.c b/teshsuite/msg/app-pingpong/app-pingpong.c index c4ed0d50ba..265c15f804 100644 --- a/teshsuite/msg/app-pingpong/app-pingpong.c +++ b/teshsuite/msg/app-pingpong/app-pingpong.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_app_pingpong, "Messages specific for this msg example"); static int pinger(int argc, char* argv[]) @@ -27,7 +29,7 @@ static int pinger(int argc, char* argv[]) double sender_time = *((double*)(pong_task->data)); double communication_time = MSG_get_clock() - sender_time; - XBT_INFO("Task received : %s", pong_task->name); + XBT_INFO("Task received : %s", MSG_task_get_name(pong_task)); xbt_free(pong_task->data); MSG_task_destroy(pong_task); XBT_INFO("Pong time (bandwidth bound): %.3f", communication_time); @@ -48,7 +50,7 @@ static int ponger(int argc, char* argv[]) double sender_time = *((double*)(ping_task->data)); double communication_time = MSG_get_clock() - sender_time; - XBT_INFO("Task received : %s", ping_task->name); + XBT_INFO("Task received : %s", MSG_task_get_name(ping_task)); xbt_free(ping_task->data); MSG_task_destroy(ping_task); XBT_INFO(" Ping time (latency bound) %f", communication_time);