aboutsummaryrefslogtreecommitdiff
path: root/src/fragmentation/fragmentation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fragmentation/fragmentation.c')
-rw-r--r--src/fragmentation/fragmentation.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c
index bf7491815..a72bda4ce 100644
--- a/src/fragmentation/fragmentation.c
+++ b/src/fragmentation/fragmentation.c
@@ -98,7 +98,7 @@ struct GNUNET_FRAGMENT_Context
98 /** 98 /**
99 * Task performing work for the fragmenter. 99 * Task performing work for the fragmenter.
100 */ 100 */
101 GNUNET_SCHEDULER_TaskIdentifier task; 101 struct GNUNET_SCHEDULER_Task * task;
102 102
103 /** 103 /**
104 * Our fragmentation ID. (chosen at random) 104 * Our fragmentation ID. (chosen at random)
@@ -157,7 +157,7 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
157 size_t fsize; 157 size_t fsize;
158 int wrap; 158 int wrap;
159 159
160 fc->task = GNUNET_SCHEDULER_NO_TASK; 160 fc->task = NULL;
161 GNUNET_assert (GNUNET_NO == fc->proc_busy); 161 GNUNET_assert (GNUNET_NO == fc->proc_busy);
162 if (0 == fc->acks) 162 if (0 == fc->acks)
163 return; /* all done */ 163 return; /* all done */
@@ -323,7 +323,7 @@ GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc)
323{ 323{
324 GNUNET_assert (fc->proc_busy == GNUNET_YES); 324 GNUNET_assert (fc->proc_busy == GNUNET_YES);
325 fc->proc_busy = GNUNET_NO; 325 fc->proc_busy = GNUNET_NO;
326 GNUNET_assert (fc->task == GNUNET_SCHEDULER_NO_TASK); 326 GNUNET_assert (fc->task == NULL);
327 fc->task = 327 fc->task =
328 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining 328 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
329 (fc->delay_until), &transmit_next, fc); 329 (fc->delay_until), &transmit_next, fc);
@@ -415,7 +415,7 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
415 if (0 != fc->acks) 415 if (0 != fc->acks)
416 { 416 {
417 /* more to transmit, do so right now (if tracker permits...) */ 417 /* more to transmit, do so right now (if tracker permits...) */
418 if (fc->task != GNUNET_SCHEDULER_NO_TASK) 418 if (fc->task != NULL)
419 { 419 {
420 /* schedule next transmission now, no point in waiting... */ 420 /* schedule next transmission now, no point in waiting... */
421 GNUNET_SCHEDULER_cancel (fc->task); 421 GNUNET_SCHEDULER_cancel (fc->task);
@@ -434,10 +434,10 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
434 GNUNET_STATISTICS_update (fc->stats, 434 GNUNET_STATISTICS_update (fc->stats,
435 _("# fragmentation transmissions completed"), 1, 435 _("# fragmentation transmissions completed"), 1,
436 GNUNET_NO); 436 GNUNET_NO);
437 if (fc->task != GNUNET_SCHEDULER_NO_TASK) 437 if (fc->task != NULL)
438 { 438 {
439 GNUNET_SCHEDULER_cancel (fc->task); 439 GNUNET_SCHEDULER_cancel (fc->task);
440 fc->task = GNUNET_SCHEDULER_NO_TASK; 440 fc->task = NULL;
441 } 441 }
442 return GNUNET_OK; 442 return GNUNET_OK;
443} 443}
@@ -458,7 +458,7 @@ GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc,
458 struct GNUNET_TIME_Relative *msg_delay, 458 struct GNUNET_TIME_Relative *msg_delay,
459 struct GNUNET_TIME_Relative *ack_delay) 459 struct GNUNET_TIME_Relative *ack_delay)
460{ 460{
461 if (fc->task != GNUNET_SCHEDULER_NO_TASK) 461 if (fc->task != NULL)
462 GNUNET_SCHEDULER_cancel (fc->task); 462 GNUNET_SCHEDULER_cancel (fc->task);
463 if (NULL != ack_delay) 463 if (NULL != ack_delay)
464 *ack_delay = fc->ack_delay; 464 *ack_delay = fc->ack_delay;