*
*/
static unsigned int
-peer_info_transmit_position (struct MeshPeerInfo *peer)
+peer_info_transmit_slot (struct MeshPeerInfo *peer)
{
unsigned int i;
unsigned int i;
if (NULL == p)
+ {
p = tree_get_path_to_peer(t->tree, peer->id);
+ if (NULL == p)
+ {
+ GNUNET_break (0);
+ return;
+ }
+ }
for (i = 0; i < p->length; i++)
{
if (p->peers[i] == myid)
path_info->peer = peer;
path_info->t = t;
neighbor = peer_info_get(&id);
- path_info->pos = peer_info_transmit_position(neighbor);
+ path_info->pos = peer_info_transmit_slot(neighbor);
neighbor->types[path_info->pos] = GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE;
neighbor->infos[path_info->pos] = path_info;
neighbor->core_transmit[path_info->pos] =
+ (p->length * sizeof (struct GNUNET_PeerIdentity)), /*size */
&send_core_create_path, /* callback */
path_info); /* cls */
-
}
}
}
+/**
+ * Add a path to a tunnel, without evaluating costs.
+ *
+ * @param t Tunnel we want to add a new peer to
+ * @param p Path to add
+ *
+ */
+static void
+tunnel_add_path (struct MeshTunnel *t, struct MeshPeerPath *p)
+{
+}
+
/**
* Notify a tunnel that a connection has broken that affects at least
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"MESH: Retransmitting.\n");
path_add_to_peer(dest_peer_info, path);
- tunnel_add_peer(t, dest_peer_info);
+ tunnel_add_path (t, path);
path = path_duplicate(path2);
path_add_to_origin(orig_peer_info, path2);
send_create_path(dest_peer_info, path, t);