Bug 2452 - Topology incomplete (half of the links) 47/13247/1
authorMartin Bobak <mbobak@cisco.com>
Mon, 1 Dec 2014 09:29:26 +0000 (10:29 +0100)
committerMartin Bobak <mbobak@cisco.com>
Mon, 1 Dec 2014 09:29:30 +0000 (10:29 +0100)
- initial operational status set to RUN

Change-Id: I22ff6863391405348b5937efa997fb7248809b23
Signed-off-by: Martin Bobak <mbobak@cisco.com>
applications/lldp-speaker/src/main/java/org/opendaylight/openflowplugin/applications/lldpspeaker/LLDPSpeaker.java

index 81d2a88f25c83fe29d6713b77e013cae8016c1a7..c6838993073c16730496113651e1fef0b6cb898c 100644 (file)
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
  */
 public class LLDPSpeaker implements AutoCloseable, NodeConnectorEventsObserver, Runnable {
 
-    private static OperStatus operationalStatus;
+    private static OperStatus operationalStatus = OperStatus.RUN;
 
     private static final Logger LOG = LoggerFactory.getLogger(LLDPSpeaker.class);
     private static final long LLDP_FLOOD_PERIOD = 5;
@@ -88,7 +88,7 @@ public class LLDPSpeaker implements AutoCloseable, NodeConnectorEventsObserver,
      */
     @Override
     public void run() {
-        if (operationalStatus.equals(OperStatus.RUN)) {
+        if (OperStatus.RUN.equals(operationalStatus)) {
             LOG.debug("Sending LLDP frames to {} ports...", nodeConnectorMap.keySet().size());
 
             for (InstanceIdentifier<NodeConnector> nodeConnectorInstanceId : nodeConnectorMap.keySet()) {