if (do_hello)
{
GNUNET_STATISTICS_update (stats,
- gettext_noop ("# peerinfo iterate requests"),
+ gettext_noop ("# peerinfo new neighbor iterate requests"),
1,
GNUNET_NO);
GNUNET_STATISTICS_update (stats,
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);
const struct GNUNET_HELLO_Message *hello;
struct CheckHelloValidatedContext *chvc;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey;
-#if DEBUG_TRANSPORT_HELLO
+#if DEBUG_TRANSPORT_HELLO > 2
char *my_id;
#endif
hsize = ntohs (message->size);
chvc->hello,
GNUNET_TIME_absolute_get ()).value > 0)
{
-#if DEBUG_TRANSPORT_HELLO
+#if DEBUG_TRANSPORT_HELLO > 2
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received duplicate `%s' message for `%4s'; ignored\n",
"HELLO",
GNUNET_HELLO_size(hello)));
chvc = chvc->next;
}
-#if DEBUG_TRANSPORT_HELLO
+
+#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)
{
my_id = GNUNET_strdup(GNUNET_i2s(plugin->env.my_identity));
/* finally, check if HELLO was previously validated
(continuation will then schedule actual validation) */
GNUNET_STATISTICS_update (stats,
- gettext_noop ("# peerinfo iterate requests"),
+ gettext_noop ("# peerinfo process hello iterate requests"),
1,
GNUNET_NO);
GNUNET_STATISTICS_update (stats,
sizeof (struct GNUNET_PeerIdentity)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Received `%s' message not destined for me!\n"),
- "PING");
+ _("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>",
+ GNUNET_i2s (&ping->target));
return GNUNET_SYSERR;
}
#if DEBUG_PING_PONG