return NULL;
}
+ if(gWiFiResource.handle == NULL)
+ {
+ OIC_LOG(ERROR, ES_RH_TAG, "WiFi resource is not created");
+ return NULL;
+ }
+
OIC_LOG(INFO, ES_RH_TAG, "constructResponse wifi res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFI);
OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_DEFAULT);
return NULL;
}
+ if(gCloudResource.handle == NULL)
+ {
+ OIC_LOG(ERROR, ES_RH_TAG, "CloudServer resource is not created");
+ return NULL;
+ }
+
OIC_LOG(INFO, ES_RH_TAG, "constructResponse cloudserver res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_CLOUDSERVER);
OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_DEFAULT);
return NULL;
}
+ if(gDevConfResource.handle == NULL)
+ {
+ OIC_LOG(ERROR, ES_RH_TAG, "DevConf resource is not created");
+ return NULL;
+ }
+
OIC_LOG(INFO, ES_RH_TAG, "constructResponse devconf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_DEFAULT);
std::vector<OCRepresentation> children = m_ProvRep.getChildren();
for(auto child = children.begin(); child != children.end(); ++child)
{
- if(child->getUri().find(OC_RSRVD_ES_URI_CLOUDSERVER) != std::string::npos)
+ for(auto rt : child->getResourceTypes())
{
- return true;
+ if(0 == rt.compare(OC_RSRVD_ES_RES_TYPE_CLOUDSERVER))
+ {
+ return true;
+ }
}
}
return false;