ev);
return;
}
+ GNUNET_assert (NULL == mq->envelope_head);
mq->current_envelope = ev;
mq->send_impl (mq,
ev->mh,
if (mq->current_envelope == ev)
{
- // complex case, we already started with transmitting
- // the message
+ /* complex case, we already started with transmitting
+ the message using the callbacks. */
GNUNET_assert (0 < mq->queue_length);
mq->queue_length--;
mq->cancel_impl (mq,
mq->impl_state);
- // continue sending the next message, if any
- if (NULL == mq->envelope_head)
+ /* continue sending the next message, if any */
+ mq->current_envelope = mq->envelope_head;
+ if (NULL != mq->current_envelope)
{
- mq->current_envelope = NULL;
- }
- else
- {
- mq->current_envelope = mq->envelope_head;
GNUNET_CONTAINER_DLL_remove (mq->envelope_head,
mq->envelope_tail,
mq->current_envelope);
}
else
{
- // simple case, message is still waiting in the queue
+ /* simple case, message is still waiting in the queue */
GNUNET_CONTAINER_DLL_remove (mq->envelope_head,
mq->envelope_tail,
ev);
GNUNET_assert (mst->off <= mst->pos);
GNUNET_assert (mst->pos <= mst->curr_buf);
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Server-mst receives %u bytes with %u bytes already in private buffer\n",
+ "MST receives %u bytes with %u bytes already in private buffer\n",
(unsigned int) size,
(unsigned int) (mst->pos - mst->off));
ret = GNUNET_OK;
}
if (mst->pos - mst->off < sizeof (struct GNUNET_MessageHeader))
{
- delta
+ delta
= GNUNET_MIN (sizeof (struct GNUNET_MessageHeader)
- (mst->pos - mst->off),
size);
if (one_shot == GNUNET_YES)
one_shot = GNUNET_SYSERR;
mst->off += want;
- if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
- hdr))
+ if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
+ hdr))
return GNUNET_SYSERR;
if (mst->off == mst->pos)
{