platform/upstream/iotivity.git
7 years agochange strcpy to strncpy.
jaesick.shin [Fri, 2 Sep 2016 06:17:59 +0000 (15:17 +0900)]
change strcpy to strncpy.

strcpy function is unsafe.

Change-Id: Ifd679a4b9804861da409d4318b69502992d8ef90
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11327
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd logic for NS_FAIL Case in API.
jaesick.shin [Fri, 2 Sep 2016 05:43:02 +0000 (14:43 +0900)]
Add logic for NS_FAIL Case in API.

Add NS_FAIL case in API.

Change-Id: I597cf9ed3c76aa2621aacef36305beb01130d11a
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11323
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoBug fixes for Unlock.
jaesick.shin [Fri, 2 Sep 2016 04:40:48 +0000 (13:40 +0900)]
Bug fixes for Unlock.

Bug fixes unlock logic for NSProviderDeleteConsumerTopic Function.

Change-Id: Ibe27134f38b8e12b0d767df03aabd049f16431b9
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11317
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoChange dereference code.
jaesick.shin [Fri, 2 Sep 2016 04:02:22 +0000 (13:02 +0900)]
Change dereference code.

Added check logic for dereference code.

Change-Id: If34fe346803b7ccc9c3eb21056790c1e030bd14a
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11313
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoReplace conditional compilation marcro WITH_CLOUD and bug fixed.
jaesick.shin [Fri, 2 Sep 2016 03:50:56 +0000 (12:50 +0900)]
Replace conditional compilation marcro WITH_CLOUD and bug fixed.

Macro RD_CLIENT is replaced with WITH_CLOUD.
The codes related to cloud service is not compiled according to
the conditional compilation with the marcro.

modify topic notification filter for remote message
This patch is bug-fix which adds topic notification filter for remote msg.

Change-Id: Ib61957dac3a193706386be5e121e5efdb2bbada8
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11311
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoResolve memory leak for unittest.
jaesick.shin [Thu, 1 Sep 2016 01:18:59 +0000 (10:18 +0900)]
Resolve memory leak for unittest.

change strdup to global variables.

Change-Id: Ida35b98ad5fb5be8add9fa12b481cb8a2bee4dcb
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11235
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify subscribe presence query.
KIM JungYong [Thu, 1 Sep 2016 11:53:11 +0000 (20:53 +0900)]
Modify subscribe presence query.

Changed query is calculated to receive presence message on ipv6.

Change-Id: I53db76230b96dc12a3174de37b14fa0044eafc67
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11279
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 44e8750f7f2aa96d8c313cd757c96211ddc65571)
Reviewed-on: https://gerrit.iotivity.org/gerrit/11321

7 years agoFix bug for Cloud service of consumer service.
KIM JungYong [Tue, 30 Aug 2016 07:04:29 +0000 (16:04 +0900)]
Fix bug for Cloud service of consumer service.

For connect to Cloud, making uri, parsing address, constructing query was fixed.

Address converter is modified for TCP requests.

Change-Id: I714ce22e53ba05aab7f1be1512ccddfe46cdeb78
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11113
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoMove non-public struct
cc [Thu, 1 Sep 2016 05:41:23 +0000 (14:41 +0900)]
Move non-public struct

TopicList struct and Attribute keys are moved to internal struct module.

Change-Id: Iab8d9c7a308eb107f12f59cc5cf999d092f58642
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11253
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify Svace Issue
YounghyunJoo [Thu, 1 Sep 2016 05:46:28 +0000 (14:46 +0900)]
Modify Svace Issue

- Fix bug for checking NSResult is validate
- Fix bug for value null check

Change-Id: Ie0cab2ae4d7487a3f0ef310fda938893f4fe84ef
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11251
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify consumer logic for updating provider information
YounghyunJoo [Mon, 29 Aug 2016 12:56:43 +0000 (21:56 +0900)]
Modify consumer logic for updating provider information

- Add synchronization logic for cache update in NSConsumerInternalTaskController.
- Adapt its synchronization logic, when subscription succeed is checked/updated.

Change-Id: I746a3d3602eab3ac570a6d2ddfcdd4b7dce8e18a
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11055
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdate consumer logic for stopped provider.
KIM JungYong [Tue, 30 Aug 2016 00:22:53 +0000 (09:22 +0900)]
Update consumer logic for stopped provider.

When the provider was stopped service,
consumer service will feedback to upperlayer on ProviderChangedCallback but non-feedback before.
This patch enable feedback when stopped provider service.

And enum value of NS_STOPPED is added.
NSResponse enum structure is renamed with NSProviderState.

Change-Id: I7fdd2ca1d3ba0b534c74b0fbc6719616daab2f67
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11091
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd unittest for NSUnregistertopic Case.
jaesick.shin [Wed, 31 Aug 2016 08:00:36 +0000 (17:00 +0900)]
Add unittest for NSUnregistertopic Case.

check the Unregistertopic case.

Change-Id: I0f182ce9b9e8b60b708740a35ea0880f1c537344
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11207
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd unitest and change invalid function name.
jaesick.shin [Wed, 31 Aug 2016 06:57:04 +0000 (15:57 +0900)]
Add unitest and change invalid function name.

