platform/upstream/iotivity.git
7 years agoAdd an API to cloud provisioning with a given OCResource object
Jihun Ha [Tue, 27 Dec 2016 05:22:00 +0000 (14:22 +0900)]
Add an API to cloud provisioning with a given OCResource object

When a user wants to do cloud provisioning with a specific OCResource object,
the added API can be used and expected that a resource discovery in a current
connectivity for cloud provisioning is skipped.

Change-Id: Ic93da14b39e7576e413442b00db28ed3a6fc4890
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15947
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1699]Fix memory leak on collection
bg.chun [Wed, 21 Dec 2016 02:47:46 +0000 (11:47 +0900)]
[IOT-1699]Fix memory leak on collection

Fix memory leak on DefaultCollectionEntityHandler

Change-Id: I4070d3f8feae9596f646ecbc24de471eb99a1e8c
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15859
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1683] Add missing defines for standard interfaces.
Todd Malsbary [Tue, 6 Dec 2016 19:06:30 +0000 (11:06 -0800)]
[IOT-1683] Add missing defines for standard interfaces.

Change-Id: I3d6980b6a907abcb5adff3a08760ce013404f83d
Bug: https://jira.iotivity.org/browse/IOT-1683
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15629
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRevert wrong removal of proxy client sample build
Abhishek Sharma [Fri, 14 Oct 2016 13:01:22 +0000 (18:31 +0530)]
Revert wrong removal of proxy client sample build

A DTLS related change has wrongly removed build for
proxy client sample.

Change-Id: I1f65c1cadf6a84a69691ad02bc1227793ca2fce7
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13305
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit cf5614e1d93d537be20943136beb17b7182d87d2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15277
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1677] Fix Java build when TARGET_TRANSPORT=ALL
George Nash [Wed, 14 Dec 2016 23:03:10 +0000 (15:03 -0800)]
[IOT-1677] Fix Java build when TARGET_TRANSPORT=ALL

Currently there is no BTLE manager for linux. Only support
the jni BTLE addapter functions on android.

BUG: https://jira.iotivity.org/browse/IOT-1677
Change-Id: If365690771ab64fe40c49ad30a22707612c3d580
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15637
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1320] Make SECURED flag default '1'
George Nash [Fri, 18 Nov 2016 00:20:02 +0000 (16:20 -0800)]
[IOT-1320] Make SECURED flag default '1'

Note:
  arduino does not support build with SECURED=1 see IOT-1331
  Darwin and iOS built with SECURED=0 see IOT-1684

Change-Id: I87c7c0e76423c4f58f8dbea911835f27b2936a0b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12085
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoUpdate documentation on server/device ID.
Ziran Sun [Wed, 14 Dec 2016 14:17:48 +0000 (14:17 +0000)]
Update documentation on server/device ID.

Bug: https://jira.iotivity.org/browse/IOT-1385
Change-Id: Ib3e616cee6fe1e76a7f8aa8fbc8b33b93b97c2c4
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15611
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix build warning of notification service.
KIM JungYong [Sun, 25 Dec 2016 23:44:49 +0000 (08:44 +0900)]
Fix build warning of notification service.

In this patch, implicit declaration of function is resloved.
and it is fixed that different environments were specified for target.

Change-Id: Icd6dabc2557da2acc24fc7141d3e8ce0481b80fe
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15933
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMinor SConscript clean-up for Windows
Dan Mihai [Wed, 14 Dec 2016 16:39:25 +0000 (08:39 -0800)]
Minor SConscript clean-up for Windows

Change-Id: Ifee94165bd3171b45d2f8791293860f43cf3cdbc
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15621
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix transportFlags and port setting in OCSerialization
Minji Park [Mon, 5 Dec 2016 10:22:07 +0000 (19:22 +0900)]
Fix transportFlags and port setting in OCSerialization

- Transport flags and port setting logic fixed when making OCResource objects
 with discovery payload.
  Flags and port in devAddr used to be set as secured,
 if any previous resource has the secured information in payload.

