fix of BUG-146 92/2792/1
authorMichal Rehak <mirehak@cisco.com>
Sat, 16 Nov 2013 08:44:08 +0000 (09:44 +0100)
committerMichal Rehak <mirehak@cisco.com>
Sat, 16 Nov 2013 08:44:14 +0000 (09:44 +0100)
todos removed

Change-Id: Ife0ebc4784d81573a0c8d35c81239953e40a8b09
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/session/OFSessionUtil.java

index cd00871c02dc854f2e04fb55350a91a660730df2..510cd4430f7e73f4d3447aed3b6d581a3eb0abd3 100644 (file)
@@ -45,7 +45,7 @@ public abstract class OFSessionUtil {
             LOG.debug("registering sessionKey: {}", Arrays.toString(sessionKey.getId()));
         }
         
-        if (features.getAuxiliaryId() == 0) {
+        if (features.getAuxiliaryId() == null || features.getAuxiliaryId() == 0) {
             // handle primary
             if (sessionContext != null) {
                 LOG.warn("duplicate datapathId occured while registering new switch session: "
@@ -59,7 +59,6 @@ public abstract class OFSessionUtil {
             context.setSessionKey(sessionKey);
             connectionConductor.setSessionContext(context);
             context.setValid(true);
-            //TODO: retrieve listenerMapping from sessionManager and push it to conductor
             getSessionManager().addSessionContext(sessionKey, context);
         } else {
             // handle auxiliary
@@ -78,7 +77,6 @@ public abstract class OFSessionUtil {
                             auxiliaryKey);
                 }
 
-                //TODO: retrieve listenerMapping from sessionManager and push it to conductor
                 sessionContext.addAuxiliaryConductor(auxiliaryKey,
                         connectionConductor);
                 connectionConductor.setSessionContext(sessionContext);