fixing 1891
authorChristian Grothoff <christian@grothoff.org>
Mon, 14 Nov 2011 16:30:25 +0000 (16:30 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 14 Nov 2011 16:30:25 +0000 (16:30 +0000)
src/transport/gnunet-service-transport.c

index 7fd4760ef6511336f5256cdf8a7b38db845daa4d..0b21812de910dccc07205264d4a057d19414dfcb 100644 (file)
@@ -333,6 +333,7 @@ static void
 plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
                         struct Session *session)
 {
+  const char *transport_name = cls;
   struct GNUNET_HELLO_Address address;
 
 #if DEBUG_TRANSPORT
@@ -347,9 +348,9 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
   address.peer = *peer;
   address.address = NULL;
   address.address_length = 0;
-  address.transport_name = cls;
-  GNUNET_ATS_address_destroyed (GST_ats, &address, session);
+  address.transport_name = transport_name;
   GST_neighbours_session_terminated (peer, session);
+  GNUNET_ATS_address_destroyed (GST_ats, &address, session);
 }