- document string termination
[oweals/gnunet.git] / src / peerinfo / perf_peerinfo_api.c
index a1e309d649580d610b1f60a36ee86b19878c332f..4eb84e8c2f9168d11c54d70633da2274cbf98960 100755 (executable)
@@ -27,7 +27,7 @@
 #include "platform.h"
 #include "gnunet_hello_lib.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_testing_lib-new.h"
+#include "gnunet_testing_lib.h"
 #include "gnunet_peerinfo_service.h"
 #include "peerinfo.h"
 #include <gauger.h>
@@ -82,12 +82,10 @@ address_generator (void *cls, size_t max, void *buf)
 static void
 add_peer (size_t i)
 {
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
   struct GNUNET_HELLO_Message *h2;
 
-  memset (&pkey, i, sizeof (pkey));
-  GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey);
-  h2 = GNUNET_HELLO_create (&pkey, &address_generator, &i);
+  memset (&pid, i, sizeof (pid));
+  h2 = GNUNET_HELLO_create (&pid.public_key, &address_generator, &i, GNUNET_NO);
   GNUNET_PEERINFO_add_peer (h, h2, NULL, NULL);
   GNUNET_free (h2);
 }
@@ -108,8 +106,9 @@ process (void *cls, const struct GNUNET_PeerIdentity *peer,
 
 
 static void
-run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+run (void *cls,
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   size_t i;
 
@@ -119,7 +118,7 @@ run (void *cls,
   {
     add_peer (i);
     ic[i] =
-        GNUNET_PEERINFO_iterate (h, NULL,
+        GNUNET_PEERINFO_iterate (h, GNUNET_YES, NULL,
                                  GNUNET_TIME_relative_multiply
                                  (GNUNET_TIME_UNIT_SECONDS, 30), &process, cls);
   }