If observation for a resource from a client is started, it should be canceled.
But there was a logic error that it isn't.
Change-Id: I2440c20999b7076bea5987ccbad3f0710269b3d9
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5807
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
(cherry picked from commit
607ef0e262f85d164cb3b1edbcf2e5bf926a2930)
Reviewed-on: https://gerrit.iotivity.org/gerrit/6259
const HeaderOptions &_hos, const ResponseStatement &_rep,
int _result, unsigned int _seq, std::weak_ptr<DataCache> rpPtr)
{
const HeaderOptions &_hos, const ResponseStatement &_rep,
int _result, unsigned int _seq, std::weak_ptr<DataCache> rpPtr)
{
- std::shared_ptr<DataCache> Ptr = rpPtr.lock();
- if (Ptr)
+ std::shared_ptr<DataCache> ptr = rpPtr.lock();
+ if (ptr)
- Ptr->onObserve(_hos, _rep, _result, _seq);
+ ptr->onObserve(_hos, _rep, _result, _seq);
subscriberList.release();
}
subscriberList.release();
}
- if (mode == CACHE_MODE::OBSERVE)
+ if (sResource->isObservable())
const PrimitiveResourcePtr DataCache::getPrimitiveResource() const
{
const PrimitiveResourcePtr DataCache::getPrimitiveResource() const
{
- return (sResource != nullptr) ? sResource : nullptr;
}
const RCSResourceAttributes DataCache::getCachedData() const
}
const RCSResourceAttributes DataCache::getCachedData() const