commit | d631e42168b07305f6add79a0fcbf097d1030415 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 19 00:18:59 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 19 00:23:27 2014 -0700 |
tree | 578fc8218042253ccda0e94f59c2e3082ae245f3 | |
parent | fb0e4d6c010a63cdc07c716b55502be4a294f038 [diff] |
bugfix: DeviceManager#applyRole should ignore NONE Change-Id: Ib235c4853b0a7e504a8ee42e9bc9eafe99257fc8
diff --git a/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java index 017d03a..7b7eb82 100644 --- a/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java
@@ -144,7 +144,7 @@ // Applies the specified role to the device; ignores NONE private void applyRole(DeviceId deviceId, MastershipRole newRole) { - if (newRole.equals(MastershipRole.NONE)) { + if (!newRole.equals(MastershipRole.NONE)) { Device device = store.getDevice(deviceId); // FIXME: Device might not be there yet. (eventual consistent) if (device == null) {