From 4d80dc1d5536ad26d19c69d920dcffe84d93cf07 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 18 Dec 2013 15:19:37 +0000 Subject: [PATCH] tests and session timeout for bt --- src/transport/Makefile.am | 2 ++ src/transport/plugin_transport_bluetooth.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 2e49b0cf0..e6ecf4ffe 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -464,7 +464,9 @@ TESTS = \ $(HTTPS_API_TEST) \ $(HTTPS_API_TIMEOUT_TEST) \ $(WLAN_API_TEST) \ + $(WLAN_TIMEOUT_TEST) \ $(BT_API_TEST) \ + $(BT_TIMEOUT_TEST) \ test_transport_api_multi \ test_transport_blacklisting_no_bl \ test_transport_blacklisting_outbound_bl_full \ diff --git a/src/transport/plugin_transport_bluetooth.c b/src/transport/plugin_transport_bluetooth.c index 621a880e1..51e8a89bd 100644 --- a/src/transport/plugin_transport_bluetooth.c +++ b/src/transport/plugin_transport_bluetooth.c @@ -1804,7 +1804,10 @@ bluetooth_plugin_update_session_timeout (void *cls, const struct GNUNET_PeerIdentity *peer, struct Session *session) { - + if (GNUNET_SCHEDULER_NO_TASK != session->timeout_task) + GNUNET_SCHEDULER_cancel (session->timeout_task); + session->timeout_task = GNUNET_SCHEDULER_add_delayed ( + GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, &session_timeout, session); } -- 2.25.1