summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-25 21:28:06 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-25 21:28:06 +0000
commit31f3749379e9e12ea0468eabaab650ca3f7a3e1f (patch)
treec4c7a64bc980124d17be2ed230104e54240f06cd /src
parent4939e6e943f7480ebc9d5c23b6cc3251e8a42286 (diff)
fix shutdown order to destroy sessions first, fix logic failure with respect to bi-directional transports like UNIX
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 5126dad96..b21b0c384 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -732,11 +732,15 @@ plugin_env_session_start (void *cls,
session,
GNUNET_i2s (&address->peer),
GST_plugins_a2s (address));
- if (GNUNET_YES ==
- GNUNET_HELLO_address_check_option (address,
- GNUNET_HELLO_ADDRESS_INFO_INBOUND))
+ if ( (GNUNET_YES ==
+ GNUNET_HELLO_address_check_option (address,
+ GNUNET_HELLO_ADDRESS_INFO_INBOUND)) ||
+ (GNUNET_NO ==
+ GST_ats_is_known (address, session) ) )
{
- /* inbound is always new */
+ /* inbound is always new, but outbound MAY already be known, but
+ for example for UNIX, we have symmetric connections and thus we
+ may not know the address yet; add if necessary! */
GST_ats_add_address (address,
session,
ats,
@@ -744,7 +748,6 @@ plugin_env_session_start (void *cls,
}
else
{
- /* outbound should already be known */
GST_ats_new_session (address,
session);
GST_ats_update_metrics (address,
@@ -923,8 +926,8 @@ shutdown_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GST_neighbours_stop ();
- GST_validation_stop ();
GST_plugins_unload ();
+ GST_validation_stop ();
GST_ats_done ();
GNUNET_ATS_scheduling_done (GST_ats);
GST_ats = NULL;