1. Add unittest for NSProviderRegisterTopic case.
2. change invalid function name in NSProviderInterface.h

second patch is comment changed only.

third patch included,
change invalid testcase name.

Change-Id: Iacbc8466c1f2f204b81ff5db28015ef9f5762858
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11195
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove warning code in Provider Side.
jaesick.shin [Wed, 31 Aug 2016 08:05:21 +0000 (17:05 +0900)]
Remove warning code in Provider Side.

remove warning code only.

Change-Id: I12f4ffc235817110e8a71c42f80d642569efb7f2
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11209
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoBug fixes for mutex unlock.
jaesick.shin [Thu, 1 Sep 2016 00:56:05 +0000 (09:56 +0900)]
Bug fixes for mutex unlock.

Add mutex unlock for NSProviderDeleteConsumerTopic function
in NSPrvoiderMemoryCache.c

Change-Id: I9286c3fdb897409f298defab40d7479db13a2f06
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11233
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix bugs for copy provider
YounghyunJoo [Wed, 31 Aug 2016 08:50:55 +0000 (17:50 +0900)]
Fix bugs for copy provider

- Modify incompatible type casting

Change-Id: Ic2695c85c1b4c6070089d46dbb9179d6cb9baae1
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11211
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdded CreateMessage API in Android APIs
nikhil.a [Mon, 29 Aug 2016 12:49:21 +0000 (18:19 +0530)]
Added CreateMessage API in Android APIs

1) CreateMessage API added for ProviderService
2) Addition of JNI code for the respective API
3)Refactoring of code

Change-Id: I53c44c09580028b4ec0631b47f31c5b8abb47535
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11053
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Abitha Shankar <abitha.s@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoRemove MessagList in Provider side.
jaesick.shin [Mon, 29 Aug 2016 04:45:55 +0000 (13:45 +0900)]
Remove MessagList in Provider side.

MessageList is unused in provider side.
second patch remove the white space.

Change-Id: I078166aa44eaaa0886edab1832536911352abbda
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11037
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoBug fixes for memory leak in NSProviderMemoryCache.
jaesick.shin [Thu, 25 Aug 2016 07:20:00 +0000 (16:20 +0900)]
Bug fixes for memory leak in NSProviderMemoryCache.

Add free logic for memory leak in NSStorageWrite function.

Change-Id: Ifd8ef3b08cc61e798255be5f472df6e9d4e3575a
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10901
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
(cherry picked from commit 2f8564431591e37493985629ffee7a90dfbfe4f6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/11035

7 years agoModify bug which is related provider copy issue
YounghyunJoo [Tue, 30 Aug 2016 05:32:03 +0000 (14:32 +0900)]
Modify bug which is related provider copy issue

some APIs which is received NSProvider pointer as an API parameter
after calling and Processing these APIs, NSProvider was removed.
to prevent this problem, as a first step in the API, we added the logic to copy provider.

Change-Id: I3523691ec4992dc9dbf0b0824a4e2ff4df133568
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11107
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify logic for related topic.
jaesick.shin [Tue, 30 Aug 2016 04:58:44 +0000 (13:58 +0900)]
Modify logic for related topic.

this patch included,
1. Modify logic for NSSendTopicList.
2-1. change NSProviderTopicListSize to NSProviderGetTopicListSize.
2-2. and move NSProviderMemoryCache to NSProviderTopic.c
3. rename Function for NSProviderRegisterTopic.

Change-Id: I829435e5504b117f1f4d71453b5c9ca6ab02c511
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11101
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoRename Function and arguments for API.
jaesick.shin [Mon, 29 Aug 2016 13:51:30 +0000 (22:51 +0900)]
Rename Function and arguments for API.

this patch included,
1. Rename function for API.
2. Modify the unittested by the first.
3. comment out the cpp-wrapper in SConscript.

Change-Id: I5f7ba966e757dc14389eab58d96ed3e5cfa521fe
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11071
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoModify cloud URI for sample
cc [Tue, 30 Aug 2016 05:04:59 +0000 (14:04 +0900)]
Modify cloud URI for sample

The default URIs are changed for sign-up, sign-in, token and refresh.

Change-Id: I06e60ba7733b59089c89fd031ab811e7a4191760
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11105
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove consumer callback for discovered provider.
KIM JungYong [Fri, 26 Aug 2016 09:47:25 +0000 (18:47 +0900)]
Remove consumer callback for discovered provider.

Consumer service has two type of callback within parameter as provider object.
One of callback is called when the provider discovered,
and others is called the provider changed.
But, discovered callback is imprecise called owing to provider policy.
So, discovered event is added in provider changed callback.
Two of callback is united as changed name of ProviderStateCallback
and removed discovered callback.

Change-Id: I60eebaf78aaae78a61b3772138b582df3748910c
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10973
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix bug for storage update to provider.
KIM JungYong [Mon, 29 Aug 2016 12:20:43 +0000 (21:20 +0900)]
Fix bug for storage update to provider.

The provider will update two type of information,
one of information is connection information, and others is topic list.
It is problem that whole infomation was updated although just one of information updated.
In this patch, update logic is seperated updating infomation.

Change-Id: I0fe1062791ac43fadadbba04311b903c44678a1e
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11047
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoRemove unused enum eAccessPolicy
cc [Fri, 26 Aug 2016 13:12:01 +0000 (22:12 +0900)]
Remove unused enum eAccessPolicy

The unnessary enum data is removed.

Change-Id: I6d55405827a365689a5a8d452dd400464b1fbd16
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10969
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoFix bug for discover logic on consumer service.
KIM JungYong [Mon, 29 Aug 2016 04:43:56 +0000 (13:43 +0900)]
Fix bug for discover logic on consumer service.

1) Modify default connectivity type of discover requestion.
When consumer service run the discover provider,
Connectivity type of request was CT_DEFAULT.
It original meaning was CT_ADAPTER_IP.

