diff options
-rw-r--r-- | src/util/client.c | 46 | ||||
-rw-r--r-- | src/util/mq.c | 32 | ||||
-rw-r--r-- | src/util/scheduler.c | 14 |
3 files changed, 46 insertions, 46 deletions
diff --git a/src/util/client.c b/src/util/client.c index 7a718fc8d..3479fa971 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -261,11 +261,11 @@ 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_DEBUG, | 264 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
265 | "client: message of type %u trying to send with socket %p (MQ: %p\n", | 265 | "message of type %u trying to send with socket %p (MQ: %p\n", |
266 | ntohs(cstate->msg->type), | 266 | ntohs(cstate->msg->type), |
267 | cstate->sock, | 267 | cstate->sock, |
268 | cstate->mq); | 268 | cstate->mq); |
269 | 269 | ||
270 | RETRY: | 270 | RETRY: |
271 | ret = GNUNET_NETWORK_socket_send (cstate->sock, | 271 | ret = GNUNET_NETWORK_socket_send (cstate->sock, |
@@ -273,13 +273,13 @@ transmit_ready (void *cls) | |||
273 | len - cstate->msg_off); | 273 | len - cstate->msg_off); |
274 | if (-1 == ret) | 274 | if (-1 == ret) |
275 | { | 275 | { |
276 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 276 | LOG (GNUNET_ERROR_TYPE_WARNING, |
277 | "client: error during sending message of type %u\n", | 277 | "Error during sending message of type %u\n", |
278 | ntohs(cstate->msg->type)); | 278 | ntohs(cstate->msg->type)); |
279 | if (EINTR == errno){ | 279 | if (EINTR == errno){ |
280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 280 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
281 | "client: retrying message of type %u\n", | 281 | "Retrying message of type %u\n", |
282 | ntohs(cstate->msg->type)); | 282 | ntohs(cstate->msg->type)); |
283 | goto RETRY; | 283 | goto RETRY; |
284 | } | 284 | } |
285 | GNUNET_MQ_inject_error (cstate->mq, | 285 | GNUNET_MQ_inject_error (cstate->mq, |
@@ -290,9 +290,9 @@ transmit_ready (void *cls) | |||
290 | cstate->msg_off += ret; | 290 | cstate->msg_off += ret; |
291 | if (cstate->msg_off < len) | 291 | if (cstate->msg_off < len) |
292 | { | 292 | { |
293 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 293 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
294 | "client: rescheduling message of type %u\n", | 294 | "rescheduling message of type %u\n", |
295 | ntohs(cstate->msg->type)); | 295 | ntohs(cstate->msg->type)); |
296 | cstate->send_task | 296 | cstate->send_task |
297 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 297 | = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
298 | cstate->sock, | 298 | cstate->sock, |
@@ -302,9 +302,9 @@ transmit_ready (void *cls) | |||
302 | GNUNET_MQ_impl_send_in_flight (cstate->mq); | 302 | GNUNET_MQ_impl_send_in_flight (cstate->mq); |
303 | return; | 303 | return; |
304 | } | 304 | } |
305 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 305 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
306 | "client: sending message of type %u successful\n", | 306 | "sending message of type %u successful\n", |
307 | ntohs(cstate->msg->type)); | 307 | ntohs(cstate->msg->type)); |
308 | cstate->msg = NULL; | 308 | cstate->msg = NULL; |
309 | GNUNET_MQ_impl_send_continue (cstate->mq); | 309 | GNUNET_MQ_impl_send_continue (cstate->mq); |
310 | } | 310 | } |
@@ -394,9 +394,9 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, | |||
394 | if (NULL != cstate->retry_task) | 394 | if (NULL != cstate->retry_task) |
395 | GNUNET_SCHEDULER_cancel (cstate->retry_task); | 395 | GNUNET_SCHEDULER_cancel (cstate->retry_task); |
396 | if (NULL != cstate->sock){ | 396 | if (NULL != cstate->sock){ |
397 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 397 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
398 | "client: destroying socket: %p\n", | 398 | "destroying socket: %p\n", |
399 | cstate->sock); | 399 | cstate->sock); |
400 | GNUNET_NETWORK_socket_close (cstate->sock); | 400 | GNUNET_NETWORK_socket_close (cstate->sock); |
401 | } | 401 | } |
402 | cancel_aps (cstate); | 402 | cancel_aps (cstate); |
@@ -822,9 +822,9 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq, | |||
822 | cstate->msg = msg; | 822 | cstate->msg = msg; |
823 | cstate->msg_off = 0; | 823 | cstate->msg_off = 0; |
824 | if (NULL == cstate->sock){ | 824 | if (NULL == cstate->sock){ |
825 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 825 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
826 | "client: message of type %u waiting for socket\n", | 826 | "message of type %u waiting for socket\n", |
827 | ntohs(msg->type)); | 827 | ntohs(msg->type)); |
828 | return; /* still waiting for connection */ | 828 | return; /* still waiting for connection */ |
829 | } | 829 | } |
830 | cstate->send_task | 830 | cstate->send_task |
diff --git a/src/util/mq.c b/src/util/mq.c index 33bbaa6ad..af700836c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -358,10 +358,10 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, | |||
358 | GNUNET_assert (NULL == mq->envelope_head); | 358 | GNUNET_assert (NULL == mq->envelope_head); |
359 | mq->current_envelope = ev; | 359 | mq->current_envelope = ev; |
360 | 360 | ||
361 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 361 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
362 | "mq: sending message of type %u, queue empty (MQ: %p)\n", | 362 | "sending message of type %u, queue empty (MQ: %p)\n", |
363 | ntohs(ev->mh->type), | 363 | ntohs(ev->mh->type), |
364 | mq); | 364 | mq); |
365 | 365 | ||
366 | mq->send_impl (mq, | 366 | mq->send_impl (mq, |
367 | ev->mh, | 367 | ev->mh, |
@@ -459,9 +459,9 @@ impl_send_continue (void *cls) | |||
459 | mq->envelope_tail, | 459 | mq->envelope_tail, |
460 | mq->current_envelope); | 460 | mq->current_envelope); |
461 | 461 | ||
462 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 462 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
463 | "mq: sending message of type %u from queue\n", | 463 | "sending message of type %u from queue\n", |
464 | ntohs(mq->current_envelope->mh->type)); | 464 | ntohs(mq->current_envelope->mh->type)); |
465 | 465 | ||
466 | mq->send_impl (mq, | 466 | mq->send_impl (mq, |
467 | mq->current_envelope->mh, | 467 | mq->current_envelope->mh, |
@@ -851,9 +851,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) | |||
851 | ev); | 851 | ev); |
852 | GNUNET_assert (0 < mq->queue_length); | 852 | GNUNET_assert (0 < mq->queue_length); |
853 | mq->queue_length--; | 853 | mq->queue_length--; |
854 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 854 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
855 | "MQ destroy drops message of type %u\n", | 855 | "MQ destroy drops message of type %u\n", |
856 | ntohs (ev->mh->type)); | 856 | ntohs (ev->mh->type)); |
857 | GNUNET_MQ_discard (ev); | 857 | GNUNET_MQ_discard (ev); |
858 | } | 858 | } |
859 | if (NULL != mq->current_envelope) | 859 | if (NULL != mq->current_envelope) |
@@ -861,9 +861,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) | |||
861 | /* we can only discard envelopes that | 861 | /* we can only discard envelopes that |
862 | * are not queued! */ | 862 | * are not queued! */ |
863 | mq->current_envelope->parent_queue = NULL; | 863 | mq->current_envelope->parent_queue = NULL; |
864 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 864 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
865 | "MQ destroy drops current message of type %u\n", | 865 | "MQ destroy drops current message of type %u\n", |
866 | ntohs (mq->current_envelope->mh->type)); | 866 | ntohs (mq->current_envelope->mh->type)); |
867 | GNUNET_MQ_discard (mq->current_envelope); | 867 | GNUNET_MQ_discard (mq->current_envelope); |
868 | mq->current_envelope = NULL; | 868 | mq->current_envelope = NULL; |
869 | GNUNET_assert (0 < mq->queue_length); | 869 | GNUNET_assert (0 < mq->queue_length); |
@@ -946,9 +946,9 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev) | |||
946 | mq->envelope_tail, | 946 | mq->envelope_tail, |
947 | mq->current_envelope); | 947 | mq->current_envelope); |
948 | 948 | ||
949 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 949 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
950 | "mq: sending canceled message of type %u queue\n", | 950 | "sending canceled message of type %u queue\n", |
951 | ntohs(ev->mh->type)); | 951 | ntohs(ev->mh->type)); |
952 | 952 | ||
953 | mq->send_impl (mq, | 953 | mq->send_impl (mq, |
954 | mq->current_envelope->mh, | 954 | mq->current_envelope->mh, |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 7c1a8326a..e00ca444b 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -520,8 +520,8 @@ GNUNET_SCHEDULER_shutdown () | |||
520 | { | 520 | { |
521 | struct GNUNET_SCHEDULER_Task *pos; | 521 | struct GNUNET_SCHEDULER_Task *pos; |
522 | 522 | ||
523 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 523 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
524 | "GNUNET_SCHEDULER_shutdown\n"); | 524 | "GNUNET_SCHEDULER_shutdown\n"); |
525 | if (NULL != install_parent_control_task) | 525 | if (NULL != install_parent_control_task) |
526 | { | 526 | { |
527 | GNUNET_SCHEDULER_cancel (install_parent_control_task); | 527 | GNUNET_SCHEDULER_cancel (install_parent_control_task); |
@@ -2023,9 +2023,9 @@ GNUNET_SCHEDULER_do_work (struct GNUNET_SCHEDULER_Handle *sh) | |||
2023 | * waiting for the timeout, so we handle this gracefully. It might | 2023 | * waiting for the timeout, so we handle this gracefully. It might |
2024 | * also be a programming error in the driver though. | 2024 | * also be a programming error in the driver though. |
2025 | */ | 2025 | */ |
2026 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2026 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2027 | "GNUNET_SCHEDULER_do_work did not find any ready " | 2027 | "GNUNET_SCHEDULER_do_work did not find any ready " |
2028 | "tasks and timeout has not been reached yet.\n"); | 2028 | "tasks and timeout has not been reached yet.\n"); |
2029 | return GNUNET_NO; | 2029 | return GNUNET_NO; |
2030 | } | 2030 | } |
2031 | /** | 2031 | /** |
@@ -2376,8 +2376,8 @@ select_loop (struct GNUNET_SCHEDULER_Handle *sh, struct DriverContext *context) | |||
2376 | } | 2376 | } |
2377 | if (GNUNET_YES == GNUNET_SCHEDULER_do_work (sh)) | 2377 | if (GNUNET_YES == GNUNET_SCHEDULER_do_work (sh)) |
2378 | { | 2378 | { |
2379 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2379 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2380 | "scheduler has more tasks ready!\n"); | 2380 | "scheduler has more tasks ready!\n"); |
2381 | } | 2381 | } |
2382 | } | 2382 | } |
2383 | GNUNET_NETWORK_fdset_destroy (rs); | 2383 | GNUNET_NETWORK_fdset_destroy (rs); |