aboutsummaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index 90b2aa968..8d71359ac 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -357,6 +357,12 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
357 } 357 }
358 GNUNET_assert (NULL == mq->envelope_head); 358 GNUNET_assert (NULL == mq->envelope_head);
359 mq->current_envelope = ev; 359 mq->current_envelope = ev;
360
361 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
362 "mq: sending message of type %u, queue empty (MQ: %p)\n",
363 ntohs(ev->mh->type),
364 mq);
365
360 mq->send_impl (mq, 366 mq->send_impl (mq,
361 ev->mh, 367 ev->mh,
362 mq->impl_state); 368 mq->impl_state);
@@ -452,6 +458,11 @@ impl_send_continue (void *cls)
452 GNUNET_CONTAINER_DLL_remove (mq->envelope_head, 458 GNUNET_CONTAINER_DLL_remove (mq->envelope_head,
453 mq->envelope_tail, 459 mq->envelope_tail,
454 mq->current_envelope); 460 mq->current_envelope);
461
462 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
463 "mq: sending message of type %u from queue\n",
464 ntohs(mq->current_envelope->mh->type));
465
455 mq->send_impl (mq, 466 mq->send_impl (mq,
456 mq->current_envelope->mh, 467 mq->current_envelope->mh,
457 mq->impl_state); 468 mq->impl_state);
@@ -840,6 +851,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq)
840 ev); 851 ev);
841 GNUNET_assert (0 < mq->queue_length); 852 GNUNET_assert (0 < mq->queue_length);
842 mq->queue_length--; 853 mq->queue_length--;
854 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
855 "MQ destroy drops message of type %u\n",
856 ntohs (ev->mh->type));
843 GNUNET_MQ_discard (ev); 857 GNUNET_MQ_discard (ev);
844 } 858 }
845 if (NULL != mq->current_envelope) 859 if (NULL != mq->current_envelope)
@@ -847,6 +861,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq)
847 /* we can only discard envelopes that 861 /* we can only discard envelopes that
848 * are not queued! */ 862 * are not queued! */
849 mq->current_envelope->parent_queue = NULL; 863 mq->current_envelope->parent_queue = NULL;
864 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
865 "MQ destroy drops current message of type %u\n",
866 ntohs (mq->current_envelope->mh->type));
850 GNUNET_MQ_discard (mq->current_envelope); 867 GNUNET_MQ_discard (mq->current_envelope);
851 mq->current_envelope = NULL; 868 mq->current_envelope = NULL;
852 GNUNET_assert (0 < mq->queue_length); 869 GNUNET_assert (0 < mq->queue_length);
@@ -928,6 +945,11 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev)
928 GNUNET_CONTAINER_DLL_remove (mq->envelope_head, 945 GNUNET_CONTAINER_DLL_remove (mq->envelope_head,
929 mq->envelope_tail, 946 mq->envelope_tail,
930 mq->current_envelope); 947 mq->current_envelope);
948
949 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
950 "mq: sending canceled message of type %u queue\n",
951 ntohs(ev->mh->type));
952
931 mq->send_impl (mq, 953 mq->send_impl (mq,
932 mq->current_envelope->mh, 954 mq->current_envelope->mh,
933 mq->impl_state); 955 mq->impl_state);