-keep track of messages passed to mq
[oweals/gnunet.git] / src / sensor / sensor_util_lib_crypto.c
index 41cba199154522474825ba1be08aea14e4e6d941..0586879c76ab7216e0b24ca8335605e970678cbf 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.
 */
 
 /**
@@ -65,7 +65,7 @@ struct GNUNET_SENSOR_crypto_pow_context
   /**
    * Task that calculates the proof-of-work
    */
-  GNUNET_SCHEDULER_TaskIdentifier calculate_pow_task;
+  struct GNUNET_SCHEDULER_Task * calculate_pow_task;
 
   /**
    * Size of msg (allocated after this struct)
@@ -157,7 +157,7 @@ calculate_pow (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                  cx->matching_bits))
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, "Found pow %" PRIu64 ".\n", cx->pow);
-    cx->calculate_pow_task = GNUNET_SCHEDULER_NO_TASK;
+    cx->calculate_pow_task = NULL;
     result_block =
         GNUNET_malloc (sizeof (struct GNUNET_SENSOR_crypto_pow_block) +
                        cx->msg_size);
@@ -197,10 +197,10 @@ void
 GNUNET_SENSOR_crypto_pow_sign_cancel (struct GNUNET_SENSOR_crypto_pow_context
                                       *cx)
 {
-  if (GNUNET_SCHEDULER_NO_TASK != cx->calculate_pow_task)
+  if (NULL != cx->calculate_pow_task)
   {
     GNUNET_SCHEDULER_cancel (cx->calculate_pow_task);
-    cx->calculate_pow_task = GNUNET_SCHEDULER_NO_TASK;
+    cx->calculate_pow_task = NULL;
   }
   GNUNET_free (cx);
   cx = NULL;