Check devID for owned device
[platform/upstream/iotivity.git] / resource / csdk / security / src / doxmresource.c
index 6d35780..e88a381 100644 (file)
@@ -1310,6 +1310,13 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe
                     ehRet = OC_EH_NOT_ACCEPTABLE;
                     goto exit;
                 }
+
+                if(0 != memcmp(&gDoxm->owner.id, &newDoxm->owner.id, sizeof(gDoxm->owner.id)))
+                {
+                    OIC_LOG(ERROR, TAG, "Not acceptable request for owned property");
+                    ehRet = OC_EH_NOT_ACCEPTABLE;
+                }
+
                 //Update gDoxm based on newDoxm
                 updateWriteableProperty(newDoxm, gDoxm);