gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r36584 - gnunet/src/transport
Date: Mon, 26 Oct 2015 16:59:32 +0100

Author: grothoff
Date: 2015-10-26 16:59:32 +0100 (Mon, 26 Oct 2015)
New Revision: 36584

Modified:
   gnunet/src/transport/gnunet-service-transport_ats.c
   gnunet/src/transport/transport_api.c
Log:
never pass addresses for ourselves to ATS

Modified: gnunet/src/transport/gnunet-service-transport_ats.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_ats.c 2015-10-26 15:16:47 UTC 
(rev 36583)
+++ gnunet/src/transport/gnunet-service-transport_ats.c 2015-10-26 15:59:32 UTC 
(rev 36584)
@@ -332,6 +332,11 @@
 {
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   ai = find_ai (address,
                 session);
   if (NULL == ai)
@@ -399,6 +404,11 @@
 {
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   ai = find_ai (address, session);
   if (NULL == ai)
   {
@@ -429,6 +439,12 @@
   struct GNUNET_ATS_AddressRecord *ar;
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
+
   /* Sanity checks for a valid inbound address */
   if (NULL == address->transport_name)
   {
@@ -487,6 +503,11 @@
   struct GNUNET_ATS_AddressRecord *ar;
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   /* validadte address */
   if (NULL == address->transport_name)
   {
@@ -537,6 +558,11 @@
 {
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   ai = find_ai (address, NULL);
   if (NULL == ai)
   {
@@ -615,6 +641,11 @@
 {
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   if (NULL == session)
   {
     GNUNET_break (0);
@@ -828,6 +859,11 @@
 {
   struct AddressInfo *ai;
 
+  if (0 ==
+      memcmp (&GST_my_identity,
+              &address->peer,
+              sizeof (struct GNUNET_PeerIdentity)))
+    return; /* our own, ignore! */
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Address %s of peer %s expired\n",
        GST_plugins_a2s (address),

Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c        2015-10-26 15:16:47 UTC (rev 
36583)
+++ gnunet/src/transport/transport_api.c        2015-10-26 15:59:32 UTC (rev 
36584)
@@ -990,7 +990,8 @@
     if (th->notify_size + sizeof (struct OutboundMessage) > size)
       break;                    /* does not fit */
     if (GNUNET_BANDWIDTH_tracker_get_delay
-        (&n->out_tracker, th->notify_size).rel_value_us > 0)
+        (&n->out_tracker,
+         th->notify_size).rel_value_us > 0)
       break;                    /* too early */
     GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap));
     n->hn = NULL;




reply via email to

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