aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_tree.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-26 14:02:09 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-26 14:02:09 +0000
commita9763a49d78b240fed1ace9068a0ea11cdff00f7 (patch)
tree292f58cc3a0765c58952cd83c695e1faafc83fd9 /src/fs/fs_tree.c
parent69685227863090eb24ee20d07e8c0f139264c061 (diff)
downloadgnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.tar.gz
gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.zip
-eliminating #if DEBUG checks
Diffstat (limited to 'src/fs/fs_tree.c')
-rw-r--r--src/fs/fs_tree.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index 2ac38ffd3..b3bbdc7b1 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -27,7 +27,6 @@
27#include "platform.h" 27#include "platform.h"
28#include "fs_tree.h" 28#include "fs_tree.h"
29 29
30#define DEBUG_TREE GNUNET_EXTRA_LOGGING
31 30
32/** 31/**
33 * Context for an ECRS-based file encoder that computes 32 * Context for an ECRS-based file encoder that computes
@@ -341,10 +340,8 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te)
341 if (te->chk_tree_depth == te->current_depth) 340 if (te->chk_tree_depth == te->current_depth)
342 { 341 {
343 off = CHK_PER_INODE * (te->chk_tree_depth - 1); 342 off = CHK_PER_INODE * (te->chk_tree_depth - 1);
344#if DEBUG_TREE
345 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "TE done, reading CHK `%s' from %u\n", 343 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "TE done, reading CHK `%s' from %u\n",
346 GNUNET_h2s (&te->chk_tree[off].query), off); 344 GNUNET_h2s (&te->chk_tree[off].query), off);
347#endif
348 te->uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri)); 345 te->uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
349 te->uri->type = chk; 346 te->uri->type = chk;
350 te->uri->data.chk.chk = te->chk_tree[off]; 347 te->uri->data.chk.chk = te->chk_tree[off];
@@ -374,23 +371,19 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te)
374 pt_block = &te->chk_tree[(te->current_depth - 1) * CHK_PER_INODE]; 371 pt_block = &te->chk_tree[(te->current_depth - 1) * CHK_PER_INODE];
375 } 372 }
376 off = compute_chk_offset (te->current_depth, te->publish_offset); 373 off = compute_chk_offset (te->current_depth, te->publish_offset);
377#if DEBUG_TREE
378 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 374 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
379 "TE is at offset %llu and depth %u with block size %u and target-CHK-offset %u\n", 375 "TE is at offset %llu and depth %u with block size %u and target-CHK-offset %u\n",
380 (unsigned long long) te->publish_offset, te->current_depth, 376 (unsigned long long) te->publish_offset, te->current_depth,
381 (unsigned int) pt_size, (unsigned int) off); 377 (unsigned int) pt_size, (unsigned int) off);
382#endif
383 mychk = &te->chk_tree[te->current_depth * CHK_PER_INODE + off]; 378 mychk = &te->chk_tree[te->current_depth * CHK_PER_INODE + off];
384 GNUNET_CRYPTO_hash (pt_block, pt_size, &mychk->key); 379 GNUNET_CRYPTO_hash (pt_block, pt_size, &mychk->key);
385 GNUNET_CRYPTO_hash_to_aes_key (&mychk->key, &sk, &iv); 380 GNUNET_CRYPTO_hash_to_aes_key (&mychk->key, &sk, &iv);
386 GNUNET_CRYPTO_aes_encrypt (pt_block, pt_size, &sk, &iv, enc); 381 GNUNET_CRYPTO_aes_encrypt (pt_block, pt_size, &sk, &iv, enc);
387 GNUNET_CRYPTO_hash (enc, pt_size, &mychk->query); 382 GNUNET_CRYPTO_hash (enc, pt_size, &mychk->query);
388#if DEBUG_TREE
389 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 383 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
390 "TE calculates query to be `%s', stored at %u\n", 384 "TE calculates query to be `%s', stored at %u\n",
391 GNUNET_h2s (&mychk->query), 385 GNUNET_h2s (&mychk->query),
392 te->current_depth * CHK_PER_INODE + off); 386 te->current_depth * CHK_PER_INODE + off);
393#endif
394 if (NULL != te->proc) 387 if (NULL != te->proc)
395 te->proc (te->cls, mychk, te->publish_offset, te->current_depth, 388 te->proc (te->cls, mychk, te->publish_offset, te->current_depth,
396 (0 == 389 (0 ==