*/
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_kademlia, "Messages specific for this msg example");
-extern long unsigned int smx_total_comms;
-
/* Main loop for the process */
static void main_loop(node_t node, double deadline)
{
*/
unsigned int ping(node_t node, unsigned int id_to_ping)
{
- char mailbox[MAILBOX_NAME_SIZE + 1];
- sprintf(mailbox, "%0*x", MAILBOX_NAME_SIZE, id_to_ping);
+ char mailbox[MAILBOX_NAME_SIZE];
+ snprintf(mailbox,MAILBOX_NAME_SIZE, "%d", id_to_ping);
unsigned int destination_found = 0;
double timeout = MSG_get_clock() + ping_timeout;
*/
void send_find_node(node_t node, unsigned int id, unsigned int destination)
{
- char mailbox[MAILBOX_NAME_SIZE + 1];
+ char mailbox[MAILBOX_NAME_SIZE];
/* Gets the mailbox to send to */
get_node_mailbox(id, mailbox);
/* Build the task */
msg_error_t res = MSG_main();
- XBT_CRITICAL("Messages created: %ld", smx_total_comms);
XBT_INFO("Simulated time: %g", MSG_get_clock());
return res != MSG_OK;