*/
unsigned int join(node_t node, unsigned int id_known)
{
- answer_t node_list;
+ const s_answer_t* node_list;
msg_error_t status;
unsigned int trial = 0;
unsigned int i;
XBT_DEBUG("Received an answer from the node I know.");
answer_got = 1;
//retrieve the node list and ping them.
- task_data_t data = MSG_task_get_data(node->task_received);
+ const s_task_data_t* data = MSG_task_get_data(node->task_received);
xbt_assert((data != NULL), "Null data received");
if (data->type == TASK_FIND_NODE_ANSWER) {
node_contact_t contact;
if (status == MSG_OK) {
xbt_assert((node->task_received != NULL), "Invalid task received");
//Figure out if we received an answer or something else
- task_data_t data = MSG_task_get_data(node->task_received);
+ const s_task_data_t* data = MSG_task_get_data(node->task_received);
xbt_assert((data != NULL), "No data in the task");
//Check if what we have received is what we are looking for.
while (j < KADEMLIA_ALPHA && i < node_list->size) {
/* We need to have at most "KADEMLIA_ALPHA" requests each time, according to the protocol */
/* Gets the node we want to send the query to */
- node_contact_t node_to_query = xbt_dynar_get_as(node_list->nodes, i, node_contact_t);
+ const s_node_contact_t* node_to_query = xbt_dynar_get_as(node_list->nodes, i, node_contact_t);
if (node_to_query->id != node->id) { /* No need to query ourselves */
send_find_node(node, node_to_query->id, destination);
j++;