diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/Makefile.am | 24 | ||||
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 4 | ||||
-rw-r--r-- | src/transport/test_transport_api_timeout_bluetooth_peer1.conf | 35 | ||||
-rw-r--r-- | src/transport/test_transport_api_timeout_bluetooth_peer2.conf | 34 | ||||
-rw-r--r-- | src/transport/test_transport_api_timeout_wlan_peer1.conf | 35 | ||||
-rw-r--r-- | src/transport/test_transport_api_timeout_wlan_peer2.conf | 34 |
6 files changed, 166 insertions, 0 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index bb30e4cea..2e49b0cf0 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -53,6 +53,7 @@ if LINUX | |||
53 | WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la | 53 | WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la |
54 | WLAN_PLUGIN_TEST = test_plugin_wlan | 54 | WLAN_PLUGIN_TEST = test_plugin_wlan |
55 | WLAN_API_TEST = test_transport_api_wlan | 55 | WLAN_API_TEST = test_transport_api_wlan |
56 | WLAN_TIMEOUT_TEST = test_transport_api_timeout_wlan | ||
56 | WLAN_REL_TEST = test_transport_api_reliability_wlan | 57 | WLAN_REL_TEST = test_transport_api_reliability_wlan |
57 | WLAN_UREL_TEST = test_transport_api_unreliability_wlan | 58 | WLAN_UREL_TEST = test_transport_api_unreliability_wlan |
58 | WLAN_QUOTA_TEST = test_quota_compliance_wlan \ | 59 | WLAN_QUOTA_TEST = test_quota_compliance_wlan \ |
@@ -72,6 +73,7 @@ if HAVE_LIBBLUETOOTH | |||
72 | BT_PLUGIN_LA = libgnunet_plugin_transport_bluetooth.la | 73 | BT_PLUGIN_LA = libgnunet_plugin_transport_bluetooth.la |
73 | BT_PLUGIN_TEST = test_plugin_bluetooth | 74 | BT_PLUGIN_TEST = test_plugin_bluetooth |
74 | BT_API_TEST = test_transport_api_bluetooth | 75 | BT_API_TEST = test_transport_api_bluetooth |
76 | BT_TIMEOUT_TEST = test_transport_api_timeout_bluetooth | ||
75 | BT_REL_TEST = test_transport_api_reliability_bluetooth | 77 | BT_REL_TEST = test_transport_api_reliability_bluetooth |
76 | BT_UREL_TEST = test_transport_api_unreliability_bluetooth | 78 | BT_UREL_TEST = test_transport_api_unreliability_bluetooth |
77 | BT_QUOTA_TEST = test_quota_compliance_bluetooth \ | 79 | BT_QUOTA_TEST = test_quota_compliance_bluetooth \ |
@@ -398,7 +400,9 @@ check_PROGRAMS = \ | |||
398 | $(HTTPS_API_TEST) \ | 400 | $(HTTPS_API_TEST) \ |
399 | $(HTTPS_API_TIMEOUT_TEST) \ | 401 | $(HTTPS_API_TIMEOUT_TEST) \ |
400 | $(WLAN_API_TEST) \ | 402 | $(WLAN_API_TEST) \ |
403 | $(WLAN_TIMEOUT_TEST) \ | ||
401 | $(BT_API_TEST) \ | 404 | $(BT_API_TEST) \ |
405 | $(BT_TIMEOUT_TEST) \ | ||
402 | test_transport_api_multi \ | 406 | test_transport_api_multi \ |
403 | test_transport_blacklisting_no_bl \ | 407 | test_transport_blacklisting_no_bl \ |
404 | test_transport_blacklisting_outbound_bl_full \ | 408 | test_transport_blacklisting_outbound_bl_full \ |
@@ -786,6 +790,22 @@ test_transport_api_timeout_unix_LDADD = \ | |||
786 | $(top_builddir)/src/util/libgnunetutil.la \ | 790 | $(top_builddir)/src/util/libgnunetutil.la \ |
787 | $(top_builddir)/src/transport/libgnunettransporttesting.la | 791 | $(top_builddir)/src/transport/libgnunettransporttesting.la |
788 | 792 | ||
793 | test_transport_api_timeout_wlan_SOURCES = \ | ||
794 | test_transport_api_timeout.c | ||
795 | test_transport_api_timeout_wlan_LDADD = \ | ||
796 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
797 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
798 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
799 | $(top_builddir)/src/transport/libgnunettransporttesting.la | ||
800 | |||
801 | test_transport_api_timeout_bluetooth_SOURCES = \ | ||
802 | test_transport_api_timeout.c | ||
803 | test_transport_api_timeout_bluetooth_LDADD = \ | ||
804 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
805 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
806 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
807 | $(top_builddir)/src/transport/libgnunettransporttesting.la | ||
808 | |||
789 | test_transport_api_reliability_tcp_nat_SOURCES = \ | 809 | test_transport_api_reliability_tcp_nat_SOURCES = \ |
790 | test_transport_api_reliability.c | 810 | test_transport_api_reliability.c |
791 | test_transport_api_reliability_tcp_nat_LDADD = \ | 811 | test_transport_api_reliability_tcp_nat_LDADD = \ |
@@ -1155,6 +1175,10 @@ test_transport_api_unix_peer1.conf\ | |||
1155 | test_transport_api_unix_peer2.conf\ | 1175 | test_transport_api_unix_peer2.conf\ |
1156 | test_transport_api_timeout_unix_peer1.conf\ | 1176 | test_transport_api_timeout_unix_peer1.conf\ |
1157 | test_transport_api_timeout_unix_peer2.conf\ | 1177 | test_transport_api_timeout_unix_peer2.conf\ |
1178 | test_transport_api_timeout_wlan_peer1.conf \ | ||
1179 | test_transport_api_timeout_wlan_peer2.conf \ | ||
1180 | test_transport_api_timeout_bluetooth_peer1.conf\ | ||
1181 | test_transport_api_timeout_bluetooth_peer2.conf\ | ||
1158 | test_transport_api_unreliability_udp_peer1.conf\ | 1182 | test_transport_api_unreliability_udp_peer1.conf\ |
1159 | test_transport_api_unreliability_udp_peer2.conf\ | 1183 | test_transport_api_unreliability_udp_peer2.conf\ |
1160 | test_transport_api_unreliability_unix_peer1.conf\ | 1184 | test_transport_api_unreliability_unix_peer1.conf\ |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 212394248..6f5c66ad3 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1861,7 +1861,11 @@ wlan_plugin_update_session_timeout (void *cls, | |||
1861 | const struct GNUNET_PeerIdentity *peer, | 1861 | const struct GNUNET_PeerIdentity *peer, |
1862 | struct Session *session) | 1862 | struct Session *session) |
1863 | { | 1863 | { |
1864 | if (session->timeout_task != GNUNET_SCHEDULER_NO_TASK) | ||
1865 | GNUNET_SCHEDULER_cancel (session->timeout_task); | ||
1864 | 1866 | ||
1867 | session->timeout_task = GNUNET_SCHEDULER_add_delayed ( | ||
1868 | GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, &session_timeout, session); | ||
1865 | } | 1869 | } |
1866 | 1870 | ||
1867 | /** | 1871 | /** |
diff --git a/src/transport/test_transport_api_timeout_bluetooth_peer1.conf b/src/transport/test_transport_api_timeout_bluetooth_peer1.conf new file mode 100644 index 000000000..d63bca939 --- /dev/null +++ b/src/transport/test_transport_api_timeout_bluetooth_peer1.conf | |||
@@ -0,0 +1,35 @@ | |||
1 | @INLINE@ template_cfg_peer1.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-bluetooth-p1/ | ||
4 | |||
5 | [transport-bluetooth] | ||
6 | INTERFACE = hci0 | ||
7 | TESTMODE = 1 | ||
8 | |||
9 | [arm] | ||
10 | PORT = 12164 | ||
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock | ||
12 | |||
13 | [statistics] | ||
14 | PORT = 12163 | ||
15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock | ||
16 | |||
17 | [resolver] | ||
18 | PORT = 12162 | ||
19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock | ||
20 | |||
21 | [peerinfo] | ||
22 | PORT = 12161 | ||
23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock | ||
24 | |||
25 | [transport] | ||
26 | PORT = 12160 | ||
27 | PLUGINS = bluetooth | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock | ||
29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | ||
30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | ||
31 | #PREFIX = valgrind --leak-check=full --show-reachable=yes | ||
32 | #PREFIX = valgrind --leak-check=full | ||
33 | #PREFIX = valgrind --tool=massif | ||
34 | #PREFIX = gdbserver :2345 | ||
35 | |||
diff --git a/src/transport/test_transport_api_timeout_bluetooth_peer2.conf b/src/transport/test_transport_api_timeout_bluetooth_peer2.conf new file mode 100644 index 000000000..4a19cddf5 --- /dev/null +++ b/src/transport/test_transport_api_timeout_bluetooth_peer2.conf | |||
@@ -0,0 +1,34 @@ | |||
1 | @INLINE@ template_cfg_peer2.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-bluetooth-p2/ | ||
4 | |||
5 | [transport-bluetooth] | ||
6 | INTERFACE = hci1 | ||
7 | TESTMODE = 2 | ||
8 | |||
9 | [arm] | ||
10 | PORT = 12174 | ||
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock | ||
12 | |||
13 | [statistics] | ||
14 | PORT = 12173 | ||
15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock | ||
16 | |||
17 | [resolver] | ||
18 | PORT = 12172 | ||
19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock | ||
20 | |||
21 | [peerinfo] | ||
22 | PORT = 12171 | ||
23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock | ||
24 | |||
25 | [transport] | ||
26 | PORT = 12170 | ||
27 | PLUGINS = bluetooth | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock | ||
29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | ||
30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | ||
31 | #PREFIX = valgrind --leak-check=full --show-reachable=yes | ||
32 | #PREFIX = valgrind --leak-check=full | ||
33 | #PREFIX = valgrind --tool=massif | ||
34 | #PREFIX = gdbserver :2345 | ||
diff --git a/src/transport/test_transport_api_timeout_wlan_peer1.conf b/src/transport/test_transport_api_timeout_wlan_peer1.conf new file mode 100644 index 000000000..8b870f1d4 --- /dev/null +++ b/src/transport/test_transport_api_timeout_wlan_peer1.conf | |||
@@ -0,0 +1,35 @@ | |||
1 | @INLINE@ template_cfg_peer1.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-wlan-p1/ | ||
4 | |||
5 | [transport-wlan] | ||
6 | INTERFACE = mon0 | ||
7 | TESTMODE = 1 | ||
8 | |||
9 | [arm] | ||
10 | PORT = 12164 | ||
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock | ||
12 | |||
13 | [statistics] | ||
14 | PORT = 12163 | ||
15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock | ||
16 | |||
17 | [resolver] | ||
18 | PORT = 12162 | ||
19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock | ||
20 | |||
21 | [peerinfo] | ||
22 | PORT = 12161 | ||
23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock | ||
24 | |||
25 | [transport] | ||
26 | PORT = 12160 | ||
27 | PLUGINS = wlan | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock | ||
29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | ||
30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | ||
31 | #PREFIX = valgrind --leak-check=full --show-reachable=yes | ||
32 | #PREFIX = valgrind --leak-check=full | ||
33 | #PREFIX = valgrind --tool=massif | ||
34 | #PREFIX = gdbserver :2345 | ||
35 | |||
diff --git a/src/transport/test_transport_api_timeout_wlan_peer2.conf b/src/transport/test_transport_api_timeout_wlan_peer2.conf new file mode 100644 index 000000000..c32ce5ced --- /dev/null +++ b/src/transport/test_transport_api_timeout_wlan_peer2.conf | |||
@@ -0,0 +1,34 @@ | |||
1 | @INLINE@ template_cfg_peer2.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-wlan-p2/ | ||
4 | |||
5 | [transport-wlan] | ||
6 | INTERFACE = mon1 | ||
7 | TESTMODE = 2 | ||
8 | |||
9 | [arm] | ||
10 | PORT = 12174 | ||
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock | ||
12 | |||
13 | [statistics] | ||
14 | PORT = 12173 | ||
15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock | ||
16 | |||
17 | [resolver] | ||
18 | PORT = 12172 | ||
19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock | ||
20 | |||
21 | [peerinfo] | ||
22 | PORT = 12171 | ||
23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock | ||
24 | |||
25 | [transport] | ||
26 | PORT = 12170 | ||
27 | PLUGINS = wlan | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock | ||
29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | ||
30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | ||
31 | #PREFIX = valgrind --leak-check=full --show-reachable=yes | ||
32 | #PREFIX = valgrind --leak-check=full | ||
33 | #PREFIX = valgrind --tool=massif | ||
34 | #PREFIX = gdbserver :2345 | ||