summaryrefslogtreecommitdiff
path: root/src/backend/anastasis-httpd_truth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/anastasis-httpd_truth.c')
-rw-r--r--src/backend/anastasis-httpd_truth.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/backend/anastasis-httpd_truth.c b/src/backend/anastasis-httpd_truth.c
index aa3011b..df105dd 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -230,11 +230,6 @@ static struct GetContext *gc_head;
static struct GetContext *gc_tail;
/**
- * Heap for processing timeouts of requests.
- */
-static struct GNUNET_CONTAINER_Heap *to_heap;
-
-/**
* Task running #do_timeout().
*/
static struct GNUNET_SCHEDULER_Task *to_task;
@@ -253,7 +248,7 @@ do_timeout (void *cls)
(void) cls;
to_task = NULL;
while (NULL !=
- (gc = GNUNET_CONTAINER_heap_peek (to_heap)))
+ (gc = GNUNET_CONTAINER_heap_peek (AH_to_heap)))
{
if (GNUNET_TIME_absolute_is_future (gc->timeout))
break;
@@ -269,7 +264,7 @@ do_timeout (void *cls)
GNUNET_assert (NULL != gc->hn);
gc->hn = NULL;
GNUNET_assert (gc ==
- GNUNET_CONTAINER_heap_remove_root (to_heap));
+ GNUNET_CONTAINER_heap_remove_root (AH_to_heap));
}
if (NULL == gc)
return;
@@ -336,11 +331,6 @@ AH_truth_shutdown (void)
GNUNET_SCHEDULER_cancel (to_task);
to_task = NULL;
}
- if (NULL != to_heap)
- {
- GNUNET_CONTAINER_heap_destroy (to_heap);
- to_heap = NULL;
- }
}
@@ -931,10 +921,10 @@ run_authorization_process (struct MHD_Connection *connection,
return MHD_YES;
case ANASTASIS_AUTHORIZATION_RES_SUSPENDED:
/* connection was suspended */
- if (NULL == to_heap)
- to_heap = GNUNET_CONTAINER_heap_create (
+ if (NULL == AH_to_heap)
+ AH_to_heap = GNUNET_CONTAINER_heap_create (
GNUNET_CONTAINER_HEAP_ORDER_MIN);
- gc->hn = GNUNET_CONTAINER_heap_insert (to_heap,
+ gc->hn = GNUNET_CONTAINER_heap_insert (AH_to_heap,
gc,
gc->timeout.abs_value_us);
gc->suspended = true;
@@ -946,7 +936,7 @@ run_authorization_process (struct MHD_Connection *connection,
{
struct GetContext *rn;
- rn = GNUNET_CONTAINER_heap_peek (to_heap);
+ rn = GNUNET_CONTAINER_heap_peek (AH_to_heap);
to_task = GNUNET_SCHEDULER_add_at (rn->timeout,
&do_timeout,
NULL);