ping.challenge = htonl(va->challenge);
memcpy(&ping.target, &neighbour->id, sizeof(struct GNUNET_PeerIdentity));
if (peer_address->validated != GNUNET_YES)
- memcpy(message_buf, our_hello, hello_size);
+ {
+ memcpy(message_buf, our_hello, hello_size);
+ }
if (peer_address->addr != NULL)
{
#endif
if (peer_address->validated != GNUNET_YES)
GNUNET_STATISTICS_update (stats,
- gettext_noop ("# PING+HELLO messages sent"),
+ gettext_noop ("# PING with HELLO messages sent"),
+ 1,
+ GNUNET_NO);
+ else
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# PING without HELLO messages sent"),
1,
GNUNET_NO);
GNUNET_HELLO_size(hello)));
chvc = chvc->next;
}
+
+#if BREAK_TESTS
+ struct NeighbourList *temp_neighbor = find_neighbour(&target);
+ if ((NULL != temp_neighbor))
+ {
+ fprintf(stderr, "Already know peer, ignoring hello\n");
+ return GNUNET_OK;
+ }
+#endif
+
#if DEBUG_TRANSPORT_HELLO > 2
if (plugin != NULL)
{
sizeof (struct GNUNET_PeerIdentity)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Received `%s' message from `%s' not destined for me!\n"),
+ _("Received `%s' message from `%s' destined for `%s' which is not me!\n"),
"PING",
(sender_address != NULL)
? a2s (plugin->short_name,
(const struct sockaddr *)sender_address,
sender_address_len)
- : "<inbound>");
+ : "<inbound>",
+ GNUNET_i2s (&ping->target));
return GNUNET_SYSERR;
}
#if DEBUG_PING_PONG