2) Remove meaningless memory allocation.
When discover as TCP, we use of allocated context data.
But, this context data unnecessary to allocate.

Change-Id: I2fab71f5352485f04b17b3e7fdd9cda254ebeab9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11017
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix unit test of notification provider service.
KIM JungYong [Fri, 26 Aug 2016 10:53:46 +0000 (19:53 +0900)]
Fix unit test of notification provider service.

unit test bug is fixed at notification provider service.

Change-Id: I83882ceb626be56fc47d5da2cb6eda60e17207e9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10963
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years ago1) Modified JNI to fix few issues.
nikhil.a [Sun, 28 Aug 2016 16:08:10 +0000 (21:38 +0530)]
1) Modified JNI to fix few issues.

2) Update cpp-wrapper code causing issue with JAVA API's.

Change-Id: I55b5b0d85fce9011287868773e17144f9ce4ea61
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11005
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago1. Modified the Accepted Providers Consumers list to return references
abitha.s [Fri, 26 Aug 2016 11:52:21 +0000 (17:22 +0530)]
1. Modified the Accepted Providers Consumers list to return references

2. Added API to setTopic in Message for setting via application

3. Updated Logs

Change-Id: Id3b37c148c3e96d391224ccb5cf75a57c40ced6f
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10965
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoSconscript and Android sample app update
nikhil.a [Thu, 25 Aug 2016 08:44:57 +0000 (14:14 +0530)]
Sconscript and Android sample app update

1) Sconscript update  to build android code
2)  onProviderChanged callback name update in consumer sample app

Change-Id: Ic74bf7315f31b734cb854d4e0b3d59a01420d74d
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10911
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify Consumer Logic to call the Provider Changed CB
YounghyunJoo [Tue, 23 Aug 2016 06:14:22 +0000 (15:14 +0900)]
Modify Consumer Logic to call the Provider Changed CB

- remove if statement which should be modified when change to Provider Changed CB from Accepted CB

Conflicts:
        service/notification/src/consumer/NSConsumerInternalTaskController.c

Change-Id: Icb4b0afe55f2589a9d5bdcc6b8655f8f3a59fdd5
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10767
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify response logic for NSTopicEntityHandler.
jaesick.shin [Wed, 24 Aug 2016 08:48:59 +0000 (17:48 +0900)]
Modify response logic for NSTopicEntityHandler.

two times, send response.

second patch included,
remove the DoResponse for error case.

Change-Id: Ife6e8b87868afa6307ed82ca41430b1837c56798
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10879
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdated JAVA and JNI API's for Topic Resource
nikhil.a [Wed, 24 Aug 2016 15:53:08 +0000 (21:23 +0530)]
Updated JAVA and JNI API's for Topic Resource

1. Added JAVA APIs related to topic resource for provider and consumer
2. Added JNI for respective Java API's
3. Minor changes for cpp-wrapper

Change-Id: I459c70b64529040010d099bf239d42863b1417c2
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10883
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdated Topic resource changes for C++ wrapper
abitha.s [Fri, 12 Aug 2016 08:47:21 +0000 (14:17 +0530)]
Updated Topic resource changes for C++ wrapper

1. Modified the Topic resource and Topic LL changes in Provider and Consumer
2. Updated the APIs for Topic resource in C++ wrapper
3. Updated the sample application for calling Topic APIs

patch 1 : initial commit
patch 2 : updated commit message
patch 3 : updated review comments
patch 4 : updated commit message
patch 5 : removed NSAccessPolicy struct

Change-Id: I737bef2eebb129c5f13034d990398d75dd13b3b7
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10623
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix bug for Find provider using Address.
KIM JungYong [Wed, 24 Aug 2016 04:41:12 +0000 (13:41 +0900)]
Fix bug for Find provider using Address.

When finding provider using address,
search logic do invalid type casting for provider connection information.
For the above reason, Provider was never finding with address on storage.
In this patch, invalid type casting is fixed.

Change-Id: I6cde6c9b85e589501cb3ae7567246e631d5e9a65
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10845
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify cloud interface
cc [Mon, 22 Aug 2016 07:00:12 +0000 (16:00 +0900)]
Modify cloud interface

Cloud interface and APIs are modified according to cloud module changes.
And configurations related to the interface are changed.

Conflicts:
service/notification/examples/linux/notificationconsumer.c

Change-Id: I0c7cb16dd19596cda90c0eef2a6332cc6a5532ae
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10717
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoBug fixes for unlock mutex.
jaesick.shin [Wed, 24 Aug 2016 08:42:09 +0000 (17:42 +0900)]
Bug fixes for unlock mutex.

