mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 13:21:21 +02:00
minor cleanup
This commit is contained in:
parent
662dde9824
commit
a159a32c5a
@ -166,10 +166,11 @@ public class LinkDiscovery implements TimerTask {
|
|||||||
*
|
*
|
||||||
* @param port the port
|
* @param port the port
|
||||||
*/
|
*/
|
||||||
public void removePort(final OFPort port) {
|
public void removePort(final OFPortDesc port) {
|
||||||
// Ignore ports that are not on this switch
|
// Ignore ports that are not on this switch
|
||||||
|
|
||||||
int portnum = port.getPortNumber();
|
int portnum = port.getPortNo().getPortNumber();
|
||||||
|
this.ports.remove(portnum);
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (this.slowPorts.contains(portnum)) {
|
if (this.slowPorts.contains(portnum)) {
|
||||||
this.slowPorts.remove(portnum);
|
this.slowPorts.remove(portnum);
|
||||||
@ -383,7 +384,7 @@ public class LinkDiscovery implements TimerTask {
|
|||||||
|
|
||||||
public void removeAllPorts() {
|
public void removeAllPorts() {
|
||||||
for (OFPortDesc port : sw.getPorts()) {
|
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())),
|
DeviceId.deviceId("of:" + Long.toHexString(dpid.value())),
|
||||||
PortNumber.portNumber(port.getPortNo().getPortNumber()));
|
PortNumber.portNumber(port.getPortNo().getPortNumber()));
|
||||||
providerService.linksVanished(cp);
|
providerService.linksVanished(cp);
|
||||||
ld.removePort(port.getPortNo());
|
ld.removePort(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user