init blacklist
[oweals/gnunet.git] / src / dv / test_transport_api_dv.c
index 39dd08877db643700a50cc0bc104b3ef68985ad2..8b42c43110c265ba783cdf5bf8b0d5ab92f876c3 100644 (file)
@@ -737,7 +737,7 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
   die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 250), &end_badly, "from send_other_messages");
 }
 
-void
+static void
 topology_callback (void *cls,
                    const struct GNUNET_PeerIdentity *first,
                    const struct GNUNET_PeerIdentity *second,
@@ -879,7 +879,7 @@ static void all_connect_handler (void *cls,
 {
   struct GNUNET_TESTING_Daemon *d = cls;
   struct GNUNET_TESTING_Daemon *second_daemon;
-  char *second_shortname = strdup(GNUNET_i2s(peer));
+  char *second_shortname;
 #if !TEST_ALL
   struct TestMessageContext *temp_context;
 #endif
@@ -887,21 +887,23 @@ static void all_connect_handler (void *cls,
 
   if (0 == memcmp(&d->id, peer, sizeof(struct GNUNET_PeerIdentity)))
     return;
-
+  second_shortname = GNUNET_strdup (GNUNET_i2s(peer));
   distance = get_atsi_distance(atsi);
 
 #if VERBOSE
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connected peer %s to peer %s, distance %u\n",
-           d->shortname,
-           second_shortname,
-           distance);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+             "connected peer %s to peer %s, distance %u\n",
+             d->shortname,
+             second_shortname,
+             distance);
 #endif
 
   second_daemon = GNUNET_CONTAINER_multihashmap_get(peer_daemon_hash, &peer->hashPubKey);
 
   if (second_daemon == NULL)
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Couldn't find second peer!\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 
+                 "Couldn't find second peer!\n");
       GNUNET_free(second_shortname);
       return;
     }
@@ -1000,10 +1002,11 @@ peers_started_callback (void *cls,
  * @param d the daemon handle (pretty useless at this point, remove?)
  * @param emsg non-null on failure
  */
-void hostkey_callback (void *cls,
-                       const struct GNUNET_PeerIdentity *id,
-                       struct GNUNET_TESTING_Daemon *d,
-                       const char *emsg)
+static void
+hostkey_callback (void *cls,
+                 const struct GNUNET_PeerIdentity *id,
+                 struct GNUNET_TESTING_Daemon *d,
+                 const char *emsg)
 {
   if (emsg != NULL)
     {