add sanity check for GNUNET_MQ_notify_sent
authorChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 15:37:48 +0000 (16:37 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 15:37:48 +0000 (16:37 +0100)
src/util/mq.c

index 985e8633120d815f55c33daf830e49289106e6d0..d12f69e5f4b954b6fd0e84be4784bc3363585882 100644 (file)
@@ -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;
 }