diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_paths.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_paths.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_paths.c b/src/cadet/gnunet-service-cadet-new_paths.c index 05d702717..05565c043 100644 --- a/src/cadet/gnunet-service-cadet-new_paths.c +++ b/src/cadet/gnunet-service-cadet-new_paths.c | |||
@@ -76,8 +76,16 @@ struct CadetPeerPath | |||
76 | static void | 76 | static void |
77 | recalculate_path_desirability (struct CadetPeerPath *path) | 77 | recalculate_path_desirability (struct CadetPeerPath *path) |
78 | { | 78 | { |
79 | /* FIXME: update path desirability! */ | 79 | double result = 0.0; |
80 | GNUNET_break (0); // not implemented | 80 | |
81 | for (unsigned int i=0;i<path->entries_length;i++) | ||
82 | { | ||
83 | struct CadetPeer *cp = path->entries[i]->peer; | ||
84 | |||
85 | result += GCP_get_desirability_of_path (cp, | ||
86 | i); | ||
87 | } | ||
88 | path->desirability = (GNUNET_CONTAINER_HeapCostType) result; | ||
81 | } | 89 | } |
82 | 90 | ||
83 | 91 | ||