GNUNET_sh2s (&route->cid.connection_of_tunnel));
GNUNET_assert (route ==
GNUNET_CONTAINER_heap_remove_node (route->hn));
+ GNUNET_assert (GNUNET_YES ==
+ GNUNET_CONTAINER_multishortmap_remove (routes,
+ &route->cid.connection_of_tunnel,
+ route));
destroy_direction (&route->prev);
destroy_direction (&route->next);
GNUNET_free (route);
}
/* We're just an intermediary peer, route the message along its path */
- route = get_route (&msg->cid);
route_message (peer,
&msg->cid,
&msg->header);
- destroy_route (route);
+ route = get_route (&msg->cid);
+ if (NULL != route)
+ destroy_route (route);
/* FIXME: also destroy paths we MAY have up to the specified link! */
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Received CONNECTION_DESTROY for connection %s. Destroying route.\n",
GNUNET_sh2s (&msg->cid.connection_of_tunnel));
- route = get_route (&msg->cid);
route_message (peer,
&msg->cid,
&msg->header);
- destroy_route (route);
+ route = get_route (&msg->cid);
+ if (NULL != route)
+ destroy_route (route);
}