A few instances of OC_LOG were left in.
Change-Id: I36eee4bc27c2b0d559b8de21181a59278b5c7cef
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5147
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
#endif
// Use the PCF macro to wrap strings stored in FLASH on the Arduino
-// Example: OC_LOG(INFO, TAG, PCF("Entering function"));
+// Example: OIC_LOG(INFO, TAG, PCF("Entering function"));
#ifdef ARDUINO
#ifdef __cplusplus
#define PCF(str) ((PROGMEM const char *)(F(str)))
}
else if (isEMPTYPacket)
{
- OC_LOG(DEBUG, TAG, "The message to be Forwarded is a EMPTY message");
+ OIC_LOG(DEBUG, TAG, "The message to be Forwarded is a EMPTY message");
CAResponseInfo_t responseMessage = {.result = CA_EMPTY};
if (ACK == routeOption.msgType)
{
CAResult_t caRes = CASendResponse(&nextHop, &responseMessage);
if (CA_STATUS_OK != caRes)
{
- OC_LOG_V(ERROR, RM_TAG, "Failed to forward response to next hop [%d][%s]",
+ OIC_LOG_V(ERROR, RM_TAG, "Failed to forward response to next hop [%d][%s]",
caRes, nextHop.addr);
// Since a response is always unicast, return error here.
return OC_STACK_ERROR;
{
if (isRequest)
{
- OC_LOG(DEBUG, TAG, "POST message with type ACK in Route Option");
+ OIC_LOG(DEBUG, TAG, "POST message with type ACK in Route Option");
if (NULL != isEmptyMsg)
{
*isEmptyMsg = true;
}
else
{
- OC_LOG(DEBUG, TAG, "Response for EMPTY message is received");
+ OIC_LOG(DEBUG, TAG, "Response for EMPTY message is received");
CAResponseInfo_t *msg = message;
if (ACK == (MSGType)routeOption.msgType)
{
CAResponseInfo_t *respMsg = message;
if ('\0' == destination[0] && (CA_EMPTY == respMsg->result))
{
- OC_LOG(DEBUG, TAG, "Response is for an Endpoint, No need to add the routing Option");
+ OIC_LOG(DEBUG, TAG, "Response is for an Endpoint, No need to add the routing Option");
return OC_STACK_OK;
}
options = &(respMsg->info.options);
CAResponseInfo_t *respMsg = message;
if (CA_EMPTY == respMsg->result && CA_MSG_ACKNOWLEDGE == respMsg->info.type)
{
- OC_LOG(DEBUG, TAG, "CA_EMPTY WITH ACKNOWLEDGEMENT");
+ OIC_LOG(DEBUG, TAG, "CA_EMPTY WITH ACKNOWLEDGEMENT");
routeOption.msgType = ACK;
if (OC_SERVER == g_rmStackMode)
{
- OC_LOG(DEBUG, TAG, "This is server mode");
+ OIC_LOG(DEBUG, TAG, "This is server mode");
// Send the Empty message in the response with adding the MSGType in Route option.
respMsg->info.type = CA_MSG_NONCONFIRM;
respMsg->result = CA_CONTENT;
}
else
{
- OC_LOG(DEBUG, TAG, "Send a POST request");
+ OIC_LOG(DEBUG, TAG, "Send a POST request");
if (NULL != doPost)
{
*doPost = true;
}
else if (CA_EMPTY == respMsg->result && CA_MSG_RESET == respMsg->info.type)
{
- OC_LOG(DEBUG, TAG, "CA_EMPTY WITH RESET");
+ OIC_LOG(DEBUG, TAG, "CA_EMPTY WITH RESET");
routeOption.msgType = RST;
respMsg->info.type = CA_MSG_NONCONFIRM;
respMsg->result = CA_CONTENT;
}
#else
#define OIC_LOG_PAYLOAD(level, payload)
- #define OC_LOG_PAYLOAD(level, payload)
#endif
#ifdef __cplusplus
void OCHandleResponse(const CAEndpoint_t* endPoint, const CAResponseInfo_t* responseInfo)
{
- OC_LOG(DEBUG, TAG, "Enter OCHandleResponse");
+ OIC_LOG(DEBUG, TAG, "Enter OCHandleResponse");
if(responseInfo->info.resourceUri &&
strcmp(responseInfo->info.resourceUri, OC_RSRVD_PRESENCE_URI) == 0)
VERIFY_NON_NULL_NR(endPoint, FATAL);
VERIFY_NON_NULL_NR(responseInfo, FATAL);
- OC_LOG(INFO, TAG, "Enter HandleCAResponses");
+ OIC_LOG(INFO, TAG, "Enter HandleCAResponses");
#if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
#ifdef ROUTING_GATEWAY
&needRIHandling);
if(ret != OC_STACK_OK || !needRIHandling)
{
- OC_LOG_V(INFO, TAG, "Routing status![%d]. Not forwarding to RI", ret);
+ OIC_LOG_V(INFO, TAG, "Routing status![%d]. Not forwarding to RI", ret);
return;
}
#endif
}
if (doPost)
{
- OC_LOG(DEBUG, TAG, "Sending a POST message for EMPTY ACK in Client Mode");
+ OIC_LOG(DEBUG, TAG, "Sending a POST message for EMPTY ACK in Client Mode");
CARequestInfo_t reqInfo = {.method = CA_POST };
/* The following initialization is not done in a single initializer block as in
* arduino, .c file is compiled as .cpp and moves it from C99 to C++11. The latter
(CAHeaderOption_t *)OICCalloc(reqInfo.info.numOptions, sizeof(CAHeaderOption_t));
if (NULL == reqInfo.info.options)
{
- OC_LOG(ERROR, TAG, "Calloc failed");
+ OIC_LOG(ERROR, TAG, "Calloc failed");
return OC_STACK_NO_MEMORY;
}
memcpy (reqInfo.info.options, respInfo.info.options,
OICFree (respInfo.info.options);
if (CA_STATUS_OK != caResult)
{
- OC_LOG(ERROR, TAG, "CASendRequest error");
+ OIC_LOG(ERROR, TAG, "CASendRequest error");
return CAResultToOCResult(caResult);
}
}
return CAResultToOCResult(caResult);
}
}
- OC_LOG(DEBUG, TAG, "Exit SendDirectStackResponse");
+ OIC_LOG(DEBUG, TAG, "Exit SendDirectStackResponse");
return OC_STACK_OK;
}
void OCHandleRequests(const CAEndpoint_t* endPoint, const CARequestInfo_t* requestInfo)
{
- OC_LOG(DEBUG, TAG, "Enter OCHandleRequests");
+ OIC_LOG(DEBUG, TAG, "Enter OCHandleRequests");
#ifdef TCP_ADAPTER
if (requestInfo->info.resourceUri &&