commit | a159a32c5a5c4bf3adb7f88bcd5cb1c0f4141abc | [log] [tgz] |
---|---|---|
author | alshabib <alshabibi.ali@gmail.com> | Tue Sep 09 14:50:51 2014 -0700 |
committer | alshabib <alshabibi.ali@gmail.com> | Tue Sep 09 14:50:51 2014 -0700 |
tree | b226e250271c7dff675d1e2c867676e79620a792 | |
parent | 662dde982427a6a015315e241810ae9fb015b549 [diff] |
minor cleanup
diff --git a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java index f250660..2f0d5d8 100644 --- a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java +++ b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/LinkDiscovery.java
@@ -166,10 +166,11 @@ * * @param port the port */ - public void removePort(final OFPort port) { + public void removePort(final OFPortDesc port) { // Ignore ports that are not on this switch - int portnum = port.getPortNumber(); + int portnum = port.getPortNo().getPortNumber(); + this.ports.remove(portnum); synchronized (this) { if (this.slowPorts.contains(portnum)) { this.slowPorts.remove(portnum); @@ -383,7 +384,7 @@ public void removeAllPorts() { for (OFPortDesc port : sw.getPorts()) { - removePort(port.getPortNo()); + removePort(port); } }
diff --git a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java index af0bb65..2de4b8c 100644 --- a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java +++ b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
@@ -125,7 +125,7 @@ DeviceId.deviceId("of:" + Long.toHexString(dpid.value())), PortNumber.portNumber(port.getPortNo().getPortNumber())); providerService.linksVanished(cp); - ld.removePort(port.getPortNo()); + ld.removePort(port); } }