- debug
[oweals/gnunet.git] / src / mesh / mesh_path.c
index 05444655aa546a1fae0701e329165ba3a6a60527..536fb0da6316a0b0c35f97dc1e1534d31312d91a 100644 (file)
@@ -24,7 +24,7 @@
  * @author Bartlomiej Polot
  */
 
-#include "mesh2.h"
+#include "mesh.h"
 #include "mesh_path.h"
 
 
@@ -76,15 +76,15 @@ path_invert (struct MeshPeerPath *path)
  * @param path The path to duplicate.
  */
 struct MeshPeerPath *
-path_duplicate (struct MeshPeerPath *path)
+path_duplicate (const struct MeshPeerPath *path)
 {
   struct MeshPeerPath *aux;
   unsigned int i;
 
   aux = path_new (path->length);
   memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id));
-  for (i = 0; i < path->length; i++)
-    GNUNET_PEER_change_rc (path->peers[i], 1);
+  for (i = 0; i < aux->length; i++)
+    GNUNET_PEER_change_rc (aux->peers[i], 1);
   return aux;
 }