else
{
OIC_LOG(INFO, TAG, "not Blockwise Transfer");
- goto exit;
}
}
{
// 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;
+ }
}
}