aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster/gnunet-service-zonemaster.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-10-22 12:45:49 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-10-22 12:45:49 +0900
commiteeded1180f04913c9c324ca04e32234c6a920304 (patch)
tree3cc24962a09a46feba03ad72dcf6abee00a461ad /src/zonemaster/gnunet-service-zonemaster.c
parentce203bca7c3c0bf5ea440ee1597897c05c30c7ff (diff)
downloadgnunet-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.c32
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;
247static struct GNUNET_NAMESTORE_ZoneMonitor *zmon; 247static struct GNUNET_NAMESTORE_ZoneMonitor *zmon;
248 248
249/** 249/**
250 * Head of monitor activities; kept in a DLL.
251 */
252static struct DhtPutActivity *ma_head;
253
254/**
255 * Tail of monitor activities; kept in a DLL.
256 */
257static struct DhtPutActivity *ma_tail;
258
259/**
260 * Our handle to the namecache service 250 * Our handle to the namecache service
261 */ 251 */
262static struct GNUNET_NAMECACHE_Handle *namecache; 252static struct GNUNET_NAMECACHE_Handle *namecache;
@@ -268,11 +258,6 @@ static struct GNUNET_NAMECACHE_Handle *namecache;
268static int disable_namecache; 258static int disable_namecache;
269 259
270/** 260/**
271 * Number of entries in the DHT queue #ma_head.
272 */
273static 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 */
278static struct GNUNET_NAMESTORE_ZoneIterator *namestore_iter; 263static 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