aboutsummaryrefslogtreecommitdiff
path: root/src/core/test_core_quota_compliance.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-26 13:45:13 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-26 13:45:13 +0000
commite6d53f7f11ebfecb182b9be97b9216723362050b (patch)
tree405e4758508548b9a240846267608b81cc4e5636 /src/core/test_core_quota_compliance.c
parent14041678697dc77a75860333f91e649fca26ec0d (diff)
downloadgnunet-e6d53f7f11ebfecb182b9be97b9216723362050b.tar.gz
gnunet-e6d53f7f11ebfecb182b9be97b9216723362050b.zip
-extra logging is not the same as verbose
Diffstat (limited to 'src/core/test_core_quota_compliance.c')
-rw-r--r--src/core/test_core_quota_compliance.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index c45863f0d..68cc47386 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -33,8 +33,7 @@
33#include "gnunet_transport_service.h" 33#include "gnunet_transport_service.h"
34#include "gnunet_statistics_service.h" 34#include "gnunet_statistics_service.h"
35 35
36#define VERBOSE GNUNET_EXTRA_LOGGING 36#define VERBOSE GNUNET_NO
37#define DEBUG_TRANSMISSION GNUNET_EXTRA_LOGGING
38 37
39#define SYMMETRIC 0 38#define SYMMETRIC 0
40#define ASYMMETRIC_SEND_LIMITED 1 39#define ASYMMETRIC_SEND_LIMITED 1
@@ -333,11 +332,9 @@ transmit_ready (void *cls, size_t size, void *buf)
333 cbuf = buf; 332 cbuf = buf;
334 do 333 do
335 { 334 {
336#if DEBUG_TRANSMISSION
337 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 335 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
338 "Sending message %u of size %u at offset %u\n", tr_n, 336 "Sending message %u of size %u at offset %u\n", tr_n,
339 MESSAGESIZE, ret); 337 MESSAGESIZE, ret);
340#endif
341 hdr.header.size = htons (MESSAGESIZE); 338 hdr.header.size = htons (MESSAGESIZE);
342 hdr.header.type = htons (MTYPE); 339 hdr.header.type = htons (MTYPE);
343 hdr.num = htonl (tr_n); 340 hdr.num = htonl (tr_n);
@@ -373,14 +370,12 @@ connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
373 pc->connect_status = 1; 370 pc->connect_status = 1;
374 if (pc == &p1) 371 if (pc == &p1)
375 { 372 {
376#if DEBUG_TRANSMISSION
377 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 373 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
378 "Encrypted connection established to peer `%4s'\n", 374 "Encrypted connection established to peer `%4s'\n",
379 GNUNET_i2s (peer)); 375 GNUNET_i2s (peer));
380 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 376 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
381 "Asking core (1) for transmission to peer `%4s'\n", 377 "Asking core (1) for transmission to peer `%4s'\n",
382 GNUNET_i2s (&p2.id)); 378 GNUNET_i2s (&p2.id));
383#endif
384 if (err_task != GNUNET_SCHEDULER_NO_TASK) 379 if (err_task != GNUNET_SCHEDULER_NO_TASK)
385 GNUNET_SCHEDULER_cancel (err_task); 380 GNUNET_SCHEDULER_cancel (err_task);
386 err_task = 381 err_task =
@@ -421,10 +416,8 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
421 GNUNET_CORE_notify_transmit_ready_cancel (pc->nth); 416 GNUNET_CORE_notify_transmit_ready_cancel (pc->nth);
422 pc->nth = NULL; 417 pc->nth = NULL;
423 } 418 }
424#if DEBUG_TRANSMISSION
425 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted connection to `%4s' cut\n", 419 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted connection to `%4s' cut\n",
426 GNUNET_i2s (peer)); 420 GNUNET_i2s (peer));
427#endif
428} 421}
429 422
430 423
@@ -434,11 +427,9 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
434 const struct GNUNET_ATS_Information *atsi, 427 const struct GNUNET_ATS_Information *atsi,
435 unsigned int atsi_count) 428 unsigned int atsi_count)
436{ 429{
437#if DEBUG_TRANSMISSION
438 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 430 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
439 "Core provides inbound data from `%4s' %llu.\n", 431 "Core provides inbound data from `%4s' %llu.\n",
440 GNUNET_i2s (other), ntohs (message->size)); 432 GNUNET_i2s (other), ntohs (message->size));
441#endif
442 total_bytes_recv += ntohs (message->size); 433 total_bytes_recv += ntohs (message->size);
443 return GNUNET_OK; 434 return GNUNET_OK;
444} 435}
@@ -450,11 +441,9 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
450 const struct GNUNET_ATS_Information *atsi, 441 const struct GNUNET_ATS_Information *atsi,
451 unsigned int atsi_count) 442 unsigned int atsi_count)
452{ 443{
453#if DEBUG_TRANSMISSION
454 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 444 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
455 "Core notifies about outbound data for `%4s'.\n", 445 "Core notifies about outbound data for `%4s'.\n",
456 GNUNET_i2s (other)); 446 GNUNET_i2s (other));
457#endif
458 return GNUNET_OK; 447 return GNUNET_OK;
459} 448}
460 449
@@ -492,10 +481,8 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
492 err_task = GNUNET_SCHEDULER_add_now (&terminate_task_error, NULL); 481 err_task = GNUNET_SCHEDULER_add_now (&terminate_task_error, NULL);
493 return GNUNET_SYSERR; 482 return GNUNET_SYSERR;
494 } 483 }
495#if DEBUG_TRANSMISSION
496 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got message %u of size %u\n", 484 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got message %u of size %u\n",
497 ntohl (hdr->num), ntohs (message->size)); 485 ntohl (hdr->num), ntohs (message->size));
498#endif
499 n++; 486 n++;
500 if (0 == (n % 10)) 487 if (0 == (n % 10))
501 FPRINTF (stderr, "%s", "."); 488 FPRINTF (stderr, "%s", ".");
@@ -545,11 +532,9 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
545 GNUNET_assert (ok == 3); 532 GNUNET_assert (ok == 3);
546 OKPP; 533 OKPP;
547 GNUNET_assert (cls == &p2); 534 GNUNET_assert (cls == &p2);
548#if DEBUG_TRANSMISSION
549 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 535 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
550 "Asking core (1) to connect to peer `%4s'\n", 536 "Asking core (1) to connect to peer `%4s'\n",
551 GNUNET_i2s (&p2.id)); 537 GNUNET_i2s (&p2.id));
552#endif
553 connect_task = GNUNET_SCHEDULER_add_now (&try_connect, NULL); 538 connect_task = GNUNET_SCHEDULER_add_now (&try_connect, NULL);
554 } 539 }
555} 540}
@@ -560,11 +545,8 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
560{ 545{
561 struct PeerContext *p = cls; 546 struct PeerContext *p = cls;
562 547
563
564#if DEBUG_TRANSMISSION
565 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 548 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
566 "Received (my) `%s' from transport service\n", "HELLO"); 549 "Received (my) `%s' from transport service\n", "HELLO");
567#endif
568 GNUNET_assert (message != NULL); 550 GNUNET_assert (message != NULL);
569 p->hello = GNUNET_malloc (ntohs (message->size)); 551 p->hello = GNUNET_malloc (ntohs (message->size));
570 memcpy (p->hello, message, ntohs (message->size)); 552 memcpy (p->hello, message, ntohs (message->size));