platform/upstream/iotivity.git
7 years agoChanged the type of data added in ca_threadpool_pthreads list.
hyuna0213.jo [Wed, 14 Dec 2016 08:02:30 +0000 (17:02 +0900)]
Changed the type of data added in ca_threadpool_pthreads list.

If u_arraylist_add() failed, pthread_join() should be called to
release its resources in ca_thread_pool_add_task().
but If the state of target thread is blocked on a condition variable,
there is no way to release its resource. (pthread_join() function
will wait for the thread to terminate.)
So, I changed the type of data added in ca_threadpool_pthreads list
to release its resource when ca_thread_pool_free() is called.

Change-Id: Ieae5d920368e46230ca312817ed1726bb08e0f2d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15591
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFixed double free issue when destroying endpoint
hyuna0213.jo [Thu, 8 Dec 2016 02:50:27 +0000 (11:50 +0900)]
Fixed double free issue when destroying endpoint

- after destroying memory, set NULL value to prevent double free
- add the usage of oc_mutex_lock() when block data is updated

Change-Id: I07dbdff8288888ece8f89f7b278e979c09cf8e51
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15447
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-1621] Add custom config.h file mbedtls build options
Greg Zaverucha [Fri, 9 Dec 2016 01:58:24 +0000 (17:58 -0800)]
[IOT-1621] Add custom config.h file mbedtls build options

Adds a new version of the mbedtls config.h file specialized to IoTivity.
Library features that are not required by IoTivity are removed from the build.
The new file is extlibs/mbedtls/config-iotivity.h. Changes to config.h made by
ocf.patch are now made directly in config-iotivity.h. Update the scons file to
copy this to mbedtls/include/mbedtls/config.h. Update ssaladapter tests so that
they don't allow unsupported TLS versions.

TLS renegotiation was being disabled at runtime, now it is disabled at build.

To review the changes that IoTivity makes to config.h relative to the default,
diff extlibs/mbedtls/config-iotivity.h and
extlibs/mbedtlsmbedtls/include/mbedtls/config.h.

Change-Id: I9e6190e7c0e145443d5e164ccf47314a3bfcf53e
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15175
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
(cherry picked from commit 91cbd73ce34e72cad01b9912c471164a8abb3cb2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15707

7 years agobug fix about related memory and security resource.
jaesick.shin [Wed, 14 Dec 2016 08:30:55 +0000 (17:30 +0900)]
bug fix about related memory and security resource.

1. I did not copy the memory,
   but I freed the memory while I was using it.
2. The initial value of the securityResource variable
   used by the provider was wrong.

second patch include,
1. change OICCalloc to OICMalloc.
2. removed the initialization code from the previous commit,
   so added it again.

Change-Id: I189eb720785a74e39955640484e795170be3b010
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15593
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoremoved unreachable code in cloud
jihwan.seo [Tue, 13 Dec 2016 04:53:29 +0000 (13:53 +0900)]
removed unreachable code in cloud

Change-Id: I55b6befa400722561032b37891c2eda42d386846
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15545
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoAdd "accessToken" and "acceessTokenType" property in cloudserver resource.
Jihun Ha [Wed, 14 Dec 2016 08:27:51 +0000 (17:27 +0900)]
Add "accessToken" and "acceessTokenType" property in cloudserver resource.

Rather than authCode, some of IoT Cloud servers may use an access token for
enrollee to do sign-up. For example, after a mediator got issued
an auth code from account server, it can send a request to change it
to its corresponding access token which is going to deliver to Enrollee.
Additionally, AccessTokenType property is added, which indicates ,for example,
an given access token is "bearer" type token.

Change-Id: I6feb2b4f1582b5c9ee9b104b3592267247f97f99
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15657
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdate Android Sample App to enable findResource on unicast BLE
jihwan.seo [Tue, 13 Dec 2016 08:43:17 +0000 (17:43 +0900)]
Update Android Sample App to enable findResource on unicast BLE

since findResource on multicast in BLE is not supported anymore,
it should be updated

Change-Id: Ie26c3b50d9f9624a392931027d546bd7a040d6bc
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15559
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoAdd support files to run SmokeTest
Larry Sachs [Tue, 13 Dec 2016 20:47:57 +0000 (12:47 -0800)]
Add support files to run SmokeTest

Change-Id: I8dc9cce7b79119c2138646e687740c25de8f3e08
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15575
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoresource: Fix build break on randomtest
Dan Mihai [Wed, 14 Dec 2016 16:17:08 +0000 (08:17 -0800)]
resource: Fix build break on randomtest

Fix conflict between commits 80a131603151b1666c092ac03e76af399b500b9d
and 4333f4c5cc1578449afbc04dce1bd890f7017cfa.

Change-Id: I29b343b92b27fd819bac0275bfbc4ae1b931cb23
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/15619/
Reviewed-on: https://gerrit.iotivity.org/gerrit/15619
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agobuild: Bypass easy-setup unit test
Philippe Coval [Tue, 13 Dec 2016 00:08:22 +0000 (01:08 +0100)]
build: Bypass easy-setup unit test

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: Idb4540ed07fc9ebcea0bbc753830bffbf9a31152
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15529
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/15615/
Reviewed-on: https://gerrit.iotivity.org/gerrit/15615

7 years agoadd null checker related some parmaters in CA layer
jihwan.seo [Mon, 12 Dec 2016 10:43:35 +0000 (19:43 +0900)]
add null checker related some parmaters in CA layer

Change-Id: Idd29912d0dff5022809f72586ebef913a84b55bc
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15493
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoMerge "Merge branch 'notification-service' to master branch."
Uze Choi [Wed, 14 Dec 2016 10:42:29 +0000 (10:42 +0000)]
Merge "Merge branch 'notification-service' to master branch."

7 years agoocrandom test: ensure generated data is different
David Antler [Mon, 12 Sep 2016 16:41:42 +0000 (09:41 -0700)]
ocrandom test: ensure generated data is different

Change-Id: Id415a6119d89cc27eff95b0e0171d6dd50a9f76d
Signed-off-by: David Antler <david.a.antler@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11709
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoDouble free of OCServerRequest
Habib Virji [Mon, 12 Dec 2016 12:20:55 +0000 (12:20 +0000)]
Double  free of OCServerRequest

OCServerRequest was deleted once in SendListObserverNotification and HandleSingleResponse.

Change-Id: I2964a6a65d760369afaf3e1325eae825d4ce3345
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15503
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoFix OCParseArray passed value treated as array
Habib Virji [Fri, 9 Dec 2016 12:43:08 +0000 (12:43 +0000)]
Fix OCParseArray passed value treated as array

OCParseArray was incremented the passed CborValue. The passed value was incrementd by one.

BUG: https://jira.iotivity.org/browse/IOT-1660
Change-Id: I96fcd27714989732278627b0d61fb68683112b8a
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15361
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[IOT-1665] Fix bug for invalid input of constructResourceObject() in RE layer.
KIM JungYong [Mon, 12 Dec 2016 12:51:46 +0000 (21:51 +0900)]
[IOT-1665] Fix bug for invalid input of constructResourceObject() in RE layer.

When RCSRemoteResourceObject::toOCResource() method called,
inside RE layer, constructResourceObject() was called
with invalid parameter on OCConnectityType.
So, it is due to mismatch with response type and request type.
the above result, ocstack layer couldn't parse payload.

In this patch, fixed parameter for OCConnectityType is modified valid type.

Change-Id: Ic924d9a892227377406e2b3ecfe666c41f1f0b04
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15507
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 51c33d5fc29083cfe17667f5cc33e4e82cd0a0f5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15535

7 years agoremoved unreachable code in android JNI
jihwan.seo [Tue, 13 Dec 2016 04:49:57 +0000 (13:49 +0900)]
removed unreachable code in android JNI

Change-Id: Ie193980b00bbab996357c9011d15e9f612fd32b0
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15543
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoremoved unreachable code in coap http
jihwan.seo [Tue, 13 Dec 2016 04:32:15 +0000 (13:32 +0900)]
removed unreachable code in coap http

Change-Id: I4ca17ced9d83d9624b948aefba60f01057652ae0
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15541
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
7 years agoFix defects detected by static analysis
Parkhi [Fri, 9 Dec 2016 06:44:07 +0000 (15:44 +0900)]
Fix defects detected by static analysis

Change-Id: Iee6f843db1602d0a6fcc0bd43841d306d4a7257c
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15331
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit f36c71f082f9e5eca0249a30d3f8104f726d27b1)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15557

