aboutsummaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2017-11-08 20:07:06 +0100
committert3sserakt <t3ss@posteo.de>2017-11-08 20:07:06 +0100
commit12997f9148d918c434a4c4bae1549b250a78cac0 (patch)
treed4e2915ffb69c047db0a8b9365f52dd5cdfd2348 /src/util/client.c
parentbf2169967b3c5a4a553c133a00dd7d35289f7a9d (diff)
downloadgnunet-12997f9148d918c434a4c4bae1549b250a78cac0.tar.gz
gnunet-12997f9148d918c434a4c4bae1549b250a78cac0.zip
changed log levels
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c43
1 files changed, 27 insertions, 16 deletions
diff --git a/src/util/client.c b/src/util/client.c
index a5eae2a75..19ab67f0a 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -261,19 +261,25 @@ transmit_ready (void *cls)
261 pos = (const char *) cstate->msg; 261 pos = (const char *) cstate->msg;
262 len = ntohs (cstate->msg->size); 262 len = ntohs (cstate->msg->size);
263 GNUNET_assert (cstate->msg_off < len); 263 GNUNET_assert (cstate->msg_off < len);
264 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
265 "client: message of type %u trying to send with socket %p\n", ntohs(cstate->msg->type), cstate->sock); 265 "client: message of type %u trying to send with socket %p (MQ: %p\n",
266 ntohs(cstate->msg->type),
267 cstate->sock,
268 cstate->mq);
269
266 RETRY: 270 RETRY:
267 ret = GNUNET_NETWORK_socket_send (cstate->sock, 271 ret = GNUNET_NETWORK_socket_send (cstate->sock,
268 &pos[cstate->msg_off], 272 &pos[cstate->msg_off],
269 len - cstate->msg_off); 273 len - cstate->msg_off);
270 if (-1 == ret) 274 if (-1 == ret)
271 { 275 {
272 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 276 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
273 "client: error during sending message of type %u\n", ntohs(cstate->msg->type)); 277 "client: error during sending message of type %u\n",
278 ntohs(cstate->msg->type));
274 if (EINTR == errno){ 279 if (EINTR == errno){
275 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 280 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
276 "client: retrying message of type %u\n", ntohs(cstate->msg->type)); 281 "client: retrying message of type %u\n",
282 ntohs(cstate->msg->type));
277 goto RETRY; 283 goto RETRY;
278 } 284 }
279 GNUNET_MQ_inject_error (cstate->mq, 285 GNUNET_MQ_inject_error (cstate->mq,
@@ -284,8 +290,9 @@ transmit_ready (void *cls)
284 cstate->msg_off += ret; 290 cstate->msg_off += ret;
285 if (cstate->msg_off < len) 291 if (cstate->msg_off < len)
286 { 292 {
287 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 293 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
288 "client: rescheduling message of type %u\n", ntohs(cstate->msg->type)); 294 "client: rescheduling message of type %u\n",
295 ntohs(cstate->msg->type));
289 cstate->send_task 296 cstate->send_task
290 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, 297 = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
291 cstate->sock, 298 cstate->sock,
@@ -295,8 +302,9 @@ transmit_ready (void *cls)
295 GNUNET_MQ_impl_send_in_flight (cstate->mq); 302 GNUNET_MQ_impl_send_in_flight (cstate->mq);
296 return; 303 return;
297 } 304 }
298 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 305 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
299 "client: sending message of type %u successful\n", ntohs(cstate->msg->type)); 306 "client: sending message of type %u successful\n",
307 ntohs(cstate->msg->type));
300 cstate->msg = NULL; 308 cstate->msg = NULL;
301 GNUNET_MQ_impl_send_continue (cstate->mq); 309 GNUNET_MQ_impl_send_continue (cstate->mq);
302} 310}
@@ -385,8 +393,9 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq,
385 if (NULL != cstate->retry_task) 393 if (NULL != cstate->retry_task)
386 GNUNET_SCHEDULER_cancel (cstate->retry_task); 394 GNUNET_SCHEDULER_cancel (cstate->retry_task);
387 if (NULL != cstate->sock){ 395 if (NULL != cstate->sock){
388 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
389 "client: destroying socket: %p\n", cstate->sock); 397 "client: destroying socket: %p\n",
398 cstate->sock);
390 GNUNET_NETWORK_socket_close (cstate->sock); 399 GNUNET_NETWORK_socket_close (cstate->sock);
391 } 400 }
392 cancel_aps (cstate); 401 cancel_aps (cstate);
@@ -528,8 +537,9 @@ try_unixpath (const char *service_name,
528 SOCK_STREAM, 537 SOCK_STREAM,
529 0); 538 0);
530 539
531 GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, 540 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
532 "client: socket created: %p\n", sock); 541 "client: socket created: %p\n",
542 sock);
533 543
534 if ( (NULL != sock) && 544 if ( (NULL != sock) &&
535 ( (GNUNET_OK == 545 ( (GNUNET_OK ==
@@ -815,8 +825,9 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
815 cstate->msg = msg; 825 cstate->msg = msg;
816 cstate->msg_off = 0; 826 cstate->msg_off = 0;
817 if (NULL == cstate->sock){ 827 if (NULL == cstate->sock){
818 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 828 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
819 "client: message of type %u waiting for socket\n",ntohs(msg->type)); 829 "client: message of type %u waiting for socket\n",
830 ntohs(msg->type));
820 return; /* still waiting for connection */ 831 return; /* still waiting for connection */
821 } 832 }
822 cstate->send_task 833 cstate->send_task