gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17806 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r17806 - gnunet/src/mesh
Date: Thu, 27 Oct 2011 02:47:16 +0200

Author: bartpolot
Date: 2011-10-27 02:47:16 +0200 (Thu, 27 Oct 2011)
New Revision: 17806

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed a bug when adding a path to a peer_info, modified logging

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2011-10-26 23:15:54 UTC (rev 
17805)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2011-10-27 00:47:16 UTC (rev 
17806)
@@ -1470,9 +1470,19 @@
   unsigned int l;
   unsigned int l2;
 
+#if MESH_DEBUG
+  struct GNUNET_PeerIdentity id;
+
+  GNUNET_PEER_resolve (peer_info->id, &id);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "MESH: adding path [%u] to peer %s\n",
+              path->length,
+              GNUNET_i2s (&id));
+#endif
   if (NULL == peer_info || NULL == path)
   {
     GNUNET_break (0);
+    path_destroy (path);
     return;
   }
 
@@ -1489,7 +1499,10 @@
     if (l2 > l)
     {
       GNUNET_CONTAINER_DLL_insert_before (peer_info->path_head,
-                                          peer_info->path_tail, aux, path);
+                                          peer_info->path_tail,
+                                          aux,
+                                          path);
+      return;
     }
     else
     {
@@ -1532,9 +1545,9 @@
  */
 static struct MeshPeerPath *
 path_build_from_dht (const struct GNUNET_PeerIdentity *get_path,
-                    unsigned int get_path_length,
+                     unsigned int get_path_length,
                      const struct GNUNET_PeerIdentity *put_path,
-                    unsigned int put_path_length)
+                     unsigned int put_path_length)
 {
   struct MeshPeerPath *p;
   GNUNET_PEER_Id id;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]