diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:48:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:48:15 +0000 |
commit | 21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6 (patch) | |
tree | db7c1187ddbba17641e0c0fcd631331803d19983 /src/ats/gnunet-service-ats_addresses.c | |
parent | 88031e0e8188e96d7ae4ce3659e6ed0d90a64f26 (diff) | |
download | gnunet-21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6.tar.gz gnunet-21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6.zip |
cleaning up gnunet-service-ats_normalization.c
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index e87bf487b..bbd2fda2d 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -501,10 +501,10 @@ find_exact_address (const struct GNUNET_PeerIdentity *peer, | |||
501 | * @return the value in HBO or #GNUNET_ATS_VALUE_UNDEFINED in HBO if value does not exist | 501 | * @return the value in HBO or #GNUNET_ATS_VALUE_UNDEFINED in HBO if value does not exist |
502 | */ | 502 | */ |
503 | static int | 503 | static int |
504 | get_performance_info (struct ATS_Address *address, uint32_t type) | 504 | get_performance_info (struct ATS_Address *address, |
505 | uint32_t type) | ||
505 | { | 506 | { |
506 | int c1; | 507 | uint32_t c1; |
507 | GNUNET_assert(NULL != address); | ||
508 | 508 | ||
509 | if ((NULL == address->atsi) || (0 == address->atsi_count)) | 509 | if ((NULL == address->atsi) || (0 == address->atsi_count)) |
510 | return GNUNET_ATS_VALUE_UNDEFINED; | 510 | return GNUNET_ATS_VALUE_UNDEFINED; |
@@ -550,11 +550,6 @@ GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, | |||
550 | GNUNET_break (0); | 550 | GNUNET_break (0); |
551 | return; | 551 | return; |
552 | } | 552 | } |
553 | |||
554 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
555 | "Received `%s' for peer `%s'\n", | ||
556 | "ADDRESS ADD", | ||
557 | GNUNET_i2s (peer)); | ||
558 | new_address = create_address (peer, | 553 | new_address = create_address (peer, |
559 | plugin_name, | 554 | plugin_name, |
560 | plugin_addr, | 555 | plugin_addr, |
@@ -581,13 +576,9 @@ GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, | |||
581 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); | 576 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); |
582 | update_addresses_stat (); | 577 | update_addresses_stat (); |
583 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 578 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
584 | "Adding new address %p for peer `%s', length %u, session id %u, %s\n", | 579 | "Adding new address for peer `%s' slot %u\n", |
585 | new_address, | ||
586 | GNUNET_i2s (peer), | 580 | GNUNET_i2s (peer), |
587 | plugin_addr_len, | 581 | session_id); |
588 | session_id, | ||
589 | GNUNET_ATS_print_network_type (addr_net)); | ||
590 | |||
591 | /* Tell solver about new address */ | 582 | /* Tell solver about new address */ |
592 | GAS_plugin_new_address (new_address, | 583 | GAS_plugin_new_address (new_address, |
593 | addr_net, | 584 | addr_net, |
@@ -638,10 +629,9 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, | |||
638 | return; | 629 | return; |
639 | } | 630 | } |
640 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 631 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
641 | "Received `%s' for peer `%s' address \n", | 632 | "Received ADDRESS_UPDATE for peer `%s' slot %u\n", |
642 | "ADDRESS UPDATE", | ||
643 | GNUNET_i2s (peer), | 633 | GNUNET_i2s (peer), |
644 | aa); | 634 | (unsigned int) session_id); |
645 | 635 | ||
646 | /* Update address */ | 636 | /* Update address */ |
647 | aa->t_last_activity = GNUNET_TIME_absolute_get(); | 637 | aa->t_last_activity = GNUNET_TIME_absolute_get(); |
@@ -673,7 +663,7 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, | |||
673 | 663 | ||
674 | 664 | ||
675 | /** | 665 | /** |
676 | * Remove an address or just a session for a peer. | 666 | * Remove an address for a peer. |
677 | * | 667 | * |
678 | * @param peer peer | 668 | * @param peer peer |
679 | * @param session_id session id, can never be 0 | 669 | * @param session_id session id, can never be 0 |
@@ -693,9 +683,8 @@ GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer, | |||
693 | return; | 683 | return; |
694 | } | 684 | } |
695 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 685 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
696 | "Received ADDRESS_DESTROYED for peer `%s' address %p session %u\n", | 686 | "Received ADDRESS_DESTROYED for peer `%s' session %u\n", |
697 | GNUNET_i2s (peer), | 687 | GNUNET_i2s (peer), |
698 | ea, | ||
699 | session_id); | 688 | session_id); |
700 | free_address (ea); | 689 | free_address (ea); |
701 | } | 690 | } |