X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50102ec1c30562e20d450afa7015374387bf1904..39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f:/src/kernel/routing/FloydZone.cpp diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index c414f968e7..7b2c688cd0 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -96,7 +96,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical); /* Check that the route does not already exist */ - if (gw_dst) // netzone route (to adapt the error message, if any) + if (gw_dst && gw_src) // netzone route (to adapt the error message, if any) xbt_assert(nullptr == TO_FLOYD_LINK(src->id(), dst->id()), "The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).", src->get_cname(), gw_src->get_cname(), dst->get_cname(), gw_dst->get_cname()); @@ -110,7 +110,7 @@ void FloydZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoi TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size(); if (symmetrical) { - if (gw_dst) // netzone route (to adapt the error message, if any) + if (gw_dst && gw_src) // netzone route (to adapt the error message, if any) xbt_assert( nullptr == TO_FLOYD_LINK(dst->id(), src->id()), "The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",