From: Jee Hyeok Kim Date: Wed, 23 Nov 2016 08:51:41 +0000 (+0900) Subject: [IOT-1592] Fix rd publish fail X-Git-Tag: 1.2.1~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1abd0caaa69ba0f4346ecd8958e4fb4363ae239;p=platform%2Fupstream%2Fiotivity.git [IOT-1592] Fix rd publish fail 1. RD publish fail due to lack of shared point lock logic. https://jira.iotivity.org/browse/IOT-1592 Change-Id: I278b67ac050fb5bcb0cb5ee6920c27e446f0f01a Signed-off-by: Jee Hyeok Kim Reviewed-on: https://gerrit.iotivity.org/gerrit/14647 Tested-by: jenkins-iotivity Reviewed-by: Habib Virji Reviewed-by: Phil Coval --- diff --git a/resource/csdk/resource-directory/include/RDClient.h b/resource/csdk/resource-directory/include/RDClient.h index 288e98569..2f48e0131 100644 --- a/resource/csdk/resource-directory/include/RDClient.h +++ b/resource/csdk/resource-directory/include/RDClient.h @@ -46,9 +46,15 @@ class RDClient { private: OCQualityOfService m_qos; + std::shared_ptr _csdkLock; + std::weak_ptr m_csdkLock; + public: - RDClient(OCQualityOfService qos = OC_NA_QOS) : m_qos(qos) + RDClient(OCQualityOfService qos = OC_NA_QOS) + : m_qos(qos), + _csdkLock{ std::make_shared() } { + m_csdkLock = _csdkLock; } static RDClient& Instance() diff --git a/resource/csdk/resource-directory/src/RDClient.cpp b/resource/csdk/resource-directory/src/RDClient.cpp index 365ab5d3b..115c45159 100644 --- a/resource/csdk/resource-directory/src/RDClient.cpp +++ b/resource/csdk/resource-directory/src/RDClient.cpp @@ -33,8 +33,6 @@ #include "OCException.h" #include "ocpayload.h" -std::weak_ptr m_csdkLock; - using namespace OC;