separate update and full results
[oweals/gnunet.git] / src / ats / test_ats_solver_request_and_delete_address.c
index d502d56babbe54778ffc2793265d94a2c5eab80f..05a045e3bc1ef01176386eb903715fd1003f6bd4 100644 (file)
@@ -131,7 +131,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 static void
-address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
+address_suggest_cb (void *cls,
+                    const struct GNUNET_PeerIdentity *peer,
+                    const struct GNUNET_HELLO_Address *address,
                     struct Session *session,
                     struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                     struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
@@ -159,10 +161,10 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
     /* Expecting disconnect */
 
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-        "Received sugggestion for peer `%s': %llu %llu\n",
-        GNUNET_i2s (&address->peer),
-        ntohl(bandwidth_in.value__),
-        ntohl(bandwidth_out.value__));
+                "Received sugggestion for peer `%s': %u %u\n",
+                GNUNET_i2s (&address->peer),
+                (unsigned int) ntohl (bandwidth_in.value__),
+                (unsigned int) ntohl (bandwidth_out.value__));
 
     if ((ntohl(bandwidth_in.value__) == 0) &&
         (ntohl(bandwidth_out.value__) == 0))
@@ -184,7 +186,7 @@ stat_cb(void *cls, const char *subsystem,
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ATS statistics: `%s' `%s' %llu\n",
       subsystem,name, value);
   if (GNUNET_NO == address_deleted)
-    GNUNET_ATS_suggest_address (sched_ats, &p.id);
+    GNUNET_ATS_suggest_address (sched_ats, &p.id, NULL, NULL);
   return GNUNET_OK;
 }
 
@@ -207,14 +209,7 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
   }
 
   /* Set up peer */
-  if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string(PEERID0, &p.id.hashPubKey))
-  {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n");
-      GNUNET_SCHEDULER_add_now (&end_badly, NULL);
-      return;
-  }
-  GNUNET_assert (0 == strcmp (PEERID0, GNUNET_i2s_full (&p.id)));
-
+  memset (&p.id, '1', sizeof (p.id));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created peer `%s'\n",
               GNUNET_i2s_full(&p.id));