aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
commit29e6158507a0758192075ac6ece7ba8e75ddc49a (patch)
treeb91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/set/gnunet-service-set.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
downloadgnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz
gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/set/gnunet-service-set.c')
-rw-r--r--src/set/gnunet-service-set.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 4b65fd737..e9555928a 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -1713,8 +1713,7 @@ handle_client_accept (void *cls,
1713 * @param tc context information (why was this task triggered now) 1713 * @param tc context information (why was this task triggered now)
1714 */ 1714 */
1715static void 1715static void
1716shutdown_task (void *cls, 1716shutdown_task (void *cls)
1717 const struct GNUNET_SCHEDULER_TaskContext *tc)
1718{ 1717{
1719 while (NULL != incoming_head) 1718 while (NULL != incoming_head)
1720 incoming_destroy (incoming_head); 1719 incoming_destroy (incoming_head);
@@ -1747,13 +1746,14 @@ shutdown_task (void *cls,
1747 * @param tc context information (why was this task triggered now) 1746 * @param tc context information (why was this task triggered now)
1748 */ 1747 */
1749static void 1748static void
1750incoming_timeout_cb (void *cls, 1749incoming_timeout_cb (void *cls)
1751 const struct GNUNET_SCHEDULER_TaskContext *tc)
1752{ 1750{
1753 struct Operation *incoming = cls; 1751 struct Operation *incoming = cls;
1752 const struct GNUNET_SCHEDULER_TaskContext *tc;
1754 1753
1755 incoming->timeout_task = NULL; 1754 incoming->timeout_task = NULL;
1756 GNUNET_assert (GNUNET_YES == incoming->is_incoming); 1755 GNUNET_assert (GNUNET_YES == incoming->is_incoming);
1756 tc = GNUNET_SCHEDULER_get_task_context ();
1757 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1757 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
1758 return; 1758 return;
1759 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1759 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,