ntohs(message->size),
GNUNET_i2s(&(ps->peercontext)->identity),http_plugin_address_to_string(NULL,ps->addr,ps->addrlen));
#endif
+ struct GNUNET_TRANSPORT_ATS_Information distance[2];
+ distance[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+ distance[0].value = htonl (1);
+ distance[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+ distance[1].value = htonl (0);
+
delay = pc->plugin->env->receive (ps->peercontext->plugin->env->cls,
&pc->identity,
- message, 1, ps,
+ message,
+ (const struct GNUNET_TRANSPORT_ATS_Information *) &distance,
+ 2,
+ ps,
NULL,
0);
pc->delay = delay;
ntohs(message->size),
GNUNET_i2s(&(pc->identity)),http_plugin_address_to_string(NULL,ps->addr,ps->addrlen));
#endif
+ struct GNUNET_TRANSPORT_ATS_Information distance[2];
+ distance[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+ distance[0].value = htonl (1);
+ distance[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+ distance[1].value = htonl (0);
+
delay = pc->plugin->env->receive (pc->plugin->env->cls,
&pc->identity,
- message, 1, ps,
+ message,
+ (const struct GNUNET_TRANSPORT_ATS_Information *) &distance, 2,
+ ps,
ps->addr,
ps->addrlen);
if (delay.rel_value > 0)
{
#if DEBUG_HTTP
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: Inbound quota management: delay next read for %llu ms \n", ps, delay.abs_value);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: Inbound quota management: delay next read for %llu ms \n", ps, delay.rel_value);
#endif
pc->reset_task = GNUNET_SCHEDULER_add_delayed (delay, &reset_inbound_quota_delay, pc);
}
if (force_address != GNUNET_YES)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"No existing connection: creating new session %X to peer %s\n", ps, GNUNET_i2s(target));
#endif
- if ((addrlen!=0) && (addr!=NULL))
- {
- ps->addr = GNUNET_malloc(addrlen);
- memcpy(ps->addr,addr,addrlen);
- ps->addrlen = addrlen;
- }
+ ps->addr = GNUNET_malloc(addrlen);
+ memcpy(ps->addr,addr,addrlen);
+ ps->addrlen = addrlen;
+ /*
else
{
ps->addr = NULL;
ps->addrlen = 0;
- }
+ }*/
ps->direction=OUTBOUND;
ps->recv_connected = GNUNET_NO;
ps->recv_force_disconnect = GNUNET_NO;