Add unlock mutex NSStorageDelete.

Change-Id: I52795aff7395051b00f60f764163cda85e318be1
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10877
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd Consumer Logic to update observe result for each connections
YounghyunJoo [Wed, 24 Aug 2016 05:10:58 +0000 (14:10 +0900)]
Add Consumer Logic to update observe result for each connections

- Modify to update result additionally in case of observe fail during while loop

Change-Id: I272db06e182e0ded3c227de571fa15cd736feabe
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10853
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRestrict topic list control when Provider does not have permission.
jaesick.shin [Tue, 23 Aug 2016 09:44:00 +0000 (18:44 +0900)]
Restrict topic list control when Provider does not have permission.

If provider does not have the comsumer subscription accept capability
following topic related API should not work.
1. NSProviderSelectTopic
2. NSProviderUnselectTopic

Change-Id: I197a60a0aae5eef3226f3766f1b793594628a9f9
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10795
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify invalid type for NSPostConsumerTopics.
jaesick.shin [Tue, 23 Aug 2016 09:27:04 +0000 (18:27 +0900)]
Modify invalid type for NSPostConsumerTopics.

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>
7 years agomodify logic for OC_REST_POST of topic.
jaesick.shin [Tue, 23 Aug 2016 07:21:41 +0000 (16:21 +0900)]
modify logic for OC_REST_POST of topic.

1. Accepter is provider case :
   - our service is not support sendtopiclist from OC_REST_POST
2. // Accepter is consumer.
   - our service is support sendtopiclist from OC_REST_POST

Change-Id: I4e2090197f388892e831071e7d3ff600494261c7
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10781
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify logic for related Topic.
jaesick.shin [Tue, 23 Aug 2016 06:25:17 +0000 (15:25 +0900)]
Modify logic for related Topic.

This patch included
add OCDoReponse for NSEntityHandlerTopicCb.
add DeleteConsumerTopicList.
When the topic entityhandler OC_REST_POST is requested,
the function is called NSPostConsumerTopics.
At this time, delete a list of consumer who have a provider,
and make a new selection topiclist.

second patch included.
modify comment out.

Change-Id: Ib5eba3809dfc199bc2ab93008e32591da1312060
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10773
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify Consumer example & Logic to copy provider
YounghyunJoo [Wed, 24 Aug 2016 04:57:41 +0000 (13:57 +0900)]
Modify Consumer example & Logic to copy provider

- Modify example code to test Topic
- Modify Logic to copy provider during processing topic

Change-Id: I4a6ca0d2d0c203fcfb76af00cc4c05b745d498e0
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10783
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd Logic to store NSProvider subscribe information after subscribing
YounghyunJoo [Tue, 23 Aug 2016 11:58:11 +0000 (20:58 +0900)]
Add Logic to store NSProvider subscribe information after subscribing

- fix bug for non-storing issue
- fix bug logic which does not push task into the queue when received presence stopped

Change-Id: I0ba93229bfa02361def5bfbf357043ec05e5a4f1
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10759
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify MessagId for type.
jaesick.shin [Tue, 23 Aug 2016 12:33:59 +0000 (21:33 +0900)]
Modify MessagId for type.

The OIC specification supports 32 bits only for int type.

Change-Id: I6485f6657c4de50340727b244b5fe22f71da5816
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10805
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd deallocation memory for related topic.
jaesick.shin [Tue, 23 Aug 2016 07:10:10 +0000 (16:10 +0900)]
Add deallocation memory for related topic.

This patch included,
Add deallocation memory for remaining task.

Change-Id: I344ae1f65eb8385959a832baf9e09454833cc611
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10777
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix bug for copy of provider informations.
KIM JungYong [Mon, 22 Aug 2016 08:05:08 +0000 (17:05 +0900)]
Fix bug for copy of provider informations.

When provider information was stored,
storage module copy whole of provider connections,
but first pointer of connection information was wrongly redefine with next connection information.
For the reason, first connection information was ignored.
In this patch wrongly calculation of pointer was fixed.

Change-Id: Ic91abd458979c2b113e641b3d9c28e6894dd5b7f
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10723
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge "Merge remote-tracking branch 'origin/master' into notification-service" into...
Uze Choi [Tue, 23 Aug 2016 11:25:34 +0000 (11:25 +0000)]
Merge "Merge remote-tracking branch 'origin/master' into notification-service" into notification-service

7 years agoBug fixes unittest for ExpectCallNotifyOnConsumerByAcceptIsTrue.
jaesick.shin [Tue, 23 Aug 2016 00:57:47 +0000 (09:57 +0900)]
Bug fixes unittest for ExpectCallNotifyOnConsumerByAcceptIsTrue.

change new NSMessage to NSCreateMessage.

Change-Id: Ic6639f936504a40fe5b40a2ed0efdabf4d6121c7
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10751
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove not required function.
jaesick.shin [Tue, 23 Aug 2016 05:44:00 +0000 (14:44 +0900)]
Remove not required function.

this patch included
remove not required function in NSProviderMemoryCache.
and refactoring code about related NSStorageDelete function.

