gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17665 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r17665 - gnunet/src/core
Date: Sat, 22 Oct 2011 00:39:26 +0200

Author: grothoff
Date: 2011-10-22 00:39:26 +0200 (Sat, 22 Oct 2011)
New Revision: 17665

Modified:
   gnunet/src/core/gnunet-service-core_clients.c
   gnunet/src/core/gnunet-service-core_clients.h
   gnunet/src/core/gnunet-service-core_sessions.c
Log:
try to make sure to send connect on new neighbour even if tcnts are both empty

Modified: gnunet/src/core/gnunet-service-core_clients.c
===================================================================
--- gnunet/src/core/gnunet-service-core_clients.c       2011-10-21 21:53:56 UTC 
(rev 17664)
+++ gnunet/src/core/gnunet-service-core_clients.c       2011-10-21 22:39:26 UTC 
(rev 17665)
@@ -612,6 +612,7 @@
  * @param atsi_count number of entries in 'ats' array
  * @param tmap_old previous type map for the neighbour, NULL for disconnect
  * @param tmap_new updated type map for the neighbour, NULL for disconnect
+ * @param is_new GNUNET_YES if this is a completely new neighbour
  */
 void
 GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
@@ -619,7 +620,8 @@
                                           const struct GNUNET_ATS_Information 
*atsi,
                                           unsigned int atsi_count,
                                           const struct GSC_TypeMap *tmap_old,
-                                          const struct GSC_TypeMap *tmap_new)
+                                          const struct GSC_TypeMap *tmap_new,
+                                          int is_new)
 {
   struct ConnectNotifyMessage *cnm;
   size_t size;
@@ -639,6 +641,8 @@
     if (tmap_old != NULL)
       old_match = GNUNET_YES;
   }
+  if (GNUNET_YES == is_new)
+    old_match = GNUNET_NO;
   if (old_match == new_match)
     return; /* no change */
   if (old_match == GNUNET_NO)
@@ -706,7 +710,8 @@
   for (c = client_head; c != NULL; c = c->next)
     GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, atsi,
                                               atsi_count, 
-                                              tmap_old, tmap_new);
+                                              tmap_old, tmap_new,
+                                              GNUNET_NO);
 }
 
 

Modified: gnunet/src/core/gnunet-service-core_clients.h
===================================================================
--- gnunet/src/core/gnunet-service-core_clients.h       2011-10-21 21:53:56 UTC 
(rev 17664)
+++ gnunet/src/core/gnunet-service-core_clients.h       2011-10-21 22:39:26 UTC 
(rev 17665)
@@ -56,6 +56,7 @@
  * @param atsi_count number of entries in 'ats' array
  * @param tmap_old previous type map for the neighbour, NULL for disconnect
  * @param tmap_new updated type map for the neighbour, NULL for disconnect
+ * @param is_new GNUNET_YES if this is a completely new neighbour
  */
 void
 GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
@@ -63,7 +64,8 @@
                                           const struct GNUNET_ATS_Information 
*atsi,
                                           unsigned int atsi_count,
                                           const struct GSC_TypeMap *tmap_old,
-                                          const struct GSC_TypeMap *tmap_new);
+                                          const struct GSC_TypeMap *tmap_new,
+                                          int is_new);
 
 
 /**

Modified: gnunet/src/core/gnunet-service-core_sessions.c
===================================================================
--- gnunet/src/core/gnunet-service-core_sessions.c      2011-10-21 21:53:56 UTC 
(rev 17664)
+++ gnunet/src/core/gnunet-service-core_sessions.c      2011-10-21 22:39:26 UTC 
(rev 17665)
@@ -256,7 +256,8 @@
                                             &session->peer,
                                             NULL, 0, /* FIXME: ATS!? */
                                             NULL, /* old TMAP: none */
-                                            session->tmap);
+                                            session->tmap,
+                                            GNUNET_YES);
   return GNUNET_OK;
 }
 




reply via email to

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