struct GNUNET_TIME_Relative ret;
uint16_t type;
-
ret = GNUNET_TIME_UNIT_ZERO;
if (NULL != message)
{
(void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed,
NULL);
/* TODO: if 'session != NULL', and timestamp more recent than the
- previous one, maybe notify ATS that this is now the preferred
- * way to communicate with this peer (other peer switched transport) */
+ * previous one, maybe notify ATS that this is now the preferred
+ * * way to communicate with this peer (other peer switched transport) */
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT:
/* TODO: do some validation to prevent an attacker from sending
break;
}
}
+
+ GNUNET_assert ((ats_count > 0) && (ats != NULL));
+
GNUNET_ATS_address_update (GST_ats, peer, GNUNET_TIME_absolute_get (), /* valid at least until right now... */
plugin_name, session, sender_address,
sender_address_len, ats, ats_count);
{
struct Session *session = cls;
struct GNUNET_TIME_Relative delay;
+ struct GNUNET_TRANSPORT_ATS_Information ats;
+
+ ats.type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+ ats.value = htonl (0);
session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK;
delay =
session->plugin->env->receive (session->plugin->env->cls,
- &session->target, NULL, NULL, 0, session,
+ &session->target, NULL, &ats, 1, session,
NULL, 0);
if (delay.rel_value == 0)
GNUNET_SERVER_receive_done (session->client, GNUNET_OK);