diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 12:20:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 12:20:31 +0000 |
commit | 6549574748c9583f86fc35dbb47d7709cafe671d (patch) | |
tree | f2b714ca6969633fa1f50a76614a5655dead19bf /src/dht/gnunet-service-dht.c | |
parent | d3834ca8024608b1dc7df467405d8a6ed31e8c05 (diff) | |
download | gnunet-6549574748c9583f86fc35dbb47d7709cafe671d.tar.gz gnunet-6549574748c9583f86fc35dbb47d7709cafe671d.zip |
-misc fixes to DHT tests
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index a44be2dfe..abdd77548 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -57,6 +57,11 @@ struct GNUNET_BLOCK_Context *GDS_block_context; | |||
57 | const struct GNUNET_CONFIGURATION_Handle *GDS_cfg; | 57 | const struct GNUNET_CONFIGURATION_Handle *GDS_cfg; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Handle to our server. | ||
61 | */ | ||
62 | struct GNUNET_SERVER_Handle *GDS_server; | ||
63 | |||
64 | /** | ||
60 | * Our HELLO | 65 | * Our HELLO |
61 | */ | 66 | */ |
62 | struct GNUNET_MessageHeader *GDS_my_hello; | 67 | struct GNUNET_MessageHeader *GDS_my_hello; |
@@ -140,10 +145,13 @@ shutdown_task (void *cls) | |||
140 | * @param c configuration to use | 145 | * @param c configuration to use |
141 | */ | 146 | */ |
142 | static void | 147 | static void |
143 | run (void *cls, struct GNUNET_SERVER_Handle *server, | 148 | run (void *cls, |
149 | struct GNUNET_SERVER_Handle *server, | ||
144 | const struct GNUNET_CONFIGURATION_Handle *c) | 150 | const struct GNUNET_CONFIGURATION_Handle *c) |
145 | { | 151 | { |
146 | GDS_cfg = c; | 152 | GDS_cfg = c; |
153 | GDS_server = server; | ||
154 | GNUNET_SERVER_suspend (server); | ||
147 | if (GNUNET_OK != | 155 | if (GNUNET_OK != |
148 | GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration)) | 156 | GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration)) |
149 | { | 157 | { |
@@ -155,7 +163,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
155 | GDS_NSE_init (); | 163 | GDS_NSE_init (); |
156 | GDS_DATACACHE_init (); | 164 | GDS_DATACACHE_init (); |
157 | GDS_HELLO_init (); | 165 | GDS_HELLO_init (); |
158 | GDS_CLIENTS_init (server); | ||
159 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) | 166 | if (GNUNET_OK != GDS_NEIGHBOURS_init ()) |
160 | { | 167 | { |
161 | shutdown_task (NULL); | 168 | shutdown_task (NULL); |