Follow-up for build breakage due to 3dec7176200a1e8f125226f22b9471374dd7ace1
authorJon A. Cruz <jonc@osg.samsung.com>
Tue, 23 Feb 2016 21:42:39 +0000 (13:42 -0800)
committerJon A. Cruz <jonc@osg.samsung.com>
Tue, 23 Feb 2016 22:49:36 +0000 (22:49 +0000)
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>
resource/csdk/logger/include/logger.h
resource/csdk/routing/src/routingmanager.c
resource/csdk/routing/src/routingutility.c
resource/csdk/stack/include/payload_logging.h
resource/csdk/stack/src/ocstack.c

index ec591d1..b48cd28 100644 (file)
@@ -41,7 +41,7 @@ extern "C"
 #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)))
index 5f1aff6..23618d5 100644 (file)
@@ -1131,7 +1131,7 @@ rewriteandexit:
         }
         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)
             {
@@ -1147,7 +1147,7 @@ rewriteandexit:
             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;
@@ -1206,7 +1206,7 @@ rewriteandexit:
         {
             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;
@@ -1214,7 +1214,7 @@ rewriteandexit:
             }
             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)
                 {
index 82acf24..3ed1e60 100644 (file)
@@ -75,7 +75,7 @@ OCStackResult RMAddInfo(const char *destination, void *message, bool isRequest,
         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);
@@ -127,18 +127,18 @@ OCStackResult RMAddInfo(const char *destination, void *message, bool isRequest,
         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;
@@ -147,7 +147,7 @@ OCStackResult RMAddInfo(const char *destination, void *message, bool isRequest,
         }
         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;
index b87e2c1..4ce5770 100644 (file)
@@ -304,7 +304,6 @@ static inline void OCPayloadLog(LogLevel level, OCPayload* payload)
 }
 #else
     #define OIC_LOG_PAYLOAD(level, payload)
-    #define OC_LOG_PAYLOAD(level, payload)
 #endif
 
 #ifdef __cplusplus
index afc34fb..0f161c4 100644 (file)
@@ -1060,7 +1060,7 @@ exit:
 
 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)
@@ -1364,7 +1364,7 @@ void HandleCAResponses(const CAEndpoint_t* endPoint, const CAResponseInfo_t* res
     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
@@ -1379,7 +1379,7 @@ void HandleCAResponses(const CAEndpoint_t* endPoint, const CAResponseInfo_t* res
                                          &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
@@ -1465,7 +1465,7 @@ OCStackResult SendDirectStackResponse(const CAEndpoint_t* endPoint, const uint16
     }
     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
@@ -1484,7 +1484,7 @@ OCStackResult SendDirectStackResponse(const CAEndpoint_t* endPoint, const uint16
                 (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,
@@ -1498,7 +1498,7 @@ OCStackResult SendDirectStackResponse(const CAEndpoint_t* endPoint, const uint16
         OICFree (respInfo.info.options);
         if (CA_STATUS_OK != caResult)
         {
-            OC_LOG(ERROR, TAG, "CASendRequest error");
+            OIC_LOG(ERROR, TAG, "CASendRequest error");
             return CAResultToOCResult(caResult);
         }
     }
@@ -1517,7 +1517,7 @@ OCStackResult SendDirectStackResponse(const CAEndpoint_t* endPoint, const uint16
             return CAResultToOCResult(caResult);
         }
     }
-    OC_LOG(DEBUG, TAG, "Exit SendDirectStackResponse");
+    OIC_LOG(DEBUG, TAG, "Exit SendDirectStackResponse");
     return OC_STACK_OK;
 }
 
@@ -1588,7 +1588,7 @@ OCStackResult HandleStackRequests(OCServerProtocolRequest * protocolRequest)
 
 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 &&