From db9399efc6513ce11056394224fba23ad2f626f1 Mon Sep 17 00:00:00 2001 From: "jaesick.shin" Date: Tue, 23 Aug 2016 18:27:04 +0900 Subject: [PATCH] Modify invalid type for NSPostConsumerTopics. change int to int64_t. Change-Id: Iba4a1897cfb1e234da8574849e3fa739eaaaad8c Signed-off-by: jaesick.shin Reviewed-on: https://gerrit.iotivity.org/gerrit/10793 Reviewed-by: Uze Choi Tested-by: jenkins-iotivity --- service/notification/src/provider/NSProviderTopic.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/service/notification/src/provider/NSProviderTopic.c b/service/notification/src/provider/NSProviderTopic.c index d651bb9..015895f 100644 --- a/service/notification/src/provider/NSProviderTopic.c +++ b/service/notification/src/provider/NSProviderTopic.c @@ -19,6 +19,8 @@ //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #include "NSProviderTopic.h" +#include "oic_string.h" +#include "oic_malloc.h" NSResult NSSendTopicUpdation(); @@ -301,6 +303,8 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest) return NS_ERROR; } + NS_LOG_V(DEBUG, "TOPIC consumer ID = %s", consumerId); + consumerTopicList->cacheType = NS_PROVIDER_CACHE_CONSUMER_TOPIC_CID; while(NSStorageDelete(consumerTopicList, consumerId) != NS_FAIL); consumerTopicList->cacheType = NS_PROVIDER_CACHE_CONSUMER_TOPIC_NAME; @@ -315,7 +319,7 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest) for(int i = 0; i <(int)dimensionSize; i++) { char * topicName = NULL; - int topicState = 0; + int64_t topicState = 0; OCRepPayloadGetPropString(topicListPayload[i], NS_ATTRIBUTE_TOPIC_NAME, &topicName); OCRepPayloadGetPropInt(topicListPayload[i], NS_ATTRIBUTE_TOPIC_SELECTION, &topicState); @@ -323,8 +327,8 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest) if(NS_TOPIC_SUBSCRIBED == (NSTopicState)topicState) { - NSCacheTopicSubData * topicSubData = - (NSCacheTopicSubData *) OICMalloc(sizeof(NSCacheTopicSubData)); + NSCacheTopicSubData * topicSubData = (NSCacheTopicSubData *) + OICMalloc(sizeof(NSCacheTopicSubData)); OICStrcpy(topicSubData->id, NS_UUID_STRING_SIZE, consumerId); topicSubData->topicName = OICStrdup(topicName); -- 2.7.4