From: KIM JungYong Date: Tue, 18 Apr 2017 03:59:27 +0000 (+0900) Subject: Fix build fail on notification with MQ. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1d9b0e0c77dadf8e5fceaa33d3aee7712798931;p=contrib%2Fiotivity.git Fix build fail on notification with MQ. When building of notificaiton with MQ, build failed because related API call invalid(removed) function. in this patch, removed function was changed. Change-Id: Ib97a5c966f4bd8907bfecbfd1463340574c2063c Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/19031 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi Tested-by: Uze Choi --- diff --git a/service/notification/src/consumer/NSConsumerInterface.c b/service/notification/src/consumer/NSConsumerInterface.c index 8bd7a99..70edd55 100644 --- a/service/notification/src/consumer/NSConsumerInterface.c +++ b/service/notification/src/consumer/NSConsumerInterface.c @@ -76,7 +76,7 @@ NSResult NSConsumerSubscribeMQService(const char * serverAddress, const char * t bool isStartedConsumer = NSIsStartedConsumer(); NS_VERIFY_NOT_NULL(isStartedConsumer == true ? (void *) 1 : NULL, NS_ERROR); - char * queryAddr = NSGetQueryAddress(serverAddress); + char * queryAddr = OICStrdup(serverAddress); NS_VERIFY_NOT_NULL(queryAddr, NS_ERROR); NSMQTopicAddress * topicAddr = (NSMQTopicAddress *)OICMalloc(sizeof(NSMQTopicAddress)); diff --git a/service/notification/src/provider/NSProviderInterface.c b/service/notification/src/provider/NSProviderInterface.c index 64290fa..0cd3037 100644 --- a/service/notification/src/provider/NSProviderInterface.c +++ b/service/notification/src/provider/NSProviderInterface.c @@ -216,7 +216,7 @@ NSResult NSProviderSubscribeMQService(const char * serverAddress, const char * t return NS_FAIL; } - topicAddr->serverAddr = NSGetQueryAddress(serverAddress); + topicAddr->serverAddr = OICStrdup(serverAddress); topicAddr->topicName = OICStrdup(topicName); NS_LOG_V(DEBUG, "input Topic Name : %s", topicAddr->topicName); @@ -450,7 +450,7 @@ NSResult NSProviderSetConsumerTopic(const char * consumerId, const char * topicN "Configuration must set to true."); if (topicSubData) { - OICFreeAndSetToNull(&topicSubData); + OICFreeAndSetToNull((void**)&topicSubData); } pthread_mutex_unlock(&nsInitMutex); return NS_FAIL; @@ -489,7 +489,7 @@ NSResult NSProviderUnsetConsumerTopic(const char * consumerId, const char * topi "Configuration must set to true."); if (topicSubData) { - OICFreeAndSetToNull(&topicSubData); + OICFreeAndSetToNull((void**)&topicSubData); } pthread_mutex_unlock(&nsInitMutex); return NS_FAIL;