7 years ago[IS] Sync simulator with changes in cJSON.
Senthil Kumar G S [Fri, 9 Dec 2016 16:45:39 +0000 (22:15 +0530)]
[IS] Sync simulator with changes in cJSON.

Some changes in cJSON external library affected the Simulator's
JSON Schema Parser. Due to this, resource creation was failed.
This code check-in handles those cJSON changes in simulator.

Change-Id: I11173b39c61651c1459cb45b5e5cf886dafbabdd
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15369
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit c29d63038da023bce2de1b95c073fe9b181f6c9d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15453

7 years agoAdd an additional callback in security provisioning of easy setup
Jihun Ha [Fri, 9 Dec 2016 06:08:54 +0000 (15:08 +0900)]
Add an additional callback in security provisioning of easy setup
after secure resource is discovered.

Right after a target secure resource is discovered, Mediator may need to
confirm which ownership tranfer method is used or set a pre-configured pin
number for MOT use case.
For that, it adds an additional ESResult, ES_SECURE_RESOURCE_IS_DISCOVERED,
which indicates the event. And if some user inputs are needed, user can
pass its inputs as a form of ESOwnershipTransferData object which can store
an ownership transfer method to be used and pre-configured pin to be used
for a MOT case.

Note that, related APIs for MOT was merged
: https://gerrit.iotivity.org/gerrit/#/c/14221/

Change-Id: Ic17f50693a6c4073eb5208da861506230f817f0e
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15161
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 80884027f52113cdeb2673877d2a3d338630e371)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15467

7 years ago[IOT-1652] Fix Doxm Handler to check ehRet during ownership transfer
Jongmin Choi [Mon, 12 Dec 2016 07:42:47 +0000 (16:42 +0900)]
[IOT-1652] Fix Doxm Handler to check ehRet during ownership transfer

Kevin noted that ehRet value set at lines 1120 or 1125 of doxmresource.c
will be overwritten and never checked if __WITH_DTLS__ or __WITH_TLS__ is defined
due to the patch https://gerrit.iotivity.org/gerrit/#/c/14739
This patch fixes the issue.
https://jira.iotivity.org/browse/IOT-1652

Patch #1: Initial upload

Change-Id: Ieda643f10d3116d785f293604393e8709c94fe80
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15463
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 8e088ff2f9e41f339b0cef663b9d8cb688840e14)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15539

7 years ago[IOT-1652] Modify confirmed certificate OTM to use vendor namespace
Jongmin Choi [Mon, 12 Dec 2016 07:16:57 +0000 (16:16 +0900)]
[IOT-1652] Modify confirmed certificate OTM to use vendor namespace

Confirmed Certificate OTM is vendor-specific OTM
and hence oic.sec.namespace is replaced by x.org.iotivity.
https://jira.iotivity.org/browse/IOT-1652

Patch #1: Initial upload

Change-Id: Ifa3c4f9119307064e27c90f2581cdb6d4765be13
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15461
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 7d1493d3288a5b121c70b429d26218ec91ff664c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15537

7 years agoPlatform ID must be UUID
Larry Sachs [Tue, 13 Dec 2016 20:41:13 +0000 (12:41 -0800)]
Platform ID must be UUID
Change sleep() to wait()/notify()

Platform ID change was due to this commit https://gerrit.iotivity.org/gerrit/#/c/14991/
wait()/notify() improves performance

Change-Id: I5c1bca6939243eec9cbb52893c7e376ac422cb7c
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15573
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoIOT-1656: Removing -fPIC compiler option for unsupported builds.
Pawel Winogrodzki [Thu, 8 Dec 2016 03:16:13 +0000 (19:16 -0800)]
IOT-1656: Removing -fPIC compiler option for unsupported builds.

One extlibs/mbedtls/SConscript was passing -fPIC for all compilers,
even the ones, which didn't support it.

Change-Id: Ib946da6f73d3e811e05b8b92bc5315e95a5a3d67
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15295
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1089] Fixed paths in gradle build files
George Nash [Tue, 13 Dec 2016 18:09:10 +0000 (10:09 -0800)]
[IOT-1089] Fixed paths in gradle build files

