aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core_clients.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-21 22:39:26 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-21 22:39:26 +0000
commit16b954786d5a14360c7f974f3554e041e3f32ed1 (patch)
tree4268583f8333ca54ce7f530d72c56b1e4745c304 /src/core/gnunet-service-core_clients.c
parentddc17ac9517141ce9b342ddbb10c87ed328da01b (diff)
downloadgnunet-16b954786d5a14360c7f974f3554e041e3f32ed1.tar.gz
gnunet-16b954786d5a14360c7f974f3554e041e3f32ed1.zip
try to make sure to send connect on new neighbour even if tcnts are both empty
Diffstat (limited to 'src/core/gnunet-service-core_clients.c')
-rw-r--r--src/core/gnunet-service-core_clients.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index c37f5bafc..ec286a888 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -612,6 +612,7 @@ GSC_CLIENTS_reject_request (struct GSC_ClientActiveRequest *car)
612 * @param atsi_count number of entries in 'ats' array 612 * @param atsi_count number of entries in 'ats' array
613 * @param tmap_old previous type map for the neighbour, NULL for disconnect 613 * @param tmap_old previous type map for the neighbour, NULL for disconnect
614 * @param tmap_new updated type map for the neighbour, NULL for disconnect 614 * @param tmap_new updated type map for the neighbour, NULL for disconnect
615 * @param is_new GNUNET_YES if this is a completely new neighbour
615 */ 616 */
616void 617void
617GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, 618GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
@@ -619,7 +620,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
619 const struct GNUNET_ATS_Information *atsi, 620 const struct GNUNET_ATS_Information *atsi,
620 unsigned int atsi_count, 621 unsigned int atsi_count,
621 const struct GSC_TypeMap *tmap_old, 622 const struct GSC_TypeMap *tmap_old,
622 const struct GSC_TypeMap *tmap_new) 623 const struct GSC_TypeMap *tmap_new,
624 int is_new)
623{ 625{
624 struct ConnectNotifyMessage *cnm; 626 struct ConnectNotifyMessage *cnm;
625 size_t size; 627 size_t size;
@@ -639,6 +641,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
639 if (tmap_old != NULL) 641 if (tmap_old != NULL)
640 old_match = GNUNET_YES; 642 old_match = GNUNET_YES;
641 } 643 }
644 if (GNUNET_YES == is_new)
645 old_match = GNUNET_NO;
642 if (old_match == new_match) 646 if (old_match == new_match)
643 return; /* no change */ 647 return; /* no change */
644 if (old_match == GNUNET_NO) 648 if (old_match == GNUNET_NO)
@@ -706,7 +710,8 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *ne
706 for (c = client_head; c != NULL; c = c->next) 710 for (c = client_head; c != NULL; c = c->next)
707 GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, atsi, 711 GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, atsi,
708 atsi_count, 712 atsi_count,
709 tmap_old, tmap_new); 713 tmap_old, tmap_new,
714 GNUNET_NO);
710} 715}
711 716
712 717