aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-06-23 15:51:43 +0000
committerNathan S. Evans <evans@in.tum.de>2010-06-23 15:51:43 +0000
commit5ae985135268e8fe5a731f877ad5ddb3c854a708 (patch)
treea13e997975b20200cb4c040d4d36c2d25aa1f609 /src/dht
parent4377ade158e5b6d0e60c3ad1eae2ae74d892d973 (diff)
downloadgnunet-5ae985135268e8fe5a731f877ad5ddb3c854a708.tar.gz
gnunet-5ae985135268e8fe5a731f877ad5ddb3c854a708.zip
someone changed how services start and didn't tell the dht testcase
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/dht_api.c11
-rw-r--r--src/dht/test_dht_api.c3
-rw-r--r--src/dht/test_dht_api_peer1.conf65
3 files changed, 11 insertions, 68 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index c188e171f..2d54eeb9c 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -315,6 +315,7 @@ static int retransmit_iterator (void *cls,
315 pending_message_list->message->unique_id = route_handle->uid; 315 pending_message_list->message->unique_id = route_handle->uid;
316 /* Add the new pending message to the front of the retransmission list */ 316 /* Add the new pending message to the front of the retransmission list */
317 pending_message_list->next = route_handle->dht_handle->retransmissions; 317 pending_message_list->next = route_handle->dht_handle->retransmissions;
318 route_handle->dht_handle->retransmissions = pending_message_list;
318 319
319 return GNUNET_OK; 320 return GNUNET_OK;
320} 321}
@@ -569,10 +570,12 @@ service_message_handler (void *cls,
569 "dht", 570 "dht",
570 handle->cfg); 571 handle->cfg);
571 572
572 handle->retransmit_stage = DHT_RETRANSMITTING; 573 if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0)
573 GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle); 574 {
574 handle->current = handle->retransmissions->message; 575 handle->retransmit_stage = DHT_RETRANSMITTING;
575 process_pending_retransmissions(handle); 576 handle->current = handle->retransmissions->message;
577 process_pending_retransmissions(handle);
578 }
576 return; 579 return;
577 } 580 }
578 581
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c
index 122dfff16..635001c94 100644
--- a/src/dht/test_dht_api.c
+++ b/src/dht/test_dht_api.c
@@ -149,7 +149,8 @@ end_badly ()
149#if VERBOSE 149#if VERBOSE
150 fprintf (stderr, "Ending on an unhappy note.\n"); 150 fprintf (stderr, "Ending on an unhappy note.\n");
151#endif 151#endif
152 if (retry_context.peer_ctx->find_peer_handle != NULL) 152
153 if ((retry_context.peer_ctx != NULL) && (retry_context.peer_ctx->find_peer_handle != NULL))
153 GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle, NULL, NULL); 154 GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle, NULL, NULL);
154 if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK) 155 if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK)
155 GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task); 156 GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task);
diff --git a/src/dht/test_dht_api_peer1.conf b/src/dht/test_dht_api_peer1.conf
index 33ca838f3..c02567efd 100644
--- a/src/dht/test_dht_api_peer1.conf
+++ b/src/dht/test_dht_api_peer1.conf
@@ -8,23 +8,9 @@ HOSTNAME = localhost
8PORT = 2094 8PORT = 2094
9INDEXDB = $SERVICEHOME/idxinfo.lst 9INDEXDB = $SERVICEHOME/idxinfo.lst
10 10
11[datastore-sqlite]
12FILENAME = $SERVICEHOME/datastore/sqlite.db
13
14[datastore]
15DATABASE = sqlite
16BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
17QUOTA = 100000000
18ACCEPT_FROM6 = ::1;
19ACCEPT_FROM = 127.0.0.1;
20BINARY = gnunet-service-datastore
21CONFIG = $DEFAULTCONFIG
22HOME = $SERVICEHOME
23HOSTNAME = localhost
24PORT = 2093
25
26[dht] 11[dht]
27DEBUG = NO 12DEBUG = NO
13AUTOSTART = YES
28ACCEPT_FROM6 = ::1; 14ACCEPT_FROM6 = ::1;
29ACCEPT_FROM = 127.0.0.1; 15ACCEPT_FROM = 127.0.0.1;
30BINARY = gnunet-service-dht 16BINARY = gnunet-service-dht
@@ -40,25 +26,6 @@ PORT = 2100
40QUOTA = 1000000 26QUOTA = 1000000
41DATABASE = sqlite 27DATABASE = sqlite
42 28
43[hostlist]
44HTTP-PROXY =
45SERVERS = http://gnunet.org:8080/
46OPTIONS = -b
47BINARY = gnunet-daemon-hostlist
48CONFIG = $DEFAULTCONFIG
49HOME = $SERVICEHOME
50HOSTNAME = localhost
51HTTPPORT = 8080
52
53[topology]
54BINARY = gnunet-daemon-topology
55CONFIG = $DEFAULTCONFIG
56FRIENDS = $SERVICEHOME/friends
57TARGET-CONNECTION-COUNT = 16
58AUTOCONNECT = YES
59FRIENDS-ONLY = NO
60MINIMUM-FRIENDS = 0
61
62[transport] 29[transport]
63PLUGINS = tcp 30PLUGINS = tcp
64DEBUG = NO 31DEBUG = NO
@@ -73,35 +40,6 @@ HOME = $SERVICEHOME
73HOSTNAME = localhost 40HOSTNAME = localhost
74PORT = 12365 41PORT = 12365
75 42
76[peerinfo]
77TRUST = $SERVICEHOME/data/credit/
78HOSTS = $SERVICEHOME/data/hosts/
79ACCEPT_FROM6 = ::1;
80ACCEPT_FROM = 127.0.0.1;
81BINARY = gnunet-service-peerinfo
82CONFIG = $DEFAULTCONFIG
83HOME = $SERVICEHOME
84HOSTNAME = localhost
85PORT = 12369
86
87[resolver]
88ACCEPT_FROM6 = ::1;
89ACCEPT_FROM = 127.0.0.1;
90BINARY = gnunet-service-resolver
91CONFIG = $DEFAULTCONFIG
92HOME = $SERVICEHOME
93HOSTNAME = localhost
94PORT = 12364
95
96[statistics]
97ACCEPT_FROM6 = ::1;
98ACCEPT_FROM = 127.0.0.1;
99BINARY = gnunet-service-statistics
100CONFIG = $DEFAULTCONFIG
101HOME = $SERVICEHOME
102HOSTNAME = localhost
103PORT = 12367
104
105[core] 43[core]
106TOTAL_QUOTA_OUT = 3932160 44TOTAL_QUOTA_OUT = 3932160
107TOTAL_QUOTA_IN = 3932160 45TOTAL_QUOTA_IN = 3932160
@@ -122,6 +60,7 @@ CONFIG = $DEFAULTCONFIG
122HOME = $SERVICEHOME 60HOME = $SERVICEHOME
123HOSTNAME = localhost 61HOSTNAME = localhost
124PORT = 12366 62PORT = 12366
63DEBUG = YES
125 64
126[transport-tcp] 65[transport-tcp]
127TIMEOUT = 300000 66TIMEOUT = 300000