From aa189e94b593fd5679f328333a3aabef742d9d69 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 Jan 2017 16:37:48 +0100 Subject: add sanity check for GNUNET_MQ_notify_sent --- src/util/mq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util/mq.c') diff --git a/src/util/mq.c b/src/util/mq.c index 985e86331..d12f69e5f 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -811,12 +811,13 @@ GNUNET_MQ_assoc_remove (struct GNUNET_MQ_Handle *mq, * @param cb_cls closure for the callback */ void -GNUNET_MQ_notify_sent (struct GNUNET_MQ_Envelope *mqm, +GNUNET_MQ_notify_sent (struct GNUNET_MQ_Envelope *ev, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls) { - mqm->sent_cb = cb; - mqm->sent_cls = cb_cls; + GNUNET_assert (NULL == ev->sent_cb); + ev->sent_cb = cb; + ev->sent_cls = cb_cls; } -- cgit v1.2.3