gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13171 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13171 - gnunet/src/dht
Date: Wed, 6 Oct 2010 10:46:51 +0200

Author: nevans
Date: 2010-10-06 10:46:51 +0200 (Wed, 06 Oct 2010)
New Revision: 13171

Modified:
   gnunet/src/dht/test_dht_api.c
   gnunet/src/dht/test_dht_api_peer1.conf
Log:
fix get error (never canceled) in test_dht_api, remove valgrind from conf

Modified: gnunet/src/dht/test_dht_api.c
===================================================================
--- gnunet/src/dht/test_dht_api.c       2010-10-06 08:41:57 UTC (rev 13170)
+++ gnunet/src/dht/test_dht_api.c       2010-10-06 08:46:51 UTC (rev 13171)
@@ -34,7 +34,7 @@
 #include "gnunet_dht_service.h"
 #include "gnunet_hello_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_YES
 
 #define VERBOSE_ARM GNUNET_NO
 
@@ -139,10 +139,16 @@
 
   if ( (retry_context.peer_ctx != NULL) && 
        (retry_context.peer_ctx->find_peer_handle != NULL) )
-    GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle);
+    {
+      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping find peer request!\n");
+      GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle);
+    }
   if ( (retry_context.peer_ctx != NULL) && 
        (retry_context.peer_ctx->get_handle != NULL) )
-    GNUNET_DHT_get_stop (retry_context.peer_ctx->get_handle);
+    {
+      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping get request!\n");
+      GNUNET_DHT_get_stop (retry_context.peer_ctx->get_handle);
+    }
   if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task);
   GNUNET_DHT_disconnect (p1.dht_handle);
@@ -387,6 +393,8 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n");
 
   GNUNET_assert (peer->dht_handle != NULL);
+  retry_context.real_timeout = GNUNET_TIME_relative_to_absolute(TOTAL_TIMEOUT);
+  retry_context.next_timeout = BASE_TIMEOUT;
 
   peer->get_handle =
     GNUNET_DHT_get_start (peer->dht_handle, 
@@ -405,6 +413,8 @@
       GNUNET_SCHEDULER_add_now (sched, &end_badly, &p1);
       return;
     }
+
+  retry_context.peer_ctx = peer;
 }
 
 /**

Modified: gnunet/src/dht/test_dht_api_peer1.conf
===================================================================
--- gnunet/src/dht/test_dht_api_peer1.conf      2010-10-06 08:41:57 UTC (rev 
13170)
+++ gnunet/src/dht/test_dht_api_peer1.conf      2010-10-06 08:46:51 UTC (rev 
13171)
@@ -2,13 +2,12 @@
 AUTOSTART = NO
 
 [dht]
-DEBUG = NO
+DEBUG = YES
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
 PORT = 2100
-PREFIX = valgrind
 
 [dhtcache]
 QUOTA = 1000000




reply via email to

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