track hello passing
authorChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2018 23:39:40 +0000 (01:39 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2018 23:39:40 +0000 (01:39 +0200)
src/peerinfo/peerinfo_api.c
src/transport/gnunet-service-transport_validation.c

index 8b47ed444bb63f4b71a14f8cd2095ab23ad91e2a..09ec04bf8e978586a76f173ffa9a3e01fa366dd1 100644 (file)
@@ -565,7 +565,10 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
   struct GNUNET_PeerIdentity peer;
 
   if (NULL == h->mq)
+  {
+    GNUNET_break (0);
     return NULL;
+  }
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_HELLO_get_id (hello,
                                       &peer));
index cd5aeb5e27c31d324211456a52cf2bb06f584cfc..91acc18ed5589077899fff378c4a12913bdc6031 100644 (file)
@@ -1623,15 +1623,20 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
                             GNUNET_TRANSPORT_VS_UPDATE);
 
   /* build HELLO to store in PEERINFO */
+  GNUNET_STATISTICS_update (GST_stats,
+                            gettext_noop ("# HELLOs given to peerinfo"),
+                            1,
+                            GNUNET_NO);
   ve->copied = GNUNET_NO;
   hello = GNUNET_HELLO_create (&ve->address->peer.public_key,
                                &add_valid_peer_address,
                               ve,
                                GNUNET_NO);
-  GNUNET_PEERINFO_add_peer (GST_peerinfo,
-                           hello,
-                           NULL,
-                           NULL);
+  GNUNET_break (NULL !=
+                GNUNET_PEERINFO_add_peer (GST_peerinfo,
+                                          hello,
+                                          NULL,
+                                          NULL));
   GNUNET_free (hello);
   return GNUNET_OK;
 }