summaryrefslogtreecommitdiff
path: root/src/transport/transport_api_monitor_plugins.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_plugins.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_plugins.c')
-rw-r--r--src/transport/transport_api_monitor_plugins.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/transport_api_monitor_plugins.c b/src/transport/transport_api_monitor_plugins.c
index 0c6cb9214..6ecee9c98 100644
--- a/src/transport/transport_api_monitor_plugins.c
+++ b/src/transport/transport_api_monitor_plugins.c
@@ -72,7 +72,7 @@ struct GNUNET_TRANSPORT_PluginMonitor
/**
* Task ID for reconnect.
*/
- GNUNET_SCHEDULER_TaskIdentifier reconnect_task;
+ struct GNUNET_SCHEDULER_Task * reconnect_task;
};
@@ -141,7 +141,7 @@ do_plugin_connect (void *cls,
{
struct GNUNET_TRANSPORT_PluginMonitor *pm = cls;
- pm->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+ pm->reconnect_task = NULL;
pm->client = GNUNET_CLIENT_connect ("transport", pm->cfg);
GNUNET_assert (NULL != pm->client);
send_plugin_mon_request (pm);
@@ -442,10 +442,10 @@ GNUNET_TRANSPORT_monitor_plugins_cancel (struct GNUNET_TRANSPORT_PluginMonitor *
GNUNET_CLIENT_disconnect (pm->client);
pm->client = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != pm->reconnect_task)
+ if (NULL != pm->reconnect_task)
{
GNUNET_SCHEDULER_cancel (pm->reconnect_task);
- pm->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+ pm->reconnect_task = NULL;
}
clear_map (pm);
GNUNET_CONTAINER_multihashmap32_destroy (pm->sessions);