When RCSRemoteResourceObject::toOCResource() method called,
inside RE layer, constructResourceObject() was called
with invalid parameter on OCConnectityType.
So, it is due to mismatch with response type and request type.
the above result, ocstack layer couldn't parse payload.
In this patch, fixed parameter for OCConnectityType is modified valid type.
Change-Id: Ic924d9a892227377406e2b3ecfe666c41f1f0b04
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15507
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit
51c33d5fc29083cfe17667f5cc33e4e82cd0a0f5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15535
virtual std::string getHost() const = 0;
virtual std::vector< std::string > getTypes() const = 0;
virtual std::vector< std::string > getInterfaces() const = 0;
+ virtual OCConnectivityType getConnectivityType() const = 0;
virtual bool isObservable() const = 0;
return invokeOC(m_baseResource, &BaseResource::getResourceInterfaces);
}
+ OCConnectivityType getConnectivityType() const
+ {
+ return invokeOC(m_baseResource, &BaseResource::connectivityType);
+ }
+
bool isObservable() const
{
return invokeOC(m_baseResource, &BaseResource::isObservable);
virtual std::string host() const = 0;
virtual std::vector<std::string> getResourceTypes() const = 0;
virtual std::vector<std::string> getResourceInterfaces() const = 0;
+ virtual OCConnectivityType connectivityType() const = 0;
virtual bool isObservable() const = 0;
};
OC::OCResource::Ptr ocResource = OC::OCPlatform::constructResourceObject(rcsResource->getAddress(),
rcsResource->getUri(),
- CT_DEFAULT,
+ rcsResource->m_primitiveResource->getConnectivityType(),
rcsResource->isObservable(),
rcsResource->getTypes(),
rcsResource->getInterfaces());