generating consumer id is replaced with device id generated by base layer.
Change-Id: I4e8157b938c0e9ea524c838d7d355443f9bb0c41
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12549
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit
cbf966cc737b79530cac8cf8920412ec3d36bde9)
Reviewed-on: https://gerrit.iotivity.org/gerrit/12555
NSConsumerThread * handle = NULL;
NSConsumerQueue * queue = NULL;
NSConsumerThread * handle = NULL;
NSConsumerQueue * queue = NULL;
- uint8_t uuid[UUID_SIZE] = {0,};
- char uuidString[UUID_STRING_SIZE] = {0,};
- OCRandomUuidResult randomRet = OCGenerateUuid(uuid);
- NS_VERIFY_NOT_NULL(randomRet == RAND_UUID_OK ? (void *) 1 : NULL, NS_ERROR);
- randomRet = OCConvertUuidToString(uuid, uuidString);
- NS_VERIFY_NOT_NULL(randomRet == RAND_UUID_OK ? (void *) 1 : NULL, NS_ERROR);
-
- NSSetConsumerId(uuidString);
+ char * consumerUuid = (char *)OCGetServerInstanceIDString();
+ NS_VERIFY_NOT_NULL(consumerUuid, NS_ERROR);
+
+ NSSetConsumerId(consumerUuid);
NS_LOG_V(DEBUG, "Consumer ID : %s", *NSGetConsumerId());
NS_LOG(DEBUG, "listener init");
NS_LOG_V(DEBUG, "Consumer ID : %s", *NSGetConsumerId());
NS_LOG(DEBUG, "listener init");