X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Frouting%2Fdijkstra_implementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Frouting%2Fdijkstra_implementation%2Finternal%2FDijkstraImplementation.java;h=64cc3fbe01045f8e2bf372fbae0ee8e360f9f908;hb=ab59b3b28b16f1a87d07b37cdc6dbe882d255bb5;hp=05ec5d40530919941dd69f67a197111c7a565687;hpb=617bdfee08c9d5b34e104ad68317ccc09883ec29;p=controller.git diff --git a/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/DijkstraImplementation.java b/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/DijkstraImplementation.java index 05ec5d4053..64cc3fbe01 100644 --- a/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/DijkstraImplementation.java +++ b/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/DijkstraImplementation.java @@ -111,22 +111,14 @@ public class DijkstraImplementation implements IRouting, ITopologyManagerAware { .getNodeConnectorProp(dstNC, Bandwidth.BandwidthPropName); - if ((bwSrc == null) || (bwDst == null)) { - log.error("bwSrc:{} or bwDst:{} is null", bwSrc, bwDst); - return (double) -1; - } - - long srcLinkSpeed = bwSrc.getValue(); - if (srcLinkSpeed == 0) { - log.trace("Edge {}: srcLinkSpeed is 0. Setting to {}!", - e, DEFAULT_LINK_SPEED); - srcLinkSpeed = DEFAULT_LINK_SPEED; + long srcLinkSpeed = 0, dstLinkSpeed = 0; + if ((bwSrc == null) || ((srcLinkSpeed = bwSrc.getValue()) == 0)) { + log.debug("srcNC: {} - Setting srcLinkSpeed to Default!",srcNC); + srcLinkSpeed = DEFAULT_LINK_SPEED; } - - long dstLinkSpeed = bwDst.getValue(); - if (dstLinkSpeed == 0) { - log.trace("Edge {}: dstLinkSpeed is 0. Setting to {}!", - e, DEFAULT_LINK_SPEED); + + if ((bwDst == null) || ((dstLinkSpeed = bwDst.getValue()) == 0)) { + log.debug("dstNC: {} - Setting dstLinkSpeed to Default!",dstNC); dstLinkSpeed = DEFAULT_LINK_SPEED; }