gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r26321 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r26321 - gnunet/src/dht
Date: Tue, 5 Mar 2013 14:39:28 +0100

Author: bartpolot
Date: 2013-03-05 14:39:28 +0100 (Tue, 05 Mar 2013)
New Revision: 26321

Modified:
   gnunet/src/dht/gnunet-service-dht_neighbours.c
Log:
- dont offer hellos if not going to use them

Modified: gnunet/src/dht/gnunet-service-dht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_neighbours.c      2013-03-05 13:36:34 UTC 
(rev 26320)
+++ gnunet/src/dht/gnunet-service-dht_neighbours.c      2013-03-05 13:39:28 UTC 
(rev 26321)
@@ -1975,17 +1975,16 @@
       GNUNET_break_op (0);
       return GNUNET_YES;
     }
-    if (0 != memcmp (&my_identity, &pid, sizeof (struct GNUNET_PeerIdentity)))
+    if ((GNUNET_YES != disable_try_connect) &&
+        0 != memcmp (&my_identity, &pid, sizeof (struct GNUNET_PeerIdentity)))
     {
       bucket = find_bucket (&pid.hashPubKey);
-      if ((bucket >= 0) && (k_buckets[bucket].peers_size < bucket_size))
+      if ((bucket >= 0) &&
+          (k_buckets[bucket].peers_size < bucket_size) &&
+          (NULL != GDS_transport_handle))
       {
-        if (NULL != GDS_transport_handle)
-        {
-          GNUNET_TRANSPORT_offer_hello (GDS_transport_handle, h, NULL, NULL);
-          if (GNUNET_YES != disable_try_connect)
-            GNUNET_TRANSPORT_try_connect (GDS_transport_handle, &pid, NULL, 
NULL); /*FIXME TRY_CONNECT change */
-        }
+        GNUNET_TRANSPORT_offer_hello (GDS_transport_handle, h, NULL, NULL);
+        GNUNET_TRANSPORT_try_connect (GDS_transport_handle, &pid, NULL, NULL); 
/*FIXME TRY_CONNECT change */
       }
     }
   }




reply via email to

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