Change-Id: I01765c392b9cdd923908f934b3e50e9f1665cb50
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15155
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: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoAdding API to configure SVR db as self-ownership
js126.lee [Mon, 12 Dec 2016 10:08:48 +0000 (19:08 +0900)]
Adding API to configure SVR db as self-ownership

This patch is
1) to configure SVR db as self-ownership for device (ex. onboarding tool)
   that is not required to Ownership Transfer by other device.
2) DeviceID of both doxm and pstat remains as same after reset.

- Test Configure SVR as self-ownership
1. Build with scons SECURED=1 WITH_TCP=1 WITH_CLOUD=1
2. Run the cloudClient with dat file that is configured as Ready-For-OTM
  ex) ./cloudClient oic_svr_db_server_randompin.dat
3. Perfrom Configure SVRdb as Self-OwnerShip [Menu:11]

-Patch 1: Upload patch
-Patch 2: Fixed build error on arduino
-Patch 3-5 : Rebase due to Jenkins problem
-Patch 6 : Apply review comment
-Patch 7,8 : Apply Greg's review commnets
-Patch 9: Rebase due to merge conflict

Change-Id: I12f178e5955d2d963ba46b88972042ee1c90dff8
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15495
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 1494606f170d49087b06da294afc9af8eac7ba2a)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15825

7 years ago[IOT-1700] SendCallBack() doesn't return an error for unsupported adapter
Joonghwan Lee [Thu, 22 Dec 2016 02:00:13 +0000 (11:00 +0900)]
[IOT-1700] SendCallBack() doesn't return an error for unsupported adapter

Added error return if adapter is not supported

Change-Id: I472864a1b8e20128965905883ab6db60b36bda6f
Signed-off-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15885
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 8064b0c63c5632a47f36d61e3c1972c8d3c2e284)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15911

7 years agoreplace some error log with debug log.
jihwan.seo [Fri, 16 Dec 2016 07:08:47 +0000 (16:08 +0900)]
replace some error log with debug log.

some log can create some confusion.
because these log are not error cases generally.

Change-Id: I8fd932ee5df707d00db4c7f9662f323697476f78
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15749
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoremoved unreachable code in resource layer
jihwan.seo [Tue, 13 Dec 2016 02:21:06 +0000 (11:21 +0900)]
removed unreachable code in resource layer

Change-Id: I19367f5f28e32a97f17aa6f7e02423349adeb7ad
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15531
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 ago[IOT-1671] Fixed base layer terminate logic
jihwan.seo [Thu, 15 Dec 2016 09:10:47 +0000 (18:10 +0900)]
[IOT-1671] Fixed base layer terminate logic

- ObserverList should be removed before destroying ResourceList
to avoid the error of dangling pointer. because ResourceObserver
object includes a resource handle which is memory address allocated
when resource is created.
- Add function to unset network monitoring callback when OCStop()
is called.

Change-Id: I7c0a11c029054163996f00bd760b1445fb6a7899
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15693
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: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoAdd CAcloseSslConnectionAll method in IP adapter changed logic
jihwan.seo [Mon, 19 Dec 2016 10:30:51 +0000 (19:30 +0900)]
Add CAcloseSslConnectionAll method in IP adapter changed logic

since session should be cleared when adapter related IP status is disabled.
we add to call CAcloseSslConnectionAll method in IP adapter changed logic.

Change-Id: I3a53852ea3a0ee92a1a75f18e7f0cfd7dc39284c
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15821
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoFix handshake error check
Joonghwan Lee [Wed, 14 Dec 2016 09:35:42 +0000 (18:35 +0900)]
Fix handshake error check

- Only delete peer info without sending alert message when socket error returned during handshake
  : this will prevent re-trying TLS handsake in order to send alert message
- Check if received data size is larger than zero

Change-Id: I3e5423b9f82e5b6bc703814fd72166844e6149b3
Signed-off-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15605
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15887

7 years agoreplace the name related device ID with remoteId for some structures
jihwan.seo [Fri, 16 Dec 2016 01:48:49 +0000 (10:48 +0900)]
replace the name related device ID with remoteId for some structures

