more log messages
authorChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 20:13:27 +0000 (20:13 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 20:13:27 +0000 (20:13 +0000)
src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_neighbours.c

index c571277e291e6e6bfc92f5ff46402ff7df0a513f..2a97f8155a2745f5af5eabeea5bbbbe847ec0755 100644 (file)
@@ -295,10 +295,19 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
   /* FIXME: this should not be needed, and not sure it's good to have it, but without
      this connections seem to go extra-slow */
   if ((ats_count > 0) && (ats != NULL))
+  {
+    if (NULL != session)
+      GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+                      "transport-ats",
+                      "Giving ATS session %p of plugin %s for peer %s\n",
+                      session,
+                      plugin_name,
+                      GNUNET_i2s (peer));
     GNUNET_ATS_address_update (GST_ats, peer,
                                plugin_name, sender_address, sender_address_len,
                                session,
                                ats, ats_count);
+  }
 #endif
   return ret;
 }
@@ -347,6 +356,12 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
               "Session %X to peer `%s' ended \n",
               session, GNUNET_i2s (peer));
 #endif
+  if (NULL != session)
+    GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+                    "transport-ats",
+                    "Telling ATS to destroy session %p from peer %s\n",
+                    session,              
+                    GNUNET_i2s (peer));
   GNUNET_ATS_address_destroyed(GST_ats, peer, NULL, NULL, 0, session);
   GST_neighbours_session_terminated (peer, session);
 }
index db2dce5e768c1cc2e38e9594070bb8913ed90d9a..330991d04c27434ef3e152dfdbcd00cd32b80399 100644 (file)
@@ -647,6 +647,12 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
   n = lookup_neighbour (peer);
   if (NULL == n)
   {
+    if (NULL != session)
+      GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+                      "transport-ats",
+                      "Telling ATS to destroy session %p of peer %s\n",
+                      session,                
+                      GNUNET_i2s (peer));
     GNUNET_ATS_address_destroyed (GST_ats,
                                  peer,
                                  plugin_name, address,
@@ -801,6 +807,12 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
               "Session %X to peer `%s' ended \n",
               session, GNUNET_i2s (peer));
 #endif
+  if (NULL != session)
+    GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+                    "transport-ats",
+                    "Telling ATS to destroy session %p of peer %s\n",
+                    session,               
+                    GNUNET_i2s (peer));
   GNUNET_ATS_address_destroyed (GST_ats,
                                peer,
                                NULL, NULL, 0,
@@ -1203,6 +1215,13 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
     n = setup_neighbour (peer);
   if (ts.abs_value > n->connect_ts.abs_value)
   {
+    if (NULL != session)
+      GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+                      "transport-ats",
+                      "Giving ATS session %p of plugin %s for peer %s\n",
+                      session,
+                      plugin_name,
+                      GNUNET_i2s (peer));
     GNUNET_ATS_address_update (GST_ats,
                               peer,
                               plugin_name, sender_address, sender_address_len,