diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/social/social_api.c | 4 | ||||
-rw-r--r-- | src/util/client.c | 43 | ||||
-rw-r--r-- | src/util/mq.c | 12 |
3 files changed, 36 insertions, 23 deletions
diff --git a/src/social/social_api.c b/src/social/social_api.c index 1db8e501a..f9d00d491 100644 --- a/src/social/social_api.c +++ b/src/social/social_api.c | |||
@@ -1063,7 +1063,7 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc) | |||
1063 | } | 1063 | } |
1064 | if (NULL != plc->mq) | 1064 | if (NULL != plc->mq) |
1065 | { | 1065 | { |
1066 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1066 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1067 | "destroying MQ (place_cleanup)\n"); | 1067 | "destroying MQ (place_cleanup)\n"); |
1068 | GNUNET_MQ_destroy (plc->mq); | 1068 | GNUNET_MQ_destroy (plc->mq); |
1069 | plc->mq = NULL; | 1069 | plc->mq = NULL; |
@@ -1088,7 +1088,7 @@ place_disconnect (struct GNUNET_SOCIAL_Place *plc) | |||
1088 | GNUNET_CRYPTO_hash (&plc->pub_key, | 1088 | GNUNET_CRYPTO_hash (&plc->pub_key, |
1089 | sizeof (plc->pub_key), | 1089 | sizeof (plc->pub_key), |
1090 | &place_pub_hash); | 1090 | &place_pub_hash); |
1091 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1091 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1092 | "place_disconnect, plc = %s\n", | 1092 | "place_disconnect, plc = %s\n", |
1093 | GNUNET_h2s (&place_pub_hash)); | 1093 | GNUNET_h2s (&place_pub_hash)); |
1094 | place_cleanup (plc); | 1094 | place_cleanup (plc); |
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 |
diff --git a/src/util/mq.c b/src/util/mq.c index 6ad6b82eb..793fd70ae 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -360,7 +360,7 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, | |||
360 | GNUNET_assert (NULL == mq->envelope_head); | 360 | GNUNET_assert (NULL == mq->envelope_head); |
361 | mq->current_envelope = ev; | 361 | mq->current_envelope = ev; |
362 | 362 | ||
363 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 363 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
364 | "mq: sending message of type %u, queue empty\n", | 364 | "mq: sending message of type %u, queue empty\n", |
365 | ntohs(ev->mh->type)); | 365 | ntohs(ev->mh->type)); |
366 | 366 | ||
@@ -460,8 +460,9 @@ impl_send_continue (void *cls) | |||
460 | mq->envelope_tail, | 460 | mq->envelope_tail, |
461 | mq->current_envelope); | 461 | mq->current_envelope); |
462 | 462 | ||
463 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 463 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
464 | "mq: sending message of type %u from queue\n", ntohs(mq->current_envelope->mh->type)); | 464 | "mq: sending message of type %u from queue\n", |
465 | ntohs(mq->current_envelope->mh->type)); | ||
465 | 466 | ||
466 | mq->send_impl (mq, | 467 | mq->send_impl (mq, |
467 | mq->current_envelope->mh, | 468 | mq->current_envelope->mh, |
@@ -946,8 +947,9 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev) | |||
946 | mq->envelope_tail, | 947 | mq->envelope_tail, |
947 | mq->current_envelope); | 948 | mq->current_envelope); |
948 | 949 | ||
949 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 950 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
950 | "mq: sending canceled message of type %u queue\n", ntohs(ev->mh->type)); | 951 | "mq: sending canceled message of type %u queue\n", |
952 | ntohs(ev->mh->type)); | ||
951 | 953 | ||
952 | mq->send_impl (mq, | 954 | mq->send_impl (mq, |
953 | mq->current_envelope->mh, | 955 | mq->current_envelope->mh, |