diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-22 12:45:49 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-22 12:45:49 +0900 |
commit | eeded1180f04913c9c324ca04e32234c6a920304 (patch) | |
tree | 3cc24962a09a46feba03ad72dcf6abee00a461ad /src/zonemaster/gnunet-service-zonemaster.c | |
parent | ce203bca7c3c0bf5ea440ee1597897c05c30c7ff (diff) | |
download | gnunet-eeded1180f04913c9c324ca04e32234c6a920304.tar.gz gnunet-eeded1180f04913c9c324ca04e32234c6a920304.zip |
-fix queue
Diffstat (limited to 'src/zonemaster/gnunet-service-zonemaster.c')
-rw-r--r-- | src/zonemaster/gnunet-service-zonemaster.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c index 220cf1f99..cbb448518 100644 --- a/src/zonemaster/gnunet-service-zonemaster.c +++ b/src/zonemaster/gnunet-service-zonemaster.c | |||
@@ -247,16 +247,6 @@ static struct GNUNET_NAMESTORE_Handle *namestore_handle; | |||
247 | static struct GNUNET_NAMESTORE_ZoneMonitor *zmon; | 247 | static struct GNUNET_NAMESTORE_ZoneMonitor *zmon; |
248 | 248 | ||
249 | /** | 249 | /** |
250 | * Head of monitor activities; kept in a DLL. | ||
251 | */ | ||
252 | static struct DhtPutActivity *ma_head; | ||
253 | |||
254 | /** | ||
255 | * Tail of monitor activities; kept in a DLL. | ||
256 | */ | ||
257 | static struct DhtPutActivity *ma_tail; | ||
258 | |||
259 | /** | ||
260 | * Our handle to the namecache service | 250 | * Our handle to the namecache service |
261 | */ | 251 | */ |
262 | static struct GNUNET_NAMECACHE_Handle *namecache; | 252 | static struct GNUNET_NAMECACHE_Handle *namecache; |
@@ -268,11 +258,6 @@ static struct GNUNET_NAMECACHE_Handle *namecache; | |||
268 | static int disable_namecache; | 258 | static int disable_namecache; |
269 | 259 | ||
270 | /** | 260 | /** |
271 | * Number of entries in the DHT queue #ma_head. | ||
272 | */ | ||
273 | static unsigned int ma_queue_length; | ||
274 | |||
275 | /** | ||
276 | * Handle to iterate over our authoritative zone in namestore | 261 | * Handle to iterate over our authoritative zone in namestore |
277 | */ | 262 | */ |
278 | static struct GNUNET_NAMESTORE_ZoneIterator *namestore_iter; | 263 | static struct GNUNET_NAMESTORE_ZoneIterator *namestore_iter; |
@@ -448,23 +433,12 @@ shutdown_task (void *cls) | |||
448 | { | 433 | { |
449 | if (NULL != ma->ph) | 434 | if (NULL != ma->ph) |
450 | GNUNET_DHT_put_cancel (ma->ph); | 435 | GNUNET_DHT_put_cancel (ma->ph); |
451 | dht_queue_length--; | ||
452 | GNUNET_CONTAINER_DLL_remove (it_head, | 436 | GNUNET_CONTAINER_DLL_remove (it_head, |
453 | it_tail, | 437 | it_tail, |
454 | ma); | 438 | ma); |
455 | dht_queue_length--; | 439 | dht_queue_length--; |
456 | GNUNET_free (ma); | 440 | GNUNET_free (ma); |
457 | } | 441 | } |
458 | while (NULL != (ma = ma_head)) | ||
459 | { | ||
460 | if (NULL != ma->ph) | ||
461 | GNUNET_DHT_put_cancel (ma->ph); | ||
462 | ma_queue_length--; | ||
463 | GNUNET_CONTAINER_DLL_remove (ma_head, | ||
464 | ma_tail, | ||
465 | ma); | ||
466 | GNUNET_free (ma); | ||
467 | } | ||
468 | if (NULL != statistics) | 442 | if (NULL != statistics) |
469 | { | 443 | { |
470 | GNUNET_STATISTICS_destroy (statistics, | 444 | GNUNET_STATISTICS_destroy (statistics, |
@@ -1263,10 +1237,10 @@ handle_monitor_event (void *cls, | |||
1263 | ma); | 1237 | ma); |
1264 | GNUNET_NAMESTORE_zone_monitor_next (zmon, | 1238 | GNUNET_NAMESTORE_zone_monitor_next (zmon, |
1265 | 1); | 1239 | 1); |
1266 | GNUNET_CONTAINER_DLL_insert_tail (ma_head, | 1240 | GNUNET_CONTAINER_DLL_insert_tail (it_head, |
1267 | ma_tail, | 1241 | it_tail, |
1268 | ma); | 1242 | ma); |
1269 | ma_queue_length++; | 1243 | dht_queue_length++; |
1270 | } | 1244 | } |
1271 | 1245 | ||
1272 | 1246 | ||