From: hyuna0213.jo Date: Mon, 28 Mar 2016 08:25:07 +0000 (+0900) Subject: fixed code to get token about the empty message X-Git-Tag: 1.2.0+RC1~355^2^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=947d995a5c6b27c09c4e66e4a6af83226e9fc1fb;p=platform%2Fupstream%2Fiotivity.git fixed code to get token about the empty message fixed code to get token about the empty message. Change-Id: Ifbe334f42457c1b2ba801d92cdca540433689938 Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/7387 Tested-by: jenkins-iotivity Reviewed-by: Jaewook Jung Reviewed-by: Ashok Babu Channa --- diff --git a/resource/csdk/connectivity/src/cablockwisetransfer.c b/resource/csdk/connectivity/src/cablockwisetransfer.c index e59ba36..ad4cee3 100644 --- a/resource/csdk/connectivity/src/cablockwisetransfer.c +++ b/resource/csdk/connectivity/src/cablockwisetransfer.c @@ -1441,7 +1441,6 @@ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t *info, else { OIC_LOG(INFO, TAG, "not Blockwise Transfer"); - goto exit; } } @@ -1450,11 +1449,15 @@ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t *info, { // if received message type is RESET from remote device, // we have to use the updated message id of request message to find token. - res = CAUpdateMessageId(*pdu, blockDataID); - if (CA_STATUS_OK != res) + CABlockData_t *blockData = CAGetBlockDataFromBlockDataList(blockDataID); + if (blockData) { - OIC_LOG(ERROR, TAG, "fail to update message id"); - goto exit; + res = CAUpdateMessageId(*pdu, blockDataID); + if (CA_STATUS_OK != res) + { + OIC_LOG(ERROR, TAG, "fail to update message id"); + goto exit; + } } }