Change-Id: Id358652f3616f9f4eb7065097cf2225c0d803e6b
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15735
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoremove dependency with ocramdon.h for base stack.
jihwan.seo [Thu, 15 Dec 2016 07:33:53 +0000 (16:33 +0900)]
remove dependency with ocramdon.h for base stack.

Change-Id: Iefaf746059acae16af190564cbd9bcf67cdd277f
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15683
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-1693]Fix observer header option check logic in OCHandleResponse
bg.chun [Fri, 16 Dec 2016 04:43:59 +0000 (13:43 +0900)]
[IOT-1693]Fix observer header option check logic in OCHandleResponse
Fix obs header opt check logic which determine
obs rest fail or success

Change-Id: I93d485b4369feacefdc1d3a9452309dd46372c5a
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15745
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoRemove unnecessary code to unset a given fd in catcpserver
hyuna0213.jo [Fri, 16 Dec 2016 00:47:47 +0000 (09:47 +0900)]
Remove unnecessary code to unset a given fd in catcpserver

After reading data from file descriptor, we set the readFds again.
so it is not required to remove a given file descriptor from a set.

Change-Id: I8c7a72b14bcce2f1a513cc6085d4113fa8fea9b1
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15731
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: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFixed keepalive to send ping request only when host mode is client
hyuna0213.jo [Thu, 15 Dec 2016 07:34:53 +0000 (16:34 +0900)]
Fixed keepalive to send ping request only when host mode is client

ping message should be sent when host mode is client

Change-Id: I2ac94e1340c1607969391b86577b9101ddc013b5
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15675
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: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix possible NULL pointer dereference
George Nash [Fri, 9 Dec 2016 17:55:59 +0000 (09:55 -0800)]
Fix possible NULL pointer dereference

if *userdata was a NULL pointer it would be dereferenced
it even after a NULL pointer check. The dereference
was moved inside the NULL pointer check to prevent the
pointer dereference.

Change-Id: I334d56c210e81329bcfef9936fbe653cc5561e8f
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15371
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdded build option to decide whether include libocpmapi.so when build liboctbstack.so
Chul Lee [Thu, 15 Dec 2016 04:07:12 +0000 (13:07 +0900)]
Added build option to decide whether include libocpmapi.so when build liboctbstack.so

This option may helpful in case of only server stack used.

This patch was reviewed from https://gerrit.iotivity.org/gerrit/#/c/15185/

Change-Id: Ibb8eabe3c2e0ffb5370977d11a648886eb4b70ab
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15663
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoChange the MAX_VERSION_LEN to OIC_SEC_MAX_VER_LEN.
Chul Lee [Tue, 20 Dec 2016 07:50:19 +0000 (16:50 +0900)]
Change the MAX_VERSION_LEN to OIC_SEC_MAX_VER_LEN.

MAX_VERSION_LEN is a very common name.
This is not appropriate for use at the SDK level.
So I changed as OIC specific name.

Change-Id: Ia573dda8811f36a60999bbc63bb24cb3b3b04d93
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15827
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoRemove the liboc link from PM's SConcript.
Chul Lee [Mon, 31 Oct 2016 01:52:14 +0000 (10:52 +0900)]
Remove the liboc link from PM's SConcript.

Change-Id: Ieb3f8ecb87233869242817eeb83e979bf9d50eb9
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13853
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Junghyun Oh <junghyun.oh@samsung.com>
Reviewed-by: Jongsung Lee <js126.lee@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 6f66686b4a730964ea1f3991f200892ef3803e96)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15281
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ossama Othman <ossama.othman@intel.com>
Reviewed-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-by: Gregg Reynolds <dev@mobileink.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoFix defects detected by static analysis
Parkhi [Thu, 15 Dec 2016 07:08:35 +0000 (16:08 +0900)]
Fix defects detected by static analysis
 - mediator/submediator sample app.
 - enrolleeSecurity class memory issue.

