[IOT-1744] Fix for race-condition crash
authorGeorge Nash <george.nash@intel.com>
Fri, 20 Jan 2017 22:02:48 +0000 (14:02 -0800)
committerRick Bell <richard.s.bell@intel.com>
Mon, 23 Jan 2017 17:52:01 +0000 (17:52 +0000)
commit9a29b5716db76e686e8ba0575ba6eeb98990d5f6
tree1d4993557302b5507ff03f3e264865db69efc173
parent5a47a698d6e320346f597514e6ef5f70525d852f
[IOT-1744] Fix for race-condition crash

The resource-container was crashing when due to failure to
grab a lock when the resorce container was being stopped

This resulted in code trying to use the resource container
at the same time it was being unregistered resulting in
a segfault.

Note: RemoteResourceUnitTest.onCacheCBCalled test is still
failing due to a different issue. That test must be fixed
before IOT-1744 can be closed.

Bug: https://jira.iotivity.org/browse/IOT-1744
Change-Id: I2dc5061c1693cc81c4f54a65a5233790fb5336d2
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16637
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
service/resource-container/src/ResourceContainerImpl.cpp