aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.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/transport/plugin_transport_tcp.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/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 52ab4414f..b1c68acdf 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -957,11 +957,9 @@ tcp_plugin_query_keepalive_factor (void *cls)
957 * Session was idle for too long, so disconnect it 957 * Session was idle for too long, so disconnect it
958 * 958 *
959 * @param cls the `struct GNUNET_ATS_Session` of the idle session 959 * @param cls the `struct GNUNET_ATS_Session` of the idle session
960 * @param tc scheduler context
961 */ 960 */
962static void 961static void
963session_timeout (void *cls, 962session_timeout (void *cls)
964 const struct GNUNET_SCHEDULER_TaskContext *tc)
965{ 963{
966 struct GNUNET_ATS_Session *s = cls; 964 struct GNUNET_ATS_Session *s = cls;
967 struct GNUNET_TIME_Relative left; 965 struct GNUNET_TIME_Relative left;
@@ -1457,11 +1455,9 @@ session_lookup_it (void *cls,
1457 * Task cleaning up a NAT connection attempt after timeout 1455 * Task cleaning up a NAT connection attempt after timeout
1458 * 1456 *
1459 * @param cls the `struct GNUNET_ATS_Session` 1457 * @param cls the `struct GNUNET_ATS_Session`
1460 * @param tc scheduler context (unused)
1461 */ 1458 */
1462static void 1459static void
1463nat_connect_timeout (void *cls, 1460nat_connect_timeout (void *cls)
1464 const struct GNUNET_SCHEDULER_TaskContext *tc)
1465{ 1461{
1466 struct GNUNET_ATS_Session *session = cls; 1462 struct GNUNET_ATS_Session *session = cls;
1467 1463
@@ -1500,11 +1496,9 @@ tcp_plugin_update_session_timeout (void *cls,
1500 * receiving from the TCP client now. 1496 * receiving from the TCP client now.
1501 * 1497 *
1502 * @param cls the `struct GNUNET_ATS_Session *` 1498 * @param cls the `struct GNUNET_ATS_Session *`
1503 * @param tc task context (unused)
1504 */ 1499 */
1505static void 1500static void
1506delayed_done (void *cls, 1501delayed_done (void *cls)
1507 const struct GNUNET_SCHEDULER_TaskContext *tc)
1508{ 1502{
1509 struct GNUNET_ATS_Session *session = cls; 1503 struct GNUNET_ATS_Session *session = cls;
1510 1504