From 44e3e8d883e22856d6ac02951e33abbfb10f6558 Mon Sep 17 00:00:00 2001 From: "hyuna0213.jo" Date: Tue, 23 Jun 2015 19:55:55 +0900 Subject: [PATCH] remove unnecessary code in messagehandler - remove the duplicated log message for the debugging - add the null check logic for token Change-Id: Icfd74fcc350b6e1c9038acdac290cfcaf9d344e7 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/1402 Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- resource/csdk/connectivity/src/camessagehandler.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c index 042fcee..f221843 100644 --- a/resource/csdk/connectivity/src/camessagehandler.c +++ b/resource/csdk/connectivity/src/camessagehandler.c @@ -381,10 +381,6 @@ static void CAReceivedPacketCallback(const CAEndpoint_t *endpoint, void *data, u OIC_LOG_BUFFER(DEBUG, TAG, (const uint8_t *) ReqInfo->info.token, ReqInfo->info.tokenLength); } - - OIC_LOG_V(DEBUG, TAG, "Request- code: %d", ReqInfo->method); - OIC_LOG(DEBUG, TAG, "Request- token"); - OIC_LOG_BUFFER(DEBUG, TAG, (const uint8_t *) ReqInfo->info.token, CA_MAX_TOKEN_LEN); OIC_LOG_V(DEBUG, TAG, "Request- msgID : %d", ReqInfo->info.messageId); // store the data at queue. CAData_t *cadata = NULL; @@ -438,7 +434,12 @@ static void CAReceivedPacketCallback(const CAEndpoint_t *endpoint, void *data, u OIC_LOG_V(DEBUG, TAG, "Response- payload: %s", ResInfo->info.payload); } OIC_LOG_V(DEBUG, TAG, "Response- code: %d", ResInfo->result); - OIC_LOG_V(DEBUG, TAG, "Response- token : %s", ResInfo->info.token); + if (NULL != ResInfo->info.token) + { + OIC_LOG(DEBUG, TAG, "Response- token:"); + OIC_LOG_BUFFER(DEBUG, TAG, (const uint8_t *) ResInfo->info.token, + ResInfo->info.tokenLength); + } OIC_LOG_V(DEBUG, TAG, "Response- msgID: %d", ResInfo->info.messageId); // store the data at queue. -- 2.7.4