summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-11-23 15:10:10 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-11-23 15:10:10 +0000
commit68621a1c1481126790d308c97dda6981f17e8b9e (patch)
treedce8b9ae108420c6932af6d085ec15e1878ebc19 /src
parent012a2fb048225012e3f07461ba4aa1238e78392f (diff)
fix shutdown order + disable broadcast in testcase
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_udp.c26
-rw-r--r--src/transport/template_cfg_peer1.conf4
-rw-r--r--src/transport/template_cfg_peer2.conf4
-rw-r--r--src/transport/test_transport_api_udp_peer1.conf2
-rw-r--r--src/transport/test_transport_api_udp_peer2.conf1
5 files changed, 22 insertions, 15 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 9ad97449c..87ee25005 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -2335,16 +2335,6 @@ libgnunet_plugin_transport_udp_done (void *cls)
GNUNET_SCHEDULER_cancel (plugin->select_task);
plugin->select_task = GNUNET_SCHEDULER_NO_TASK;
}
- if (plugin->sockv4 != NULL)
- {
- GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (plugin->sockv4));
- plugin->sockv4 = NULL;
- }
- if (plugin->sockv6 != NULL)
- {
- GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (plugin->sockv6));
- plugin->sockv6 = NULL;
- }
if (plugin->broadcast_ipv4)
{
@@ -2377,10 +2367,6 @@ libgnunet_plugin_transport_udp_done (void *cls)
if ( GNUNET_NETWORK_socket_setsockopt( plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP, (char*) &multicastRequest, sizeof(multicastRequest)) == 0 )
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n");
-
- plugin->send_ipv6_broadcast_task =
- GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin);
- plugin->broadcast_ipv6 = GNUNET_YES;
}
else
GNUNET_log_strerror(GNUNET_ERROR_TYPE_ERROR, setsockopt);
@@ -2394,6 +2380,18 @@ libgnunet_plugin_transport_udp_done (void *cls)
GNUNET_SERVER_mst_destroy (plugin->broadcast_ipv6_mst);
}
+
+ if (plugin->sockv4 != NULL)
+ {
+ GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (plugin->sockv4));
+ plugin->sockv4 = NULL;
+ }
+ if (plugin->sockv6 != NULL)
+ {
+ GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (plugin->sockv6));
+ plugin->sockv6 = NULL;
+ }
+
GNUNET_SERVER_mst_destroy (plugin->mst);
GNUNET_NETWORK_fdset_destroy (plugin->rs);
diff --git a/src/transport/template_cfg_peer1.conf b/src/transport/template_cfg_peer1.conf
index 961c98b8f..8b6e04bd6 100644
--- a/src/transport/template_cfg_peer1.conf
+++ b/src/transport/template_cfg_peer1.conf
@@ -14,6 +14,9 @@ DISABLEV6 = NO
PORT = 12000
TIMEOUT = 5 s
+[transport-udp]
+BROADCAST = NO
+
[arm]
PORT = 12005
DEFAULTSERVICES = transport
@@ -32,6 +35,7 @@ PORT = 12002
UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
[transport]
+PREFIX = valgrind --leak-check=full
PORT = 12001
#DEBUG = YES
UNIXPATH = /tmp/gnunet-p1-service-transport.sock
diff --git a/src/transport/template_cfg_peer2.conf b/src/transport/template_cfg_peer2.conf
index e46f0b8a1..3706ffb25 100644
--- a/src/transport/template_cfg_peer2.conf
+++ b/src/transport/template_cfg_peer2.conf
@@ -14,6 +14,9 @@ DISABLEV6 = NO
PORT = 12100
TIMEOUT = 5 s
+[transport-udp]
+BROADCAST = NO
+
[arm]
PORT = 12014
DEFAULTSERVICES = transport
@@ -33,6 +36,7 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
TRUST = $SERVICEHOME/data/credit/
[transport]
+PREFIX = valgrind --leak-check=full
PORT = 12010
UNIXPATH = /tmp/gnunet-p2-service-transport.sock
diff --git a/src/transport/test_transport_api_udp_peer1.conf b/src/transport/test_transport_api_udp_peer1.conf
index f8b0ae47c..a1216e4aa 100644
--- a/src/transport/test_transport_api_udp_peer1.conf
+++ b/src/transport/test_transport_api_udp_peer1.conf
@@ -5,7 +5,7 @@ DEFAULTCONFIG = test_transport_api_udp_peer1.conf
[transport-udp]
PORT = 12040
-BROADCAST = YES
+BROADCAST = NO
BROADCAST_INTERVAL = 30000
MAX_BPS = 50000000
diff --git a/src/transport/test_transport_api_udp_peer2.conf b/src/transport/test_transport_api_udp_peer2.conf
index 751a15ae0..3e487a6bf 100644
--- a/src/transport/test_transport_api_udp_peer2.conf
+++ b/src/transport/test_transport_api_udp_peer2.conf
@@ -5,6 +5,7 @@ DEFAULTCONFIG = test_transport_api_udp_peer2.conf
[transport-udp]
PORT = 12050
+BROADCAST = NO
MAX_BPS = 50000000
[arm]