Change-Id: I15261d813de636c1ed9dec6bed7a5e0392897924
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15571
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years ago[IOT-1313, IOT-1300] Improve random number generation
Greg Zaverucha [Tue, 13 Dec 2016 00:20:45 +0000 (16:20 -0800)]
[IOT-1313, IOT-1300] Improve random number generation

Update ocrandom.c to use platform specific, secure random number
generators instead of rand(). Update the API in ocrandom.h, and make
corresponding updates to callers. Avoid using FP arithmetic in
OCGetRandomRange.

Change-Id: Ic0476dc69f1c649c4a07a46b99643cf7206f83af
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15243
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRemove unused function to resolve build warnings in catcpserver
hyuna0213.jo [Fri, 9 Dec 2016 07:46:13 +0000 (16:46 +0900)]
Remove unused function to resolve build warnings in catcpserver

Remove unused function after merging below patchset
link: https://gerrit.iotivity.org/gerrit/#/c/14827/
commit message:
[IOT-1548] Fix to transfer a large size of data on CoAPs over TCP

Change-Id: I79ddc0167e62e5601c81bb432bd3c1af750b69a1
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15341
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Extend unit_tests to all (including service)
Philippe Coval [Wed, 30 Nov 2016 22:14:03 +0000 (23:14 +0100)]
build: Extend unit_tests to all (including service)

Bug: https://jira.iotivity.org/browse/IOT-1486
Change-Id: I89426d04e0b05c49470c059ffe60cf90fcb95582
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14971
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Mats Wichmann <mats@osg.samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/15291/
Reviewed-on: https://gerrit.iotivity.org/gerrit/15291
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agoIndicate intentional fall through in switch statments
George Nash [Wed, 7 Dec 2016 20:51:27 +0000 (12:51 -0800)]
Indicate intentional fall through in switch statments

Add comments to clearly indicate that these cases that lack
a `break` statement is intentional

The lack of `break` statment shows up in many analysis tools.
Adding the comments helps when evaluating reports from analysis
tools.

Change-Id: I24f0e4ee7b8d651bed6a8a0f8179d0ec789521a4
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15239
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agobuild: Bypass and/or fix suspicious service tests (workaround)
Philippe Coval [Tue, 29 Nov 2016 14:07:08 +0000 (15:07 +0100)]
build: Bypass and/or fix suspicious service tests (workaround)

- Run tests using tools.scons.RunTest
- Add a file parameter to enable valgrind check
- Disable failed test, to make verifier sane again

To be tracked at:
http://wiki.iotivity.org/1.2-rel

Droped Conflicts:
resource/csdk/connectivity/test/SConscript
resource/csdk/security/provisioning/unittest/SConscript
resource/provisioning/unittests/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1486
Change-Id: Ib665de6ab2dfe31b06ab3bb8cb3fb22f00000001
Origin: https://gerrit.iotivity.org/gerrit/#/c/14967/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14967
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Origin: https://gerrit.iotivity.org/gerrit/#/c/15377
Reviewed-on: https://gerrit.iotivity.org/gerrit/15377
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoFix deadcode execution in ocserverrequest.c
Habib Virji [Fri, 9 Dec 2016 18:39:35 +0000 (18:39 +0000)]
Fix deadcode execution in ocserverrequest.c

There was a deadcode.

It has goto statement which is only called when memory allocation fails.

In the goto statement, it was trying to free the variable that failed in memory allocation.

BUG: https://jira.iotivity.org/browse/IOT-1664
Change-Id: I36ea779ee5bae131a10f55dafcb45728c1e7dc9b
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15373
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoNULL pointer check in cbor_test
Habib Virji [Fri, 9 Dec 2016 13:55:46 +0000 (13:55 +0000)]
NULL pointer check in cbor_test

cbor_test directly uses value returned by OCRepPayloadGetPropeString in memcmp .

The value is not checked before calling memcmp.

BUG: https://jira.iotivity.org/browse/IOT-1662
Change-Id: Ia998ab4154d0b2efb69dff232532d2b8b7f4f5de
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15365
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoBuffer overrun in ocstack.c
Habib Virji [Fri, 9 Dec 2016 11:05:21 +0000 (11:05 +0000)]
Buffer overrun in ocstack.c

UUID length is 37, but CA was setting it as 32.
Since UUID length was set in octack, the correct
size has to berelatively in CA layer too.

BUG: https://jira.iotivity.org/browse/IOT-1638
Change-Id: I4c8713acf9329fe8ace64d1da56093c1126d9c19
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15353
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agobuild: Enable unit testing in SECURED=1 mode for resource
Philippe Coval [Fri, 9 Dec 2016 23:05:33 +0000 (00:05 +0100)]
build: Enable unit testing in SECURED=1 mode for resource

Bug: https://jira.iotivity.org/browse/IOT-1486
Change-Id: I38e593d49401f7e14bfa26dd980938d36e66ac68
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14903
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Nivedita Singhvi <niveditasinghvi@gmail.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 7be23fe785dffb5bf4ce022c882bdd235434ebb8)
Origin: https://gerrit.iotivity.org/gerrit/#/c/14691/
Reviewed-on: https://gerrit.iotivity.org/gerrit/14691
Reviewed-by: George Nash <george.nash@intel.com>
7 years agobuild: Bypass and/or fix suspicious resource tests (workaround)
Philippe Coval [Tue, 29 Nov 2016 14:07:08 +0000 (15:07 +0100)]
build: Bypass and/or fix suspicious resource tests (workaround)

- Run tests using tools.scons.RunTest
- Add a file parameter to enable valgrind check
- Disable failed test, to make verifier sane again

To be tracked at:
http://wiki.iotivity.org/1.2-rel

Bug: https://jira.iotivity.org/browse/IOT-1486
Change-Id: Ib665de6ab2dfe31b06ab3bb8cb3fb22f27487f4e
Origin: https://gerrit.iotivity.org/gerrit/#/c/14967/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14967
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Origin: https://gerrit.iotivity.org/gerrit/#/c/12075/
Reviewed-on: https://gerrit.iotivity.org/gerrit/12075
Reviewed-by: George Nash <george.nash@intel.com>
7 years agoMerge branch 'notification-service' to master branch.
KIM JungYong [Mon, 12 Dec 2016 10:52:30 +0000 (19:52 +0900)]
Merge branch 'notification-service' to master branch.

in this patch, Notification MQ functionality is added

