diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-11-28 18:27:23 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-11-28 18:27:23 +0000 |
commit | 34298120a3b660139b08a449ed56ab38c7dbe719 (patch) | |
tree | 4cb361ef85d0fa2a446808bdcbf81c0adce034ec /src | |
parent | 92698047334856292975c05b3fec68e930d73ac9 (diff) | |
download | gnunet-34298120a3b660139b08a449ed56ab38c7dbe719.tar.gz gnunet-34298120a3b660139b08a449ed56ab38c7dbe719.zip |
- Off by 1
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index ce90b224c..8883602ab 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -1709,7 +1709,7 @@ path_add_to_peers (struct MeshPeerPath *p, int confirmed) | |||
1709 | unsigned int i; | 1709 | unsigned int i; |
1710 | 1710 | ||
1711 | /* TODO: invert and add */ | 1711 | /* TODO: invert and add */ |
1712 | for (i = 1; i < p->length && p->peers[i] != myid; i++) /* skip'em */; | 1712 | for (i = 0; i < p->length && p->peers[i] != myid; i++) /* skip'em */; |
1713 | for (i++; i < p->length; i++) | 1713 | for (i++; i < p->length; i++) |
1714 | { | 1714 | { |
1715 | struct MeshPeerInfo *aux; | 1715 | struct MeshPeerInfo *aux; |
@@ -1717,7 +1717,7 @@ path_add_to_peers (struct MeshPeerPath *p, int confirmed) | |||
1717 | 1717 | ||
1718 | aux = peer_info_get_short(p->peers[i]); | 1718 | aux = peer_info_get_short(p->peers[i]); |
1719 | copy = path_duplicate(p); | 1719 | copy = path_duplicate(p); |
1720 | copy->length = i; | 1720 | copy->length = i + 1; |
1721 | peer_info_add_path(aux, copy, GNUNET_NO); | 1721 | peer_info_add_path(aux, copy, GNUNET_NO); |
1722 | } | 1722 | } |
1723 | } | 1723 | } |