-keep track of messages passed to mq
[oweals/gnunet.git] / src / sensor / gnunet-service-sensor_update.c
index aa7716f1c33b76ac41fb84117dbedfb0940de418..b2c8b21d40226646775f29aa95a8e352b940150a 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.
 */
 
 /**
@@ -168,7 +168,7 @@ static int updating;
 /**
  * GNUnet scheduler task that starts the update check process.
  */
-static GNUNET_SCHEDULER_TaskIdentifier update_task;
+static struct GNUNET_SCHEDULER_Task * update_task;
 
 /**
  * Pointer to service reset function called when we have new sensor updates.
@@ -237,10 +237,10 @@ SENSOR_update_stop ()
 
   up_default = NULL;
   up = up_head;
-  if (GNUNET_SCHEDULER_NO_TASK != update_task)
+  if (NULL != update_task)
   {
     GNUNET_SCHEDULER_cancel (update_task);
-    update_task = GNUNET_SCHEDULER_NO_TASK;
+    update_task = NULL;
   }
   while (NULL != up)
   {
@@ -390,7 +390,7 @@ check_for_updates (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct GNUNET_MessageHeader *msg;
   size_t msg_size;
 
-  update_task = GNUNET_SCHEDULER_NO_TASK;
+  update_task = NULL;
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
     return;
   if (GNUNET_YES == updating)
@@ -710,7 +710,7 @@ handle_sensor_full (void *cls, struct GNUNET_CADET_Channel *channel,
   {
     updating = GNUNET_NO;
     cleanup_updatepoint (up_default);
-    GNUNET_SCHEDULER_add_continuation (&reset, NULL, 0);
+    GNUNET_SCHEDULER_add_now (&reset, NULL);
   }
   else
     GNUNET_CADET_receive_done (channel);