aboutsummaryrefslogtreecommitdiff
path: root/src/sensor/sensor_util_lib_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensor/sensor_util_lib_crypto.c')
-rw-r--r--src/sensor/sensor_util_lib_crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sensor/sensor_util_lib_crypto.c b/src/sensor/sensor_util_lib_crypto.c
index 41cba1991..154b7667c 100644
--- a/src/sensor/sensor_util_lib_crypto.c
+++ b/src/sensor/sensor_util_lib_crypto.c
@@ -65,7 +65,7 @@ struct GNUNET_SENSOR_crypto_pow_context
65 /** 65 /**
66 * Task that calculates the proof-of-work 66 * Task that calculates the proof-of-work
67 */ 67 */
68 GNUNET_SCHEDULER_TaskIdentifier calculate_pow_task; 68 struct GNUNET_SCHEDULER_Task * calculate_pow_task;
69 69
70 /** 70 /**
71 * Size of msg (allocated after this struct) 71 * Size of msg (allocated after this struct)
@@ -157,7 +157,7 @@ calculate_pow (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
157 cx->matching_bits)) 157 cx->matching_bits))
158 { 158 {
159 LOG (GNUNET_ERROR_TYPE_DEBUG, "Found pow %" PRIu64 ".\n", cx->pow); 159 LOG (GNUNET_ERROR_TYPE_DEBUG, "Found pow %" PRIu64 ".\n", cx->pow);
160 cx->calculate_pow_task = GNUNET_SCHEDULER_NO_TASK; 160 cx->calculate_pow_task = NULL;
161 result_block = 161 result_block =
162 GNUNET_malloc (sizeof (struct GNUNET_SENSOR_crypto_pow_block) + 162 GNUNET_malloc (sizeof (struct GNUNET_SENSOR_crypto_pow_block) +
163 cx->msg_size); 163 cx->msg_size);
@@ -197,10 +197,10 @@ void
197GNUNET_SENSOR_crypto_pow_sign_cancel (struct GNUNET_SENSOR_crypto_pow_context 197GNUNET_SENSOR_crypto_pow_sign_cancel (struct GNUNET_SENSOR_crypto_pow_context
198 *cx) 198 *cx)
199{ 199{
200 if (GNUNET_SCHEDULER_NO_TASK != cx->calculate_pow_task) 200 if (NULL != cx->calculate_pow_task)
201 { 201 {
202 GNUNET_SCHEDULER_cancel (cx->calculate_pow_task); 202 GNUNET_SCHEDULER_cancel (cx->calculate_pow_task);
203 cx->calculate_pow_task = GNUNET_SCHEDULER_NO_TASK; 203 cx->calculate_pow_task = NULL;
204 } 204 }
205 GNUNET_free (cx); 205 GNUNET_free (cx);
206 cx = NULL; 206 cx = NULL;