fix rung prev injection
authorChristian Grothoff <christian@grothoff.org>
Tue, 31 Jan 2017 16:04:56 +0000 (17:04 +0100)
committerChristian Grothoff <christian@grothoff.org>
Tue, 31 Jan 2017 16:05:02 +0000 (17:05 +0100)
src/cadet/gnunet-service-cadet-new_core.c
src/cadet/gnunet-service-cadet-new_paths.c

index 9b2f1a6fb46142bb1773715cab3566a6c4d7072d..bb33dac409376dd6eef2253987b20bad1e506527 100644 (file)
@@ -275,8 +275,8 @@ lower_rung (struct RouteDirection *dir)
     prev->rung_off = rung->rung_off - 1;
     GNUNET_CONTAINER_DLL_insert_after (rung_head,
                                        rung_tail,
-                                       prev,
-                                       rung);
+                                       rung->prev,
+                                       prev);
   }
   else
   {
index 39026dbe74346e9f4dfc94267eb72097cb823301..e2d8da6879fc4098c8d1a0fb436d381759010178 100644 (file)
@@ -494,7 +494,7 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
     /* Check that no peer is twice on the path */
     for (unsigned int i=0;i<off - skip;i++)
     {
-      if (cpath[i] == cpath[off - skip])
+     if (cpath[i] == cpath[off - skip])
       {
         skip = off - i;
         break;