Change-Id: Iee2e6bbfb149a4cf3d1a0908974d0c752e54be0b
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10765
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agobug fixes logic for subscription cache update.
jaesick.shin [Mon, 22 Aug 2016 07:15:55 +0000 (16:15 +0900)]
bug fixes logic for subscription cache update.

If consumer have controlled access
then provider always allowed for subscription.
Added call function of subscription updateState.

second patch included,
remove not required code.
change NSSendSubscriptionResponse to NSSendConsumerSubResponse.

Change-Id: Ia39766e814130bd492193e5c3a57436493b9e409
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10719
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge remote-tracking branch 'origin/master' into notification-service
Hun-je Yeon [Tue, 23 Aug 2016 03:55:18 +0000 (12:55 +0900)]
Merge remote-tracking branch 'origin/master' into notification-service

Change-Id: Ifc4d229deb7d96800790c617536d96b9ad25136c
Signed-off-by: Hun-je Yeon <hunje.yeon@samsung.com>
7 years agoFix build fail of consumer unittest.
KIM JungYong [Mon, 22 Aug 2016 02:03:59 +0000 (11:03 +0900)]
Fix build fail of consumer unittest.

When notification service build,
before unittest is commented why unittest has fail case and build error.
Fail case is resolved other patch by Jaesick.shin.
In this patch, build error is fixed.

Change-Id: Id5a588f719ae8b6eb1ac78bf987dd793da208c14
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10707
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemoved the duplicated code in catcpserver.c
hyuna0213.jo [Thu, 11 Aug 2016 00:30:47 +0000 (09:30 +0900)]
Removed the duplicated code in catcpserver.c

removed the duplicated code caused by merge of
https://gerrit.iotivity.org/gerrit/#/c/8027/

Change-Id: Id9429af0959cae4a2cc9d508a007c7b26a7e0c31
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10243
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoCorrect wrong use of API for creating resources in unittests.
Ziran Sun [Mon, 8 Aug 2016 10:05:48 +0000 (11:05 +0100)]
Correct wrong use of API for creating resources in unittests.

Change-Id: Ib05481a2a87c2eb4714832d453a8455a80c1456f
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10139
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agoModify TLS adapter implementation to store subjectAltName
Oleksii Beketov [Thu, 18 Aug 2016 11:04:36 +0000 (14:04 +0300)]
Modify TLS adapter implementation to store subjectAltName

CAdecryptTls() from ca_adapter_net_tls.c modified to check certificate
for subject alternative name (SAN) optional field. It will be stored
as userId.

Change-Id: I5a018f1030873f031966d785658db8c9b36f2839
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10613
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoModify unittest for ExpectCallNotifyOnConsumerByAcceptIsTrue.
jaesick.shin [Mon, 22 Aug 2016 03:45:10 +0000 (12:45 +0900)]
Modify unittest for ExpectCallNotifyOnConsumerByAcceptIsTrue.

this unittest is sometimes success or fail.

Change-Id: I5db819e90919c9db1281b0853c44214cbf58cc43
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10701
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoModify some internal functions' name in easy setup
Jihun Ha [Sat, 20 Aug 2016 06:20:37 +0000 (15:20 +0900)]
Modify some internal functions' name in easy setup

This patch change names of some funtions more readable.
Additionally, update the codes to remove warning messages in building

Change-Id: Ifaf31b0bc99641110a79f199bea753fa4e4597dd
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10689
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoRemove ESCloudProvState in Jni and Android
Jihun Ha [Sat, 20 Aug 2016 05:32:01 +0000 (14:32 +0900)]
Remove ESCloudProvState in Jni and Android

Followed by https://gerrit.iotivity.org/gerrit/#/c/10685/,
this change is applied to jni and Android.

Change-Id: I0f716706f65ef4f455a61ccbd9f79ae4854458ed
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10687
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoRemove ESCloudProvState due to duplication
Jihun Ha [Sat, 20 Aug 2016 04:52:03 +0000 (13:52 +0900)]
Remove ESCloudProvState due to duplication

ESCloudProvState and ESResult can produce a similar result in easy setup.
So ESCloudProvState is decided to be merged into ESResult for consistency
with the other provisioning API like deviceProvisioning.

Change-Id: Ic937688f0f47eac9b7f4ce2b257ea7c3c6306eba
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10685
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoComment out unittest of resource hosting.
KIM JungYong [Mon, 22 Aug 2016 04:45:55 +0000 (13:45 +0900)]
Comment out unittest of resource hosting.

When unittest of resource hosting running,
lead to crash because pure virtual method called.
some of resource hosting class has OCResource as shared pointer.
When the termination of application
OCResource as shared pointer call destructors on RH's instance termination,
but RI c++ alread terminated, so RH app(unittest) lead to crash.

Change-Id: I297300a16ecd0e4dd7f9a1db8557d7167a59c5a5
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10705
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix unittest of things manager to wait a certain time to discover resources
Jihun Ha [Mon, 22 Aug 2016 04:26:23 +0000 (13:26 +0900)]
Fix unittest of things manager to wait a certain time to discover resources

findCandidateResources can have the third parameter which is a waitTime
for discovering resources. If it is not specified, it acts like findResource.
It means, once any resource is discovered, it is immediately called, which
makes the test case failed if wrong resource is discovered.
To resolve this issue, we wait until a right resource id discovered.

