+ else if (isEMPTYPacket)
+ {
+ OIC_LOG(DEBUG, TAG, "The message to be Forwarded is a EMPTY message");
+ CAResponseInfo_t responseMessage = {.result = CA_EMPTY};
+ if (ACK == routeOption.msgType)
+ {
+ responseMessage.info.type = CA_MSG_ACKNOWLEDGE;
+ }
+ else
+ {
+ responseMessage.info.type = CA_MSG_RESET;
+ }
+
+ responseMessage.info.messageId = info->messageId;
+ responseMessage.info.dataType = CA_RESPONSE_DATA;
+
+ CAResult_t caRes = CASendResponse(&nextHop, &responseMessage);
+ if (CA_STATUS_OK != caRes)
+ {
+ OIC_LOG_V(ERROR, RM_TAG, "Failed to forward response to next hop [%d][%s]",
+ caRes, nextHop.addr);
+ // Since a response is always unicast, return error here.
+ return OC_STACK_ERROR;
+ }
+ }