diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-18 15:19:37 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-18 15:19:37 +0000 |
commit | 4d80dc1d5536ad26d19c69d920dcffe84d93cf07 (patch) | |
tree | 93a32cb5576a707f1742dbd9263417ad76305eab /src | |
parent | ea34d2bd85d17841962d50177b1f35ae158ab3ec (diff) |
tests and session timeout for bt
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/Makefile.am | 2 | ||||
-rw-r--r-- | src/transport/plugin_transport_bluetooth.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 2e49b0cf03..e6ecf4ffe0 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 621a880e1c..51e8a89bd2 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); } |