Improvement:https://jira.iotivity.org/browse/IOT-1523
Change-Id: I59a102b6a188371c293accf55f3df872752705b9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
7 years ago[IOT-1670]Removing Unreachable code from Provider sample app
abitha.s [Mon, 12 Dec 2016 10:43:54 +0000 (16:13 +0530)]
[IOT-1670]Removing Unreachable code from Provider sample app

Change-Id: I4a21cfb86bf474f1e8609f0288560509d6538e14
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15501
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 ago[IOT-1089] Merge remote-tracking branch 'origin/generic-java'
George Nash [Mon, 12 Dec 2016 20:44:38 +0000 (12:44 -0800)]
[IOT-1089] Merge remote-tracking branch 'origin/generic-java'

Change-Id: Icad0fdf58b85b23fa1d47a900bfd81b278592749
Signed-off-by: George Nash <george.nash@intel.com>
7 years agodisable enum value of OCResourceProperty related Local(D2D) MQ Broker
jihwan.seo [Wed, 7 Dec 2016 01:37:31 +0000 (10:37 +0900)]
disable enum value of OCResourceProperty related Local(D2D) MQ Broker

since local mq broker is not supproted yet.
it is better to disable some value of OCResourceProperty
related MQ local broker until define it on OCF spec.

this issue from CTT vertification.

Change-Id: I37715a8e763084cb33f9b7fea794346152c29704
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15207
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix for crash in InProcClientWrapper destructor.
jihwanseo [Fri, 2 Dec 2016 11:40:41 +0000 (20:40 +0900)]
Fix for crash in InProcClientWrapper destructor.

InProcClientWrapper::stop() throws an exception when stack
is already stopped. Not catching this exception would terminate
application.

Change-Id: I50bb6befb716049da275c16a4fdbf96437c2ad03
Signed-off-by: Harry <h.marappa@samsung.com>
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15169
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1628] fixed TC failure in the resource discovery in the cloud RD
yeonghun.nam [Thu, 1 Dec 2016 09:59:36 +0000 (18:59 +0900)]
[IOT-1628] fixed TC failure in the resource discovery in the cloud RD

- According to the latest RD implementation, the resource discovery TC is fixed where the device presence information is stored in the DB in advance

Change-Id: I85c2c848cf3b0a60fa22014faa09e00985fe6688
Signed-off-by: yeonghun.nam <yeonghun.nam@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15017
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
(cherry picked from commit fbedeaf326cfd49446ba3a28d599a4cb54824d10)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15259
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoRemoved href from device and platform payload
Habib Virji [Wed, 30 Nov 2016 22:09:30 +0000 (22:09 +0000)]
Removed href from device and platform payload

- Created a separate function to handle Device and Platform payload.
- rt, if and attribute information are the only included in the payload.
- BuildResponseRepresentation updated to avoid information about device and platform payload.
- Updated dmv value from res.1.1.0,sh.1.2.0 to res.1.1.0,sh.1.1.0.

Change-Id: I59059997f170d177663e87eddea9df32275ca882
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14979
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15265
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[IOT-1614] Test for NULL a single time.
Dan Mihai [Fri, 2 Dec 2016 16:03:49 +0000 (08:03 -0800)]
[IOT-1614] Test for NULL a single time.

Change-Id: Id3b07eb93ebc0d888c27f3629acc93ec7c4925dc
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15071
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-1626] Added BSD 3-Clause License in SCons.
Jaehong Jo [Thu, 1 Dec 2016 09:55:41 +0000 (18:55 +0900)]
[IOT-1626] Added BSD 3-Clause License in SCons.

Because SCons has dual license.

From https://github.com/flashpixx/Storage/tree/master/Scons

Change-Id: If45a359bb41efb3bdd93d33d20e6d26ec28847c5
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14951
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoSupport unicast discovery of secure resource for BLE transport in easy setup
Parkhi [Wed, 7 Dec 2016 05:32:42 +0000 (14:32 +0900)]
Support unicast discovery of secure resource for BLE transport in easy setup

In a patch, https://gerrit.iotivity.org/gerrit/#/c/15183/, an api to discover
a secure resource in unicast is being developed. So if an OCResource object
given for easy setup is BLE transport, this patch will make a secure resource
discovery happen in unicast due to its better efficiency.

Change-Id: I65bacf090b6ef5cebdb101a705a58ebdb6d8b645
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15205
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 1b17f573c2ae4accb5888d69b6038cc252e43554)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15319

7 years ago[IOT-1593] TLS ports and CA_SECURE flag added for secure socket accept
Minji Park [Wed, 23 Nov 2016 10:53:28 +0000 (19:53 +0900)]
[IOT-1593] TLS ports and CA_SECURE flag added for secure socket accept

- TLS port and secure flag added in tcp server
- TLS port information added in discovery payload

Change-Id: Ib409e069869c52e10f1bd99d35cd6f94ab90fff2
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14667
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15345
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IoT-1603] Restrict unittest with SECURED mode
cc [Fri, 25 Nov 2016 07:39:49 +0000 (16:39 +0900)]
[IoT-1603] Restrict unittest with SECURED mode

Fixed segmentation fault from notification-service unit test
when building option with SECURED=1.
The unit test is not allowed with SECURED mode,
becuase provisioning steps are required to detect providers and consumers
for running the test cases.

Change-Id: I02ebfbc8f3afdd2b06d66b87976773fcdc37b030
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14783
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15343

7 years ago[IOT-1659] Fix JNI static analysis issue for Notification Service
nikhil.a [Fri, 9 Dec 2016 11:41:55 +0000 (17:11 +0530)]
[IOT-1659] Fix JNI static analysis issue for Notification Service

It is required to fix static analysis issue and improve code quality

Change-Id: Ic5afa823196ef83fb2ee62bb799dda093c13485b
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15351
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModified the usage of the u_arraylist_remove()
hyuna0213.jo [Fri, 9 Dec 2016 06:47:36 +0000 (15:47 +0900)]
Modified the usage of the u_arraylist_remove()

-Modified the usage of the u_arraylist_remove()
-Add log message for catcpserver.
 It will help to resolve the future problems.

Change-Id: If5ee7157cbf1536b3cafdd9885a8533c91aef505
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14661
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15333
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-1575] Update to manage connection state of tcp session
hyuna0213.jo [Mon, 7 Nov 2016 08:24:22 +0000 (17:24 +0900)]
[IOT-1575] Update to manage connection state of tcp session

If network interface is down, the socket of the connecting/connected
state will be closed.

