Commit d86a86eb authored by coderhyme's avatar coderhyme Committed by JungHo Kim

Fixed a bug in the cache module of RE

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: default avatarcoderhyme <>
Reviewed-on: default avatarjenkins-iotivity <>
Reviewed-by: default avatarJungYong KIM <>
(cherry picked from commit 607ef0e2)
parent 14af5d46
......@@ -42,10 +42,10 @@ namespace OIC
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);
......@@ -100,7 +100,7 @@ namespace OIC
if (mode == CACHE_MODE::OBSERVE)
if (sResource->isObservable())
......@@ -184,7 +184,7 @@ namespace OIC
const PrimitiveResourcePtr DataCache::getPrimitiveResource() const
return (sResource != nullptr) ? sResource : nullptr;
return sResource;
const RCSResourceAttributes DataCache::getCachedData() const
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment