-keep track of messages passed to mq
[oweals/gnunet.git] / src / sensor / test_gnunet-service-sensor_reporting.c
index acb0e7165f14f9009ac1003b28b5aec5b2037df6..d8302751ebae6c6331ae9f5758b58155595b903c 100644 (file)
@@ -1,6 +1,6 @@
   /*
    * This file is part of GNUnet.
-   * (C)
+   * Copyright (C)
    *
    * GNUnet is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
    *
    * You should have received a copy of the GNU General Public License
    * along with GNUnet; see the file COPYING.  If not, write to the
-   * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   * Boston, MA 02111-1307, USA.
+   * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   * Boston, MA 02110-1301, USA.
    */
 /**
  * @file sensor/test_gnunet-service-sensor_reporting.c
@@ -89,7 +89,7 @@ struct TestPeer
   /**
    * GNUNET scheduler task that forces the anomaly after a stabilization delay
    */
-  GNUNET_SCHEDULER_TaskIdentifier delay_task;
+  struct GNUNET_SCHEDULER_Task * delay_task;
 
 };
 
@@ -152,7 +152,7 @@ static struct GNUNET_PEERSTORE_Handle *peerstore;
 /**
  * Task used to shutdown / expire the test
  */
-static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
+static struct GNUNET_SCHEDULER_Task * shutdown_task;
 
 /**
  * Status of the test to be returned by main()
@@ -163,10 +163,10 @@ static int ok = 1;
 static void
 destroy_peer (struct TestPeer *peer)
 {
-  if (GNUNET_SCHEDULER_NO_TASK != peer->delay_task)
+  if (NULL != peer->delay_task)
   {
     GNUNET_SCHEDULER_cancel (peer->delay_task);
-    peer->delay_task = GNUNET_SCHEDULER_NO_TASK;
+    peer->delay_task = NULL;
   }
   if (NULL != peer->sensor_op)
   {
@@ -241,8 +241,9 @@ write_new_sensor_dir (struct TestPeer *cp_peer)
  * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop
  */
 static int
-peerstore_watch_cb (void *cls, struct GNUNET_PEERSTORE_Record *record,
-                    char *emsg)
+peerstore_watch_cb (void *cls,
+                    const struct GNUNET_PEERSTORE_Record *record,
+                    const char *emsg)
 {
   struct TestPeer *peer = cls;
   struct GNUNET_SENSOR_DashboardAnomalyEntry *anomaly;
@@ -279,7 +280,7 @@ force_anomaly_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct TestPeer *peer = cls;
 
-  peer->delay_task = GNUNET_SCHEDULER_NO_TASK;
+  peer->delay_task = NULL;
   GNUNET_SENSOR_force_anomaly (peer->sensor, (char *) sensor_name, GNUNET_YES,
                                NULL, NULL);
 }
@@ -480,7 +481,7 @@ peer_info_cb (void *cb_cls, struct GNUNET_TESTBED_Operation *op,
   peer = GNUNET_new (struct TestPeer);
 
   peer->testbed_peer = testbed_peer;
-  peer->delay_task = GNUNET_SCHEDULER_NO_TASK;
+  peer->delay_task = NULL;
   GNUNET_CRYPTO_get_peer_identity (pinfo->result.cfg, &peer->peer_id);
   if (NULL == peer_head)        /* First peer (collection point) */
   {