Change-Id: I9f9cda2e3ab5672c336ed165ec4f189ab846f054
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14067
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: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agomodified searchUser() API on OCAccountManager
Jaewook Jung [Mon, 21 Nov 2016 05:31:17 +0000 (14:31 +0900)]
modified searchUser() API on OCAccountManager

Since the account server spec has been changed, it needs some modifications.
 - modified uri "/oic/account/user" to "/oic/account/search"
 - modified query form to search more than one user.
 - removed searchUser() API for searching a specific user.

Change-Id: I431d6a4750d7a0772831da1865de2e8c5498ed09
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14545
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15347
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix static analysis issue in keepalive
Minji Park [Wed, 30 Nov 2016 01:16:50 +0000 (10:16 +0900)]
Fix static analysis issue in keepalive

- add return value checking logic after memory allocation

Change-Id: I1c28e13e01c2dd7bf4b78585adf0ffdc0e6ecdfd
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14935
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 64b44c48ab8944c7cae1cabf64aa0e1e98ada932)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15339
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
7 years agoPatch for discovery unowned device by BLE MAC address
junghun kim [Tue, 6 Dec 2016 07:25:26 +0000 (16:25 +0900)]
Patch for discovery unowned device by BLE MAC address

Patch for discovery unowned device by BLE MAC and
Device ID.
This is a patch for CONPRO-245.
There is a patch at the iotivity with commit
https://gerrit.iotivity.org/gerrit/#/c/14629/

Change-Id: Iddbf32bfb93fbeb5ffa8654358e538952bd3ae02
Signed-off-by: junghun kim <jhun1105.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15183
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15317

7 years agolinux: Use system sqlite3
Philippe Coval [Fri, 9 Dec 2016 01:12:04 +0000 (02:12 +0100)]
linux: Use system sqlite3

Problem was discovered on yocto

Change-Id: I5274bed9e4b7ddcdc1b17a265a1886cd78cb631f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15305
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 08b403572985a70fe5d652378e1cfa2b72ac6a3d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15359
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agoModify the SRMRequestHandler to use the CAEndpoint_t's infomation
Chul Lee [Fri, 28 Oct 2016 05:51:16 +0000 (14:51 +0900)]
Modify the SRMRequestHandler to use the CAEndpoint_t's infomation
for identify a secure channel connection.

Change-Id: I91caf27ba7b08ee69623a960bb8df4da0acfefd9
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13809
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit b321d908218d5c2fdf1807b47c9da0c85bdbefa5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14823
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agofix crash issue related transmission for large data
jihwan.seo [Mon, 5 Dec 2016 22:25:23 +0000 (07:25 +0900)]
fix crash issue related transmission for large data

Change-Id: I88dbef87f5e02a0d4e0c0903a3d1734088d82401
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15167
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoPrevent out-of-bounds memory access
George Nash [Mon, 5 Dec 2016 23:33:17 +0000 (15:33 -0800)]
Prevent out-of-bounds memory access

prevent the snprintf function from accessing outside the
queryParam char array.

If the resulting uri exceeds the max uri length indicate the
failure by returning OC_STACK_INVALID_URI from the function.

Found using static analysis tool.

Change-Id: I81ee4cc932c70942ff65dcf8390529279e36dc4a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15173
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd new connectGatt API for Level 23 for android.
jihwan.seo [Tue, 6 Dec 2016 10:42:55 +0000 (19:42 +0900)]
Add new connectGatt API for Level 23 for android.

Change-Id: I5bb170c92b1df48d767f96dddecdb9b86fc85945
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15189
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1089] Merge remote-tracking branch 'origin/master' into generic-java
George Nash [Fri, 9 Dec 2016 00:07:49 +0000 (16:07 -0800)]
[IOT-1089] Merge remote-tracking branch 'origin/master' into generic-java

Change-Id: Ic21559c8bb95f93ab82d8b2d8f443e14ae470654
Signed-off-by: George Nash <george.nash@intel.com>
7 years agoAdd links and rep in the response for the collection
Habib Virji [Wed, 30 Nov 2016 21:24:52 +0000 (21:24 +0000)]
Add links and rep in the response for the collection

- Use common ExtractParamFromQuery in ocresource and occollection to extract query parameters.
- Added links tag to the oic.if.ll and oic.if.baseline.
- Added rts tag in the payload for the baseline. - Added rep tag for oic.if.b response.
- occollection was using extra structure to differentiate ll, baseline, batch and group. Simplified the code to use
a simpler code and removed unwanted structure.
- oic.wk.col added in the types.
- OCStackIfTypes is removed as it was used only internally. This is not needed due to usage of ExtractParamFromQuery.
- BuildResponseRepresentation is updated as it is used in collection. For inner payload, these
values were not being used by ocpayloadconvert.
- oic.if.ll has been updated to give response in form of {links:[{href:"", rt:[""], if:[""]}]}
- oic.if.baseline has been updated to give response in form of {rt:[], if:[], rts:[], links:[{href:"", rt:[""], if:[""]}]}
- oic.if.b has been to response in form of [{"href": "", "rep": {""}}]
- in case of wrong query it will respond with error message.

Change-Id: I98489ac9923ab3c63012ddfe6b55c2b3064c3f28
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14621
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13999
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[IOT-1625] Fix a logic to terminate CA in case of failure of init
hyuna0213.jo [Wed, 30 Nov 2016 04:29:36 +0000 (13:29 +0900)]
[IOT-1625] Fix a logic to terminate CA in case of failure of init

- If CAInitializeMessageHandler() fails, we should call
CATerminateMessageHandler() to terminate the main thread successfully.
- Calling u_arraylist_reserve before creating the thread

Bug: https://jira.iotivity.org/browse/IOT-1625
Change-Id: If291d90bbe69abbf967a7f0014c6e5d44644131d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14941
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15327
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
7 years ago[IOT-1605][tizen]Fix obs ocserver.cpp deregistration coredump issue
bg.chun [Mon, 28 Nov 2016 04:09:40 +0000 (13:09 +0900)]
[IOT-1605][tizen]Fix obs ocserver.cpp deregistration coredump issue

Fix ocserver.cpp obs deregistration coredump issue in tizen.

Change-Id: Iba3f1288482cd20aac585eec599b45764499b09d
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14825
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit bf3a3f25f8bfcdb2508cf0e44d165c8ef6e5d6fe)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15261

