From: KIM JungYong Date: Thu, 29 Sep 2016 05:33:09 +0000 (+0900) Subject: Modify generating notification consumer id. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbf966cc737b79530cac8cf8920412ec3d36bde9;p=contrib%2Fiotivity.git Modify generating notification consumer id. generating consumer id is replaced with device id generated by base layer. Change-Id: I4e8157b938c0e9ea524c838d7d355443f9bb0c41 Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/12549 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- diff --git a/service/notification/src/consumer/NSConsumerScheduler.c b/service/notification/src/consumer/NSConsumerScheduler.c index f5b440f..13a33bb 100644 --- a/service/notification/src/consumer/NSConsumerScheduler.c +++ b/service/notification/src/consumer/NSConsumerScheduler.c @@ -74,14 +74,10 @@ NSResult NSConsumerMessageHandlerInit() 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");