From: hyuna0213.jo Date: Tue, 23 Jun 2015 10:55:55 +0000 (+0900) Subject: remove unnecessary code in messagehandler X-Git-Tag: 1.2.0+RC1~1560 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44e3e8d883e22856d6ac02951e33abbfb10f6558;p=platform%2Fupstream%2Fiotivity.git 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 --- 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.