diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-01 10:17:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-01 10:17:14 +0200 |
commit | 3b16879d89a65d3f3b386be76d15954d5423d532 (patch) | |
tree | 9748e43809d0a4edcf3454984bb6fa3b165e7311 /src/util | |
parent | 544a4efee5239f4a8eb6b911bb7a6c78686d5c09 (diff) | |
parent | 87f924153ec9a8a14be030d634c57438db550cbf (diff) | |
download | gnunet-3b16879d89a65d3f3b386be76d15954d5423d532.tar.gz gnunet-3b16879d89a65d3f3b386be76d15954d5423d532.zip |
merge
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/mq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index af700836c..dbcce704d 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -578,11 +578,9 @@ void | |||
578 | GNUNET_MQ_set_handlers_closure (struct GNUNET_MQ_Handle *mq, | 578 | GNUNET_MQ_set_handlers_closure (struct GNUNET_MQ_Handle *mq, |
579 | void *handlers_cls) | 579 | void *handlers_cls) |
580 | { | 580 | { |
581 | unsigned int i; | ||
582 | |||
583 | if (NULL == mq->handlers) | 581 | if (NULL == mq->handlers) |
584 | return; | 582 | return; |
585 | for (i=0;NULL != mq->handlers[i].cb; i++) | 583 | for (unsigned int i=0;NULL != mq->handlers[i].cb; i++) |
586 | mq->handlers[i].cls = handlers_cls; | 584 | mq->handlers[i].cls = handlers_cls; |
587 | } | 585 | } |
588 | 586 | ||
@@ -782,7 +780,9 @@ GNUNET_MQ_notify_sent (struct GNUNET_MQ_Envelope *ev, | |||
782 | GNUNET_SCHEDULER_TaskCallback cb, | 780 | GNUNET_SCHEDULER_TaskCallback cb, |
783 | void *cb_cls) | 781 | void *cb_cls) |
784 | { | 782 | { |
785 | GNUNET_assert (NULL == ev->sent_cb); | 783 | /* allow setting *OR* clearing callback */ |
784 | GNUNET_assert ( (NULL == ev->sent_cb) || | ||
785 | (NULL == cb) ); | ||
786 | ev->sent_cb = cb; | 786 | ev->sent_cb = cb; |
787 | ev->sent_cls = cb_cls; | 787 | ev->sent_cls = cb_cls; |
788 | } | 788 | } |