7 years ago[IOT-1608] Support PUT,POST,DELETE method type for /oic/ping
hyuna0213.jo [Mon, 28 Nov 2016 08:11:34 +0000 (17:11 +0900)]
[IOT-1608] Support PUT,POST,DELETE method type for /oic/ping

If PUT,DELETE methoed type is received for /oic/ping,
HandleKeepAliveRequest() function will respond to remote device
with error code.
bug: https://jira.iotivity.org/browse/IOT-1608

Change-Id: I47d81222cebced3505cafec8eabfe0604c94d8a3
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14835
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15321
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoUpdate the keepalive response payload for the ping request
hyuna0213.jo [Mon, 24 Oct 2016 07:23:24 +0000 (16:23 +0900)]
Update the keepalive response payload for the ping request

- add resource type/interface name to response payload
- add interval value to response payload
- POST method is used to send ping message

Change-Id: I6c74122bdb4a726a5c77f8a8e742d202f639972b
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13597
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 4444b92de6df210c62a2b7d463f74eb0793238f7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13849
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agodisable scan interval logic in initialize step for android BLE
Jaehong Jo [Thu, 8 Dec 2016 04:37:16 +0000 (13:37 +0900)]
disable scan interval logic in initialize step for android BLE

Change-Id: I662aef453b109f13556e2eb79accfde17f61188b
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15253
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agomodified uri for searching user on account server
Jaewook Jung [Thu, 17 Nov 2016 10:40:17 +0000 (19:40 +0900)]
modified uri for searching user on account server

modified uri since the account server specification has been changed.

Change-Id: I25771bca72803fe88a09631611194baf73a28181
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14455
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit ef8dbb0fb89274b24159d0258e1daa3fe198b313)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14507
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
7 years agomodified OCAccountManager APIs
Jaewook Jung [Wed, 19 Oct 2016 04:49:45 +0000 (13:49 +0900)]
modified OCAccountManager APIs

modified some APIs on OCAccountManager since the OCF cloud specification
has been changed.
(C++/Android API, sampleApp and unittest are modified)

- added a string parameter for accessToken on signOut() and deleteDevice().
- removed AclGroupType for createGroup() and added new overloaded one
  that has a map parameter for optional property values.
- changed getGroupList() to getGroupInfoAll() because it does not get a
  list anymore but information of all my group from account server.
- removed joinGroup(), deleteInvitation() and added replyToInvitation().
- removed addDeviceToGroup(), deleteDeviceFromGroup(), leaveGroup() and
  added addPropertyValueToGroup(), deletePropertyValueFromGroup(),
  updatePropertyValueOnGroup().

Change-Id: Ibf462a6667990c1786d8b4111263d96e5c618166
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14335
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15211

7 years agoAdd C++ API for UnsetInputPinCB.
Sandeep Sharma [Thu, 8 Dec 2016 07:42:38 +0000 (13:12 +0530)]
Add C++ API for UnsetInputPinCB.

Change-Id: I0a3285d906d250a932a6cb98daff0b34ba6bff79
Signed-off-by: Sandeep Sharma <sandeep.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15257
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 194d25ca4d7dccbe2201d0db563a785b4f838d9c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15313

7 years agoFix Doxm Handler for Manufacturer Cert OTM
Jongmin Choi [Wed, 7 Dec 2016 08:21:37 +0000 (17:21 +0900)]
Fix Doxm Handler for Manufacturer Cert OTM

Fix error due to confirmable cert OTM

Change-Id: Id191ae12e3842e910a44b9d025794caf6aaaf16b
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15227
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 50a09e72b62edc9179fdc8b824a0cc6bfbeee88f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15311

7 years agoUpdate provisioning client dat file for mfg otm
Jongmin Choi [Thu, 1 Dec 2016 10:13:46 +0000 (19:13 +0900)]
Update provisioning client dat file for mfg otm

Update dat file for provisioningclient to include key
used for manufacturer cert ownership transfer

Patch #1: Initial upload
Patch #2: Update to latest dat file

Change-Id: I9897266306e398ea683deaa07f480f2b6ce48e17
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15019
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 37ca18297c3ed65275eb033a55190eec423da200)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15309

7 years agoAdded API to reset SVR DB
Jongmin Choi [Fri, 25 Nov 2016 09:44:55 +0000 (18:44 +0900)]
Added API to reset SVR DB

OCResetSVRDB() added to reset the SVR DB of the device

Patch #1: Initial upload
Patch #2: Fix based on Chul's comments

Change-Id: I2b55eaad5dd4c81f45373ca1dbde113c01d0a93d
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14791
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 2de9ab10e67d24111202aa8e255b5bfb2634cee2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15307

7 years agotizen: Remove things-manager installation
Philippe Coval [Tue, 22 Nov 2016 09:25:51 +0000 (10:25 +0100)]
tizen: Remove things-manager installation

Change-Id: I6b8c4ef6322072b9340ab9dc637e6d4751846b90
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14613
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit 44f330b2077b6dde540182480876d0349ad3e0db)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14801
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoprovisioning: Rename some C++ headers to avoid collision with CSDK ones
Philippe Coval [Thu, 24 Nov 2016 10:20:23 +0000 (11:20 +0100)]
provisioning: Rename some C++ headers to avoid collision with CSDK ones

The name clash only happens
 on case insensitive filesystems (ie HPFS on MacOS),
 there is ambiguity with C header ie:
  ./resource/csdk/security/provisioning/include/ocprovisioningmanager.h
  ./resource/include/OCProvisioningManager.h

Renaming to .hpp suffix prevent the problem.

Note, one other approach would be to use namespaces

Like:
   #include <iotivity/csdk/ocprovisioningmanager.h> vs
   #include <iotivity/oc/ocprovisioningmanager.h> or similar

Change-Id: Ie311344a98fd056e5b54f329819090a36a901589
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14747
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/14747/3
Reviewed-on: https://gerrit.iotivity.org/gerrit/15099
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1575] Initialize socket fd after closing session
hyuna0213.jo [Thu, 8 Dec 2016 04:08:21 +0000 (13:08 +0900)]
[IOT-1575] Initialize socket fd after closing session

- add socket fd initialization after closing TCP session in tcpserver

Change-Id: Icb40f0c37ccc17ee9972974cfeae752e3a60048d
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14499
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14777
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFixed mismatched printf argument
George Nash [Tue, 6 Dec 2016 19:50:19 +0000 (11:50 -0800)]
Fixed mismatched printf argument

