Synchronized observe notification using mutex. 23/174223/1
authorHarry <h.marappa@samsung.com>
Thu, 22 Mar 2018 13:43:09 +0000 (19:13 +0530)
committerAmit KS <amit.s12@samsung.com>
Thu, 29 Mar 2018 07:10:11 +0000 (12:40 +0530)
commit77409b9260f5a06dd6eec1a46ecb105a758d9e53
treef26e6607006c07dc147d16584671f060e2304231
parente4d4ccfd5834a4ca7aece15477511c2d96acbbcf
Synchronized observe notification using mutex.

As InProcClientWrapper class creates separate thread for every
obseve callback, There is a chance that more than one thread enter
ObserveCache object and trying to modify m_attributes. More over
same m_attributes is being passed out or RE layer by const reference,
so application is using same member object m_attributes. Mutex allows
only one thread to modify m_attributes.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/276
(cherry picked from commit c87d0d4b14d22349c3563e7cd316d323d068e2ab)

Change-Id: Ibee9b9326e6d7a3be093bc387db70a7c8f9a626d
Signed-off-by: Harry <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
service/resource-encapsulation/src/resourceCache/include/ObserveCache.h
service/resource-encapsulation/src/resourceCache/src/ObserveCache.cpp