Fix a bug caused by misuse of policy comparator 04/84204/1
authorSungbae Yoo <sungbae.yoo@samsung.com>
Wed, 17 Aug 2016 09:31:41 +0000 (18:31 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Wed, 17 Aug 2016 09:32:23 +0000 (18:32 +0900)
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: If12f400eed747bdea33e30c2e6abe4d0166bca73

server/policy-manager.cpp

index 5f958f9..ea6137f 100644 (file)
@@ -66,10 +66,8 @@ void PolicyManager::flushEffectivePolicy(const std::string& name)
                if (isFirstClient) {
                        isFirstClient = false;
                        result = newState;
-               }
-
-               if (comparator(result, newState)) {
-                       result = comparator(result, newState);
+               } else if (comparator(result, newState)) {
+                       result = newState;
                }
        }