Change-Id: I16278adc2a1864ec1e95886014a6c6746d94e661
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15203
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix wrong size argument
George Nash [Tue, 6 Dec 2016 19:08:59 +0000 (11:08 -0800)]
Fix wrong size argument

The second argument for OICStrcpy is the destination size
not the sizeof the char* for the string being copied.

The code should have been copying the string '/oic/res'
over to the szQueryUri but it was only copying '/oic/re'

Found using static analysis tool

Change-Id: I3b6c2f7b6c67db4d84010e9e90fe7dd54f14fcee
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15201
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdded the "OIC" in TAG for debug.
Jaehong Jo [Mon, 5 Dec 2016 08:29:58 +0000 (17:29 +0900)]
Added the "OIC" in TAG for debug.

Change-Id: If87d2455e14a2b553cce62d69deb3cbe661fd02c
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15151
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1602] Remove observer when the tcp connection is disconnected
hyuna0213.jo [Wed, 23 Nov 2016 13:51:58 +0000 (22:51 +0900)]
[IOT-1602] Remove observer when the tcp connection is disconnected

If the client observes one or more resources over a reliable
connection, then the CoAP server (or intermediary in the role of the
CoAP server) MUST remove all entries associated with the client
endpoint from the lists of observers when the connection is either
closed or times out.
Bug: https://jira.iotivity.org/browse/IOT-1602

Change-Id: I31dcf26a3dc731b4479c9d7a7a4755c7afd07ff8
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14683
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 76ac4cfd9ffb58a17c93d74c3f6a21b11b07cf50)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15147
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Fix to also support SECURED=0
Philippe Coval [Mon, 5 Dec 2016 16:07:21 +0000 (17:07 +0100)]
build: Fix to also support SECURED=0

Note, for later it would be nice to test booleans instead of strings.

Change-Id: I069d865c6e2cc6a80a812e60ab278af15b7eaa85
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15163
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit f50bc6c417731a023d5bb1774ee2ecf84a7b5dca)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15225

7 years agodoc: Fix API generation script (javadoc)
Philippe Coval [Fri, 2 Dec 2016 11:52:29 +0000 (12:52 +0100)]
doc: Fix API generation script (javadoc)

Change-Id: I99b0925f91658372cd4d736ad1d79e0e92d76392
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15065
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit f989db039c8d0b21286f8c6c46f51eb72ef1a9f2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15223
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agotizen: Ship resource_directory dynamic library
Philippe Coval [Wed, 2 Nov 2016 16:13:23 +0000 (17:13 +0100)]
tizen: Ship resource_directory dynamic library

Note, it's also built with TARGET_OS=linux

For the record previous undefined OCRDDelete OCRDPublish problem
 is now fixed by this change:
 https://gerrit.iotivity.org/gerrit/#/c/14285/

Bug: https://jira.iotivity.org/browse/IOT-1510
Change-Id: I24e1621788a9154af70cf2db307383b329a8e526
Origin: https://gerrit.iotivity.org/gerrit/#/c/13967/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13967
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 76aa788dee92e6a94abfe5ac004ecf12523a3ef3)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14799

7 years agodoc: Fix API comments to support javadoc
Philippe Coval [Fri, 2 Dec 2016 11:07:50 +0000 (12:07 +0100)]
doc: Fix API comments to support javadoc

Many parse error roughtly fixed,
 it might worth to verify this by CI too

Change-Id: I61adabf0d454104826b4adaf8cb60297beb91a42
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15061
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 022f12861aacf5d40b5ab037602eab3b957b5bf0)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15221
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years ago[IOT-1651] Remove lax ACE for /oic/sec/acl
Dan Mihai [Mon, 5 Dec 2016 22:15:12 +0000 (14:15 -0800)]
[IOT-1651] Remove lax ACE for /oic/sec/acl

ACEs can be created using owner credential authentication, so there
is no need to grant access to others too.

Change-Id: I9648f34e59d8a7fb06bd7dc9c4d1d55bcace15dd
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15199
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-1645] Resovle the MOT's side effect
Jongmin Choi [Thu, 8 Dec 2016 05:23:53 +0000 (14:23 +0900)]
[IOT-1645] Resovle the MOT's side effect
from https://gerrit.iotivity.org/gerrit/#/c/14221/

Change-Id: Ie2ccfbeaae597a89e1e46d9d7e774b631aa686f4
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15143
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 04a8fe396014002d030e10958293e5389875c016)
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15159

7 years agoAdd OCGetDeviceOwnedState API
js126.lee [Thu, 8 Dec 2016 04:00:43 +0000 (13:00 +0900)]
Add OCGetDeviceOwnedState API

Change-Id: Ia9996e794f9cc0eb4b62a4b00b8f6fa79e773fc1
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15247
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 9a3b00071047071d218fee88a9d4824bdfd185c7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15255

7 years agoFixed bug on MOT.
Chul Lee [Wed, 7 Dec 2016 02:41:42 +0000 (11:41 +0900)]
Fixed bug on MOT.

Previously, If owner(PT) tried DTLS handshake while MOT,
owner's uuid added as subowner.
This patch will fix it.

Change-Id: I6a062d89a630b5582330ac0461e72e62c1e08376
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15209
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 3f2a61fc379de75678628258e8a4473712d7a30b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15249

7 years agoAdding Android Api for Mutual Verified Just-Works
Sandeep Sharma [Fri, 2 Dec 2016 12:00:37 +0000 (17:30 +0530)]
Adding Android Api for Mutual Verified Just-Works

patch #4 Add support for Mutual verified JW OTM in android PT.
patch #5 Fix names as per C++

Change-Id: I6be03b4af14645808171d25e92b78ef0382c2e7a
Signed-off-by: Sandeep Sharma <sandeep.s9@samsung.com>
Signed-off-by: Sunil Kumar K R <sunil.k14@samsung.com>
Signed-off-by: Sandeep Sharma <sandeep.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14843
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15235

7 years agoAdding C++ Api for Mutual Verified Just-Works
Sandeep Sharma [Fri, 2 Dec 2016 10:03:36 +0000 (15:33 +0530)]
Adding C++ Api for Mutual Verified Just-Works

patch# 5: Change C++ API's name and other fixes.

Change-Id: Id18546ea50bd7308f1871173ca54d199b8b7d3df
Signed-off-by: amar <amar.sri@samsung.com>
Signed-off-by: Sandeep Sharma <sandeep.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14779
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15233

