fixing mantis 2101
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 26 Jan 2012 14:53:22 +0000 (14:53 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 26 Jan 2012 14:53:22 +0000 (14:53 +0000)
src/transport/gnunet-service-transport_neighbours.c

index b6718218d59574e6d18d13cb2803e3b64540b2cd..d66285146a94c283b0d542b8bd266e32c06c77d2 100644 (file)
@@ -63,8 +63,7 @@
 
 #define SETUP_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
 
-
-#define  TEST_NEW_CODE GNUNET_YES
+#define  TEST_NEW_CODE GNUNET_NO
 
 /**
  * Entry in neighbours.
@@ -1539,12 +1538,12 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
       n->address = NULL;
       return GNUNET_NO;
     }
-    else
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Obtained new session %p for peer `%s' and  address '%s'\n",
-                  n->session, GNUNET_i2s (&n->id), GST_plugins_a2s (n->address));
-    }
+
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Obtained new session %p for peer `%s' and  address '%s'\n",
+                 n->session, GNUNET_i2s (&n->id), GST_plugins_a2s (n->address));
+    /* Telling ATS about new session */
+    GNUNET_ATS_address_update (GST_ats, n->address, n->session, NULL, 0);
   }
   else
   {