{
struct NeighbourMapEntry *n;
+ if (0 ==
+ memcmp (&GST_my_identity,
+ peer,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Cowardly refusing to consider myself my neighbour!\n");
+ return NULL;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating new neighbour entry for `%s'\n",
GNUNET_i2s (peer));
- GNUNET_assert (0 !=
- memcmp (&GST_my_identity,
- peer,
- sizeof (struct GNUNET_PeerIdentity)));
n = GNUNET_new (struct NeighbourMapEntry);
n->id = *peer;
n->ack_state = ACK_UNDEFINED;
{
/* This is a new neighbour and set to not connected */
n = setup_neighbour (peer);
+ GNUNET_assert (NULL != n);
}
/* Remember this SYN message in neighbour */
/* Get rid of remains and re-try */
free_neighbour (n);
n = setup_neighbour (peer);
+ GNUNET_assert (NULL != n);
/* Remember the SYN time stamp for ACK message */
n->ack_state = ACK_SEND_SYN_ACK;
n->connect_ack_timestamp = ts;
if (NULL == (n = lookup_neighbour (peer)))
{
n = setup_neighbour (peer);
+ if (NULL == n)
+ {
+ /* not sure how this can happen... */
+ GNUNET_break (0);
+ goto cleanup;
+ }
n->state = GNUNET_TRANSPORT_PS_INIT_ATS;
}