gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 01/03: fix comparisson


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 01/03: fix comparisson
Date: Sun, 22 Jan 2017 16:33:05 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 4f1c17f652d79776ff4eef290a3c441b68bbb5a9
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 22 15:49:46 2017 +0100

    fix comparisson
---
 src/cadet/gnunet-service-cadet-new_peer.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/cadet/gnunet-service-cadet-new_peer.c 
b/src/cadet/gnunet-service-cadet-new_peer.c
index 39645c909..fa1cc9ed9 100644
--- a/src/cadet/gnunet-service-cadet-new_peer.c
+++ b/src/cadet/gnunet-service-cadet-new_peer.c
@@ -755,7 +755,7 @@ GCP_attach_path (struct CadetPeer *cp,
   }
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Attaching path %p to peer %s (%s)\n",
+       "Attaching path %s to peer %s (%s)\n",
        GCPP_2s (path),
        GCP_2s (cp),
        (GNUNET_NO == force) ? "desirable" : "forced");
@@ -806,7 +806,7 @@ GCP_detach_path (struct CadetPeer *cp,
                  struct GNUNET_CONTAINER_HeapNode *hn)
 {
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Detatching path %p from peer %s\n",
+       "Detatching path %s from peer %s\n",
        GCPP_2s (path),
        GCP_2s (cp));
   GNUNET_assert (path ==
@@ -1007,8 +1007,14 @@ GCP_iterate_paths_at (struct CadetPeer *cp,
 {
   unsigned int ret = 0;
 
-  if (dist <= cp->path_dll_length)
+  if (dist >= cp->path_dll_length)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Asked to look for paths at distance %u, but maximum for me is < 
%u\n",
+         dist,
+         cp->path_dll_length);
     return 0;
+  }
   for (struct CadetPeerPathEntry *pe = cp->path_heads[dist];
        NULL != pe;
        pe = pe->next)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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