GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
GNUNET_TIME_UNIT_FOREVER_REL,
path_get_first_hop (t->tree, peer->id),
- size_needed, &send_core_create_path,
+ size_needed,
+ &send_core_create_path,
info);
return 0;
}
path_destroy (p);
GNUNET_free (info);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "MESH: %u bytes long create path sent!\n",
+ size_needed);
return size_needed;
}
info->peer->core_transmit[j] =
GNUNET_CORE_notify_transmit_ready (core_handle, 0, 100,
GNUNET_TIME_UNIT_FOREVER_REL, peer,
- sizeof (struct GNUNET_MessageHeader),
+ sizeof (struct GNUNET_MESH_PathACK),
&send_core_path_ack, info);
}
else
path_add_to_peer (dest_peer_info, path);
GNUNET_PEER_resolve (path->peers[own_pos + 1], &id);
- GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
- GNUNET_TIME_UNIT_FOREVER_REL, &id,
- sizeof (struct GNUNET_MessageHeader),
- &send_core_create_path, path_info);
+ GNUNET_CORE_notify_transmit_ready (
+ core_handle,
+ 0,
+ 0,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &id,
+ sizeof (struct GNUNET_MESH_ManipulatePath) +
+ path->length * sizeof(struct GNUNET_PeerIdentity),
+ &send_core_create_path,
+ path_info);
}
return GNUNET_OK;
}
peer_info->infos[i] = path_info;
peer_info->types[i] = GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE;
peer_info->core_transmit[i] =
- GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
- GNUNET_TIME_UNIT_FOREVER_REL,
- path_get_first_hop(t->tree,
- path_info->peer->id),
- sizeof (struct GNUNET_MessageHeader),
- &send_core_create_path, path_info);
+ GNUNET_CORE_notify_transmit_ready (
+ core_handle,
+ 0,
+ 0,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ path_get_first_hop(t->tree, path_info->peer->id),
+ sizeof (struct GNUNET_MESH_ManipulatePath)
+ + path_info->path->length * sizeof(struct GNUNET_PeerIdentity),
+ &send_core_create_path,
+ path_info);
}
/* Otherwise: there is no path yet, but there is a DHT_get active already. */
GNUNET_SERVER_receive_done (client, GNUNET_OK);