Change-Id: Ib3d6f5595c955c8565d031d5fd2faf2ee904abe5
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10703
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agofixed bug for setValue in refreshAccessToken
Jaewook Jung [Wed, 17 Aug 2016 08:00:43 +0000 (17:00 +0900)]
fixed bug for setValue in refreshAccessToken

Since OCRepresentation doesn't perceive a const string as std::string value,
need to clarify a type of parameter.
Otherwise, it is passed as a true boolean value whatever it is.

Change-Id: I3db677f6bdf59bf23036dc678781b35af95025e6
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10539
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoFix TLS-related Build error
Jongmin Choi [Sat, 20 Aug 2016 10:28:03 +0000 (19:28 +0900)]
Fix TLS-related Build error

Fix service build error related to TLS support

Change-Id: If0c9884ed2e21e8810c4a9d8b2e79b6cbf38dd90
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10693
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoFix build fail of consumer unittest.
KIM JungYong [Mon, 22 Aug 2016 02:03:59 +0000 (11:03 +0900)]
Fix build fail of consumer unittest.

When notification service build,
before unittest is commented why unittest has fail case and build error.
Fail case is resolved other patch by Jaesick.shin.
In this patch, build error is fixed.

Change-Id: Id5a588f719ae8b6eb1ac78bf987dd793da208c14
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10699
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge branch 'notification-service'
Hun-je Yeon [Fri, 19 Aug 2016 16:15:18 +0000 (01:15 +0900)]
Merge branch 'notification-service'

Notification topic is added.
After this patch, notification provider could distinguish
the notification according to its topics, and consumer
could receive the selected notification from provider

Change-Id: I66a8c3d6aec28c0e8d20ccdb4f00b77850e374f7
Signed-off-by: Hun-je Yeon <hunje.yeon@samsung.com>
7 years agoFix Consumer's bug & support to non topic scenario
YounghyunJoo [Fri, 19 Aug 2016 08:50:47 +0000 (17:50 +0900)]
Fix Consumer's bug & support to non topic scenario

Change-Id: Iaf704defc826147d85762095ebb0981398e77cac
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10669
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: jaesick shin <jaesick.shin@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoFix bug for prevent crash when access null pointer string.
KIM JungYong [Fri, 19 Aug 2016 13:04:18 +0000 (22:04 +0900)]
Fix bug for prevent crash when access null pointer string.

When consumer receive responce of discovery,
we was compare uri of discovered resource with "notification".
But, sometime uri of discovered resource was null,
consumer service occur crash.
In this patch, protection code is added in discover result handling logic.

Change-Id: I9006a36874ea9e282031aa7f95609ac3ac307f02
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10675
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agocomment out for ExpectCallNotifyOnConsumerByAcceptIsTrue case.
jaesick.shin [Fri, 19 Aug 2016 10:37:16 +0000 (19:37 +0900)]
comment out for ExpectCallNotifyOnConsumerByAcceptIsTrue case.

This case is sometimes failed when build with TCP=1.
Comment out for this case.
will change code.

Change-Id: I86c7092da222b2b512b292d3f66760e2f8059851
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10671
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge "Merge remote-tracking branch 'origin/master' into notification-service" into...
Uze Choi [Fri, 19 Aug 2016 11:49:19 +0000 (11:49 +0000)]
Merge "Merge remote-tracking branch 'origin/master' into notification-service" into notification-service

7 years agoChange OCCloudPublish API to OCRDRublish
ch79.cho [Fri, 19 Aug 2016 05:50:34 +0000 (14:50 +0900)]
Change OCCloudPublish API to OCRDRublish

Cloud publish API is changed to OCRDPublish provided by
resource directory. And the cloud login example is removed,
because the API releated to login will be changed.

Change-Id: I13dd27ca5461fb79ef1e2fc0df70d08c9a37515e
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10655
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd consumer logic for provider was stopped.
KIM JungYong [Thu, 18 Aug 2016 06:56:54 +0000 (15:56 +0900)]
Add consumer logic for provider was stopped.

When consumer presence listener received event of
stopped provider or deleted notification resource of provider,
consumer service does not act anything.
In this patch,
consumer service will process for canceling observe and removing provider infomation.

Change-Id: I9133ddbcbe8e341584ebaf8152c22df003cbb2ff
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10587
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify logic for NSProviderGetConsumerTopicsCacheData Function.
jaesick.shin [Fri, 19 Aug 2016 05:35:24 +0000 (14:35 +0900)]
Modify logic for NSProviderGetConsumerTopicsCacheData Function.

This Function is direct used The User Interface function.
Changed to use a cache memory function.

Change-Id: I567e644a3890f78bb25495b2ab55d46be9f7912f
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10653
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify for Related Topic.
jaesick.shin [Fri, 19 Aug 2016 04:22:17 +0000 (13:22 +0900)]
Modify for Related Topic.

this patch included
1. bug fixes for invalid type and mutex unlock logic.
2. Add NSProviderDeleteConsumerTopic Function. This function is called when you deselect topic.
3. delete NSIsTopicSubscribed function. This function is not required.

Change-Id: I2629418f441ad0efaaee864b22150424158fa43c
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10645
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFixed wrong address conversion of ip information
hyuna0213.jo [Tue, 16 Aug 2016 08:22:46 +0000 (17:22 +0900)]
Fixed wrong address conversion of ip information

