summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-13 16:59:57 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-13 16:59:57 +0000
commit1257490cb630ade315a196a724d0233e662afb2c (patch)
tree0d9c01593a1aa73d8f6490127b640d67da69b54c /src/transport/gnunet-service-transport_manipulation.c
parent35d79cb1941c9f9607195b8760d8a14d836e6397 (diff)
implementing 0003268 to inbound information in HELLO addresses
All transport plugin functions are modified to use HELLO addresses instead of peer,address,address_length All plugins are modified to use HELLO addresses internally This commit can break transport functionality: core tests on my system still pass, but transport tests may still fail, errors messages may occurs or crashs Will be fixed asap
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.c')
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index 4521047c9..06171d306 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -529,9 +529,10 @@ GST_manipulation_manipulate_metrics(const struct GNUNET_PeerIdentity *peer,
* @return manipulated delay for next receive
*/
struct GNUNET_TIME_Relative
-GST_manipulation_recv(void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message, struct Session *session,
- const char *sender_address, uint16_t sender_address_len)
+GST_manipulation_recv (void *cls,
+ const struct GNUNET_HELLO_Address *address,
+ struct Session *session,
+ const struct GNUNET_MessageHeader *message)
{
struct TM_Peer *tmp;
uint32_t p_recv_delay;
@@ -547,7 +548,7 @@ GST_manipulation_recv(void *cls, const struct GNUNET_PeerIdentity *peer,
else
m_delay = GNUNET_TIME_UNIT_ZERO;
- if (NULL != (tmp = GNUNET_CONTAINER_multipeermap_get(man_handle.peers, peer)))
+ if (NULL != (tmp = GNUNET_CONTAINER_multipeermap_get(man_handle.peers, &address->peer)))
{
/* Manipulate receive delay */
p_recv_delay = find_metric(tmp, GNUNET_ATS_QUALITY_NET_DELAY, TM_RECEIVE);
@@ -555,14 +556,15 @@ GST_manipulation_recv(void *cls, const struct GNUNET_PeerIdentity *peer,
m_delay.rel_value_us = p_recv_delay; /* Peer specific delay */
}
- quota_delay = GST_receive_callback(cls, peer, message, session,
- sender_address, sender_address_len);
+ quota_delay = GST_receive_callback(cls, address, session, message);
if (quota_delay.rel_value_us > m_delay.rel_value_us)
m_delay = quota_delay;
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "Delaying next receive for peer `%s' for %s\n", GNUNET_i2s (peer), GNUNET_STRINGS_relative_time_to_string (m_delay, GNUNET_YES));
+ "Delaying next receive for peer `%s' for %s\n",
+ GNUNET_i2s (&address->peer),
+ GNUNET_STRINGS_relative_time_to_string (m_delay, GNUNET_YES));
return m_delay;
}