[IOT-1543] modified some log message more clearly.
authorjihwanseo <jihwan.seo@samsung.com>
Thu, 10 Nov 2016 13:04:17 +0000 (22:04 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 14 Nov 2016 11:11:41 +0000 (11:11 +0000)
since some log message is printing with ERROR level even not issue,
replace it with normal message.

Change-Id: I6de18b072c4dd5b9011094368a77cec1fa4043b8
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14189
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/routing/src/routingmanager.c
resource/csdk/routing/src/routingutility.c
resource/csdk/stack/src/ocstack.c

index 0bed916..d2365b3 100644 (file)
@@ -190,7 +190,7 @@ static CAData_t* CAGenerateHandlerData(const CAEndpoint_t *endpoint,
         if (CADropSecondMessage(&caglobals.ca.requestHistory, endpoint, reqInfo->info.messageId,
                                 reqInfo->info.token, reqInfo->info.tokenLength))
         {
-            OIC_LOG(ERROR, TAG, "Second Request with same Token, Drop it");
+            OIC_LOG(INFO, TAG, "Second Request with same Token, Drop it");
             CADestroyRequestInfoInternal(reqInfo);
             goto exit;
         }
@@ -588,7 +588,7 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
             else
 #endif
 #ifdef ROUTING_GATEWAY
-            if(!skipRetransmission)
+            if (!skipRetransmission)
 #endif
             {
                 // for retransmission
index c382167..9f87d2f 100644 (file)
@@ -1244,7 +1244,7 @@ OCStackResult RMHandleRequest(CARequestInfo_t *message, const CAEndpoint_t *send
 {
     if (!g_isRMInitialized)
     {
-        OIC_LOG(ERROR, TAG, "RM not initialized");
+        OIC_LOG(INFO, TAG, "RM not initialized");
         *selfDestination = true;
         return OC_STACK_OK;
     }
@@ -1257,7 +1257,7 @@ OCStackResult RMHandleResponse(CAResponseInfo_t *message, const CAEndpoint_t *se
 {
     if (!g_isRMInitialized)
     {
-        OIC_LOG(ERROR, TAG, "RM not initialized");
+        OIC_LOG(INFO, TAG, "RM not initialized");
         *selfDestination = true;
         return OC_STACK_OK;
     }
index d9b8816..6900e66 100644 (file)
@@ -291,8 +291,14 @@ OCStackResult RMUpdateInfo(CAHeaderOption_t **options, uint8_t *numOptions,
 void RMGetRouteOptionIndex(const CAHeaderOption_t *options, uint8_t numOptions, int8_t *index)
 {
     OIC_LOG(DEBUG, TAG, "IN");
-    RM_NULL_CHECK_VOID(options, TAG, "options");
     RM_NULL_CHECK_VOID(index, TAG, "index");
+
+    if (NULL == options)
+    {
+        OIC_LOG(INFO, TAG, "No existing options");
+        return;
+    }
+
     for (uint32_t i = 0; i < numOptions; i++)
     {
         OIC_LOG_V(DEBUG, TAG, "Request- optionID: %u", options[i].optionID);
index 4c10b76..37142ea 100644 (file)
@@ -1071,7 +1071,7 @@ OCStackResult HandlePresenceResponse(const CAEndpoint_t *endpoint,
     {
         return OC_STACK_INVALID_URI;
     }
-    OIC_LOG(ERROR, TAG, "check for unicast presence");
+    OIC_LOG(INFO, TAG, "check for unicast presence");
     cbNode = GetClientCB(NULL, 0, NULL, presenceUri);
     if (cbNode)
     {
@@ -1080,7 +1080,7 @@ OCStackResult HandlePresenceResponse(const CAEndpoint_t *endpoint,
     else
     {
         // check for multicast presence
-        OIC_LOG(ERROR, TAG, "check for multicast presence");
+        OIC_LOG(INFO, TAG, "check for multicast presence");
         cbNode = GetClientCB(NULL, 0, NULL, OC_RSRVD_PRESENCE_URI);
         if (cbNode)
         {
@@ -1090,7 +1090,8 @@ OCStackResult HandlePresenceResponse(const CAEndpoint_t *endpoint,
 
     if (!presenceSubscribe && !multicastPresenceSubscribe)
     {
-        OIC_LOG(ERROR, TAG, "Received a presence notification, but no callback, ignoring");
+        OIC_LOG(INFO, TAG, "Received a presence notification, "
+                "but need to register presence callback, ignoring");
         goto exit;
     }