X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..877fd76c223fe2fba051129f3ba0339bb5566bce:/src/kernel/routing/AsFull.cpp diff --git a/src/kernel/routing/AsFull.cpp b/src/kernel/routing/AsFull.cpp index 95f8f72b40..eb84b0c392 100644 --- a/src/kernel/routing/AsFull.cpp +++ b/src/kernel/routing/AsFull.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/routing/AsFull.hpp" +#include "src/kernel/routing/NetCard.hpp" #include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf"); @@ -61,7 +62,7 @@ AsFull::~AsFull(){ void AsFull::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t res, double* lat) { - XBT_DEBUG("full getLocalRoute from %s[%d] to %s[%d]", src->name().c_str(), src->id(), dst->name().c_str(), dst->id()); + XBT_DEBUG("full getLocalRoute from %s[%d] to %s[%d]", src->cname(), src->id(), dst->cname(), dst->id()); size_t table_size = vertices_.size(); sg_platf_route_cbarg_t e_route = TO_ROUTE_FULL(src->id(), dst->id()); @@ -81,9 +82,6 @@ void AsFull::addRoute(sg_platf_route_cbarg_t route) { NetCard* src = route->src; NetCard* dst = route->dst; - const char* srcName = src->name().c_str(); - const char* dstName = dst->name().c_str(); - addRouteCheckParams(route); size_t table_size = vertices_.size(); @@ -94,11 +92,12 @@ void AsFull::addRoute(sg_platf_route_cbarg_t route) /* Check that the route does not already exist */ if (route->gw_dst) // AS route (to adapt the error message, if any) xbt_assert(nullptr == TO_ROUTE_FULL(src->id(), dst->id()), - "The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).", srcName, - route->gw_src->name().c_str(), dstName, route->gw_dst->name().c_str()); + "The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).", + src->cname(), route->gw_src->cname(), dst->cname(), route->gw_dst->cname()); else xbt_assert(nullptr == TO_ROUTE_FULL(src->id(), dst->id()), - "The route between %s and %s already exists (Rq: routes are symmetrical by default).", srcName, dstName); + "The route between %s and %s already exists (Rq: routes are symmetrical by default).", src->cname(), + dst->cname()); /* Add the route to the base */ TO_ROUTE_FULL(src->id(), dst->id()) = newExtendedRoute(hierarchy_, route, 1); @@ -114,11 +113,11 @@ void AsFull::addRoute(sg_platf_route_cbarg_t route) xbt_assert( nullptr == TO_ROUTE_FULL(dst->id(), src->id()), "The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.", - dstName, route->gw_dst->name().c_str(), srcName, route->gw_src->name().c_str()); + dst->cname(), route->gw_dst->cname(), src->cname(), route->gw_src->cname()); else xbt_assert(nullptr == TO_ROUTE_FULL(dst->id(), src->id()), "The route between %s and %s already exists. You should not declare the reverse path as symmetrical.", - dstName, srcName); + dst->cname(), src->cname()); TO_ROUTE_FULL(dst->id(), src->id()) = newExtendedRoute(hierarchy_, route, 0); TO_ROUTE_FULL(dst->id(), src->id())->link_list->shrink_to_fit();