OCStackResult res = OCCreateResource(&g_prov.handle, "oic.r.prov", OC_RSRVD_INTERFACE_DEFAULT,
OC_RSRVD_ES_URI_PROV, OCEntityHandlerCb, NULL, OC_DISCOVERABLE | OC_OBSERVABLE);
- OC_LOG_V(INFO, ES_RH_TAG, "Created Prov resource with result: %s", getResult(res));
+ OIC_LOG_V(INFO, ES_RH_TAG, "Created Prov resource with result: %s", getResult(res));
return res;
}
netInfo.ipaddr[3]);
sprintf(g_net.cnn, "%s", netInfo.ssid);
- OC_LOG_V(INFO, ES_RH_TAG, "SSID: %s", g_net.cnn);
- OC_LOG_V(INFO, ES_RH_TAG, "IP Address: %s", g_net.ipaddr);
+ OIC_LOG_V(INFO, ES_RH_TAG, "SSID: %s", g_net.cnn);
+ OIC_LOG_V(INFO, ES_RH_TAG, "IP Address: %s", g_net.ipaddr);
OCStackResult res = OCCreateResource(&g_net.handle, "oic.r.net", OC_RSRVD_INTERFACE_DEFAULT,
OC_RSRVD_ES_URI_NET, OCEntityHandlerCb,NULL, OC_DISCOVERABLE | OC_OBSERVABLE);
- OC_LOG_V(INFO, ES_RH_TAG, "Created Net resource with result: %s", getResult(res));
+ OIC_LOG_V(INFO, ES_RH_TAG, "Created Net resource with result: %s", getResult(res));
return res;
}
OCEntityHandlerResult ehResult = OC_EH_ERROR;
if (!ehRequest)
{
- OC_LOG(ERROR, ES_RH_TAG, "Request is Null");
+ OIC_LOG(ERROR, ES_RH_TAG, "Request is Null");
return ehResult;
}
if (ehRequest->payload && ehRequest->payload->type != PAYLOAD_TYPE_REPRESENTATION)
{
- OC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
+ OIC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
return ehResult;
}
OCRepPayload *getResp = constructResponse(ehRequest);
if (!getResp)
{
- OC_LOG(ERROR, ES_RH_TAG, "constructResponse failed");
+ OIC_LOG(ERROR, ES_RH_TAG, "constructResponse failed");
return OC_EH_ERROR;
}
OCEntityHandlerResult ehResult = OC_EH_ERROR;
if (ehRequest->payload && ehRequest->payload->type != PAYLOAD_TYPE_REPRESENTATION)
{
- OC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
+ OIC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
return ehResult;
}
OCRepPayload* input = (OCRepPayload*) (ehRequest->payload);
if (!input)
{
- OC_LOG(ERROR, ES_RH_TAG, "Failed to parse");
+ OIC_LOG(ERROR, ES_RH_TAG, "Failed to parse");
return ehResult;
}
OCRepPayload *getResp = constructResponse(ehRequest);
if (!getResp)
{
- OC_LOG(ERROR, ES_RH_TAG, "constructResponse failed");
+ OIC_LOG(ERROR, ES_RH_TAG, "constructResponse failed");
return OC_EH_ERROR;
}
OCEntityHandlerResult ehResult = OC_EH_ERROR;
if (!ehRequest)
{
- OC_LOG(ERROR, ES_RH_TAG, "Request is Null");
+ OIC_LOG(ERROR, ES_RH_TAG, "Request is Null");
return ehResult;
}
if (ehRequest->payload && ehRequest->payload->type != PAYLOAD_TYPE_REPRESENTATION)
{
- OC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
+ OIC_LOG(ERROR, ES_RH_TAG, "Incoming payload not a representation");
return ehResult;
}
OCRepPayload* input = (OCRepPayload*) (ehRequest->payload);
if (!input)
{
- OC_LOG(ERROR, ES_RH_TAG, "Failed to parse");
+ OIC_LOG(ERROR, ES_RH_TAG, "Failed to parse");
return ehResult;
}
char* tr;
OCRepPayload* payload = OCRepPayloadCreate();
if (!payload)
{
- OC_LOG(ERROR, ES_RH_TAG, "Failed to allocate Payload");
+ OIC_LOG(ERROR, ES_RH_TAG, "Failed to allocate Payload");
return NULL;
}
{
if (OC_REST_GET == entityHandlerRequest->method)
{
- OC_LOG(INFO, ES_RH_TAG, "Received GET request");
+ OIC_LOG(INFO, ES_RH_TAG, "Received GET request");
ehRet = ProcessGetRequest(entityHandlerRequest, &payload);
}
else if (OC_REST_PUT == entityHandlerRequest->method)
{
- OC_LOG(INFO, ES_RH_TAG, "Received PUT request");
+ OIC_LOG(INFO, ES_RH_TAG, "Received PUT request");
if (g_prov.handle != NULL && entityHandlerRequest->resource == g_prov.handle)
{
else if (OC_REST_POST == entityHandlerRequest->method)
{
// TODO: As of now, POST request will be not received.
- OC_LOG(INFO, ES_RH_TAG, "Received OC_REST_POST from client");
+ OIC_LOG(INFO, ES_RH_TAG, "Received OC_REST_POST from client");
//ehRet = ProcessPostRequest (entityHandlerRequest, payload, sizeof(payload) - 1);
}
// Send the response
if (OCDoResponse(&response) != OC_STACK_OK)
{
- OC_LOG(ERROR, ES_RH_TAG, "Error sending response");
+ OIC_LOG(ERROR, ES_RH_TAG, "Error sending response");
ehRet = OC_EH_ERROR;
}
}