static uint16_t gConfirmMsgId = 0;
static ConfirmState_t gConfirmState = CONFIRM_STATE_READY;
+static uint8_t gEmptyUuid[UUID_LENGTH] = {0};
/**
* This method is internal method.
#ifdef __WITH_DTLS__
//for normal device.
- if (true == gDoxm->owned &&
- memcmp(gDoxm->deviceID.id, gDoxm->owner.id, sizeof(gDoxm->owner.id)) != 0)
+ if (true == gDoxm->owned
+ && memcmp(gEmptyUuid, gDoxm->owner.id, sizeof(gDoxm->owner.id)) != 0
+ && memcmp(gDoxm->deviceID.id, gDoxm->owner.id, sizeof(gDoxm->owner.id)) != 0)
{
OIC_LOG(ERROR, TAG, "This device owned by owner's device.");
OIC_LOG(ERROR, TAG, "Device UUID cannot be changed to guarantee the reliability of the connection.");
bool isDeallocateRequired = false;
VERIFY_NON_NULL(TAG, gDoxm, ERROR);
-
+
if (NULL == gDoxm->mom && !enable)
{
OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);