gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r36580 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r36580 - gnunet/src/core
Date: Mon, 26 Oct 2015 14:58:46 +0100

Author: grothoff
Date: 2015-10-26 14:58:45 +0100 (Mon, 26 Oct 2015)
New Revision: 36580

Modified:
   gnunet/src/core/gnunet-service-core_neighbours.c
Log:
-better error reporting

Modified: gnunet/src/core/gnunet-service-core_neighbours.c
===================================================================
--- gnunet/src/core/gnunet-service-core_neighbours.c    2015-10-26 01:01:07 UTC 
(rev 36579)
+++ gnunet/src/core/gnunet-service-core_neighbours.c    2015-10-26 13:58:45 UTC 
(rev 36580)
@@ -124,7 +124,7 @@
 
 
 /**
- * Map of peer identities to 'struct Neighbour'.
+ * Map of peer identities to `struct Neighbour`.
  */
 static struct GNUNET_CONTAINER_MultiPeerMap *neighbours;
 
@@ -368,6 +368,9 @@
   {
     /* duplicate connect notification!? */
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s exists already\n",
+                GNUNET_i2s (peer));
     return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -415,6 +418,9 @@
   if (NULL == n)
   {
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (peer));
     return;
   }
   free_neighbour (n);
@@ -452,6 +458,9 @@
   {
     /* received message from peer that is not connected!? */
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (peer));
     return;
   }
   type = ntohs (message->type);
@@ -503,6 +512,9 @@
   if (NULL == n)
   {
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (target));
     return;
   }
   msize = ntohs (msg->size);
@@ -521,8 +533,7 @@
 
 
 /**
- * One of our neighbours has excess bandwidth,
- * remember this.
+ * One of our neighbours has excess bandwidth, remember this.
  *
  * @param cls NULL
  * @param pid identity of the peer with excess bandwidth
@@ -533,15 +544,18 @@
 {
   struct Neighbour *n;
 
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Peer %s has excess bandwidth available\n",
-              GNUNET_i2s (pid));
   n = find_neighbour (pid);
   if (NULL == n)
   {
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (pid));
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Peer %s has excess bandwidth available\n",
+              GNUNET_i2s (pid));
   n->has_excess_bandwidth = GNUNET_YES;
   GSC_SESSIONS_solicit (pid);
 }
@@ -562,6 +576,9 @@
   if (NULL == n)
   {
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (target));
     return UINT_MAX;
   }
   return n->queue_size;
@@ -583,6 +600,9 @@
   if (NULL == n)
   {
     GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Peer %s not found\n",
+                GNUNET_i2s (target));
     return GNUNET_SYSERR;
   }
   return n->has_excess_bandwidth;




reply via email to

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