Synchronized observe notification using mutex. 46/174246/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 08:51:55 +0000 (14:21 +0530)
commit7a90db940b6bae87645930f8262e062092a818f8
treefb8a167f9f41b462ba2884140e36e55046c5e0bf
parent1dacc7d60c9ec5cadd0999f25ab17889f9bff4c4
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: Ib382218f0ee064c11d3897bb927263522291d9e0
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