gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r16212 - gnunet/src/peerinfo


From: gnunet
Subject: [GNUnet-SVN] r16212 - gnunet/src/peerinfo
Date: Tue, 26 Jul 2011 20:30:19 +0200

Author: nevans
Date: 2011-07-26 20:30:19 +0200 (Tue, 26 Jul 2011)
New Revision: 16212

Modified:
   gnunet/src/peerinfo/test_peerinfo_api.c
Log:
undo

Modified: gnunet/src/peerinfo/test_peerinfo_api.c
===================================================================
--- gnunet/src/peerinfo/test_peerinfo_api.c     2011-07-26 18:29:33 UTC (rev 
16211)
+++ gnunet/src/peerinfo/test_peerinfo_api.c     2011-07-26 18:30:19 UTC (rev 
16212)
@@ -44,8 +44,6 @@
 
 static unsigned int retries;
 
-struct GNUNET_PeerIdentity pid;
-
 static int
 check_it (void *cls,
           const char *tname,
@@ -85,6 +83,7 @@
 add_peer ()
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
+  struct GNUNET_PeerIdentity pid;
   struct GNUNET_HELLO_Message *h2;
   size_t agc;
 
@@ -92,7 +91,7 @@
   memset (&pkey, 32, sizeof (pkey));
   GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey);
   h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc);
-  GNUNET_PEERINFO_standalone_add_peer (h, h2);
+  GNUNET_PEERINFO_add_peer (h, h2);
   GNUNET_free (h2);
 
 }
@@ -109,7 +108,7 @@
 
   if (err_msg != NULL)
   {
-         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                      _("Error in communication with PEERINFO service\n"));
   }
 
@@ -122,8 +121,8 @@
          /* try again */
          retries++;      
          add_peer ();
-         ic = GNUNET_PEERINFO_standalone_iterate (h,
-                                       &pid,
+         ic = GNUNET_PEERINFO_iterate (h,
+                                       NULL,
                                        GNUNET_TIME_relative_multiply
                                        (GNUNET_TIME_UNIT_SECONDS, 15), 
                                        &process, cls);
@@ -131,7 +130,7 @@
        }
       GNUNET_assert (peer == NULL);
       GNUNET_assert (2 == *ok);
-      GNUNET_PEERINFO_standalone_disconnect (h);
+      GNUNET_PEERINFO_disconnect (h);
       h = NULL;
       *ok = 0;
       return;
@@ -154,11 +153,11 @@
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
   cfg = c;
-  h = GNUNET_PEERINFO_standalone_connect (cfg);
+  h = GNUNET_PEERINFO_connect (cfg);
   GNUNET_assert (h != NULL);
   add_peer ();
-  ic = GNUNET_PEERINFO_standalone_iterate (h,
-                                &pid,
+  ic = GNUNET_PEERINFO_iterate (h,
+                               NULL,
                                GNUNET_TIME_relative_multiply
                                (GNUNET_TIME_UNIT_SECONDS, 15),
                                &process, cls);




reply via email to

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