gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7342 - GNUnet/src/applications/dht/tools


From: gnunet
Subject: [GNUnet-SVN] r7342 - GNUnet/src/applications/dht/tools
Date: Fri, 27 Jun 2008 11:38:27 -0600 (MDT)

Author: grothoff
Date: 2008-06-27 11:38:27 -0600 (Fri, 27 Jun 2008)
New Revision: 7342

Modified:
   GNUnet/src/applications/dht/tools/dht-query.c
   GNUnet/src/applications/dht/tools/dht_twopeer_test.c
Log:
no trans

Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c       2008-06-27 00:50:50 UTC 
(rev 7341)
+++ GNUnet/src/applications/dht/tools/dht-query.c       2008-06-27 17:38:27 UTC 
(rev 7342)
@@ -86,7 +86,7 @@
   ret = GNUNET_DHT_get_start (ctx, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                               &hc);
   if (ret == GNUNET_SYSERR)
-    printf (_("`%s(%s)' failed.\n"), "get", key);
+    printf ("`%s(%s)' failed.\n", "get", key);
   GNUNET_thread_sleep(timeout);
   ret = GNUNET_DHT_get_stop(ctx, 
                            GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
@@ -110,11 +110,11 @@
       GNUNET_DHT_put (cfg, ectx, &hc, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                       strlen (value), value))
     {
-      printf (_("`%s(%s,%s)' succeeded\n"), "put", key, value);
+      printf ("`%s(%s,%s)' succeeded\n", "put", key, value);
     }
   else
     {
-      printf (_("`%s(%s,%s)' failed.\n"), "put", key, value);
+      printf ("`%s(%s,%s)' failed.\n", "put", key, value);
     }
 }
 

Modified: GNUnet/src/applications/dht/tools/dht_twopeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_twopeer_test.c        2008-06-27 
00:50:50 UTC (rev 7341)
+++ GNUnet/src/applications/dht/tools/dht_twopeer_test.c        2008-06-27 
17:38:27 UTC (rev 7342)
@@ -209,7 +209,7 @@
                                             ectx,
                                             "NETWORK", "HOST",
                                             "localhost:2087");
-  GNUNET_hash ("key2", 4, &key);
+  GNUNET_hash ("key 1", 4, &key);
   value = GNUNET_malloc (8);
   memset (value, 'A', 8);
   CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
@@ -217,7 +217,7 @@
                                       &key,
                                       GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                                       8, value));
-  GNUNET_hash ("key", 3, &key);
+  GNUNET_hash ("key 2", 3, &key);
   value = GNUNET_malloc (8);
   memset (value, 'B', 8);
   CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
@@ -225,37 +225,34 @@
                                       &key,
                                       GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                                       8, value));
-  GNUNET_hash ("key2", 4, &key);
+  GNUNET_hash ("key 1", 4, &key);
   peer2count = 10;
-  printf ("Getting key 2 from peer 2 (stored at peer 1)");
-  do
-    {
-      printf (".");
-      fflush (stdout);
-      if (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer2,
-                                             
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                             &key))
-        break;
-    }
+  printf ("Getting key 1 from peer 2 (stored at peer 1)");
+  CHECK (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer2,
+                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                           &key));  
   while (peer2count > 0);
+  CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer2,
+                                          
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                          &key));  
   printf (peer2count > 0 ? " OK!\n" : "?\n");
 
   CHECK (peer2count > 0);
 
-  printf ("Getting key 1 from peer 1 (stored at peer 2)");
+  printf ("Getting key 2 from peer 1 (stored at peer 2)");
   peer1count = 10;
-  do
-    {
-      printf (".");
-      fflush (stdout);
-      if (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer1,
-                                             
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                             &key))
-        break;
-    }
+  CHECK (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer1,
+                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                           &key));
+
   while (peer1count > 0);
   printf (peer1count > 0 ? " OK!\n" : "?\n");
   CHECK (peer1count > 0);
+
+  CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer1,
+                                          
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                          &key));
+
   /* end of actual test code */
 
 FAILURE:





reply via email to

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