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_indexing.c | |
parent | 69685227863090eb24ee20d07e8c0f139264c061 (diff) | |
download | gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.tar.gz gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.zip |
-eliminating #if DEBUG checks
Diffstat (limited to 'src/fs/gnunet-service-fs_indexing.c')
-rw-r--r-- | src/fs/gnunet-service-fs_indexing.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c index d3aef8917..b56301962 100644 --- a/src/fs/gnunet-service-fs_indexing.c +++ b/src/fs/gnunet-service-fs_indexing.c | |||
@@ -265,10 +265,8 @@ hash_for_index_val (void *cls, const GNUNET_HashCode * res) | |||
265 | _ | 265 | _ |
266 | ("Hash mismatch trying to index file `%s' which has hash `%s'\n"), | 266 | ("Hash mismatch trying to index file `%s' which has hash `%s'\n"), |
267 | ii->filename, GNUNET_h2s (res)); | 267 | ii->filename, GNUNET_h2s (res)); |
268 | #if DEBUG_FS | ||
269 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Wanted `%s'\n", | 268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Wanted `%s'\n", |
270 | GNUNET_h2s (&ii->file_id)); | 269 | GNUNET_h2s (&ii->file_id)); |
271 | #endif | ||
272 | GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0, | 270 | GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0, |
273 | GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED); | 271 | GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED); |
274 | GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES); | 272 | GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES); |
@@ -329,11 +327,8 @@ GNUNET_FS_handle_index_start (void *cls, struct GNUNET_SERVER_Client *client, | |||
329 | ii->filename = (const char *) &ii[1]; | 327 | ii->filename = (const char *) &ii[1]; |
330 | memcpy (&ii[1], fn, slen); | 328 | memcpy (&ii[1], fn, slen); |
331 | ii->file_id = ism->file_id; | 329 | ii->file_id = ism->file_id; |
332 | #if DEBUG_FS | ||
333 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message for file `%s'\n", | 330 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message for file `%s'\n", |
334 | "START_INDEX", ii->filename); | 331 | "START_INDEX", ii->filename); |
335 | #endif | ||
336 | |||
337 | ii->tc = GNUNET_SERVER_transmit_context_create (client); | 332 | ii->tc = GNUNET_SERVER_transmit_context_create (client); |
338 | mydev = 0; | 333 | mydev = 0; |
339 | myino = 0; | 334 | myino = 0; |
@@ -346,12 +341,10 @@ GNUNET_FS_handle_index_start (void *cls, struct GNUNET_SERVER_Client *client, | |||
346 | GNUNET_free (fn); | 341 | GNUNET_free (fn); |
347 | return; | 342 | return; |
348 | } | 343 | } |
349 | #if DEBUG_FS | ||
350 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 344 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
351 | "Mismatch in file identifiers (%llu != %llu or %u != %u), need to hash.\n", | 345 | "Mismatch in file identifiers (%llu != %llu or %u != %u), need to hash.\n", |
352 | (unsigned long long) ino, (unsigned long long) myino, | 346 | (unsigned long long) ino, (unsigned long long) myino, |
353 | (unsigned int) dev, (unsigned int) mydev); | 347 | (unsigned int) dev, (unsigned int) mydev); |
354 | #endif | ||
355 | /* slow validation, need to hash full file (again) */ | 348 | /* slow validation, need to hash full file (again) */ |
356 | ii->fhc = | 349 | ii->fhc = |
357 | GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_IDLE, fn, | 350 | GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_IDLE, fn, |
@@ -457,11 +450,9 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client, | |||
457 | } | 450 | } |
458 | pos = next; | 451 | pos = next; |
459 | } | 452 | } |
460 | #if DEBUG_FS | ||
461 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 453 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
462 | "Client requested unindexing of file `%s': %s\n", | 454 | "Client requested unindexing of file `%s': %s\n", |
463 | GNUNET_h2s (&um->file_id), found ? "found" : "not found"); | 455 | GNUNET_h2s (&um->file_id), found ? "found" : "not found"); |
464 | #endif | ||
465 | if (GNUNET_YES == found) | 456 | if (GNUNET_YES == found) |
466 | write_index_list (); | 457 | write_index_list (); |
467 | tc = GNUNET_SERVER_transmit_context_create (client); | 458 | tc = GNUNET_SERVER_transmit_context_create (client); |
@@ -583,10 +574,8 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, | |||
583 | GNUNET_TIME_UNIT_FOREVER_REL, &remove_cont, NULL); | 574 | GNUNET_TIME_UNIT_FOREVER_REL, &remove_cont, NULL); |
584 | return GNUNET_SYSERR; | 575 | return GNUNET_SYSERR; |
585 | } | 576 | } |
586 | #if DEBUG_FS | ||
587 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 577 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
588 | "On-demand encoded block for query `%s'\n", GNUNET_h2s (key)); | 578 | "On-demand encoded block for query `%s'\n", GNUNET_h2s (key)); |
589 | #endif | ||
590 | cont (cont_cls, key, nsize, edata, GNUNET_BLOCK_TYPE_FS_DBLOCK, priority, | 579 | cont (cont_cls, key, nsize, edata, GNUNET_BLOCK_TYPE_FS_DBLOCK, priority, |
591 | anonymity, expiration, uid); | 580 | anonymity, expiration, uid); |
592 | return GNUNET_OK; | 581 | return GNUNET_OK; |