From: KIM JungYong Date: Sun, 4 Sep 2016 07:36:47 +0000 (+0900) Subject: Fix bug for sample and remove unused functions. X-Git-Tag: 1.2.0+RC3~151^2^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e5733cb19972d5d49922cddce0821ba5311207a;p=platform%2Fupstream%2Fiotivity.git Fix bug for sample and remove unused functions. 1) Bug of consumer sample app is fixed. 2) Unused function of consumer service is removed. Change-Id: Idc7f7decdde34d8067177d84410af979f173a279 Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/11361 Tested-by: jenkins-iotivity Reviewed-by: Hun-je Yeon Reviewed-by: Uze Choi --- diff --git a/service/notification/examples/linux/notificationconsumer.c b/service/notification/examples/linux/notificationconsumer.c index 3d96209..5a77ea0 100644 --- a/service/notification/examples/linux/notificationconsumer.c +++ b/service/notification/examples/linux/notificationconsumer.c @@ -73,7 +73,7 @@ void onProviderChanged(NSProvider * provider, NSProviderState response) if (response == NS_DISCOVERED) { printf("notification resource discovered\n"); - printf("subscribe result %d\n", NSSubscribe(provider)); + printf("subscribe result %d\n", NSSubscribe(provider->providerId)); printf("startSubscribing\n"); } diff --git a/service/notification/src/consumer/NSConsumerCommon.c b/service/notification/src/consumer/NSConsumerCommon.c index 3f00281..bc80124 100644 --- a/service/notification/src/consumer/NSConsumerCommon.c +++ b/service/notification/src/consumer/NSConsumerCommon.c @@ -475,33 +475,6 @@ void NSRemoveProvider(NSProvider * prov) NSOICFree(prov); } -NSSyncInfo_internal * NSCopySyncInfo(NSSyncInfo_internal * syncInfo) -{ - NS_VERIFY_NOT_NULL(syncInfo, NULL); - - NSProviderConnectionInfo * connections = NSCopyProviderConnections(syncInfo->connection); - NS_VERIFY_NOT_NULL(connections, NULL); - - NSSyncInfo_internal * newSyncInfo = (NSSyncInfo_internal *)OICMalloc(sizeof(NSSyncInfo_internal)); - NS_VERIFY_NOT_NULL_WITH_POST_CLEANING(newSyncInfo, NULL, NSRemoveConnections(connections)); - - OICStrcpy(newSyncInfo->providerId, sizeof(char) * NS_DEVICE_ID_LENGTH, syncInfo->providerId); - newSyncInfo->messageId = syncInfo->messageId; - newSyncInfo->state = syncInfo->state; - newSyncInfo->connection = connections; - - return newSyncInfo; -} - -void NSRemoveSyncInfo(NSSyncInfo_internal * syncInfo) -{ - NS_VERIFY_NOT_NULL_V(syncInfo); - - NSRemoveConnections(syncInfo->connection); - - NSOICFree(syncInfo); -} - OCStackResult NSInvokeRequest(OCDoHandle * handle, OCMethod method, const OCDevAddr * addr, const char * queryUrl, OCPayload * payload, diff --git a/service/notification/src/consumer/NSConsumerCommon.h b/service/notification/src/consumer/NSConsumerCommon.h index b386281..ea1dea8 100644 --- a/service/notification/src/consumer/NSConsumerCommon.h +++ b/service/notification/src/consumer/NSConsumerCommon.h @@ -137,9 +137,6 @@ NSProvider * NSCopyProvider(NSProvider_internal *); void NSRemoveProvider_internal(NSProvider_internal *); void NSRemoveProvider(NSProvider *); -NSSyncInfo_internal * NSCopySyncInfo(NSSyncInfo_internal *); -void NSRemoveSyncInfo(NSSyncInfo_internal *); - NSTopicLL * NSCopyTopicNode(NSTopicLL *); void NSRemoveTopicNode(NSTopicLL *); NSResult NSInsertTopicNode(NSTopicLL *, NSTopicLL *);