diff options
author | t3sserakt <t3ss@posteo.de> | 2017-10-23 04:16:43 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2017-10-23 04:16:43 +0200 |
commit | b822e98f7ea722f7f0604bd9cef9aa436e7bab7d (patch) | |
tree | 841c0282637d7f319e666facab5adc54d69567f5 /src/util/client.c | |
parent | 6490b5f31e58e9ec008f8c5ceda28f6054f1bbba (diff) | |
download | gnunet-b822e98f7ea722f7f0604bd9cef9aa436e7bab7d.tar.gz gnunet-b822e98f7ea722f7f0604bd9cef9aa436e7bab7d.zip |
added logging
Diffstat (limited to 'src/util/client.c')
-rw-r--r-- | src/util/client.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/util/client.c b/src/util/client.c index 3d74bff33..90bc837d7 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -267,8 +267,13 @@ transmit_ready (void *cls) | |||
267 | len - cstate->msg_off); | 267 | len - cstate->msg_off); |
268 | if (-1 == ret) | 268 | if (-1 == ret) |
269 | { | 269 | { |
270 | if (EINTR == errno) | 270 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
271 | "client: error during sending message of type %u\n", ntohs(cstate->msg->type)); | ||
272 | if (EINTR == errno){ | ||
273 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
274 | "client: retrying message of type %u\n", ntohs(cstate->msg->type)); | ||
271 | goto RETRY; | 275 | goto RETRY; |
276 | } | ||
272 | GNUNET_MQ_inject_error (cstate->mq, | 277 | GNUNET_MQ_inject_error (cstate->mq, |
273 | GNUNET_MQ_ERROR_WRITE); | 278 | GNUNET_MQ_ERROR_WRITE); |
274 | return; | 279 | return; |
@@ -277,6 +282,8 @@ transmit_ready (void *cls) | |||
277 | cstate->msg_off += ret; | 282 | cstate->msg_off += ret; |
278 | if (cstate->msg_off < len) | 283 | if (cstate->msg_off < len) |
279 | { | 284 | { |
285 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
286 | "client: rescheduling message of type %u\n", ntohs(cstate->msg->type)); | ||
280 | cstate->send_task | 287 | cstate->send_task |
281 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 288 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
282 | cstate->sock, | 289 | cstate->sock, |
@@ -286,6 +293,8 @@ transmit_ready (void *cls) | |||
286 | GNUNET_MQ_impl_send_in_flight (cstate->mq); | 293 | GNUNET_MQ_impl_send_in_flight (cstate->mq); |
287 | return; | 294 | return; |
288 | } | 295 | } |
296 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
297 | "client: sending message of type %u successful\n", ntohs(cstate->msg->type)); | ||
289 | cstate->msg = NULL; | 298 | cstate->msg = NULL; |
290 | GNUNET_MQ_impl_send_continue (cstate->mq); | 299 | GNUNET_MQ_impl_send_continue (cstate->mq); |
291 | } | 300 | } |
@@ -794,8 +803,11 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq, | |||
794 | GNUNET_assert (NULL == cstate->send_task); | 803 | GNUNET_assert (NULL == cstate->send_task); |
795 | cstate->msg = msg; | 804 | cstate->msg = msg; |
796 | cstate->msg_off = 0; | 805 | cstate->msg_off = 0; |
797 | if (NULL == cstate->sock) | 806 | if (NULL == cstate->sock){ |
807 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
808 | "client: waiting for socket\n"); | ||
798 | return; /* still waiting for connection */ | 809 | return; /* still waiting for connection */ |
810 | } | ||
799 | cstate->send_task | 811 | cstate->send_task |
800 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 812 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
801 | cstate->sock, | 813 | cstate->sock, |