Change-Id: Ia224aec14001f66085788eced8a4bb059c8e1715
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15673
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 9eb66a6863398d7be7f49a890d7b5e2829a97ddc)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15841
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoFixed bug of gernerating pin during randompin OTM
js126.lee [Wed, 14 Dec 2016 04:40:09 +0000 (13:40 +0900)]
Fixed bug of gernerating pin during randompin OTM

Bug : During generating randompin, the bound of curIndex is one more.

Patch 1: Upload patch.

Change-Id: I0c6416adaa8f0fbd8eeb936a0cc17b64047b9222
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15579
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 78fdef84ed34707fac4bf3a6f9abf20803046f88)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15583

7 years agoFix infinite loop
Oleksandr Dmytrenko [Mon, 12 Dec 2016 14:47:22 +0000 (16:47 +0200)]
Fix infinite loop

The loop is infinite due to incorrectly updated control variable vals

Change-Id: I6b8ace3e206404c75fae66e726b249950f60f46a
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15511
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit d68d9a1ee08a703826b06b1bb1eaebe991804585)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15613

7 years agobug fix about organize resources.
jaesick.shin [Tue, 20 Dec 2016 11:10:40 +0000 (20:10 +0900)]
bug fix about organize resources.

Before remove the provider information,
we first call unregisterResource.

Change-Id: Ib88967d13fa50ba34edc05631122228e59c2ea70
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15837
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 agobuild: Enable MLK check for connectivity tests
Philippe Coval [Fri, 9 Dec 2016 23:09:48 +0000 (00:09 +0100)]
build: Enable MLK check for connectivity tests

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: I91620205843da3c68d600deffe44e55001ff8f51
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15383
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoarduino: hotfix preprocessor macro else vs elsif
Philippe Coval [Mon, 19 Dec 2016 20:17:24 +0000 (21:17 +0100)]
arduino: hotfix preprocessor macro else vs elsif

Change-Id: Ie8a0aceab32130335c3cd471be5ec8b8bfd8cddc
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15811
Reviewed-by: Kevin Kane <kkane@microsoft.com>
(cherry picked from commit e74f0f118b9370b4ee9ec8708d2fe49a4b265286)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15839
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agotizen: Remove resource_directory.so from main package
Philippe Coval [Fri, 16 Dec 2016 23:17:53 +0000 (00:17 +0100)]
tizen: Remove resource_directory.so from main package

Revert "tizen: Add resource_directory lib to main package"
https://gerrit.iotivity.org/gerrit/14283

Change-Id: If752f8d286d45c720cab9d467edf8846584f35fd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15779
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agobuild: Enable resource-directory unittests MLK check again
Philippe Coval [Fri, 9 Dec 2016 23:09:48 +0000 (00:09 +0100)]
build: Enable resource-directory unittests MLK check again

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: I97d242b8eb56fae8c60f902c1b9f2a97258d24d6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15387
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
7 years ago[IOT-1353] Fixed README file for account server build
Jongmin Choi [Wed, 28 Sep 2016 07:40:58 +0000 (16:40 +0900)]
[IOT-1353] Fixed README file for account server build

README file fixed to resolve cloud account server build issue

Change-Id: Iaa4e61480a54dd9c5b7d66d5a5c23e77e5fb8d77
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12401
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
(cherry picked from commit 567ff432a0d79e670b82e75eb7e0238bbd2455c4)
Origin: https://gerrit.iotivity.org/gerrit/#/c/15271/
Reviewed-on: https://gerrit.iotivity.org/gerrit/15271
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agobuild: Enable MLK check on csdk stack test
Philippe Coval [Sat, 17 Dec 2016 02:41:17 +0000 (03:41 +0100)]
build: Enable MLK check on csdk stack test

Change-Id: I3db43fdf83d816e024c23426cd28a3821fa33cc0
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15783
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[IOT-1669] Fixing Notification-service Android API's formatting issue.
nikhil.a [Wed, 14 Dec 2016 11:47:43 +0000 (17:17 +0530)]
[IOT-1669] Fixing Notification-service Android API's formatting issue.

