Modify invalid type for NSPostConsumerTopics.
authorjaesick.shin <jaesick.shin@samsung.com>
Tue, 23 Aug 2016 09:27:04 +0000 (18:27 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 24 Aug 2016 06:43:12 +0000 (06:43 +0000)
change int to int64_t.

Change-Id: Iba4a1897cfb1e234da8574849e3fa739eaaaad8c
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10793
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
service/notification/src/provider/NSProviderTopic.c

index d651bb920348f1cfa47228af47998c41986f42cd..015895ff5471243e398d2a96a0af05afddb01a7a 100644 (file)
@@ -19,6 +19,8 @@
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
 \r
 #include "NSProviderTopic.h"\r
+#include "oic_string.h"\r
+#include "oic_malloc.h"\r
 \r
 NSResult NSSendTopicUpdation();\r
 \r
@@ -301,6 +303,8 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest)
         return NS_ERROR;\r
     }\r
 \r
+    NS_LOG_V(DEBUG, "TOPIC consumer ID = %s", consumerId);\r
+\r
     consumerTopicList->cacheType = NS_PROVIDER_CACHE_CONSUMER_TOPIC_CID;\r
     while(NSStorageDelete(consumerTopicList, consumerId) != NS_FAIL);\r
     consumerTopicList->cacheType = NS_PROVIDER_CACHE_CONSUMER_TOPIC_NAME;\r
@@ -315,7 +319,7 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest)
     for(int i = 0; i <(int)dimensionSize; i++)\r
     {\r
         char * topicName = NULL;\r
-        int topicState = 0;\r
+        int64_t topicState = 0;\r
 \r
         OCRepPayloadGetPropString(topicListPayload[i], NS_ATTRIBUTE_TOPIC_NAME, &topicName);\r
         OCRepPayloadGetPropInt(topicListPayload[i], NS_ATTRIBUTE_TOPIC_SELECTION, &topicState);\r
@@ -323,8 +327,8 @@ NSResult NSPostConsumerTopics(OCEntityHandlerRequest * entityHandlerRequest)
 \r
         if(NS_TOPIC_SUBSCRIBED == (NSTopicState)topicState)\r
         {\r
-            NSCacheTopicSubData * topicSubData =\r
-            (NSCacheTopicSubData *) OICMalloc(sizeof(NSCacheTopicSubData));\r
+            NSCacheTopicSubData * topicSubData = (NSCacheTopicSubData *)\r
+                    OICMalloc(sizeof(NSCacheTopicSubData));\r
 \r
             OICStrcpy(topicSubData->id, NS_UUID_STRING_SIZE, consumerId);\r
             topicSubData->topicName = OICStrdup(topicName);\r