7 years agodisable default scan interval time in android BLE
jihwan.seo [Wed, 7 Dec 2016 07:41:20 +0000 (16:41 +0900)]
disable default scan interval time in android BLE

since there is some issue related power consumption in scanning.
it is better to disable it basically

Change-Id: Ic0da8da453b9c0596e521fd5078ec97cad514788
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15215
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agobuild: Fix easy-setup unittests
Philippe Coval [Wed, 30 Nov 2016 08:35:31 +0000 (09:35 +0100)]
build: Fix easy-setup unittests

Need to add a parameter to enable valgrind check

Without this change, a race condition may occur and complain like:
service/easy-setup/enrollee/unittests/easysetup_enrollee_test: not found

Bug: https://jira.iotivity.org/browse/IOT-1526
Change-Id: If927c9a2f6e00b18ab92664f014f4f85f34209aa
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14957
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 47f52b3977fd9c78f549abc0683e8fadc840cac0)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15219
Reviewed-by: George Nash <george.nash@intel.com>
7 years ago[IOT-1615] Correct return type of callback in SubOwnerClient
Kevin Kane [Fri, 2 Dec 2016 22:02:17 +0000 (14:02 -0800)]
[IOT-1615] Correct return type of callback in SubOwnerClient

Sample only built when MULTIPLE_OWNER=1 has callback that differs in
return type from what's required. Change return type to the required
OCStackApplicationResult and have the callback return OC_STACK_OK.

Bug: https://jira.iotivity.org/browse/IOT-1615
Change-Id: I5f787f64a16f308c182067d20009decd29760730
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15109
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1525] Keep credential resource encrypted on-disk on Windows
Kevin Kane [Thu, 10 Nov 2016 22:00:27 +0000 (14:00 -0800)]
[IOT-1525] Keep credential resource encrypted on-disk on Windows

The Windows platform provides a way to encrypt and decrypt data
with system-managed keys. Since the cred resource contains
sensitive symmetric and private keys, keep this resource encrypted
on disk.

Change-Id: I88f3cab76f2e782ce778bc64830491822b7d9842
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15033
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoadded filter to handle an IP loopback message in CA directly
Jaewook Jung [Thu, 6 Oct 2016 10:35:27 +0000 (19:35 +0900)]
added filter to handle an IP loopback message in CA directly

If IoTivity stack sends a message to itself, which means the loopback,
it is unnecessary to let them go through the socket layer.
Especially it is a waste when the large payload will be sent by block-wise transfer.
So I made CA layer to handle the loopback message directly.

Change-Id: I2b8e5217575df391dd4ab66d924a3a24c2584915
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12887
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix static analysis issue in ocresource
Jaehong Jo [Wed, 30 Nov 2016 08:25:53 +0000 (17:25 +0900)]
Fix static analysis issue in ocresource

- add initial value and null checking

Change-Id: I50731d23865c72d2c03cb3b149b19bf4236bf587
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14955
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 2bf1598fa14d918f3c254feaedd61716cba8d0f1)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15101
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IoT-1562] Handle unit test segfaults at notification service
cc [Mon, 28 Nov 2016 12:39:35 +0000 (21:39 +0900)]
[IoT-1562] Handle unit test segfaults at notification service

Fix unittest segfault caused by discovery failure.
It is because external consumers or providers on the same network
interupt discovery or subscription precedure.
The test will be terminated once this situation happens,
even though precondition of the unittest is guided
to prevent this issue.

Change-Id: I0f763db760d8d2af0a185b9e7c3c6e71dfc5e5bf
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14851
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit eb8ec52d48bb8def2a8862118d2fb97aed4c3c2f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14987
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years ago[IOT-1591] Add warning code as notification type
cc [Wed, 23 Nov 2016 06:32:13 +0000 (15:32 +0900)]
[IOT-1591] Add warning code as notification type

It is required to notification message with warning type.

Change-Id: I8ea23690382a0f32d084ce3ed9903971f2a4c390
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14639
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit d2671aafa1c61b98b2e20fbef0d9c57957526d17)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14989
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoRemove Thing-manager service which is deprecated.
Jihun Ha [Tue, 6 Dec 2016 12:13:18 +0000 (21:13 +0900)]
Remove Thing-manager service which is deprecated.

Functionalities of the current things manager are deprecated because
OCF specification describes oic/con and oic/mnt resources with ambiguousness.
When it comes to be more specific, then a new service for managing those
resource will be developed.

Conflicts:
service/things-manager/sampleapp/android/con-server/src/com/example/con_server/ConfigurationServer.java
service/things-manager/sampleapp/linux/configuration/SConscript
service/things-manager/sampleapp/linux/configuration/bootstrapserver.cpp
service/things-manager/sampleapp/linux/configuration/con-server.cpp
service/things-manager/sampleapp/tizen/ConServerApp/src/conserverapp.cpp
service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp
service/things-manager/unittests/SConscript
service/things-manager/unittests/ThingsManagerTest.cpp

Change-Id: I00671da74f467461ae6c5ba76d697641dfacdf06
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15191
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix defects detected by static analysis
Parkhi [Mon, 5 Dec 2016 02:21:31 +0000 (11:21 +0900)]
Fix defects detected by static analysis

Change-Id: I9f2fd3a24df5f1394174e71ee561ed02ac8d0769
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15133
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
(cherry picked from commit 94ad6508f77f5904de76e85ee30de43b44d738fc)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15135
Reviewed-by: Hemant Mahsky <h.mahsky@samsung.com>
7 years agobuild: Bypass non finishing security test (workaround)
Philippe Coval [Tue, 29 Nov 2016 21:02:57 +0000 (22:02 +0100)]
build: Bypass non finishing security test (workaround)

Occured when SECURED=1

This change is temporary to make QA verifier sane again,
 with this change:
https://gerrit.iotivity.org/gerrit/#/c/14903/

If merged I will raise bugs for each bypassed testcase related to
https://gerrit.iotivity.org/gerrit/#/q/topic:IOT-1486

Bug: https://jira.iotivity.org/browse/IOT-1486
Origin: https://gerrit.iotivity.org/gerrit/#/c/14925/
Change-Id: I574f92375703bf8a82cad7be6948d46c10776360
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14925
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit dd3fd8bf61ebe380ce638a32da08e6d6a8977735)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14969
Reviewed-by: George Nash <george.nash@intel.com>