|| GNUNET_NO == GMP_is_neighbor (prev_peer))
{
if (GMC_is_origin (c, GNUNET_YES))
- GNUNET_STATISTICS_update (stats, "# local bad paths", 1, GNUNET_NO);
+ GNUNET_STATISTICS_update (stats, "# local bad paths", 1, GNUNET_NO);
GNUNET_STATISTICS_update (stats, "# bad paths", 1, GNUNET_NO);
LOG (GNUNET_ERROR_TYPE_DEBUG, " register neighbors failed\n");
- LOG (GNUNET_ERROR_TYPE_DEBUG, " prev: %s, neighbor: %d\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " prev: %s, neighbor?: %d\n",
GMP_2s (prev_peer), GMP_is_neighbor (prev_peer));
- LOG (GNUNET_ERROR_TYPE_DEBUG, " next: %s, neighbor: %d\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " next: %s, neighbor?: %d\n",
GMP_2s (next_peer), GMP_is_neighbor (next_peer));
return GNUNET_SYSERR;
}
peer = get_next_hop (c);
if (GNUNET_OK != GMP_remove_connection (peer, c))
{
- GNUNET_break (MESH_CONNECTION_NEW == c->state);
- LOG (GNUNET_ERROR_TYPE_ERROR, " cstate: %u\n", c->state);
+ GNUNET_break (MESH_CONNECTION_NEW == c->state/*
+ || MESH_CONNECTION_DESTROYED == c->state*/);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
+ if (NULL != c->t) GMT_debug (c->t);
}
peer = get_prev_hop (c);
if (GNUNET_OK != GMP_remove_connection (peer, c))
{
- GNUNET_break (MESH_CONNECTION_NEW == c->state);
- LOG (GNUNET_ERROR_TYPE_ERROR, " cstate: %u\n", c->state);
+ GNUNET_break (MESH_CONNECTION_NEW == c->state/*
+ || MESH_CONNECTION_DESTROYED == c->state*/);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
+ if (NULL != c->t) GMT_debug (c->t);
}
}
return GNUNET_OK;
}
+ if (GNUNET_NO != c->destroy)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " connection being destroyed\n");
+ return GNUNET_OK;
+ }
+
oldstate = c->state;
LOG (GNUNET_ERROR_TYPE_DEBUG, " via peer %s\n", GNUNET_i2s (peer));
pi = GMP_get (peer);
if (NULL == c)
{
GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO);
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "WARNING connection %s unknown\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING enc on unknown connection %s\n",
GNUNET_h2s (&msg->cid));
return GNUNET_OK;
}
if (NULL == c)
{
GNUNET_STATISTICS_update (stats, "# unknown connection", 1, GNUNET_NO);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING connection unknown\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING kx on unknown connection %s\n",
+ GNUNET_h2s (&msg->cid));
return GNUNET_OK;
}
LOG (GNUNET_ERROR_TYPE_DEBUG, " on connection %s\n", GMC_2s (c));