[IOT-914] Device ID to be based on DOXM GetDeviceID
authorHabib Virji <habib.virji@samsung.com>
Thu, 24 Mar 2016 14:01:26 +0000 (14:01 +0000)
committerHabib Virji <habib.virji@samsung.com>
Thu, 24 Mar 2016 22:13:28 +0000 (22:13 +0000)
Instead of ocstack generating random device id. DOXM id is going to be used.

Change-Id: I1a780f07388ee1fe09e315c2d645f1c8ee5142de
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6299
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/src/ocstack.c
resource/unittests/OCRepresentationEncodingTest.cpp

index a5b7a66..65b931d 100644 (file)
@@ -4422,7 +4422,7 @@ static const OicUuid_t* OCGetServerInstanceID(void)
         return &sid;
     }
 
-    if (RAND_UUID_OK != OCGenerateUuid(sid.id))
+    if (OC_STACK_OK != GetDoxmDeviceID(&sid))
     {
         OIC_LOG(FATAL, TAG, "Generate UUID for Server Instance failed!");
         return NULL;
index 68a0605..4982757 100644 (file)
@@ -49,7 +49,7 @@ namespace OC
 // CBOR->OCPayload and OCPayload->OCRepresentation conversions
 namespace OCRepresentationEncodingTest
 {
-    static const char *sid1 = OCGetServerInstanceIDString();
+    static const char sid1[] = "646F6F72-4465-7669-6365-555549443030";
     static const char devicename1[] = "device name";
     static const char specver1[] = "spec version";
     static const char dmver1[] = "data model version";