- while (NULL != (pml = cl->pending_head) )
- {
- msize = ntohs (pml->msg->size);
- if (size < msize)
- break;
- GNUNET_CONTAINER_DLL_remove (cl->pending_head,
- cl->pending_tail,
- pml);
-#if DEBUG_SERVER_NC
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Copying message of type %u and size %u from pending queue to transmission buffer\n",
- ntohs (pml->msg->type),
- msize);
-#endif
- memcpy (&cbuf[ret], pml->msg, msize);
- ret += msize;
- size -= msize;
- GNUNET_free (pml);
- cl->num_pending--;
- }
- if (pml != NULL)
- {
-#if DEBUG_SERVER_NC
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Have %u messages left in NC queue, will try transmission again\n",
- cl->num_pending);
-#endif
- cl->th = GNUNET_SERVER_notify_transmit_ready (cl->client,
- ntohs (pml->msg->size),
- GNUNET_TIME_UNIT_FOREVER_REL,
- &transmit_message,
- cl);
- }
+ while (NULL != (pml = cl->pending_head))
+ {
+ msize = ntohs (pml->msg->size);
+ if (size < msize)
+ break;
+ GNUNET_CONTAINER_DLL_remove (cl->pending_head,
+ cl->pending_tail,
+ pml);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Copying message of type %u and size %u from pending queue to transmission buffer\n",
+ ntohs (pml->msg->type),
+ msize);
+ memcpy (&cbuf[ret], pml->msg, msize);
+ ret += msize;
+ size -= msize;
+ GNUNET_free (pml);
+ cl->num_pending--;
+ }
+ if (NULL != pml)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Have %u messages left in NC queue, will try transmission again\n",
+ cl->num_pending);
+ cl->th =
+ GNUNET_SERVER_notify_transmit_ready (cl->client,
+ ntohs (pml->msg->size),
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &transmit_message, cl);
+ }