minor cleanup

This commit is contained in:
alshabib 2014-09-09 14:50:51 -07:00
parent 662dde9824
commit a159a32c5a
2 changed files with 5 additions and 4 deletions

View File

@ -166,10 +166,11 @@ public class LinkDiscovery implements TimerTask {
*
* @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 class LinkDiscovery implements TimerTask {
public void removeAllPorts() {
for (OFPortDesc port : sw.getPorts()) {
removePort(port.getPortNo());
removePort(port);
}
}

View File

@ -125,7 +125,7 @@ public class OpenFlowLinkProvider extends AbstractProvider implements LinkProvid
DeviceId.deviceId("of:" + Long.toHexString(dpid.value())),
PortNumber.portNumber(port.getPortNo().getPortNumber()));
providerService.linksVanished(cp);
ld.removePort(port.getPortNo());
ld.removePort(port);
}
}