aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-07-02 12:04:30 +0000
committerNathan S. Evans <evans@in.tum.de>2010-07-02 12:04:30 +0000
commite3cfaa841943326b1527afcc9dacf263fcf77f73 (patch)
tree1535c3f513712ad3321a7f101a2ba2f4f58c239c /src/dht
parent44444b5e2057bc45c735b171e1d2dd3173111046 (diff)
downloadgnunet-e3cfaa841943326b1527afcc9dacf263fcf77f73.tar.gz
gnunet-e3cfaa841943326b1527afcc9dacf263fcf77f73.zip
remove retransmit
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/dht_api.c4
-rwxr-xr-xsrc/dht/test_dht_tools.sh8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index f29d71768..83736fb7a 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -290,6 +290,7 @@ hash_from_uid (uint64_t uid,
290 *((uint64_t*)hash) = uid; 290 *((uint64_t*)hash) = uid;
291} 291}
292 292
293#if RETRANSMIT
293/** 294/**
294 * Iterator callback to retransmit each outstanding request 295 * Iterator callback to retransmit each outstanding request
295 * because the connection to the DHT service went down (and 296 * because the connection to the DHT service went down (and
@@ -317,6 +318,7 @@ static int retransmit_iterator (void *cls,
317 318
318 return GNUNET_OK; 319 return GNUNET_OK;
319} 320}
321#endif
320 322
321/** 323/**
322 * Try to (re)connect to the dht service. 324 * Try to (re)connect to the dht service.
@@ -571,6 +573,7 @@ service_message_handler (void *cls,
571 { 573 {
572 finish(handle, GNUNET_SYSERR); /* If there was a current message, kill it! */ 574 finish(handle, GNUNET_SYSERR); /* If there was a current message, kill it! */
573 } 575 }
576#if RETRANSMIT
574 if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0) 577 if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0)
575 { 578 {
576 handle->retransmit_stage = DHT_RETRANSMITTING; 579 handle->retransmit_stage = DHT_RETRANSMITTING;
@@ -578,6 +581,7 @@ service_message_handler (void *cls,
578 process_pending_retransmissions(handle); 581 process_pending_retransmissions(handle);
579 } 582 }
580 return; 583 return;
584#endif
581 } 585 }
582 586
583 switch (ntohs (msg->type)) 587 switch (ntohs (msg->type))
diff --git a/src/dht/test_dht_tools.sh b/src/dht/test_dht_tools.sh
index 193f5c0e5..85fd29155 100755
--- a/src/dht/test_dht_tools.sh
+++ b/src/dht/test_dht_tools.sh
@@ -42,8 +42,8 @@ echo "PASS"
42sleep 1 42sleep 1
43 43
44echo -n "TEST: Testing put..." 44echo -n "TEST: Testing put..."
45#if ! valgrind --log-file=test_put.log $putexe -k testkey -d testdata > $out ; then 45if ! valgrind --leak-check=full --log-file=test_put.log $putexe -k testkey -d testdata > $out ; then
46if ! $putexe -k testkey -d testdata > $out ; then 46#if ! $putexe -k testkey -d testdata > $out ; then
47 echo "FAIL: error running $putexe" 47 echo "FAIL: error running $putexe"
48 echo "Command output was:" 48 echo "Command output was:"
49 cat $out 49 cat $out
@@ -57,8 +57,8 @@ echo -n "TEST: Testing get..."
57echo "Result 0, type 0:" > $checkout 57echo "Result 0, type 0:" > $checkout
58echo "testdata" >> $checkout 58echo "testdata" >> $checkout
59 59
60#if ! valgrind --log-file=test_get.log $getexe -k testkey -T 1 > $out ; then 60if ! valgrind --leak-check=full --log-file=test_get.log $getexe -k testkey -T 1 > $out ; then
61if ! $getexe -k testkey -T 1 > $out ; then 61#if ! $getexe -k testkey -T 1 > $out ; then
62 echo "FAIL: error running $putexe" 62 echo "FAIL: error running $putexe"
63 echo "Command output was:" 63 echo "Command output was:"
64 cat $out 64 cat $out