struct Session *s = cls;
struct Plugin *plugin = s->plugin;
struct GNUNET_TIME_Relative delay;
- struct GNUNET_ATS_Information atsi[2];
+ struct GNUNET_ATS_Information atsi;
- atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
- atsi[0].value = htonl (1);
- atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
- atsi[1].value = session->ats_address_network_type;
+ atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
+ atsi.value = session->ats_address_network_type;
GNUNET_break (session->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED));
reschedule_session_timeout (session);
delay =
plugin->env->receive (plugin->env->cls, &s->target, message,
- (const struct GNUNET_ATS_Information *) &atsi,
- 2, s, s->addr, s->addrlen);
+ &atsi,
+ 1, s, s->addr, s->addrlen);
return delay;
}
s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_log (TIMEOUT_LOG,
- "Session %p was idle for %llu ms, disconnecting\n",
- s, (unsigned long long) TIMEOUT.rel_value);
+ "Session %p was idle for %s, disconnecting\n",
+ s,
+ GNUNET_STRINGS_relative_time_to_string (TIMEOUT,
+ GNUNET_YES));
/* call session destroy function */
if (s->inbound == GNUNET_NO)
&session_timeout,
s);
GNUNET_log (TIMEOUT_LOG,
- "Timeout for session %p set to %llu ms\n",
- s, (unsigned long long) TIMEOUT.rel_value);
+ "Timeout for session %p set to %s\n",
+ s,
+ GNUNET_STRINGS_relative_time_to_string (TIMEOUT,
+ GNUNET_YES));
}
&session_timeout,
s);
GNUNET_log (TIMEOUT_LOG,
- "Timeout rescheduled for session %p set to %llu ms\n",
- s, (unsigned long long) TIMEOUT.rel_value);
+ "Timeout rescheduled for session %p set to %s\n",
+ s,
+ GNUNET_STRINGS_relative_time_to_String (TIMEOUT,
+ GNUNET_YES));
}