diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-11-04 13:32:56 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-11-04 13:32:56 +0000 |
commit | 100a8dd7cba6252af188a2812cbf94325aa4e373 (patch) | |
tree | 82f619bb42b589943c1dc4895d514ad4003a35fb /src/mesh | |
parent | f23af8a34c2abcc816cf67e6674fcf18041630b5 (diff) | |
download | gnunet-100a8dd7cba6252af188a2812cbf94325aa4e373.tar.gz gnunet-100a8dd7cba6252af188a2812cbf94325aa4e373.zip |
Renamed functions
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 2d286e145..ad9e42c3c 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -1442,7 +1442,7 @@ peer_info_destroy (struct MeshPeerInfo *pi) | |||
1442 | * TODO: optimize (see below) | 1442 | * TODO: optimize (see below) |
1443 | */ | 1443 | */ |
1444 | static void | 1444 | static void |
1445 | path_remove_from_peer (struct MeshPeerInfo *peer, | 1445 | peer_info_remove_path (struct MeshPeerInfo *peer, |
1446 | GNUNET_PEER_Id p1, | 1446 | GNUNET_PEER_Id p1, |
1447 | GNUNET_PEER_Id p2) | 1447 | GNUNET_PEER_Id p2) |
1448 | { | 1448 | { |
@@ -1524,9 +1524,9 @@ path_remove_from_peer (struct MeshPeerInfo *peer, | |||
1524 | * @param trusted Do we trust that this path is real? | 1524 | * @param trusted Do we trust that this path is real? |
1525 | */ | 1525 | */ |
1526 | void | 1526 | void |
1527 | path_add_to_peer (struct MeshPeerInfo *peer_info, | 1527 | peer_info_add_path (struct MeshPeerInfo *peer_info, |
1528 | struct MeshPeerPath *path, | 1528 | struct MeshPeerPath *path, |
1529 | int trusted) | 1529 | int trusted) |
1530 | { | 1530 | { |
1531 | struct MeshPeerPath *aux; | 1531 | struct MeshPeerPath *aux; |
1532 | unsigned int l; | 1532 | unsigned int l; |
@@ -1618,12 +1618,12 @@ path_add_to_peer (struct MeshPeerInfo *peer_info, | |||
1618 | * @param trusted Do we trust that this path is real? | 1618 | * @param trusted Do we trust that this path is real? |
1619 | */ | 1619 | */ |
1620 | static void | 1620 | static void |
1621 | path_add_to_origin (struct MeshPeerInfo *peer_info, | 1621 | peer_info_add_path_to_origin (struct MeshPeerInfo *peer_info, |
1622 | struct MeshPeerPath *path, | 1622 | struct MeshPeerPath *path, |
1623 | int trusted) | 1623 | int trusted) |
1624 | { | 1624 | { |
1625 | path_invert(path); | 1625 | path_invert(path); |
1626 | path_add_to_peer (peer_info, path, trusted); | 1626 | peer_info_add_path (peer_info, path, trusted); |
1627 | } | 1627 | } |
1628 | 1628 | ||
1629 | 1629 | ||
@@ -2631,7 +2631,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2631 | 2631 | ||
2632 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2632 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2633 | "MESH: It's for us!\n"); | 2633 | "MESH: It's for us!\n"); |
2634 | path_add_to_origin (orig_peer_info, path, GNUNET_NO); | 2634 | peer_info_add_path_to_origin (orig_peer_info, path, GNUNET_NO); |
2635 | if (NULL == t->peers) | 2635 | if (NULL == t->peers) |
2636 | t->peers = GNUNET_CONTAINER_multihashmap_create(4); | 2636 | t->peers = GNUNET_CONTAINER_multihashmap_create(4); |
2637 | GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put ( | 2637 | GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put ( |
@@ -2667,9 +2667,9 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2667 | path2 = path_duplicate(path); | 2667 | path2 = path_duplicate(path); |
2668 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2668 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2669 | "MESH: Retransmitting.\n"); | 2669 | "MESH: Retransmitting.\n"); |
2670 | path_add_to_peer(dest_peer_info, path2, GNUNET_NO); | 2670 | peer_info_add_path(dest_peer_info, path2, GNUNET_NO); |
2671 | path2 = path_duplicate(path); | 2671 | path2 = path_duplicate(path); |
2672 | path_add_to_origin(orig_peer_info, path2, GNUNET_NO); | 2672 | peer_info_add_path_to_origin(orig_peer_info, path2, GNUNET_NO); |
2673 | send_create_path(dest_peer_info, path, t); | 2673 | send_create_path(dest_peer_info, path, t); |
2674 | } | 2674 | } |
2675 | return GNUNET_OK; | 2675 | return GNUNET_OK; |
@@ -3298,7 +3298,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
3298 | 3298 | ||
3299 | p = path_build_from_dht (get_path, get_path_length, | 3299 | p = path_build_from_dht (get_path, get_path_length, |
3300 | put_path, put_path_length); | 3300 | put_path, put_path_length); |
3301 | path_add_to_peer (path_info->peer, p, GNUNET_NO); | 3301 | peer_info_add_path (path_info->peer, p, GNUNET_NO); |
3302 | for (i = 0; i < path_info->peer->ntunnels; i++) | 3302 | for (i = 0; i < path_info->peer->ntunnels; i++) |
3303 | { | 3303 | { |
3304 | tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer); | 3304 | tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer); |
@@ -3352,7 +3352,7 @@ dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
3352 | 3352 | ||
3353 | p = path_build_from_dht (get_path, get_path_length, | 3353 | p = path_build_from_dht (get_path, get_path_length, |
3354 | put_path, put_path_length); | 3354 | put_path, put_path_length); |
3355 | path_add_to_peer (peer_info, p, GNUNET_NO); | 3355 | peer_info_add_path (peer_info, p, GNUNET_NO); |
3356 | tunnel_add_peer(t, peer_info); | 3356 | tunnel_add_peer(t, peer_info); |
3357 | peer_info_connect (peer_info, t); | 3357 | peer_info_connect (peer_info, t); |
3358 | } | 3358 | } |
@@ -4261,7 +4261,7 @@ core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4261 | path->peers[1] = peer_info->id; | 4261 | path->peers[1] = peer_info->id; |
4262 | GNUNET_PEER_change_rc(myid, 1); | 4262 | GNUNET_PEER_change_rc(myid, 1); |
4263 | GNUNET_PEER_change_rc(peer_info->id, 1); | 4263 | GNUNET_PEER_change_rc(peer_info->id, 1); |
4264 | path_add_to_peer (peer_info, path, GNUNET_YES); | 4264 | peer_info_add_path (peer_info, path, GNUNET_YES); |
4265 | return; | 4265 | return; |
4266 | } | 4266 | } |
4267 | 4267 | ||
@@ -4291,7 +4291,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
4291 | /* TODO: notify that the transmission failed */ | 4291 | /* TODO: notify that the transmission failed */ |
4292 | peer_info_cancel_transmission(pi, i); | 4292 | peer_info_cancel_transmission(pi, i); |
4293 | } | 4293 | } |
4294 | path_remove_from_peer (pi, pi->id, myid); | 4294 | peer_info_remove_path (pi, pi->id, myid); |
4295 | #if MESH_DEBUG_CONNECTION | 4295 | #if MESH_DEBUG_CONNECTION |
4296 | if (myid == pi->id) | 4296 | if (myid == pi->id) |
4297 | { | 4297 | { |
@@ -4480,7 +4480,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
4480 | p = path_new (1); | 4480 | p = path_new (1); |
4481 | p->peers[0] = myid; | 4481 | p->peers[0] = myid; |
4482 | GNUNET_PEER_change_rc (myid, 1); | 4482 | GNUNET_PEER_change_rc (myid, 1); |
4483 | path_add_to_peer(peer, p, GNUNET_YES); | 4483 | peer_info_add_path(peer, p, GNUNET_YES); |
4484 | 4484 | ||
4485 | /* Scheduled the task to clean up when shutdown is called */ | 4485 | /* Scheduled the task to clean up when shutdown is called */ |
4486 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, | 4486 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, |