another assertion, possible fix to 1840
authorChristian Grothoff <christian@grothoff.org>
Sun, 23 Oct 2011 14:15:52 +0000 (14:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 23 Oct 2011 14:15:52 +0000 (14:15 +0000)
src/core/gnunet-service-core_clients.c
src/core/gnunet-service-core_sessions.c

index ccc76f765685577204ecc282e31c6bc779494238..5cdac7d81118861529ba8c7e82d4dc4db1e6ddd1 100644 (file)
@@ -669,7 +669,12 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
   old_match = GSC_TYPEMAP_test_match (tmap_old, client->types, client->tcnt);
   new_match = GSC_TYPEMAP_test_match (tmap_new, client->types, client->tcnt);
   if (old_match == new_match)
+  {
+    GNUNET_assert (old_match ==
+                  GNUNET_CONTAINER_multihashmap_contains (client->connectmap,
+                                                          &neighbour->hashPubKey));
     return; /* no change */
+  }
   if (old_match == GNUNET_NO)
   {
     /* send connect */  
index f159da2056cd1dae834009de2505a68eba69d770..db3bc532b69292d30d3e198d28df19a15a6ee6d7 100644 (file)
@@ -271,6 +271,10 @@ GSC_SESSIONS_create (const struct GNUNET_PeerIdentity *peer,
                         gettext_noop ("# entries in session map"),
                         GNUNET_CONTAINER_multihashmap_size (sessions), 
                         GNUNET_NO);
+  GSC_CLIENTS_notify_clients_about_neighbour (peer,
+                                             NULL, 0 /* FIXME: ATSI */,
+                                             NULL,
+                                             session->tmap);
 }