fix break
[oweals/gnunet.git] / src / ats / test_ats_api_performance.c
index 7ecf42b90ed68e6b346168f518f68a2e94b43993..99231aa89e4869b509e23b84ac619138369037da 100644 (file)
@@ -366,7 +366,7 @@ void all_addresses_cb (void *cls,
       }
     }
     if (0 == memcmp (&address->peer, &p[1].id,
-                     sizeof (struct GNUNET_PeerIdentity)));
+                     sizeof (struct GNUNET_PeerIdentity)))
     {
         if (0 == strcmp(address->address, p1_addresses[0].addr))
         {
@@ -465,26 +465,24 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
   static int suggest_p1 = GNUNET_NO;
   static int running = GNUNET_NO;
 
-  if (0 == memcmp (&address->peer, &p[0].id,
-                   sizeof (struct GNUNET_PeerIdentity)))
+  if ((GNUNET_NO == suggest_p0) && (0 == memcmp (&address->peer, &p[0].id,
+                   sizeof (struct GNUNET_PeerIdentity))))
   {
     suggest_p0 = GNUNET_YES;;
 
     if (s_ha[0] != NULL)
       GNUNET_free (s_ha[0]);
     s_ha[0] = GNUNET_HELLO_address_copy (address);
-
     GNUNET_ATS_suggest_address_cancel (atsh, &p[0].id);
   }
-  if (0 == memcmp (&address->peer, &p[1].id,
-                   sizeof (struct GNUNET_PeerIdentity)))
+  if ((GNUNET_NO == suggest_p1) && (0 == memcmp (&address->peer, &p[1].id,
+                   sizeof (struct GNUNET_PeerIdentity))))
   {
     suggest_p1 = GNUNET_YES;
 
     if (s_ha[1] != NULL)
       GNUNET_free (s_ha[1]);
     s_ha[1] = GNUNET_HELLO_address_copy (address);
-
     GNUNET_ATS_suggest_address_cancel (atsh, &p[1].id);
   }