Proper allignment of braces and  Modified comments from doxygen format to javadoc.

Patch 4: Applied formatter from iotivity/tools/styles
Patch 5:  Resolve conflict due to merge of
https://gerrit.iotivity.org/gerrit/#/c/15497/

Change-Id: I406fb56aad290f06cb0094c09041b13142aed350
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15457
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd OxM Select API and MOT related API.
Chul Lee [Wed, 14 Dec 2016 01:55:22 +0000 (10:55 +0900)]
Add OxM Select API and MOT related API.

- Add OxM Select API on C layer.
  : OCSelectOwnershipTransferMethod

- Add OT/MOT related API on C++ layer.
  : OCSecureResource::getMOTMethod
  : OCSecureResource::getMOTMethod
  : OCSecureResource::isMOTSupported
  : OCSecureResource::isMOTEnabled

- Minor bugfix in OT/MOT.

Change-Id: I476fafe3f69f8bcb00036d60be1ab92ad74c6aae
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15577
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 6ba3036950661ab8c8b4d868adfe80ba12b2f531)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15795

7 years agoFixed sample error due to wrong ACL setting
js126.lee [Thu, 15 Dec 2016 08:48:37 +0000 (17:48 +0900)]
Fixed sample error due to wrong ACL setting

Sampleserver deny for PUT rquest, because PUT permission is not set in SVR_DB file.

Patch 1: Upload patch.

Change-Id: Ia033ca3a52535bb49954ba8b17e1684047ada768
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15691
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 480fd1b289112459c59e47b11a4b9df5517e4297)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15741

7 years agotizen: relocate all liboc*.so to resource subpackage
Philippe Coval [Tue, 6 Dec 2016 14:40:54 +0000 (15:40 +0100)]
tizen: relocate all liboc*.so to resource subpackage

iotivity.pc bring those libs so they should come along.
This was observed while porting Tizen's iotcon to iotivity-1.2.1

Change-Id: I82e7121520c1a7ed8d79e7b85089bec2b0b5012b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15195
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15775
Reviewed-by: Jooseok Park <jooseok.park@samsung.com>
7 years ago[IOT-1622] Use PBKDF2 code from mbedTLS
Greg Zaverucha [Tue, 6 Dec 2016 22:25:12 +0000 (14:25 -0800)]
[IOT-1622] Use PBKDF2 code from mbedTLS

Replace the PBKDF2 implementation in IoTivity
(resource\csdk\security\src\pbkdf2.c) that uses TinyDTLS\92s
implementation of HMAC, with the implementation from mbedTLS.

Add test vectors created with the old implementation to make sure
the new implementation will interoperate.

Change-Id: I8d7e7c5e9ff0cfc8a2a149dee5aa765fc6e00a9c
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15727
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
(cherry picked from commit cbb3e4e08dce06798ef8122c0ab945ee67973aea)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15803

7 years agobuild: Enable provisioning tests again
Philippe Coval [Fri, 9 Dec 2016 23:09:48 +0000 (00:09 +0100)]
build: Enable provisioning tests again

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: I64f6e771aa838d067ae834545c5a95e9c5593db7
Origin: https://gerrit.iotivity.org/gerrit/#/c/15389/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15641
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agotizen: Reformat subpackages specs files to align master one
Philippe Coval [Tue, 4 Oct 2016 12:41:58 +0000 (14:41 +0200)]
tizen: Reformat subpackages specs files to align master one

To avoid confusion, of configuration flags,
 each configuration change is welcome to be done in all spec files at once.

Change-Id: I4a35d7129719c8bfa29455f41624e1231158c62d
Origin: https://gerrit.iotivity.org/gerrit/#/c/12773/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12773
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15287

7 years ago[IOT-1679] Modify package name for notification consumer and provider sample.
nikhil.a [Fri, 16 Dec 2016 06:10:56 +0000 (11:40 +0530)]
[IOT-1679] Modify package name for notification consumer and provider sample.