Fixed wrong address conversion of ip information

Change-Id: I8c730ae9ca0efcef51d3e9f90e24f24d3a90bd8b
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10495
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoChange the delimiter from '&' to ';'
Jaehong Jo [Mon, 8 Aug 2016 09:52:46 +0000 (18:52 +0900)]
Change the delimiter from '&' to ';'
According to the specifications

Change-Id: I6c4afcd312515e71b5d9702b2edaa154bce7f2ea
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10135
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix wrong network interface length when secured option is true
hyuna0213.jo [Tue, 16 Aug 2016 22:54:59 +0000 (07:54 +0900)]
Fix wrong network interface length when secured option is true

If secured option is true, network interface length contain
invalid values.

Change-Id: Id6a99ad9ea5d03de724239e9a0d9b21ece3cbe19
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10525
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFixed memory leak from keep-alive
hyuna0213.jo [Wed, 10 Aug 2016 06:33:17 +0000 (15:33 +0900)]
Fixed memory leak from keep-alive

The keep-alive mechanism was not properly deleting the payload
that was created for keep-alive.

Change-Id: I80736893e472c31f9058c2d2b5c1d3c38a692c04
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10223
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IoT-1211] modified java file list for Android build
jihwan.seo [Wed, 17 Aug 2016 04:46:20 +0000 (13:46 +0900)]
[IoT-1211] modified java file list for Android build

https://jira.iotivity.org/browse/IOT-1211
Some interfaces including EDR, BLE, NFC will be excluded,
when there is no target option in scons build

Change-Id: I5d488b5cd7b5641c1db75e249b82a8199b46b35f
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10529
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agomodified scan interval logic when BT adapter is on.
jihwan.seo [Tue, 16 Aug 2016 04:12:39 +0000 (13:12 +0900)]
modified scan interval logic when BT adapter is on.

when BT adapter is off -> on,
scan logic is not working
because condition variable was freed.

Change-Id: Ifa244c44d57d60fea84ab42f58b100ab3cf8d147
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10477
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix unittest of Things manager for TCP build
Jihun Ha [Fri, 19 Aug 2016 07:14:44 +0000 (16:14 +0900)]
Fix unittest of Things manager for TCP build

If a found resource has TCP connectivity, it would be not used for unittest.

Change-Id: I2a1aa34ee399474c122208e7133fee8dc89267e6
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10661
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoTizen Enrollee Sample App. and its script files are updated. EasySetup logic and...
sy01.youn [Thu, 18 Aug 2016 23:12:22 +0000 (08:12 +0900)]
Tizen Enrollee Sample App. and its script files are updated. EasySetup logic and Wifi Connection implementation (targeted mobile tizen) are newly updated.
It works fine when tested on tizen mobile Z3.

Change-Id: Iff140fc33bb22ec83fd9c4ee26e6ba5fb05ab91c
Signed-off-by: sy01.youn <sy01.youn@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10531
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoAdd & fix unittest of easy setup.
sy01.youn [Thu, 18 Aug 2016 08:20:17 +0000 (17:20 +0900)]
Add & fix unittest of easy setup.

- Add unit test cases
(1) Enrollee handles individual get request from client.
(2) Enrollee handles put request from client.
(3) ESSetCallbackForUserdata API unit test is added.

- Remove GetTargetNetworkInfoFromProvResource API in resourcehandler.
  . This API is not need anymore.

Change-Id: If634923b0daaf9760b78b3d7e853c823769db6ba
Signed-off-by: sy01.youn <sy01.youn@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10603
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
7 years agoFixed memory-leak of |cJSON| object on |json2cbor|
Kyungsun Cho [Thu, 18 Aug 2016 07:22:56 +0000 (16:22 +0900)]
Fixed memory-leak of |cJSON| object on |json2cbor|

Change-Id: I972cb1386ba55279b8f961e2d6c0a76231cac872
Signed-off-by: Kyungsun Cho <goodsun.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10593
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoUpdate Provider Example.
jaesick.shin [Fri, 19 Aug 2016 02:15:48 +0000 (11:15 +0900)]
Update Provider Example.

Add User input logic for topic.

Change-Id: I0308f4bf28c222ebb164bf824668579075e058e5
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10633
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd send Response with DOResponse for subscription request.
jaesick.shin [Fri, 19 Aug 2016 02:29:57 +0000 (11:29 +0900)]
Add send Response with DOResponse for subscription request.

observe request alwyas needs response with DoResponse.

Change-Id: Icc9d25def0aed28a48f0f34278e3bc87e6e67d9c
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10641
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify(Fix) Logic bugs in Notification consumer
YounghyunJoo [Thu, 18 Aug 2016 11:38:32 +0000 (20:38 +0900)]
Modify(Fix) Logic bugs in Notification consumer

Change-Id: Ia39dd3519f8ed0febe12b7655aaa9eb3478d33da
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10615
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge remote-tracking branch 'origin/master' into notification-service
ch79.cho [Fri, 19 Aug 2016 06:42:13 +0000 (15:42 +0900)]
Merge remote-tracking branch 'origin/master' into notification-service

