skip validation logic
authorChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2018 23:51:01 +0000 (01:51 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2018 23:51:01 +0000 (01:51 +0200)
src/topology/gnunet-daemon-topology.c

index 4415d0a24c97b38818fbbcd9816fe12540d0b17b..da4f62351089738e5395fb4b4c88034d685eada7 100644 (file)
@@ -136,6 +136,11 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg;
  */
 static struct GNUNET_CORE_Handle *handle;
 
+/**
+ * Handle to the PEERINFO service.
+ */
+static struct GNUNET_PEERINFO_Handle *pi;
+
 /**
  * Handle to the ATS service.
  */
@@ -998,16 +1003,6 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
 }
 
 
-/**
- * Hello offer complete. Clean up.
- */
-static void
-done_offer_hello (void *cls)
-{
-  oh = NULL;
-}
-
-
 /**
  * This function is called whenever an encrypted HELLO message is
  * received.
@@ -1076,12 +1071,10 @@ handle_hello (void *cls,
         (friend_count < minimum_friend_count))
       return;
   }
-  if (NULL != oh)
-    GNUNET_TRANSPORT_offer_hello_cancel (oh);
-  oh = GNUNET_TRANSPORT_offer_hello (cfg,
-                                     &message->header,
-                                     &done_offer_hello,
-                                     NULL);
+  (void) GNUNET_PEERINFO_add_peer (pi,
+                                   message,
+                                   NULL,
+                                   NULL);
 }
 
 
@@ -1125,6 +1118,11 @@ cleaning_task (void *cls)
     GNUNET_ATS_connectivity_done (ats);
     ats = NULL;
   }
+  if (NULL != pi)
+  {
+    GNUNET_PEERINFO_disconnect (pi);
+    pi = NULL;
+  }
   if (NULL != stats)
   {
     GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
@@ -1189,6 +1187,7 @@ run (void *cls,
                                             &blacklist_check,
                                             NULL);
   ats = GNUNET_ATS_connectivity_init (cfg);
+  pi = GNUNET_PEERINFO_connect (cfg);
   handle = GNUNET_CORE_connect (cfg,
                                NULL,
                                &core_init,