Change-Id: I3501d0cf0cdf3f360b86836868dbf1b2243bdfcf
Signed-off-by: nikhil.a <nikhil.a7@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15607
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoSeparate MOT-disabled/enabled SVR DB files for enrollee
Jihun Ha [Tue, 13 Dec 2016 05:20:54 +0000 (14:20 +0900)]
Separate MOT-disabled/enabled SVR DB files for enrollee

MOT-disabled Enrollee should not have "PRECONFIG_PIN(0xFF00)" method
in oxms property, e.g. "oxms" : [0, 65280]. If SVR db file include the value
and Mediator can not know the value, Ownership transfer will be failed
because mediator presume that enrollee can support unknown method for
ownership transfer.

Change-Id: I8b50677215105244ad351dc1791c88a34a7cff77
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15547
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit cee9ccbb44d8cff3dd17fdf01a519209d4ad131c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15597
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years ago[IOT-1676]Removing Unreachable code from Notification Service JNI
abitha.s [Tue, 13 Dec 2016 13:43:14 +0000 (19:13 +0530)]
[IOT-1676]Removing Unreachable code from Notification Service JNI

Change-Id: If28fb835a94f67f2d37f50ab721ae68ed9234559
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15567
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 agotizen: Remove deprecated libresource_hosting.so
Philippe Coval [Thu, 1 Dec 2016 13:54:29 +0000 (14:54 +0100)]
tizen: Remove deprecated libresource_hosting.so

To be squashed into:
https://gerrit.iotivity.org/gerrit/15003

Change-Id: I512cc51a9ad53929a57d30034cb70f1d153789ea
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15029
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
(cherry picked from commit 0c90ca6ffcbb6a2c56c977ec11bebb7b1d14053b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15105
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove resource-hosting service which is deprecated.
KIM JungYong [Thu, 1 Dec 2016 08:26:45 +0000 (17:26 +0900)]
Remove resource-hosting service which is deprecated.

Current resource-hosting service is deprecated because
concept of resource proxy can cover with functionality of cloud or relay server.
And this service would not handled for previous releases.
So this service can't cover for recent basic protocols.
If needs is arised for this concept, will be develop on the new service.

Change-Id: Ie14482924b7ccbebbd2512f017ad4b6039d72dd2
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15003
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15245
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoFix defects detected by static analysis
Parkhi [Thu, 15 Dec 2016 02:10:11 +0000 (11:10 +0900)]
Fix defects detected by static analysis

Change-Id: Ie07051e70f2b78fc9cdca6e1c1c0d59d7e5bc231
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15465
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit ebce9d66d37228f8a91975d635f9b4c13036ef67)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15665
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
7 years agoDoxyGen file update.
Jaehong Jo [Fri, 16 Dec 2016 04:11:31 +0000 (13:11 +0900)]
DoxyGen file update.

CPP APIs
  ../../include/OCException.h \

C APIs
  ../../c_common/ocrandom/include/ocrandom.h \
  ../../c_common/oic_malloc/include/oic_malloc.h \
  ../../c_common/oic_string/include/oic_string.h \
  ../../c_common/oic_time/include/oic_time.h \

Change-Id: If123688d3aaa050ece8b2cc994eed589ed111d26
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15739
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years ago[IOT-1682] Windows: fix linker error for SECURED=0
Dan Mihai [Wed, 14 Dec 2016 17:42:17 +0000 (09:42 -0800)]
[IOT-1682] Windows: fix linker error for SECURED=0

Linking with static LIB octbstack_test on Windows requires linking
with static LIB ocsrm too.

Also, ocsrm has been removed from the list of LIBS of this test,
for non-Windows platforms. On these platforms, octbstack_test is a
shared LIB, that already includes static LIB ocsrm.

Change-Id: I4a73029689f137e615ecf721fa89d9498904301d
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15627
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[Android]Fix wrong class path on CA BLE adapter
bg.chun [Thu, 15 Dec 2016 07:49:34 +0000 (16:49 +0900)]
[Android]Fix wrong class path on CA BLE adapter
Fix wrong class path on CA BLE adapter jni header

