From d5b6e2555ea14bf79138efb8a31580722b012f05 Mon Sep 17 00:00:00 2001 From: "hyuna0213.jo" Date: Wed, 16 Nov 2016 15:43:24 +0900 Subject: [PATCH] Removed unnecessary/duplicated log in connectivity abstraction remove unnecessary/duplicated log in connectivity abstraction to print the correct message. Change-Id: I2d0c4535bb4abc576d7e7130b0d38111f37cd3e0 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/14269 Tested-by: jenkins-iotivity Reviewed-by: Jaehong Jo Reviewed-by: jihwan seo Reviewed-by: Dan Mihai Reviewed-by: Mike Fenelon --- resource/csdk/connectivity/src/camessagehandler.c | 26 ++++++++-------------- resource/csdk/connectivity/src/caprotocolmessage.c | 7 ++++-- .../src/ip_adapter/tizen/caipnwmonitor.c | 4 ++-- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c index 9ac61d9..d713075 100644 --- a/resource/csdk/connectivity/src/camessagehandler.c +++ b/resource/csdk/connectivity/src/camessagehandler.c @@ -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) diff --git a/resource/csdk/connectivity/src/caprotocolmessage.c b/resource/csdk/connectivity/src/caprotocolmessage.c index 0937de0..b614372 100644 --- a/resource/csdk/connectivity/src/caprotocolmessage.c +++ b/resource/csdk/connectivity/src/caprotocolmessage.c @@ -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); diff --git a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c index d5f258c..259a4be 100644 --- a/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c +++ b/resource/csdk/connectivity/src/ip_adapter/tizen/caipnwmonitor.c @@ -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; } -- 2.7.4