-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2016. 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. */
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-/** @addtogroup MSG_examples
- *
- * @section msg_ex_models Models-related examples
- *
- * @subsection MSG_ex_PLS Packet level simulators
- *
- * This example demonstrates how to use the bindings to a classical Packet-Level Simulators (PLS), as explained in
- * \ref pls. The most interesting is probably not the C files since they are unchanged from the other simulations,
- * but the associated files, such as the platform file to see how to declare a platform to be used with the PLS
- * bindings of SimGrid and the tesh file to see how to actually start a simulation in these settings.
- *
- * - <b>ns-3: network-ns3/network-ns3.c</b>. Simple ping-pong using ns-3 instead of the SimGrid network models.
- */
-
int timer_start; //set as 1 in the master process
//keep a pointer to all surf running tasks.
/* worker name */
char *workername = argv[2];
int id = xbt_str_parse_int(argv[3], "Invalid ID as argument 3: %s"); //unique id to control statistics
- char *id_alias = bprintf("flow_%d", id);
+ char *id_alias = xbt_malloc(20*sizeof(char));
+ snprintf(id_alias, 20, "flow_%d", id);
workernames[id] = workername;
TRACE_category(id_alias);
timer_start = 1 ;
/* time measurement */
- sprintf(id_alias, "%d", id);
+ snprintf(id_alias,20,"%d", id);
start_time = MSG_get_clock();
MSG_task_send(todo, id_alias);
end_time = MSG_get_clock();
XBT_DEBUG ("Worker started");
int id = xbt_str_parse_int(argv[1], "Invalid id: %s");
- sprintf(id_alias, "%d", id);
+ snprintf(id_alias,10, "%d", id);
msg_error_t a = MSG_task_receive(&(task), id_alias);