alshabib

minor cleanup

......@@ -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);
}
}
......
......@@ -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);
}
}
......