* preference is satisfied by ATS
*
* @param ph performance handle
+ * @param scope the time interval this valid for: [now - scope .. now]
* @param peer identifies the peer
* @param ... 0-terminated specification of the desired changes
*/
void
GNUNET_ATS_performance_give_feedback (struct GNUNET_ATS_PerformanceHandle *ph,
- const struct GNUNET_PeerIdentity *peer, ...)
+ const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_TIME_Relative scope, ...)
{
struct PendingMessage *p;
struct FeedbackPreferenceMessage *m;
enum GNUNET_ATS_PreferenceKind kind;
count = 0;
- va_start (ap, peer);
+ va_start (ap, scope);
while (GNUNET_ATS_PREFERENCE_END !=
(kind = va_arg (ap, enum GNUNET_ATS_PreferenceKind)))
{
m = (struct FeedbackPreferenceMessage *) &p[1];
m->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK);
m->header.size = htons (msize);
- m->num_preferences = htonl (count);
+ m->scope = GNUNET_TIME_relative_hton (scope);
+ m->num_feedback = htonl (count);
m->peer = *peer;
pi = (struct PreferenceInformation *) &m[1];
count = 0;
- va_start (ap, peer);
+ va_start (ap, scope);
while (GNUNET_ATS_PREFERENCE_END !=
(kind = va_arg (ap, enum GNUNET_ATS_PreferenceKind)))
{