- fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 15 Jun 2012 15:28:11 +0000 (15:28 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 15 Jun 2012 15:28:11 +0000 (15:28 +0000)
src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_neighbours.c

index 974ecf288bd043689ad02ad0c9511882d5befed7..1714229b53d1f7bf46c267be1a3c3105193eb328 100644 (file)
@@ -341,7 +341,7 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
   struct GNUNET_HELLO_Address address;
 
   GNUNET_assert (strlen (transport_name) > 0);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Session %X to peer `%s' ended \n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Session %p to peer `%s' ended \n",
               session, GNUNET_i2s (peer));
   if (NULL != session)
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
index 2f413290e8a8e1d4cdeb4c4596d9590d6f7967a6..44b9338adeeb1d15f8aa32e71b705757490d158e 100644 (file)
@@ -2200,6 +2200,11 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
                     address, session, ats, ats_count);    
     break;
   case S_CONNECT_RECV_BLACKLIST_INBOUND:
+    n->timeout = GNUNET_TIME_relative_to_absolute (BLACKLIST_RESPONSE_TIMEOUT);
+    check_blacklist (&n->id,
+                     n->connect_ack_timestamp,
+                     address, session, ats, ats_count);
+    break;
   case S_CONNECT_RECV_BLACKLIST:
   case S_CONNECT_RECV_ACK:
     /* ATS asks us to switch while we were trying to connect; switch to new
@@ -2595,6 +2600,11 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
                           ++neighbours_connected,
                           GNUNET_NO);
     connect_notify_cb (callback_cls, &n->id, ats, ats_count);
+    /* Tell ATS that the outbound session we created to send CONNECT was successfull */
+    GNUNET_ATS_address_add(GST_ats,
+                           n->primary_address.address,
+                           n->primary_address.session,
+                           ats, ats_count);
     set_address (&n->primary_address,
                 n->primary_address.address,
                 n->primary_address.session,
@@ -2712,7 +2722,6 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
   }
 
   n->expect_latency_response = GNUNET_NO;
-
   switch (n->state)
   {
   case S_NOT_CONNECTED: