aboutsummaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-17 11:22:00 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-17 11:22:10 +0100
commitd0bb14e2a958f4f816c6c006dd8b7a979e6de289 (patch)
treeb69929ede9560daf5c298b4e3abe7e109f8daa05 /src/util/mq.c
parent9407ee77841b771e774d51eaa2916bceed047c86 (diff)
downloadgnunet-d0bb14e2a958f4f816c6c006dd8b7a979e6de289.tar.gz
gnunet-d0bb14e2a958f4f816c6c006dd8b7a979e6de289.zip
replace redundant MQ_NotifyCallback by SCHEDULER_TaskCallback
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index ae13ff601..985e86331 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -58,7 +58,7 @@ struct GNUNET_MQ_Envelope
58 /** 58 /**
59 * Called after the message was sent irrevocably. 59 * Called after the message was sent irrevocably.
60 */ 60 */
61 GNUNET_MQ_NotifyCallback sent_cb; 61 GNUNET_SCHEDULER_TaskCallback sent_cb;
62 62
63 /** 63 /**
64 * Closure for @e send_cb 64 * Closure for @e send_cb
@@ -128,10 +128,10 @@ struct GNUNET_MQ_Handle
128 void *error_handler_cls; 128 void *error_handler_cls;
129 129
130 /** 130 /**
131 * Task to asynchronously run #impl_send_continue(). 131 * Task to asynchronously run #impl_send_continue().
132 */ 132 */
133 struct GNUNET_SCHEDULER_Task *send_task; 133 struct GNUNET_SCHEDULER_Task *send_task;
134 134
135 /** 135 /**
136 * Linked list of messages pending to be sent 136 * Linked list of messages pending to be sent
137 */ 137 */
@@ -414,7 +414,7 @@ static void
414impl_send_continue (void *cls) 414impl_send_continue (void *cls)
415{ 415{
416 struct GNUNET_MQ_Handle *mq = cls; 416 struct GNUNET_MQ_Handle *mq = cls;
417 417
418 mq->send_task = NULL; 418 mq->send_task = NULL;
419 /* call is only valid if we're actually currently sending 419 /* call is only valid if we're actually currently sending
420 * a message */ 420 * a message */
@@ -441,8 +441,8 @@ void
441GNUNET_MQ_impl_send_continue (struct GNUNET_MQ_Handle *mq) 441GNUNET_MQ_impl_send_continue (struct GNUNET_MQ_Handle *mq)
442{ 442{
443 struct GNUNET_MQ_Envelope *current_envelope; 443 struct GNUNET_MQ_Envelope *current_envelope;
444 GNUNET_MQ_NotifyCallback cb; 444 GNUNET_SCHEDULER_TaskCallback cb;
445 445
446 GNUNET_assert (0 < mq->queue_length); 446 GNUNET_assert (0 < mq->queue_length);
447 mq->queue_length--; 447 mq->queue_length--;
448 mq->in_flight = GNUNET_NO; 448 mq->in_flight = GNUNET_NO;
@@ -456,7 +456,7 @@ GNUNET_MQ_impl_send_continue (struct GNUNET_MQ_Handle *mq)
456 { 456 {
457 current_envelope->sent_cb = NULL; 457 current_envelope->sent_cb = NULL;
458 cb (current_envelope->sent_cls); 458 cb (current_envelope->sent_cls);
459 } 459 }
460 GNUNET_free (current_envelope); 460 GNUNET_free (current_envelope);
461} 461}
462 462
@@ -475,8 +475,8 @@ void
475GNUNET_MQ_impl_send_in_flight (struct GNUNET_MQ_Handle *mq) 475GNUNET_MQ_impl_send_in_flight (struct GNUNET_MQ_Handle *mq)
476{ 476{
477 struct GNUNET_MQ_Envelope *current_envelope; 477 struct GNUNET_MQ_Envelope *current_envelope;
478 GNUNET_MQ_NotifyCallback cb; 478 GNUNET_SCHEDULER_TaskCallback cb;
479 479
480 mq->in_flight = GNUNET_YES; 480 mq->in_flight = GNUNET_YES;
481 /* call is only valid if we're actually currently sending 481 /* call is only valid if we're actually currently sending
482 * a message */ 482 * a message */
@@ -812,7 +812,7 @@ GNUNET_MQ_assoc_remove (struct GNUNET_MQ_Handle *mq,
812 */ 812 */
813void 813void
814GNUNET_MQ_notify_sent (struct GNUNET_MQ_Envelope *mqm, 814GNUNET_MQ_notify_sent (struct GNUNET_MQ_Envelope *mqm,
815 GNUNET_MQ_NotifyCallback cb, 815 GNUNET_SCHEDULER_TaskCallback cb,
816 void *cb_cls) 816 void *cb_cls)
817{ 817{
818 mqm->sent_cb = cb; 818 mqm->sent_cb = cb;
@@ -953,7 +953,7 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev)
953 953
954 GNUNET_assert (NULL != mq); 954 GNUNET_assert (NULL != mq);
955 GNUNET_assert (NULL != mq->cancel_impl); 955 GNUNET_assert (NULL != mq->cancel_impl);
956 956
957 mq->evacuate_called = GNUNET_NO; 957 mq->evacuate_called = GNUNET_NO;
958 958
959 if (mq->current_envelope == ev) 959 if (mq->current_envelope == ev)