From: Giovanni Meo Date: Wed, 29 Jan 2014 05:54:17 +0000 (+0000) Subject: Merge "Fix For Bug #335 Bug Description : Remove SW2 property "description" to a... X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~561 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=f207c0c13689d0744c2ed2eb0395076fee82ffe6;hp=-c;p=controller.git Merge "Fix For Bug #335 Bug Description : Remove SW2 property "description" to a node - not working for both OF13 and OF10 mininet." --- f207c0c13689d0744c2ed2eb0395076fee82ffe6 diff --combined opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java index ca6987ad6c,e8104b5647..19f45e63c5 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java @@@ -839,9 -839,14 +839,14 @@@ public class SwitchManager implements I String prop = entry.getKey(); if (!updateProperties.containsKey(prop)) { if (prop.equals(Description.propertyName)) { - if (!advertisedDesc.isEmpty()) { - Property desc = new Description(advertisedDesc); - propMap.put(Description.propertyName, desc); + if (advertisedDesc != null) { + if (!advertisedDesc.isEmpty()) { + Property desc = new Description(advertisedDesc); + propMap.put(Description.propertyName, desc); + } + } + else { + propMap.remove(prop); } continue; } else if (prop.equals(ForwardingMode.name)) { @@@ -1397,7 -1402,7 +1402,7 @@@ } catch (SocketException e) { log.error("Failed to acquire controller MAC: ", e); } - if (macAddress != null) { + if (macAddress != null && macAddress.length != 0) { break; } }