gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17442 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r17442 - gnunet/src/transport
Date: Thu, 13 Oct 2011 15:42:51 +0200

Author: wachs
Date: 2011-10-13 15:42:51 +0200 (Thu, 13 Oct 2011)
New Revision: 17442

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
removign ats from neighbour


Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-10-13 
13:27:06 UTC (rev 17441)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-10-13 
13:42:51 UTC (rev 17442)
@@ -193,7 +193,7 @@
   /**
    * Performance data for the peer.
    */
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  //struct GNUNET_TRANSPORT_ATS_Information *ats;
 
   /**
    * Are we currently trying to send a message? If so, which one?
@@ -257,7 +257,7 @@
   /**
    * Number of values in 'ats' array.
    */
-  unsigned int ats_count;
+  //unsigned int ats_count;
 
   /**
    * Are we already in the process of disconnecting this neighbour?
@@ -499,7 +499,6 @@
     GNUNET_SCHEDULER_cancel (n->transmission_task);
     n->transmission_task = GNUNET_SCHEDULER_NO_TASK;
   }
-  GNUNET_array_grow (n->ats, n->ats_count, 0);
   if (NULL != n->plugin_name)
   {
     GNUNET_free (n->plugin_name);
@@ -668,9 +667,6 @@
   memcpy (n->addr, address, address_len);
   n->addrlen = address_len;
   n->session = session;
-  GNUNET_array_grow (n->ats, n->ats_count, ats_count);
-  memcpy (n->ats, ats,
-          ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
   GNUNET_free_non_null (n->plugin_name);
   n->plugin_name = GNUNET_strdup (plugin_name);
   GNUNET_SCHEDULER_cancel (n->timeout_task);
@@ -694,7 +690,7 @@
   neighbours_connected++;
   GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1,
                             GNUNET_NO);
-  connect_notify_cb (callback_cls, peer, n->ats, n->ats_count);
+  connect_notify_cb (callback_cls, peer, ats, ats_count);
 }
 
 /**
@@ -812,12 +808,6 @@
       GNUNET_SCHEDULER_add_delayed 
(GNUNET_CONSTANTS_DISCONNECT_SESSION_TIMEOUT,
                                     &neighbour_timeout_task, n);
   /* try QUICKLY to re-establish a connection, reduce timeout! */
-  if (NULL != n->ats)
-  {
-    /* how can this be!? */
-    //GNUNET_break (0);
-    return;
-  }
   GNUNET_ATS_suggest_address (GST_ats, peer);
 }
 
@@ -1079,8 +1069,7 @@
   if (GNUNET_YES != n->is_connected)
     return GNUNET_OK;
 
-  GNUNET_assert (n->ats_count > 0);
-  ic->cb (ic->cb_cls, &n->id, n->ats, n->ats_count, n->plugin_name, n->addr, 
n->addrlen);
+  ic->cb (ic->cb_cls, &n->id, NULL, 0, n->plugin_name, n->addr, n->addrlen);
   return GNUNET_OK;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]