Change-Id: Ia655d39bb0e4a4c14072cb9a98566fe15bc4f6b1
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
7 years agoAdd PMSingleDiscovery function for discover owned/unowned devices in specified endpoint
Sijae Kim [Mon, 15 Aug 2016 11:04:59 +0000 (20:04 +0900)]
Add PMSingleDiscovery function for discover owned/unowned devices in specified endpoint
this function will return when found one or more device even though timeout is not exceeded

Change-Id: Ib03a775bb4142466274bb38517433803971a4213
Signed-off-by: Sijae Kim <sijae.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10461
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongho Park <jh8397.park@samsung.com>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoAdd logic for getTopicRequest without consumer Id and Add topic in NSSendMessage...
jaesick.shin [Thu, 18 Aug 2016 08:12:22 +0000 (17:12 +0900)]
Add logic for getTopicRequest without consumer Id and Add topic in NSSendMessage Payload.

1. Add exception logic of getRequest(consumer Id == NULL) for Topic case.
2. Add topic attribute for NSSendMessage Payload.

Change-Id: I7db3c6432d02cd96390b5d71677fb3f20281607d
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10599
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd exception logic for NSStorageDelete Function.
jaesick.shin [Thu, 18 Aug 2016 09:57:40 +0000 (18:57 +0900)]
Add exception logic for NSStorageDelete Function.

Add exception When the list header is null of NSStorageDelete Function.

Change-Id: I080152cba762831ad71856fc7d87137dc4c4d3e5
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10609
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd logic for NSIsTopicSubscribed.
jaesick.shin [Thu, 18 Aug 2016 02:11:46 +0000 (11:11 +0900)]
Add logic for NSIsTopicSubscribed.

this function is checking the each of consumer subscribe.

second patch included,
modify invalid types.

Change-Id: I2cb1adfc5af804ed59207244638985f5b67bd754
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10569
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix build issue about unittest and cloud interface
ch79.cho [Thu, 18 Aug 2016 13:43:03 +0000 (22:43 +0900)]
Fix build issue about unittest and cloud interface

When notification service unittest build with '-Wl, --as-needed' LDFLAGS,
some build machine returns build fail.(this flag is default option.)
The default of passing --as-needed can be undone by passing --no-as-needed to the linker.
So, 'Wl, --no-as-needed' flag is added in notification unittest SConscript.

CloudPublish is removed, because it is not used by sample application.

Change-Id: Ibeeb0ec60d80da1e216c43ba635e2efc0f193b7e
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10627
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 90959b0f2675d2e39770c1e6a02bff0e05d1a9ab)
Reviewed-on: https://gerrit.iotivity.org/gerrit/10631
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoModify notification consumer example code
YounghyunJoo [Thu, 18 Aug 2016 11:42:19 +0000 (20:42 +0900)]
Modify notification consumer example code

- to support topic functionality

Change-Id: I3a76d2a5eb80ddf67780ae1707e1097c3930d6a8
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10619
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix build issue about unittest and cloud interface
ch79.cho [Thu, 18 Aug 2016 13:43:03 +0000 (22:43 +0900)]
Fix build issue about unittest and cloud interface

When notification service unittest build with '-Wl, --as-needed' LDFLAGS,
some build machine returns build fail.(this flag is default option.)
The default of passing --as-needed can be undone by passing --no-as-needed to the linker.
So, 'Wl, --no-as-needed' flag is added in notification unittest SConscript.

CloudPublish is removed, because it is not used by sample application.

Change-Id: Ibeeb0ec60d80da1e216c43ba635e2efc0f193b7e
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10627
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdate a logic to handle response code and connectivity type in constructResourceObject
Jihun Ha [Thu, 18 Aug 2016 05:33:48 +0000 (14:33 +0900)]
Update a logic to handle response code and connectivity type in constructResourceObject

OC_STACK_RESOURCE_CHANGED is also dealt as a success response code.
And (CT_ADAPTER_IP | CT_IP_USE_V4) or  (CT_ADAPTER_IP | CT_IP_USE_V6)
should be used in constructResourceObject function.
And the access mode of files has been changed to 644

Change-Id: Iadbffd045f6baab87aa42dc88f5221abc9940b20
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10333
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix memory issue on calling C APIs at Cpp layer.
KIM JungYong [Tue, 16 Aug 2016 05:15:31 +0000 (14:15 +0900)]
Fix memory issue on calling C APIs at Cpp layer.

When the calling APIs with NSProvider parameter at Cpp layer,
lead to crash by illegal access of memory.
This problem is due to type-cast of NSProvider between NSProvider_internal.
So, type-casting of structure is removed.

Conflicts:
service/notification/src/consumer/NSConsumerCommunication.c
service/notification/src/consumer/NSConsumerInterface.c
service/notification/src/consumer/NSConsumerInternalTaskController.c

Change-Id: I32c61b56510886f9f3be341d2ba497e211f0cad6
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10487
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix X.509 build issue
Dmitriy Zhuravlev [Thu, 18 Aug 2016 10:00:09 +0000 (13:00 +0300)]
Fix X.509 build issue

Added adapter type to CASelectCipherSuite

Change-Id: I1f140be0fdd5508ccc1ed64b8307a232798376cd
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10611
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>