#endif
n = find_neighbour (peer);
if (n == NULL)
- {
- GNUNET_break (0);
- return;
- }
- GNUNET_break (n->is_connected);
+ n = create_neighbour (peer);
+ if (n == NULL)
+ return;
n->last_latency = latency;
n->last_distance = distance;
up = (n->status == PEER_STATE_KEY_CONFIRMED);
handle_pong(plugin, message, peer, sender_address, sender_address_len);
break;
default:
- if (! n->received_pong)
- {
- GNUNET_break_op (0);
-#if DEBUG_TRANSPORT || 1
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received message of type %u from `%4s', prior to key confirmation (dropped).\n",
- ntohs (message->type), GNUNET_i2s (peer));
-#endif
- break;
- }
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received message of type %u from `%4s', sending to all clients.\n",
im->latency = GNUNET_TIME_relative_hton (n->latency);
im->peer = *peer;
memcpy (&im[1], message, msize);
-
cpos = clients;
while (cpos != NULL)
{
#endif
n = neighbour_find (h, &im->peer);
if (n == NULL)
- {
- GNUNET_break (0);
- break;
- }
+ n = neighbour_add (h, &im->peer);
+ if (n == NULL)
+ break;
if (h->rec != NULL)
h->rec (h->cls, &im->peer, imm,
GNUNET_TIME_relative_ntoh (im->latency), ntohs(im->distance));