From a548fccb74eb0eef777dce37da81ee64a6a0728d Mon Sep 17 00:00:00 2001
From: Wilson Ng <wilson.ng@bigswitch.com>
Date: Sat, 14 Jul 2012 07:01:52 -0700
Subject: [PATCH] Fix Device Manager entity handling code [BSC-2046]

During flow reconciliation, device manager should not call learnDeviceByEntity, which would incorrectly update timestamps of entities existing in flow cache. It should call findDeviceByEntity instead.
---
 .../devicemanager/internal/DeviceManagerImpl.java             | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java b/src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
index 7592332f1..b1cb6d457 100755
--- a/src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
+++ b/src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
@@ -527,8 +527,8 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
             if (srcEntity == null)
                 return Command.STOP;
 
-            // Learn/lookup device information
-            Device srcDevice = learnDeviceByEntity(srcEntity);
+            // Find the device by source entity
+            Device srcDevice = findDeviceByEntity(srcEntity);
             if (srcDevice == null)
                 return Command.STOP;
 
-- 
GitLab