summaryrefslogtreecommitdiff
path: root/src/transport/transport_api_monitor_peers.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/transport/transport_api_monitor_peers.c
parent53cd5b8eda2fa8db86b0907a62a39598981d008a (diff)
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/transport/transport_api_monitor_peers.c')
-rw-r--r--src/transport/transport_api_monitor_peers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/transport_api_monitor_peers.c b/src/transport/transport_api_monitor_peers.c
index 611580f68..aaf1000f6 100644
--- a/src/transport/transport_api_monitor_peers.c
+++ b/src/transport/transport_api_monitor_peers.c
@@ -74,7 +74,7 @@ struct GNUNET_TRANSPORT_PeerMonitoringContext
/**
* Task ID for reconnect.
*/
- GNUNET_SCHEDULER_TaskIdentifier reconnect_task;
+ struct GNUNET_SCHEDULER_Task * reconnect_task;
/**
* Identity of the peer to monitor.
@@ -212,7 +212,7 @@ do_peer_connect (void *cls,
{
struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls;
- pal_ctx->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+ pal_ctx->reconnect_task = NULL;
pal_ctx->client = GNUNET_CLIENT_connect ("transport", pal_ctx->cfg);
GNUNET_assert (NULL != pal_ctx->client);
send_peer_mon_request (pal_ctx);
@@ -455,10 +455,10 @@ GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringCon
GNUNET_CLIENT_disconnect (pic->client);
pic->client = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != pic->reconnect_task)
+ if (NULL != pic->reconnect_task)
{
GNUNET_SCHEDULER_cancel (pic->reconnect_task);
- pic->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+ pic->reconnect_task = NULL;
}
GNUNET_free (pic);
}