projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9269804
)
- Off by 1
author
Bart Polot
<bart@net.in.tum.de>
Mon, 28 Nov 2011 18:27:23 +0000
(18:27 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Mon, 28 Nov 2011 18:27:23 +0000
(18:27 +0000)
src/mesh/gnunet-service-mesh.c
patch
|
blob
|
history
diff --git
a/src/mesh/gnunet-service-mesh.c
b/src/mesh/gnunet-service-mesh.c
index ce90b224cb0c947216a889e3798f0d0217490249..8883602ab6a47c97922a4dad0b9e210987c68db7 100644
(file)
--- 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)
unsigned int i;
/* TODO: invert and add */
- for (i =
1
; i < p->length && p->peers[i] != myid; i++) /* skip'em */;
+ for (i =
0
; i < p->length && p->peers[i] != myid; i++) /* skip'em */;
for (i++; i < p->length; i++)
{
struct MeshPeerInfo *aux;
@@
-1717,7
+1717,7
@@
path_add_to_peers (struct MeshPeerPath *p, int confirmed)
aux = peer_info_get_short(p->peers[i]);
copy = path_duplicate(p);
- copy->length = i;
+ copy->length = i
+ 1
;
peer_info_add_path(aux, copy, GNUNET_NO);
}
}