diff options
Diffstat (limited to 'framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl')
-rw-r--r-- | framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java b/framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java index 78c6468e..f0ad2b01 100644 --- a/framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java +++ b/framework/src/onos/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java @@ -148,7 +148,7 @@ public class DistributedTunnelStore @Override public TunnelId createOrUpdateTunnel(Tunnel tunnel) { // tunnelIdAsKeyStore. - if (tunnel.tunnelId() != null && !"".equals(tunnel.tunnelId())) { + if (tunnel.tunnelId() != null && !"".equals(tunnel.tunnelId().toString())) { Tunnel old = tunnelIdAsKeyStore.get(tunnel.tunnelId()); if (old == null) { log.info("This tunnel[" + tunnel.tunnelId() + "] is not available."); @@ -290,9 +290,10 @@ public class DistributedTunnelStore TunnelSubscription order = new TunnelSubscription(appId, null, null, tunnelId, null, null, annotations); Tunnel result = tunnelIdAsKeyStore.get(tunnelId); - if (result != null || Tunnel.State.INACTIVE.equals(result.state())) { + if (result == null || Tunnel.State.INACTIVE.equals(result.state())) { return null; } + orderSet.add(order); orderRelationship.put(appId, orderSet); return result; |