Removed unnecessary/duplicated log in connectivity abstraction
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Wed, 16 Nov 2016 06:43:24 +0000 (15:43 +0900)
committerMike Fenelon <mike.fenelon@microsoft.com>
Wed, 30 Nov 2016 18:35:50 +0000 (18:35 +0000)
remove unnecessary/duplicated log in connectivity abstraction
to print the correct message.

Change-Id: I2d0c4535bb4abc576d7e7130b0d38111f37cd3e0
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14269
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c

index 9ac61d9..d713075 100644 (file)
@@ -469,9 +469,6 @@ static CAResult_t CAProcessMulticastData(const CAData_t *data)
 
     CALogPDUInfo(pdu, data->remoteEndpoint);
 
-    OIC_LOG(DEBUG, TAG, "pdu to send :");
-    OIC_LOG_BUFFER(DEBUG, TAG,  (uint8_t*)pdu->transport_hdr, pdu->length);
-
     res = CASendMulticastData(data->remoteEndpoint, pdu->transport_hdr, pdu->length, data->dataType);
     if (CA_STATUS_OK != res)
     {
@@ -1227,26 +1224,21 @@ void CALogPDUInfo(coap_pdu_t *pdu, const CAEndpoint_t *endpoint)
     VERIFY_NON_NULL_VOID(pdu, TAG, "pdu");
     VERIFY_NON_NULL_VOID(endpoint, TAG, "endpoint");
 
-    OIC_LOG_V(DEBUG, TAG, "PDU Maker - payload : %s", pdu->data);
-
-#ifdef WITH_TCP
-    if (CAIsSupportedCoAPOverTCP(endpoint->adapter))
-    {
-        OIC_LOG(DEBUG, TAG, "pdu header data :");
-        OIC_LOG_BUFFER(DEBUG, TAG,  (const uint8_t *) pdu->transport_hdr, pdu->length);
-    }
-    else
-#endif
+#ifdef WITH_BWT
+    if (CAIsSupportedBlockwiseTransfer(endpoint->adapter))
     {
         OIC_LOG_V(DEBUG, TAG, "PDU Maker - type : %d", pdu->transport_hdr->udp.type);
 
         OIC_LOG_V(DEBUG, TAG, "PDU Maker - code : %d", pdu->transport_hdr->udp.code);
+    }
+#endif
 
-        OIC_LOG(DEBUG, TAG, "PDU Maker - token :");
+    OIC_LOG(DEBUG, TAG, "PDU Maker - token :");
+    OIC_LOG_BUFFER(DEBUG, TAG, pdu->transport_hdr->udp.token,
+                   pdu->transport_hdr->udp.token_length);
 
-        OIC_LOG_BUFFER(DEBUG, TAG, pdu->transport_hdr->udp.token,
-                       pdu->transport_hdr->udp.token_length);
-    }
+    OIC_LOG(DEBUG, TAG, "PDU Maker - payload :");
+    OIC_LOG_BUFFER(DEBUG, TAG,  (const uint8_t *) pdu->transport_hdr, pdu->length);
 }
 
 static void CALogPayloadInfo(CAInfo_t *info)
index 0937de0..b614372 100644 (file)
@@ -104,6 +104,9 @@ coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info, const CAEndpoint_
     VERIFY_NON_NULL_RET(endpoint, TAG, "endpoint", NULL);
     VERIFY_NON_NULL_RET(optlist, TAG, "optlist", NULL);
 
+    OIC_LOG_V(DEBUG, TAG, "generate pdu for [%d]adapter, [%d]flags",
+              endpoint->adapter, endpoint->flags);
+
     coap_pdu_t *pdu = NULL;
 
     // RESET have to use only 4byte (empty message)
@@ -133,6 +136,8 @@ coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info, const CAEndpoint_
     {
         if (info->resourceUri)
         {
+            OIC_LOG_V(DEBUG, TAG, "uri : %s", info->resourceUri);
+
             uint32_t length = strlen(info->resourceUri);
             if (CA_MAX_URI_LENGTH < length)
             {
@@ -395,8 +400,6 @@ CAResult_t CAParseURI(const char *uriInfo, coap_list_t **optlist)
     VERIFY_NON_NULL(uriInfo, TAG, "uriInfo");
     VERIFY_NON_NULL(optlist, TAG, "optlist");
 
-    OIC_LOG_V(DEBUG, TAG, "url : %s", uriInfo);
-
     /* split arg into Uri-* options */
     coap_uri_t uri;
     coap_split_uri((unsigned char *) uriInfo, strlen(uriInfo), &uri);
index d5f258c..259a4be 100644 (file)
@@ -198,8 +198,6 @@ u_arraylist_t *CAFindInterfaceChange()
 CAResult_t CAIPStartNetworkMonitor(CAIPAdapterStateChangeCallback callback,
                                    CATransportAdapter_t adapter)
 {
-    OIC_LOG(DEBUG, TAG, "IN");
-
     if (!g_adapterCallbackList)
     {
         // Initialize Wifi service.
@@ -225,6 +223,7 @@ CAResult_t CAIPStartNetworkMonitor(CAIPAdapterStateChangeCallback callback,
         }
     }
 
+    OIC_LOG(DEBUG, TAG, "Initialize network monitoring successfully");
     return CAIPSetNetworkMonitorCallback(callback, adapter);
 }
 
@@ -260,6 +259,7 @@ CAResult_t CAIPStopNetworkMonitor(CATransportAdapter_t adapter)
         }
     }
 
+    OIC_LOG(DEBUG, TAG, "Network monitoring terminated successfully");
     return CA_STATUS_OK;
 }