Change-Id: I71b3641505625de7596ea58f4685283d7c9b9e1a
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15679
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
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: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years ago[IOT-1686] InProcServerWrapper/InProcClientWrapper Initialization.
Larry Sachs [Thu, 15 Dec 2016 20:30:32 +0000 (12:30 -0800)]
[IOT-1686] InProcServerWrapper/InProcClientWrapper Initialization.

With the change https://gerrit.iotivity.org/gerrit/#/c/13649/
m_threadRun must be explicitly initialized.

Change-Id: Ic40d9a56e4fac7ec520b522c2a8c559b5b72627d
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15721
Reviewed-by: George Nash <george.nash@intel.com>
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: Rick Bell <richard.s.bell@intel.com>
7 years agoadd debugging log related CoAP pdu in CA Layer
jihwan.seo [Wed, 14 Dec 2016 07:44:42 +0000 (16:44 +0900)]
add debugging log related CoAP pdu in CA Layer

Change-Id: I14726ad78054e2fa605f68373f3d31bea3602135
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15587
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-1586] Changed the policy key name for tcp discovery
hyuna0213.jo [Tue, 22 Nov 2016 08:16:53 +0000 (17:16 +0900)]
[IOT-1586] Changed the policy key name for tcp discovery

The name of "x.org.iotivity.tcp" key was changed from
"x.org.iotivity.tcp" to "tcp".

Change-Id: I7bae43f823bdbe744a1cda28b27b9c72d22af996
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14607
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 37c7550bc5c1c032bd4ed7a5853c98c536914782)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14733
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Enable resourceCache test again
Philippe Coval [Sat, 10 Dec 2016 12:02:58 +0000 (13:02 +0100)]
build: Enable resourceCache test again

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: Ibc3200ae0c16447720d5ec4aacd801940d616e2e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15399
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoFix RD_SERVER flag
Habib Virji [Thu, 6 Oct 2016 13:33:25 +0000 (14:33 +0100)]
Fix RD_SERVER flag

Small fix for the build with RD_SERVER flag.

Change-Id: I96eb60e05202635f595c3d1edc82aa634908c95b
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12903
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15705
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoMinor change - make log info for format options more specific.
Ziran Sun [Fri, 9 Dec 2016 15:00:45 +0000 (15:00 +0000)]
Minor change - make log info for format options more specific.

Change-Id: Ib3e524d452e5b6df2255820fcd8f06c61805c70a
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15367
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
7 years agoTrival: update documentation on OCResource attribute.
Ziran Sun [Wed, 14 Dec 2016 15:50:19 +0000 (15:50 +0000)]
Trival: update documentation on OCResource attribute.

Change-Id: Ibb92a32c4f604107be178c23a67e4cf63b5de46f
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15617
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agosvcresource.c return handler
Habib Virji [Fri, 9 Dec 2016 13:38:55 +0000 (13:38 +0000)]
svcresource.c return handler

SendSRMResponse response was ignored in the default case handler of svcentityhandler in svcresource.

BUG: https://jira.iotivity.org/browse/IOT-1661
Change-Id: I1c37b8789893d9de46863bfb931047a3c43c473c
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15363
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[Tizen]change flag which used for detect ip changed
bg.chun [Wed, 14 Dec 2016 08:41:26 +0000 (17:41 +0900)]
[Tizen]change flag which used for detect ip changed
change netlink interface flags to addr flags
which used for detect network IPv4/6 changed

Change-Id: I827db082879aafdc3e8bd688917180af09531ab2
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15677
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoadd checking logic of pdu data length.
jihwan.seo [Fri, 16 Dec 2016 04:29:24 +0000 (13:29 +0900)]
add checking logic of pdu data length.

unneccessary parsing logic is running
when received data is wrong.
it should be prevented.

Change-Id: Ic36359ae96f0aaa7321a1f1e8ed2d5d086ba1198
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15743
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
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>