On discovering secure resources, OCResource object needs to be
updated with 'secure' flag and appropriate port for secure resource.
Change-Id: I0a09ae1e6d9bcc73b7d97b9dcaae02955d63cb2d
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1545
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: sandeep sharma <sandeep.s9@samsung.com>
Reviewed-by: Woochul Shim <woochul.shim@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
{
if(res.loaded())
{
+ if (res.secureType() == OCSecureType::Secure)
+ {
+ m_devAddr.flags =
+ (OCTransportFlags)(OC_FLAG_SECURE | m_devAddr.flags);
+ }
+ if (res.port() != -1)
+ {
+ m_devAddr.port = res.port();
+ }
m_resources.push_back(std::shared_ptr<OCResource>(
new OCResource(m_clientWrapper, m_devAddr,
res.m_uri, res.m_serverId, res.observable(),
}
std::vector<std::shared_ptr<OC::OCResource>> m_resources;
std::weak_ptr<IClientWrapper> m_clientWrapper;
- const OCDevAddr& m_devAddr;
+ OCDevAddr m_devAddr;
};
}