*/
/**
- * @file transport/gnunet_transport_plugin.http.c
+ * @file transport/plugin_transport_http.c
* @brief http transport service plugin
* @author Matthias Wachs
*/
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 (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;