diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-26 14:02:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-26 14:02:09 +0000 |
commit | a9763a49d78b240fed1ace9068a0ea11cdff00f7 (patch) | |
tree | 292f58cc3a0765c58952cd83c695e1faafc83fd9 /src/fs/gnunet-service-fs_pe.c | |
parent | 69685227863090eb24ee20d07e8c0f139264c061 (diff) | |
download | gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.tar.gz gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.zip |
-eliminating #if DEBUG checks
Diffstat (limited to 'src/fs/gnunet-service-fs_pe.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pe.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index f1d87db01..71b0fc091 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -318,12 +318,9 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp) | |||
318 | (unsigned int) rp->transmission_counter, | 318 | (unsigned int) rp->transmission_counter, |
319 | (unsigned long long) delay.rel_value); | 319 | (unsigned long long) delay.rel_value); |
320 | rp->earliest_transmission = GNUNET_TIME_relative_to_absolute (delay); | 320 | rp->earliest_transmission = GNUNET_TIME_relative_to_absolute (delay); |
321 | #if DEBUG_FS | ||
322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 321 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
323 | "Earliest (re)transmission for `%s' in %us\n", | 322 | "Earliest (re)transmission for `%s' in %us\n", |
324 | GNUNET_h2s (&prd->query), rp->transmission_counter); | 323 | GNUNET_h2s (&prd->query), rp->transmission_counter); |
325 | #endif | ||
326 | |||
327 | GNUNET_assert (rp->hn == NULL); | 324 | GNUNET_assert (rp->hn == NULL); |
328 | if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value | 325 | if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value |
329 | == 0) | 326 | == 0) |
@@ -414,11 +411,9 @@ transmit_message_callback (void *cls, size_t buf_size, void *buf) | |||
414 | rp->last_transmission = GNUNET_TIME_absolute_get (); | 411 | rp->last_transmission = GNUNET_TIME_absolute_get (); |
415 | rp->transmission_counter++; | 412 | rp->transmission_counter++; |
416 | total_delay++; | 413 | total_delay++; |
417 | #if DEBUG_FS | ||
418 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 414 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
419 | "Executing plan %p executed %u times, planning retransmission\n", | 415 | "Executing plan %p executed %u times, planning retransmission\n", |
420 | rp, rp->transmission_counter); | 416 | rp, rp->transmission_counter); |
421 | #endif | ||
422 | plan (pp, rp); | 417 | plan (pp, rp); |
423 | GNUNET_STATISTICS_update (GSF_stats, | 418 | GNUNET_STATISTICS_update (GSF_stats, |
424 | gettext_noop | 419 | gettext_noop |
@@ -463,18 +458,14 @@ schedule_peer_transmission (void *cls, | |||
463 | rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap); | 458 | rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap); |
464 | if (NULL == rp) | 459 | if (NULL == rp) |
465 | { | 460 | { |
466 | #if DEBUG_FS | ||
467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No active requests for plan %p.\n", | 461 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No active requests for plan %p.\n", |
468 | pp); | 462 | pp); |
469 | #endif | ||
470 | return; /* both queues empty */ | 463 | return; /* both queues empty */ |
471 | } | 464 | } |
472 | delay = GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission); | 465 | delay = GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission); |
473 | #if DEBUG_FS | ||
474 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 466 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
475 | "Sleeping for %llu ms before retrying requests on plan %p.\n", | 467 | "Sleeping for %llu ms before retrying requests on plan %p.\n", |
476 | (unsigned long long) delay.rel_value, pp); | 468 | (unsigned long long) delay.rel_value, pp); |
477 | #endif | ||
478 | GNUNET_STATISTICS_set (GSF_stats, gettext_noop ("# delay heap timeout"), | 469 | GNUNET_STATISTICS_set (GSF_stats, gettext_noop ("# delay heap timeout"), |
479 | delay.rel_value, GNUNET_NO); | 470 | delay.rel_value, GNUNET_NO); |
480 | 471 | ||
@@ -486,9 +477,7 @@ schedule_peer_transmission (void *cls, | |||
486 | 1, GNUNET_NO); | 477 | 1, GNUNET_NO); |
487 | /* process from priority heap */ | 478 | /* process from priority heap */ |
488 | rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap); | 479 | rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap); |
489 | #if DEBUG_FS > 1 | ||
490 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing query plan %p\n", rp); | 480 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing query plan %p\n", rp); |
491 | #endif | ||
492 | GNUNET_assert (NULL != rp); | 481 | GNUNET_assert (NULL != rp); |
493 | msize = GSF_pending_request_get_message_ (get_latest (rp), 0, NULL); | 482 | msize = GSF_pending_request_get_message_ (get_latest (rp), 0, NULL); |
494 | pp->pth = | 483 | pp->pth = |
@@ -608,11 +597,9 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr) | |||
608 | GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# query plan entries"), 1, | 597 | GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# query plan entries"), 1, |
609 | GNUNET_NO); | 598 | GNUNET_NO); |
610 | prd = GSF_pending_request_get_data_ (pr); | 599 | prd = GSF_pending_request_get_data_ (pr); |
611 | #if DEBUG_FS | ||
612 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 600 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
613 | "Planning transmission of query `%s' to peer `%s'\n", | 601 | "Planning transmission of query `%s' to peer `%s'\n", |
614 | GNUNET_h2s (&prd->query), GNUNET_i2s (&id)); | 602 | GNUNET_h2s (&prd->query), GNUNET_i2s (&id)); |
615 | #endif | ||
616 | rp = GNUNET_malloc (sizeof (struct GSF_RequestPlan)); | 603 | rp = GNUNET_malloc (sizeof (struct GSF_RequestPlan)); |
617 | rpr = GNUNET_malloc (sizeof (struct GSF_RequestPlanReference)); | 604 | rpr = GNUNET_malloc (sizeof (struct GSF_RequestPlanReference)); |
618 | prl = GNUNET_malloc (sizeof (struct PendingRequestList)); | 605 | prl = GNUNET_malloc (sizeof (struct PendingRequestList)); |