im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV);
im->latency = GNUNET_TIME_relative_hton (n->latency);
im->peer = n->id;
+ im->distance = ntohl(n->distance);
memcpy (&im[1], message, msize);
cpos = clients;
while (cpos != NULL)
n->latency = fal->latency;
else
n->latency.value = (fal->latency.value + n->latency.value) / 2;
+
n->distance = fal->distance;
if (GNUNET_NO == n->received_pong)
{
static struct GNUNET_TIME_Relative
plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message,
- unsigned int distance,
+ uint32_t distance,
struct Session *session,
const char *sender_address,
size_t sender_address_len)
if (h->nc_cb != NULL)
h->nc_cb (h->cls, &n->id,
GNUNET_TIME_relative_ntoh (cim->latency),
- ntohs (cim->distance));
+ ntohl (cim->distance));
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT:
if (size != sizeof (struct DisconnectInfoMessage))
}
if (h->rec != NULL)
h->rec (h->cls, &im->peer, imm,
- GNUNET_TIME_relative_ntoh (im->latency), ntohs(im->distance));
+ GNUNET_TIME_relative_ntoh (im->latency), ntohl(im->distance));
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,