aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/gnunet-service-consensus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/consensus/gnunet-service-consensus.c')
-rw-r--r--src/consensus/gnunet-service-consensus.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 2659b939d..c6bf179c5 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -154,7 +154,7 @@ struct ConsensusSession
154 /** 154 /**
155 * Timeout task identifier for the current round or subround. 155 * Timeout task identifier for the current round or subround.
156 */ 156 */
157 GNUNET_SCHEDULER_TaskIdentifier round_timeout_tid; 157 struct GNUNET_SCHEDULER_Task * round_timeout_tid;
158 158
159 /** 159 /**
160 * Number of other peers in the consensus. 160 * Number of other peers in the consensus.
@@ -440,12 +440,12 @@ round_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
440 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%d: round over\n", session->local_peer_idx); 440 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%d: round over\n", session->local_peer_idx);
441 441
442 if (tc != NULL) 442 if (tc != NULL)
443 session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK; 443 session->round_timeout_tid = NULL;
444 444
445 if (session->round_timeout_tid != GNUNET_SCHEDULER_NO_TASK) 445 if (session->round_timeout_tid != NULL)
446 { 446 {
447 GNUNET_SCHEDULER_cancel (session->round_timeout_tid); 447 GNUNET_SCHEDULER_cancel (session->round_timeout_tid);
448 session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK; 448 session->round_timeout_tid = NULL;
449 } 449 }
450 450
451 for (i = 0; i < session->num_peers; i++) 451 for (i = 0; i < session->num_peers; i++)
@@ -726,16 +726,16 @@ subround_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
726 726
727 if (tc != NULL) 727 if (tc != NULL)
728 { 728 {
729 session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK; 729 session->round_timeout_tid = NULL;
730 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "P%u: consensus subround timed out\n", 730 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "P%u: consensus subround timed out\n",
731 session->local_peer_idx); 731 session->local_peer_idx);
732 } 732 }
733 733
734 /* cancel timeout */ 734 /* cancel timeout */
735 if (session->round_timeout_tid != GNUNET_SCHEDULER_NO_TASK) 735 if (session->round_timeout_tid != NULL)
736 { 736 {
737 GNUNET_SCHEDULER_cancel (session->round_timeout_tid); 737 GNUNET_SCHEDULER_cancel (session->round_timeout_tid);
738 session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK; 738 session->round_timeout_tid = NULL;
739 } 739 }
740 740
741 for (i = 0; i < session->num_peers; i++) 741 for (i = 0; i < session->num_peers; i++)