aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-12 15:00:47 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-12 15:00:47 +0000
commit63d15aa9d1ea50933ff34fc42916024a5d3196bf (patch)
tree5f5dad8cabd420639867d630a0b92c000001fc06 /src/ats/ats_api.c
parente5a68574ecfc990eedae657c74e54dda3d96f599 (diff)
downloadgnunet-63d15aa9d1ea50933ff34fc42916024a5d3196bf.tar.gz
gnunet-63d15aa9d1ea50933ff34fc42916024a5d3196bf.zip
no need for public key
Diffstat (limited to 'src/ats/ats_api.c')
-rw-r--r--src/ats/ats_api.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c
index f748a558b..1fcdd8262 100644
--- a/src/ats/ats_api.c
+++ b/src/ats/ats_api.c
@@ -38,11 +38,6 @@ struct AllocationRecord
38{ 38{
39 39
40 /** 40 /**
41 * Public key of the peer.
42 */
43 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
44
45 /**
46 * Performance information associated with this address (array). 41 * Performance information associated with this address (array).
47 */ 42 */
48 struct GNUNET_TRANSPORT_ATS_Information *ats; 43 struct GNUNET_TRANSPORT_ATS_Information *ats;
@@ -512,8 +507,7 @@ update_session (void *cls,
512 * @param ats_count number of performance records in 'ats' 507 * @param ats_count number of performance records in 'ats'
513 */ 508 */
514static struct AllocationRecord * 509static struct AllocationRecord *
515create_allocation_record (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key, 510create_allocation_record (const char *plugin_name,
516 const char *plugin_name,
517 struct Session *session, 511 struct Session *session,
518 const void *plugin_addr, 512 const void *plugin_addr,
519 size_t plugin_addr_len, 513 size_t plugin_addr_len,
@@ -523,7 +517,6 @@ create_allocation_record (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *
523 struct AllocationRecord *ar; 517 struct AllocationRecord *ar;
524 518
525 ar = GNUNET_malloc (sizeof (struct AllocationRecord) + plugin_addr_len); 519 ar = GNUNET_malloc (sizeof (struct AllocationRecord) + plugin_addr_len);
526 ar->public_key = *public_key;
527 ar->plugin_name = GNUNET_strdup (plugin_name); 520 ar->plugin_name = GNUNET_strdup (plugin_name);
528 ar->plugin_addr = &ar[1]; 521 ar->plugin_addr = &ar[1];
529 memcpy (&ar[1], plugin_addr, plugin_addr_len); 522 memcpy (&ar[1], plugin_addr, plugin_addr_len);
@@ -570,7 +563,6 @@ disconnect_peer (void *cls,
570 * Calculate bandwidth assignments including the new peer. 563 * Calculate bandwidth assignments including the new peer.
571 * 564 *
572 * @param atc handle 565 * @param atc handle
573 * @param public_key public key of the peer
574 * @param peer identity of the new peer 566 * @param peer identity of the new peer
575 * @param plugin_name name of the currently used transport plugin 567 * @param plugin_name name of the currently used transport plugin
576 * @param session session in use (if available) 568 * @param session session in use (if available)
@@ -581,7 +573,6 @@ disconnect_peer (void *cls,
581 */ 573 */
582void 574void
583GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc, 575GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
584 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key,
585 const struct GNUNET_PeerIdentity *peer, 576 const struct GNUNET_PeerIdentity *peer,
586 const char *plugin_name, 577 const char *plugin_name,
587 struct Session *session, 578 struct Session *session,
@@ -596,8 +587,7 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
596 (void) GNUNET_CONTAINER_multihashmap_iterate (atc->peers, 587 (void) GNUNET_CONTAINER_multihashmap_iterate (atc->peers,
597 &disconnect_peer, 588 &disconnect_peer,
598 atc); 589 atc);
599 ar = create_allocation_record (public_key, 590 ar = create_allocation_record (plugin_name,
600 plugin_name,
601 session, 591 session,
602 plugin_addr, 592 plugin_addr,
603 plugin_addr_len, 593 plugin_addr_len,
@@ -732,7 +722,6 @@ notify_valid (void *cls,
732 struct GNUNET_ATS_SuggestionContext *asc = value; 722 struct GNUNET_ATS_SuggestionContext *asc = value;
733 723
734 asc->cb (asc->cb_cls, 724 asc->cb (asc->cb_cls,
735 &ar->public_key,
736 &asc->target, 725 &asc->target,
737 ar->plugin_name, 726 ar->plugin_name,
738 ar->plugin_addr, 727 ar->plugin_addr,
@@ -752,7 +741,6 @@ notify_valid (void *cls,
752 * for later use). Update bandwidth assignments. 741 * for later use). Update bandwidth assignments.
753 * 742 *
754 * @param atc handle 743 * @param atc handle
755 * @param public_key public key of the peer
756 * @param peer identity of the peer 744 * @param peer identity of the peer
757 * @param valid_until how long is the address valid? 745 * @param valid_until how long is the address valid?
758 * @param plugin_name name of the transport plugin 746 * @param plugin_name name of the transport plugin
@@ -764,7 +752,6 @@ notify_valid (void *cls,
764 */ 752 */
765void 753void
766GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc, 754GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
767 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key,
768 const struct GNUNET_PeerIdentity *peer, 755 const struct GNUNET_PeerIdentity *peer,
769 struct GNUNET_TIME_Absolute valid_until, 756 struct GNUNET_TIME_Absolute valid_until,
770 const char *plugin_name, 757 const char *plugin_name,
@@ -777,8 +764,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
777 struct AllocationRecord *ar; 764 struct AllocationRecord *ar;
778 struct UpdateSessionContext usc; 765 struct UpdateSessionContext usc;
779 766
780 ar = create_allocation_record (public_key, 767 ar = create_allocation_record (plugin_name,
781 plugin_name,
782 session, 768 session,
783 plugin_addr, 769 plugin_addr,
784 plugin_addr_len, 770 plugin_addr_len,