pos = (const char *) cstate->msg;
len = ntohs (cstate->msg->size);
GNUNET_assert (cstate->msg_off < len);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: message of type %u trying to send with socket %p (MQ: %p\n",
- ntohs(cstate->msg->type),
- cstate->sock,
- cstate->mq);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "message of type %u trying to send with socket %p (MQ: %p\n",
+ ntohs(cstate->msg->type),
+ cstate->sock,
+ cstate->mq);
RETRY:
ret = GNUNET_NETWORK_socket_send (cstate->sock,
len - cstate->msg_off);
if (-1 == ret)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "client: error during sending message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Error during sending message of type %u\n",
+ ntohs(cstate->msg->type));
if (EINTR == errno){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: retrying message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Retrying message of type %u\n",
+ ntohs(cstate->msg->type));
goto RETRY;
}
GNUNET_MQ_inject_error (cstate->mq,
cstate->msg_off += ret;
if (cstate->msg_off < len)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: rescheduling message of type %u\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "rescheduling message of type %u\n",
+ ntohs(cstate->msg->type));
cstate->send_task
= GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
cstate->sock,
GNUNET_MQ_impl_send_in_flight (cstate->mq);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: sending message of type %u successful\n",
- ntohs(cstate->msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u successful\n",
+ ntohs(cstate->msg->type));
cstate->msg = NULL;
GNUNET_MQ_impl_send_continue (cstate->mq);
}
if (NULL != cstate->retry_task)
GNUNET_SCHEDULER_cancel (cstate->retry_task);
if (NULL != cstate->sock){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: destroying socket: %p\n",
- cstate->sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "destroying socket: %p\n",
+ cstate->sock);
GNUNET_NETWORK_socket_close (cstate->sock);
}
cancel_aps (cstate);
cstate->msg = msg;
cstate->msg_off = 0;
if (NULL == cstate->sock){
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "client: message of type %u waiting for socket\n",
- ntohs(msg->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "message of type %u waiting for socket\n",
+ ntohs(msg->type));
return; /* still waiting for connection */
}
cstate->send_task
GNUNET_assert (NULL == mq->envelope_head);
mq->current_envelope = ev;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending message of type %u, queue empty (MQ: %p)\n",
- ntohs(ev->mh->type),
- mq);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u, queue empty (MQ: %p)\n",
+ ntohs(ev->mh->type),
+ mq);
mq->send_impl (mq,
ev->mh,
mq->envelope_tail,
mq->current_envelope);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending message of type %u from queue\n",
- ntohs(mq->current_envelope->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending message of type %u from queue\n",
+ ntohs(mq->current_envelope->mh->type));
mq->send_impl (mq,
mq->current_envelope->mh,
ev);
GNUNET_assert (0 < mq->queue_length);
mq->queue_length--;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "MQ destroy drops message of type %u\n",
- ntohs (ev->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "MQ destroy drops message of type %u\n",
+ ntohs (ev->mh->type));
GNUNET_MQ_discard (ev);
}
if (NULL != mq->current_envelope)
/* we can only discard envelopes that
* are not queued! */
mq->current_envelope->parent_queue = NULL;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "MQ destroy drops current message of type %u\n",
- ntohs (mq->current_envelope->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "MQ destroy drops current message of type %u\n",
+ ntohs (mq->current_envelope->mh->type));
GNUNET_MQ_discard (mq->current_envelope);
mq->current_envelope = NULL;
GNUNET_assert (0 < mq->queue_length);
mq->envelope_tail,
mq->current_envelope);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "mq: sending canceled message of type %u queue\n",
- ntohs(ev->mh->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending canceled message of type %u queue\n",
+ ntohs(ev->mh->type));
mq->send_impl (mq,
mq->current_envelope->mh,
{
struct GNUNET_SCHEDULER_Task *pos;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "GNUNET_SCHEDULER_shutdown\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "GNUNET_SCHEDULER_shutdown\n");
if (NULL != install_parent_control_task)
{
GNUNET_SCHEDULER_cancel (install_parent_control_task);
* waiting for the timeout, so we handle this gracefully. It might
* also be a programming error in the driver though.
*/
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "GNUNET_SCHEDULER_do_work did not find any ready "
- "tasks and timeout has not been reached yet.\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "GNUNET_SCHEDULER_do_work did not find any ready "
+ "tasks and timeout has not been reached yet.\n");
return GNUNET_NO;
}
/**
}
if (GNUNET_YES == GNUNET_SCHEDULER_do_work (sh))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "scheduler has more tasks ready!\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "scheduler has more tasks ready!\n");
}
}
GNUNET_NETWORK_fdset_destroy (rs);