diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh_peer.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index 7d537e875..50e37fee2 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c | |||
@@ -744,11 +744,10 @@ peer_get_best_path (const struct MeshPeer *peer) | |||
744 | best_p = NULL; | 744 | best_p = NULL; |
745 | for (p = peer->path_head; NULL != p; p = p->next) | 745 | for (p = peer->path_head; NULL != p; p = p->next) |
746 | { | 746 | { |
747 | if (GNUNET_YES == GMT_is_path_used (peer->tunnel, p)) | ||
748 | continue; /* If path is already in use, skip it. */ | ||
749 | |||
750 | if (GNUNET_NO == path_is_valid (p)) | 747 | if (GNUNET_NO == path_is_valid (p)) |
751 | continue; /* Don't use invalid paths. */ | 748 | continue; /* Don't use invalid paths. */ |
749 | if (GNUNET_YES == GMT_is_path_used (peer->tunnel, p)) | ||
750 | continue; /* If path is already in use, skip it. */ | ||
752 | 751 | ||
753 | if ((cost = GMT_get_path_cost (peer->tunnel, p)) < best_cost) | 752 | if ((cost = GMT_get_path_cost (peer->tunnel, p)) < best_cost) |
754 | { | 753 | { |
@@ -760,6 +759,16 @@ peer_get_best_path (const struct MeshPeer *peer) | |||
760 | } | 759 | } |
761 | 760 | ||
762 | 761 | ||
762 | /** | ||
763 | * Is this queue element sendable? | ||
764 | * | ||
765 | * - All management traffic is always sendable. | ||
766 | * - For payload traffic, check the connection flow control. | ||
767 | * | ||
768 | * @param q Queue element to inspect. | ||
769 | * | ||
770 | * @return #GNUNET_YES if it is sendable, #GNUNET_NO otherwise. | ||
771 | */ | ||
763 | static int | 772 | static int |
764 | queue_is_sendable (struct MeshPeerQueue *q) | 773 | queue_is_sendable (struct MeshPeerQueue *q) |
765 | { | 774 | { |