[IOT-1792] rectified bad check issue in pstatresource
authorsaurabh.s9 <saurabh.s9@samsung.com>
Wed, 29 Mar 2017 04:46:18 +0000 (10:16 +0530)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 31 Mar 2017 10:30:47 +0000 (10:30 +0000)
Change-Id: Id8dbb670961d1efc40114f9de757cd31b296c2d4
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18311
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/pstatresource.c

index f884dc2..e127112 100644 (file)
@@ -1031,7 +1031,7 @@ OCStackResult SetPstatSelfOwnership(const OicUuid_t* newROwner)
         return ret;
     }
 
-    if( newROwner && (false == gPstat->isOp) && (true == (TAKE_OWNER && gPstat->cm)) )
+    if( newROwner && (false == gPstat->isOp) && (TAKE_OWNER & gPstat->cm) )
     {
         gPstat->cm = (OicSecDpm_t)(gPstat->cm & (~TAKE_OWNER));
         gPstat->isOp = true;