Fix issues of RCSResourceObject
authorcoderhyme <jhyo.kim@samsung.com>
Thu, 22 Oct 2015 04:24:25 +0000 (21:24 -0700)
committerHabib Virji <habib.virji@samsung.com>
Thu, 22 Oct 2015 09:08:45 +0000 (09:08 +0000)
commit8310ed98e88468180a9534d9b0e632dddb15965d
treecf9f5bcfaa26c027ad1295767270773fe2808dc4
parentc5e088d5e4267df7cf37df1ca56de83ea2d284f5
Fix issues of RCSResourceObject

Fix data race for handlers with shared_ptr which has guaranteed atomic operations for setting and loading.
LockGuard's destructor is now noexcept(false) and it will emit an exception if and only if the destruction is not caused by stack unwinding.
Some minor issues of the test are fixed.

Change-Id: I12ccb6adb4849642d266f7af5b1e28a2f6d35f83
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3929
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
service/resource-encapsulation/android/service/src/main/java/org/iotivity/service/server/RcsResourceObject.java
service/resource-encapsulation/android/service/src/main/jni/JniRcsLockedAttributes.cpp
service/resource-encapsulation/android/service/src/main/jni/JniRcsResourceObject.cpp
service/resource-encapsulation/include/RCSResourceObject.h
service/resource-encapsulation/src/serverBuilder/src/RCSResourceObject.cpp
service/resource-encapsulation/src/serverBuilder/unittests/RCSResourceObjectTest.cpp