aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
commitf1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch)
tree3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/revocation/gnunet-service-revocation.c
parent53cd5b8eda2fa8db86b0907a62a39598981d008a (diff)
downloadgnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.tar.gz
gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.zip
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r--src/revocation/gnunet-service-revocation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 8e5f554ed..ab4069dab 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -68,7 +68,7 @@ struct PeerEntry
68 /** 68 /**
69 * Tasked used to trigger the set union operation. 69 * Tasked used to trigger the set union operation.
70 */ 70 */
71 GNUNET_SCHEDULER_TaskIdentifier transmit_task; 71 struct GNUNET_SCHEDULER_Task * transmit_task;
72 72
73 /** 73 /**
74 * Handle to active set union operation (over revocation sets). 74 * Handle to active set union operation (over revocation sets).
@@ -468,7 +468,7 @@ transmit_task_cb (void *cls,
468 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 468 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
469 "Starting set exchange with peer `%s'\n", 469 "Starting set exchange with peer `%s'\n",
470 GNUNET_i2s (&peer_entry->id)); 470 GNUNET_i2s (&peer_entry->id));
471 peer_entry->transmit_task = GNUNET_SCHEDULER_NO_TASK; 471 peer_entry->transmit_task = NULL;
472 peer_entry->so = GNUNET_SET_prepare (&peer_entry->id, 472 peer_entry->so = GNUNET_SET_prepare (&peer_entry->id,
473 &revocation_set_union_app_id, 473 &revocation_set_union_app_id,
474 NULL, 474 NULL,
@@ -570,10 +570,10 @@ handle_core_disconnect (void *cls,
570 GNUNET_CONTAINER_multipeermap_remove (peers, peer, 570 GNUNET_CONTAINER_multipeermap_remove (peers, peer,
571 pos)); 571 pos));
572 GNUNET_MQ_destroy (pos->mq); 572 GNUNET_MQ_destroy (pos->mq);
573 if (pos->transmit_task != GNUNET_SCHEDULER_NO_TASK) 573 if (pos->transmit_task != NULL)
574 { 574 {
575 GNUNET_SCHEDULER_cancel (pos->transmit_task); 575 GNUNET_SCHEDULER_cancel (pos->transmit_task);
576 pos->transmit_task = GNUNET_SCHEDULER_NO_TASK; 576 pos->transmit_task = NULL;
577 } 577 }
578 if (NULL != pos->so) 578 if (NULL != pos->so)
579 { 579 {