aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.c')
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 221364c5d..2437a3e1b 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -304,8 +304,8 @@ GCP_get_desirability_of_path (struct CadetPeer *cp,
304#endif 304#endif
305 avg_sum = off_sum * 1.0 / cp->path_dll_length; 305 avg_sum = off_sum * 1.0 / cp->path_dll_length;
306 path_delta = off - avg_sum; 306 path_delta = off - avg_sum;
307 /* path_delta positiv: path off of peer above average (bad path for peer), 307 /* path_delta positive: path off of peer above average (bad path for peer),
308 path_delta negativ: path off of peer below average (good path for peer) */ 308 path_delta negative: path off of peer below average (good path for peer) */
309 if (path_delta <= -1.0) 309 if (path_delta <= -1.0)
310 weight_alts = -num_alts / path_delta; /* discount alternative paths */ 310 weight_alts = -num_alts / path_delta; /* discount alternative paths */
311 else if (path_delta >= 1.0) 311 else if (path_delta >= 1.0)
@@ -405,7 +405,7 @@ consider_peer_activate (struct CadetPeer *cp)
405 (NULL == cp->core_mq) ? "" : " with CORE link"); 405 (NULL == cp->core_mq) ? "" : " with CORE link");
406 if (NULL != cp->destroy_task) 406 if (NULL != cp->destroy_task)
407 { 407 {
408 /* It's active, do not destory! */ 408 /* It's active, do not destroy! */
409 GNUNET_SCHEDULER_cancel (cp->destroy_task); 409 GNUNET_SCHEDULER_cancel (cp->destroy_task);
410 cp->destroy_task = NULL; 410 cp->destroy_task = NULL;
411 } 411 }
@@ -946,7 +946,7 @@ path_heap_cleanup (void *cls)
946 2 * DESIRED_CONNECTIONS_PER_TUNNEL) 946 2 * DESIRED_CONNECTIONS_PER_TUNNEL)
947 { 947 {
948 /* Now we have way too many, drop least desirable UNLESS it is in use! 948 /* Now we have way too many, drop least desirable UNLESS it is in use!
949 (Note that this intentionally keeps highly desireable, but currently 949 (Note that this intentionally keeps highly desirable, but currently
950 unused paths around in the hope that we might be able to switch, even 950 unused paths around in the hope that we might be able to switch, even
951 if the number of paths exceeds the threshold.) */ 951 if the number of paths exceeds the threshold.) */
952 root = GNUNET_CONTAINER_heap_peek (cp->path_heap); 952 root = GNUNET_CONTAINER_heap_peek (cp->path_heap);
@@ -1056,7 +1056,7 @@ GCP_detach_path (struct CadetPeer *cp,
1056 struct GNUNET_CONTAINER_HeapNode *hn) 1056 struct GNUNET_CONTAINER_HeapNode *hn)
1057{ 1057{
1058 LOG (GNUNET_ERROR_TYPE_DEBUG, 1058 LOG (GNUNET_ERROR_TYPE_DEBUG,
1059 "Detatching path %s from peer %s\n", 1059 "Detaching path %s from peer %s\n",
1060 GCPP_2s (path), 1060 GCPP_2s (path),
1061 GCP_2s (cp)); 1061 GCP_2s (cp));
1062 GNUNET_assert (path == 1062 GNUNET_assert (path ==
@@ -1117,7 +1117,7 @@ GCP_remove_connection (struct CadetPeer *cp,
1117 1117
1118 1118
1119/** 1119/**
1120 * Retrieve the CadetPeer stucture associated with the 1120 * Retrieve the CadetPeer structure associated with the
1121 * peer. Optionally create one and insert it in the appropriate 1121 * peer. Optionally create one and insert it in the appropriate
1122 * structures if the peer is not known yet. 1122 * structures if the peer is not known yet.
1123 * 1123 *