diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 08:46:51 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 08:46:51 +0000 |
commit | cf6c6eea38863e2abe0421762c5e9dd3becc0b24 (patch) | |
tree | dce32bdc4b9c89f38aeccb478c4dd2fcc2e231d4 /src | |
parent | 129e2b3cb013020a6fca41d5b02e0f305cc14f5a (diff) | |
download | gnunet-cf6c6eea38863e2abe0421762c5e9dd3becc0b24.tar.gz gnunet-cf6c6eea38863e2abe0421762c5e9dd3becc0b24.zip |
fix get error (never canceled) in test_dht_api, remove valgrind from conf
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/test_dht_api.c | 16 | ||||
-rw-r--r-- | src/dht/test_dht_api_peer1.conf | 3 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index 6650e43ab..465a9246a 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "gnunet_dht_service.h" | 34 | #include "gnunet_dht_service.h" |
35 | #include "gnunet_hello_lib.h" | 35 | #include "gnunet_hello_lib.h" |
36 | 36 | ||
37 | #define VERBOSE GNUNET_NO | 37 | #define VERBOSE GNUNET_YES |
38 | 38 | ||
39 | #define VERBOSE_ARM GNUNET_NO | 39 | #define VERBOSE_ARM GNUNET_NO |
40 | 40 | ||
@@ -139,10 +139,16 @@ end_badly () | |||
139 | 139 | ||
140 | if ( (retry_context.peer_ctx != NULL) && | 140 | if ( (retry_context.peer_ctx != NULL) && |
141 | (retry_context.peer_ctx->find_peer_handle != NULL) ) | 141 | (retry_context.peer_ctx->find_peer_handle != NULL) ) |
142 | GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle); | 142 | { |
143 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping find peer request!\n"); | ||
144 | GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle); | ||
145 | } | ||
143 | if ( (retry_context.peer_ctx != NULL) && | 146 | if ( (retry_context.peer_ctx != NULL) && |
144 | (retry_context.peer_ctx->get_handle != NULL) ) | 147 | (retry_context.peer_ctx->get_handle != NULL) ) |
145 | GNUNET_DHT_get_stop (retry_context.peer_ctx->get_handle); | 148 | { |
149 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping get request!\n"); | ||
150 | GNUNET_DHT_get_stop (retry_context.peer_ctx->get_handle); | ||
151 | } | ||
146 | if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK) | 152 | if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK) |
147 | GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task); | 153 | GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task); |
148 | GNUNET_DHT_disconnect (p1.dht_handle); | 154 | GNUNET_DHT_disconnect (p1.dht_handle); |
@@ -387,6 +393,8 @@ test_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
387 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n"); | 393 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n"); |
388 | 394 | ||
389 | GNUNET_assert (peer->dht_handle != NULL); | 395 | GNUNET_assert (peer->dht_handle != NULL); |
396 | retry_context.real_timeout = GNUNET_TIME_relative_to_absolute(TOTAL_TIMEOUT); | ||
397 | retry_context.next_timeout = BASE_TIMEOUT; | ||
390 | 398 | ||
391 | peer->get_handle = | 399 | peer->get_handle = |
392 | GNUNET_DHT_get_start (peer->dht_handle, | 400 | GNUNET_DHT_get_start (peer->dht_handle, |
@@ -405,6 +413,8 @@ test_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
405 | GNUNET_SCHEDULER_add_now (sched, &end_badly, &p1); | 413 | GNUNET_SCHEDULER_add_now (sched, &end_badly, &p1); |
406 | return; | 414 | return; |
407 | } | 415 | } |
416 | |||
417 | retry_context.peer_ctx = peer; | ||
408 | } | 418 | } |
409 | 419 | ||
410 | /** | 420 | /** |
diff --git a/src/dht/test_dht_api_peer1.conf b/src/dht/test_dht_api_peer1.conf index 06bf9e533..375d7cde9 100644 --- a/src/dht/test_dht_api_peer1.conf +++ b/src/dht/test_dht_api_peer1.conf | |||
@@ -2,13 +2,12 @@ | |||
2 | AUTOSTART = NO | 2 | AUTOSTART = NO |
3 | 3 | ||
4 | [dht] | 4 | [dht] |
5 | DEBUG = NO | 5 | DEBUG = YES |
6 | AUTOSTART = YES | 6 | AUTOSTART = YES |
7 | ACCEPT_FROM6 = ::1; | 7 | ACCEPT_FROM6 = ::1; |
8 | ACCEPT_FROM = 127.0.0.1; | 8 | ACCEPT_FROM = 127.0.0.1; |
9 | HOSTNAME = localhost | 9 | HOSTNAME = localhost |
10 | PORT = 2100 | 10 | PORT = 2100 |
11 | PREFIX = valgrind | ||
12 | 11 | ||
13 | [dhtcache] | 12 | [dhtcache] |
14 | QUOTA = 1000000 | 13 | QUOTA = 1000000 |