platform/upstream/iotivity.git
7 years agoMinor SConscript clean-up
Dan Mihai [Wed, 19 Apr 2017 05:34:43 +0000 (22:34 -0700)]
Minor SConscript clean-up

Reduce the redundancy between the sets of LIBS for Darwin and
Windows, in preparation for more significant changes.

Change-Id: I4aaed0527e62857127058c3b09e91da816c3f1c4
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19111
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agobuild: Use whereis instead of which
Philippe Coval [Wed, 29 Mar 2017 12:46:54 +0000 (14:46 +0200)]
build: Use whereis instead of which

This was needed for Tizen

Change-Id: I0273e51b9faccbb5ddc86959935654676890e7c6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18853
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agotizen: Use tag and not upstream branch
Philippe Coval [Wed, 19 Oct 2016 18:09:52 +0000 (20:09 +0200)]
tizen: Use tag and not upstream branch

Change-Id: Ib45d37341fe326d42e9bdd8a81a6d479623fd8c0
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13463
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
(cherry picked from commit 011113fe0236d3473c17c071aeb98dc75cdeb317)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19053
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
7 years agoModify cloud dashboard for sign-up
Minji Park [Mon, 17 Apr 2017 11:16:36 +0000 (20:16 +0900)]
Modify cloud dashboard for sign-up

- change sign-up page to insert oauth provider manually
- sign-out bug fixed

Change-Id: Ie9bd0bae006a1cdc7bfabd5686e51da15c9d22d5
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19025
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
(cherry picked from commit de0208f8b65281318d5382e1c50b1021b589c3a5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19045

7 years agostatistical defects fixed
Jung Seungho [Mon, 17 Apr 2017 08:12:10 +0000 (17:12 +0900)]
statistical defects fixed

Change-Id: Id600550ead3fc240e6d266c945650792754dba21
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19047
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years ago[IOT-1958] CR 22 State Specific Property Access for /pstat Resource
Nathan Heldt-Sheller [Sun, 16 Apr 2017 06:57:57 +0000 (23:57 -0700)]
[IOT-1958] CR 22 State Specific Property Access for /pstat Resource

Implementation of CR 22 feature to deny UPDATE to /pstat if any
Property in the POST representation is read-only in the current
/pstat.dos.s state.

Includes necessary update to the CBOR marshalling code to support
partial Resource representations for /pstat.

Includes updates to provisioning tools to correctly include only the
/pstat Properties being updated in the POST payload.

This same change must be implemented for each SVR.

- patch set 2&3: rebased
- patch set 4: fixed a few comments and trigger jenkins
- patch set 5&6: rebased
- patch set 7: addressed Greg's review comments

Change-Id: Ie86fcc1edf4b2370ffcb755c78f1289252dcb516
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18989
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agotizen: Build easy-setup sample app package
Philippe Coval [Thu, 20 Apr 2017 07:01:36 +0000 (09:01 +0200)]
tizen: Build easy-setup sample app package

Bug: https://jira.iotivity.org/browse/IOT-2026
Change-Id: I2c7531d7412f02f26bb5d2d57b9771f0be3d64a8
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19159
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2050] Fix insecure port while posting owner ACL
Dmitriy Zhuravlev [Fri, 14 Apr 2017 15:59:20 +0000 (18:59 +0300)]
[IOT-2050] Fix insecure port while posting owner ACL

Endpoint port changed to secure port

Change-Id: If392847cc463f3f104f41198858752b50a4a3034
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19037
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoAdd check secure port info from EndPoints for Provisioning manager.
Ziran Sun [Fri, 7 Apr 2017 15:09:52 +0000 (16:09 +0100)]
Add check secure port info from EndPoints for Provisioning manager.

With OCF1.0 in place, secure and port are removed from policy schema.
These information are now available in EndPoints. Add support for this.
Otherwise provision discovery fails for format vnd_cbor.

Bug: https://jira.iotivity.org/browse/IOT-1987
Change-Id: I999aca98c6e7c5ba16dc1c63e7348c977daf8924
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18605
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit 6eb82077e7b85dc4fd9778967aff562f3a2824e7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19121
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModify RE cache callback function.
KIM JungYong [Wed, 19 Apr 2017 05:29:51 +0000 (14:29 +0900)]
Modify RE cache callback function.

https://jira.iotivity.org/browse/IOT-2093

RE cache callback was not report error and error code

In this patch,
1. RE cache callback was changed to call on error including error code.
  std::function< void(const RCSResourceAttributes& attrs, int eCode) >
  CacheUpdatedCallback;
2. Related unit test and sample was updated.
3. Related other service was updated.

Change-Id: Iafb16d3025c491c45e70bbe347ce72b61a82aae2
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19109
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoResource: Change default vaule of acceptVersion and acceptFormat.
Ziran Sun [Fri, 14 Apr 2017 08:39:39 +0000 (09:39 +0100)]
Resource: Change default vaule of acceptVersion and acceptFormat.

Change-Id: Ic63cb9217c9a10b3e38ecd244d12b9cfc552d4ad
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19061
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-2058] Close doubled secure session
Dmitriy Zhuravlev [Tue, 18 Apr 2017 13:36:32 +0000 (16:36 +0300)]
[IOT-2058] Close doubled secure session

Add checking whether secure session exists before creating new

Change-Id: Ia4c36f6257b01c1d81baf1082eba6d7fcd0e83f2
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19071
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-2045] Fix PIN based OTM
Dmitriy Zhuravlev [Thu, 13 Apr 2017 15:10:56 +0000 (18:10 +0300)]
[IOT-2045] Fix PIN based OTM

OTM should be able to use PSK ciphersuite
even if there is no credentials in SVR DB

Change-Id: Icfde495b61f5f726cab2604fd5fc0f5e9e88fff9
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18929
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
(cherry picked from commit e133089b764270a24861c7241e3df956df6a74ff)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19039
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agosecurity: Add unused member to empty struct
Philippe Coval [Fri, 24 Mar 2017 01:56:14 +0000 (02:56 +0100)]
security: Add unused member to empty struct

For clang support just like MSVC

Change-Id: I2afbaae260318874634dd42d2650a87c0731e099
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18331
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
(cherry picked from commit 61667f7dc436f0bf3feb789233897ce2a6a49f11)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18859
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix a defect detected by static code analyzer
Jaewook Jung [Fri, 14 Apr 2017 05:12:35 +0000 (14:12 +0900)]
Fix a defect detected by static code analyzer

 - remove a unreachable code
 - add a NULL checking before strcmp()

Change-Id: I459e1ab232d10affd0c0e8b1cbea340ca11fb9a2
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18967
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix cloud\aclid.c build break
Dan Mihai [Tue, 18 Apr 2017 22:45:18 +0000 (15:45 -0700)]
Fix cloud\aclid.c build break

aclid.c
cacommonutil.h(40): error C2220: warning treated as error -
no 'object' filegenerated
cacommonutil.h(40): warning C4005: 'VERIFY_TRUE': macro redefinition
srmutility.h(72): note: see previous definition of 'VERIFY_TRUE'

Change-Id: Ic629cc9fc5ed074032d9a0a455d9ae4be7312142
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19085
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoWindows: Start building provisiontests
Dan Mihai [Wed, 12 Apr 2017 01:08:17 +0000 (18:08 -0700)]
Windows: Start building provisiontests

Change-Id: I7200fb8b61cb02f2be0b25e1a663c8ec456919f6
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18781
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2012] Windows: rename ocpmapi.lib
Dan Mihai [Tue, 11 Apr 2017 12:35:01 +0000 (05:35 -0700)]
[IOT-2012] Windows: rename ocpmapi.lib

Windows exports ocpmapi APIs from octbstack.dll. IoTivity sample apps
and apps outside IoTivity should link with import library octbstack.lib
rather than the static library ocpmapi.lib. To expose possible
incorrect linking with ocpmapi.lib, rename it to ocpmapi_internal.lib
on Windows.

Change-Id: Ieec1abc65651c3b69674acc7419c87f8ef50d3a4
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18777
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-1763] CR 32 Device Onboarding State implementation
Nathan Heldt-Sheller [Fri, 14 Apr 2017 04:20:09 +0000 (21:20 -0700)]
[IOT-1763] CR 32 Device Onboarding State implementation

Implementation of CR 32 "Device Offboarding and Soft Reset".

Note that there are a handful of minor updates still to be
done after the provisioning tool is fully updated, but this
can be done during QA cycle after merge to 1.3-rel. See [IOT-2023].

Note also that the unit tests are not written yet; however,
the critical onboarding path from RFOTM->RFPRO->RFNOP has been
verified using the provisioning tool sample app. See [IOT-2024].

patch set 2,3: rebase
patch set 4,5: address review comments
patch set 6,7: fix jenkins issues
patch set 8: rebase
patch set 9: fix jenkins issues
patch set 10: rebase
patsh set 11: address review comments

Change-Id: I7dc8adb5ad90bd168f3ab485461568b9ab7805e0
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18723
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agobridging: Fix expressions style (to support clang)
Philippe Coval [Fri, 24 Mar 2017 01:56:11 +0000 (02:56 +0100)]
bridging: Fix expressions style (to support clang)

Change-Id: I8e9892f9e370e1bda424b840528079b35830069c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18891
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ossama Othman <ossama.othman@intel.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
7 years agotizen: Use TARGET_ARCH in samples
Philippe Coval [Tue, 18 Apr 2017 12:10:45 +0000 (14:10 +0200)]
tizen: Use TARGET_ARCH in samples

Bug: https://jira.iotivity.org/browse/IOT-2032
Change-Id: I893e8880e5b23d0a6e968244ea21477b1192df01
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19055
Reviewed-by: koushik girijala <g.koushik@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agomake code more stable by change strcpy to strncpy
jinhyuck83.park [Thu, 13 Apr 2017 06:06:58 +0000 (15:06 +0900)]
make code more stable by change strcpy to strncpy
and prevent memory leak by dereferencing allocated object.

Change-Id: Ief21c5a5f9e6f016a9a88948729d636bff3d7650
Signed-off-by: jinhyuck83.park <jinhyuck83.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18881
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1949] De-duplicate roles posted to /oic/sec/roles
Greg Zaverucha [Fri, 7 Apr 2017 00:52:16 +0000 (17:52 -0700)]
[IOT-1949] De-duplicate roles posted to /oic/sec/roles

If a role certificate is added a second time to the roles
resource, do not add it again.

Change-Id: Ifce27b93404216fb2bbac5b02aeb414a75f0398c
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18831
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-1942] Add support for diagnostic payloads.
Todd Malsbary [Tue, 11 Apr 2017 18:42:10 +0000 (11:42 -0700)]
[IOT-1942] Add support for diagnostic payloads.

Bug: https://jira.iotivity.org/browse/IOT-1942
Change-Id: Ia4d761bfc49d646b2e1514844826411df272d5a4
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18721
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2057] Tizen enrollee sample app fix.
Senthil Kumar G S [Tue, 18 Apr 2017 12:17:19 +0000 (17:47 +0530)]
[IOT-2057] Tizen enrollee sample app fix.

Change-Id: Ie22a8c4564acf32dbc6096c7aaeb35f2f7bccd63
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19057
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoEnable scene manager unit test on build time.
KIM JungYong [Tue, 18 Apr 2017 05:44:32 +0000 (14:44 +0900)]
Enable scene manager unit test on build time.

Scene manager unit test was blocked before,
in this patch, scene manager unit test was enabled on build time.

Change-Id: I239209f1154f08caab1088ccf3b23c2b5e0ba732
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19041
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoSupport secure network info in CAGetNetworkInformation
hyuna0213.jo [Tue, 18 Apr 2017 09:34:57 +0000 (18:34 +0900)]
Support secure network info in CAGetNetworkInformation

Secured network interface information should be provided

Change-Id: I2fd73fa23759d27e694d81d208aca451cd989fc6
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18969
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 852a9136741d22948b05146db93c30ba7ec6f98c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19051
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1952] Assert roles automatically
Greg Zaverucha [Wed, 5 Apr 2017 19:05:06 +0000 (12:05 -0700)]
[IOT-1952] Assert roles automatically

- Change OCDoRequest to assert role certificates before the first
secure request to a server.

- Move role assertion code out of provisioning to security, so that
ocstack can call it without including all provisioning code. Create
a public API for asserting role certificates OCAssertRoles. Role
assertion code is in new files ocsecurity.c/h

- Revise scenario tests accordingly.

Other changes in this commit:
- Rename a macro "OPTIONAL" in cloud samples since this is defined
in a standard Windows header and causing a build break.

- Fix the --onetest command line option to provisioningTest.py

Change-Id: I915d321bfff0bfd00add3298b07865b0963d9f14
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18833
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoextlibs: Use patch as fallback and trap errors
Philippe Coval [Wed, 22 Mar 2017 08:27:25 +0000 (09:27 +0100)]
extlibs: Use patch as fallback and trap errors

This will be helpful for Tizen and others OS.

If lib is bundled as "imported git patch"
then application of "duplicated ocf.patch as git patch",
is not needed anymore, and relies on scons.

To Tizen maintainers:
From now on let's maintain only one version in tree,
ealier versions of git patches can be reverted,
For reference check:
https://wiki.iotivity.org/tizen#maintenance_tips

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I0598ddd5c846a2286218879d57381ec2f20c17a4
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18661
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agotizen: Enable BT for Tizen:2.4 by default
Philippe Coval [Wed, 12 Apr 2017 07:42:50 +0000 (16:42 +0900)]
tizen: Enable BT for Tizen:2.4 by default

It was reported that BT got disabled for Tizen:2.4,
after investigation it appeared that Tizen:2.4 is defined as tizen=2.3
https://build.tizen.org/project/show?project=Tizen%3A2.4%3AMobile

So instead BT is disabled for Tizen:2.2 (defined as tizen=2.1)
https://build.tizen.org/project/prjconf?project=Tizen%3A2.2%3ABase

Bug: https://jira.iotivity.org/browse/IOT-2030
Change-Id: I0ebd08f383c396d913cdbd89801131b544534d23
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18811
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoFix build fail on notification with MQ.
KIM JungYong [Tue, 18 Apr 2017 03:59:27 +0000 (12:59 +0900)]
Fix build fail on notification with MQ.

When building of notificaiton with MQ, build failed
because related API call invalid(removed) function.

in this patch, removed function was changed.

Change-Id: Ib97a5c966f4bd8907bfecbfd1463340574c2063c
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19031
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdate tizen build for multiple ownership
m.parves [Sun, 9 Apr 2017 01:02:26 +0000 (07:02 +0600)]
Update tizen build for multiple ownership

1. Add parameter for multiple owner in iotivity.spec
2. Pass this parameter value to scons from spec

Bug: https://jira.iotivity.org/browse/IOT-2009

Change-Id: Idc39544911674ace14fd5ec8169413cd517a14e9
Signed-off-by: m.parves <m.parves@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2011] linker changes for oc_logger
Dan Mihai [Fri, 7 Apr 2017 20:29:14 +0000 (13:29 -0700)]
[IOT-2011] linker changes for oc_logger

Windows currently has several different copies of oc_logger code and
data in a single process. Other platforms are using a single copy of
shared library oc_logger, in each process/app.

It's better to avoid differences across platforms, because otherwise
changes tested on one platform might not work on the other platforms.

Linker behavior unchanged by this patch:
----------------------------------------

1. On non-Windows platforms: IoTivity sample apps, and apps outside
   IoTivity, link with oc_logger.

2. On Windows: IoTivity sample apps, and apps outside IoTivity,
   continue to link with octbstack.lib.

Linker behavior changed by this patch:
----------------------------------------

1. On all platforms: IoTivity internal tests link with the static LIB
   oc_logger_internal.

2. On Windows: IoTivity sample apps, and apps outside IoTivity,
   no longer link directly with oc_logger.lib. They obtain access to
   oc_logger APIs by linking with octbstack.lib.

3. On Windows: Octbstack.dll links with the static LIB
   oc_logger_internal, and exports public oc_logger APIs.

Change-Id: I3ca36ffcbebea7822918998ac3fced1c5071726e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18769
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-2013] Windows: export C RD APIs from octbstack.dll
Dan Mihai [Mon, 10 Apr 2017 23:57:41 +0000 (16:57 -0700)]
[IOT-2013] Windows: export C RD APIs from octbstack.dll

Windows currently has several different copies of the implementation
for these APIs. Other platforms are using a single copy of shared
library resource_directory, in each process/app.

It's better to avoid differences across platforms, because otherwise
changes tested on one platform might not work on the other platforms.

Note that the C++ APIs for resource_directory clients remain inside
the static resource_directory.lib, so there can be multiple copies of
the C++ API implementation in each Windows process.

Change-Id: I07683359c265989d9921cd28da6ccd83d30f06af
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18775
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-1986] Windows: Workaround race condition linking with oc_logger.lib
Soemin Tjong [Thu, 13 Apr 2017 19:23:08 +0000 (12:23 -0700)]
[IOT-1986] Windows: Workaround race condition linking with oc_logger.lib

Temporary solution for similar issue as described in:
https://gerrit.iotivity.org/gerrit/#/c/18767/

Change-Id: Ib02c0e77b3700aed89111ce95e131db121e7acdd
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18937
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoFix a defect detected by static code analyzer.
Jaehong Jo [Fri, 14 Apr 2017 02:06:03 +0000 (11:06 +0900)]
Fix a defect detected by static code analyzer.

Add null check and remove strcpy in
oic_malloc_tests.cpp, ocstack.c, oickeepalive.c

Change-Id: I7303374ce2ff6ee68ab01e844dbef4dd46a4cf1a
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18953
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix a defect detected by static code analyzer
Jaewook Jung [Fri, 14 Apr 2017 02:34:00 +0000 (11:34 +0900)]
Fix a defect detected by static code analyzer

Because the size of the struct CAEndpoint_t is 184 bytes,
it is better to pass a pointer of it if call-by-value is not
necessary.

Change-Id: I680cb11ba6ad18613370a76333002d7784a23178
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18955
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: jaehyun Cho <jaehyun3.cho@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix a defect detected by static code analyzer
Jaewook Jung [Thu, 13 Apr 2017 05:55:15 +0000 (14:55 +0900)]
Fix a defect detected by static code analyzer

unsigned int is always greater than or equal to zero.

Change-Id: I2aa83c4a224e5bbaf22882ccb131161850dcee57
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18879
Tested-by: jenkins-iotivity <jenkins@iotivity.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 agotizen: Use octimer from common lib
Philippe Coval [Wed, 12 Apr 2017 07:44:54 +0000 (16:44 +0900)]
tizen: Use octimer from common lib

Change-Id: I09c24097a319dd390d6cc99488cd88c603acc21c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18887
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix for double free in RE cache unit test.
KIM JungYong [Thu, 13 Apr 2017 07:05:28 +0000 (16:05 +0900)]
Fix for double free in RE cache unit test.

[Problem]
When RE cache unit test is terminated,
always will crash af double free.

[Reason]
double freed valiable is shared pointer of mock object.
this pointer will remove twice on release of mock object and shared pointer.

[Fix]
Deleter as non-operation was added on the creation of shared pointer.

Change-Id: I6434795fd011312b1a9bcb5ecf0d092aab19b487
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18893
Reviewed-by: Jay Sharma <jay.sharma@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove some properties in oic.r.devconf resource
Jihun Ha [Wed, 12 Apr 2017 10:49:52 +0000 (19:49 +0900)]
Remove some properties in oic.r.devconf resource

Problem:
 Some of properties in oic.r.devconf resource has a duplicated meaning with
other existing resource's one like oic.wk.con and oic.wk.p. For OCF spec,
such a duplication should be avoided as possible.

Way to resolve:
All properties EXCEPT device name("dn") property are removed.
Later, some properties can be defined in oic.r.devconf with spec update.

Change-Id: I935b3d46773aa97a846335ad36f4f866269e05d0
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18793
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agofix unsafe functions(strcpy, sprintf)
bg.chun [Fri, 14 Apr 2017 04:11:54 +0000 (13:11 +0900)]
fix unsafe functions(strcpy, sprintf)

fix strcpy -> strncpy
fix sprinrf -> snprintf

Change-Id: Ic228e3735fe3b329ec3116a393406892d0f127e2
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18961
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove unused dependencies to RD LIB
Dan Mihai [Mon, 10 Apr 2017 15:02:30 +0000 (08:02 -0700)]
Remove unused dependencies to RD LIB

Change-Id: Id40c4b20433ad5e514657495ffac17fee6df61db
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18773
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-2035] Build jni code before samples
George Nash [Thu, 13 Apr 2017 22:11:42 +0000 (15:11 -0700)]
[IOT-2035] Build jni code before samples

Changed tabs to spaces to match with conventions
used elsewhere.

Change-Id: Ic5cfb104b0dd224d8bb88118f66d5ea1370ab2ad
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18941
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years ago[IOT-2034] Updating Enrollee sample app for Tizen
Jay Sharma [Thu, 13 Apr 2017 14:09:57 +0000 (19:39 +0530)]
[IOT-2034] Updating Enrollee sample app for Tizen

Change-Id: I06468c436db5a883f747772841413a1afef9d23a
Signed-off-by: Harish Kumar Marappa <h.marappa@samsung.com>
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18921
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix for JIRA IOT-2044.
Senthil Kumar G S [Thu, 13 Apr 2017 15:00:51 +0000 (20:30 +0530)]
Fix for JIRA IOT-2044.

Handled "GetStringUTFChars received NULL jstring" error

Change-Id: I67aecab98e496ec715e634246d4ee32efc44aa8b
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18927
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agotizen: Set parallelize build up to (nproc / 2)
Philippe Coval [Wed, 12 Apr 2017 23:05:21 +0000 (08:05 +0900)]
tizen: Set parallelize build up to (nproc / 2)

Some systems faced internal compiler errors when overloaded

Bug: https://jira.iotivity.org/browse/IOT-2026
Change-Id: I898a76d894ec63a7945ec3ea668a0095b7fb2468
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18905
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2008] Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER
bg.chun [Fri, 7 Apr 2017 02:25:33 +0000 (11:25 +0900)]
[IOT-2008] Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER

Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER
because real implementation located on ca ipadapter.
It makes BLE only stack build fail.

Change-Id: Ifd2ccaa0ba3ea62967186a69c670694f2b5d5d81
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18965
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[RI] Tizen Csdk sample build fix for 32 bit machine
Veeraj Khokale [Thu, 13 Apr 2017 10:50:05 +0000 (16:20 +0530)]
[RI] Tizen Csdk sample build fix for 32 bit machine

Tizen Csdk sample build fix for 32 bit machine

Change-Id: I73a1a6866a17bb1eff7f797e6dd361a2b9bfd583
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18915
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix a sconscript for enrollee unit test
Jihun Ha [Thu, 13 Apr 2017 11:03:47 +0000 (20:03 +0900)]
Fix a sconscript for enrollee unit test

Add a line for enabling unittest for enrollee

Change-Id: Ia1e88d4a17f0a69d09cf65da8368b5af24c1686f
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18695
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2016][IOT-1623] UUID check and use MBEDTLS_MD_MAX_SIZE
Greg Zaverucha [Mon, 10 Apr 2017 20:05:24 +0000 (13:05 -0700)]
[IOT-2016][IOT-1623] UUID check and use MBEDTLS_MD_MAX_SIZE

Use MBEDTLS_MD_MAX_SIZE for buffer lengths in pHash.
Don't allow wildcard UUID in CSRs

Change-Id: Ifad48945250087d8dc92fb346cfc986f68888352
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18829
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-2037] Resolved android crash
Randeep Singh [Thu, 13 Apr 2017 08:43:33 +0000 (14:13 +0530)]
[IOT-2037] Resolved android crash

Change-Id: I9c54cc3fea321ad2f5b657eb0784ef707070dace
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18895
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2034] Fix for Tizen Enrollee sample build issue.
Jay Sharma [Thu, 13 Apr 2017 14:59:43 +0000 (20:29 +0530)]
[IOT-2034] Fix for Tizen Enrollee sample build issue.

Change-Id: I40f6e2ee5ffa91fdc4b746a94ecd35d07e5fa6d9
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Signed-off-by: Harish Kumar Marappa <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18925
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2033] Update simple base app to enable BLE Advertisement by default.
jihwan.seo [Thu, 13 Apr 2017 10:20:56 +0000 (19:20 +0900)]
[IOT-2033] Update simple base app to enable BLE Advertisement by default.

Change-Id: I382ecdbd7cdcc2f60da3e5f6389c786f8d6ebc9f
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18909
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2010] Move PMGenerateQuery export to octbstack_product_secured.def
Alex Kelley [Fri, 7 Apr 2017 20:02:07 +0000 (13:02 -0700)]
[IOT-2010] Move PMGenerateQuery export to octbstack_product_secured.def

Change-Id: I8033841aa2217978fbb04cf0ae3494b93bb64f72
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18625
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
(cherry picked from commit fb7c36315b96a1bb8cd2f1fe03c6c66ee0b89eac)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18825

7 years ago[IOT-1986] Windows: Work around SCons race condition
Dan Mihai [Fri, 7 Apr 2017 04:39:48 +0000 (21:39 -0700)]
[IOT-1986] Windows: Work around SCons race condition

These sporadic linker errors become even more frequent when adding
more static LIBs into a single target DLL.

Change-Id: I44d2cfeda61a08cbc29cb3d7f685b87ea1cb8b9e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18767
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoIOT-1583: Fixing libcoap W4 warnings.
Pawel Winogrodzki [Mon, 3 Apr 2017 23:14:33 +0000 (16:14 -0700)]
IOT-1583: Fixing libcoap W4 warnings.

This commit makes sure libcoap doesn't generate any W4
warnings when building with for Windows.

In addition to that automatic libcoap updates are enabled
by default for Jenkins builds and optional for regular
builds.

Change-Id: I676a98bd41c2aeb28fee7d5ed1283145fd306655
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit d3b382c901ee304d4f3466fa33758f5510fdf9d4)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18755
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoModified getNetAddress() in SceneUtils
ChaJiWon [Wed, 12 Apr 2017 12:12:46 +0000 (21:12 +0900)]
Modified getNetAddress() in SceneUtils

If network have IPv4 address, it returns IPv4 address.

Change-Id: Iba93339b6a980251194b02d6fa905006a88a0608
Signed-off-by: ChaJiWon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18675
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoFix bugs for invalid uri in notificaiton service.
KIM JungYong [Thu, 13 Apr 2017 06:15:12 +0000 (15:15 +0900)]
Fix bugs for invalid uri in notificaiton service.

[Problem]
Notification service sync service does not working.

[Reason]
When notification service built with TEST=0 (by default),
Sync resource uri was registered as invalid.

[Fix]
Divided sync resource uri for test, was combined.

Change-Id: I979fd8169afc15cf747796894d98a1be9e9ef853
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18885
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoProxy samples: Add support for running with security
Veeraj Khokale [Thu, 23 Mar 2017 06:52:09 +0000 (12:22 +0530)]
Proxy samples: Add support for running with security

1. Add Persistent Storage Handlers in proxy_main.c
   and proxy_client.c.
2. Add svr db files in coap proxy samples directory and
   use them in proxy_client and proxy_main for security
   credentials and ACLs.
3. Include OC_SECURE flag while initiating proxy request
   from client.

Change-Id: Iec7ea2f3a30c2777b86064e3726db25587176c21
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18797
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[Resource-Encapsulation] Removed Linux Secured samples.
Jay Sharma [Wed, 12 Apr 2017 07:31:18 +0000 (13:01 +0530)]
[Resource-Encapsulation] Removed Linux Secured samples.

Change-Id: I5c83435c91e669100f52bdf546df6ecbf32f12f7
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18783
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2029] split scons builder code out of external_libs.scons
George Nash [Tue, 11 Apr 2017 20:23:54 +0000 (13:23 -0700)]
[IOT-2029] split scons builder code out of external_libs.scons

This splits the contents of the external_libs.scons into two
files:
   external_builders.scons
   external_libs.scons

The external_libs.scons script added scons  Psuedo-Builders
'PrepareLib', 'Download', 'UnpackAll', 'Configure',
'InstallHeadFile' and 'InstalLib' to the scons environment
The builder scripts are responsible for downloading, unpacking,
and installing different items throughout the build process.

Additionally the external_libs.scons was also responsible for
building and setting up compilar flags and building external
libraries.

The external_libs.scons used to be called before and after the
android build. Once to setup the Psuedo-Builders and again to
set the compiler flags for the external libraries. Due to some
cleanup for a recent change. The script can no longer be called
multiple times without a scons error.

see: https://gerrit.iotivity.org/gerrit/#/c/18381

Now the Psuedo-Builders are added to the scons environment by
calling external_builders.scons. The external_libs.scons is
used to build the external libraries.

This allows adding the builders that are required for the
android build. While still setting up the build environment
for the external libraries.

Due to the UnpackAll builder using the system path on windows
the external_builders.scons script must be called twice.

Additional Whitespace cleanup changed tabs into spaces to follow
convention of other scons scripts.

Change-Id: I070224425bfd2d4279cd6c9b0c329e393250770a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18739
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoProxy Service: Fix broken build.
Abhishek Sharma [Tue, 21 Mar 2017 09:51:37 +0000 (15:21 +0530)]
Proxy Service: Fix broken build.

Fixed Proxy service build issues.

Change-Id: Ib49bc0e9943d2e967a8373f170e3ecba3a237020
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18791
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[Resource-Encapsulation] Fixes for Android and Tizen platform
Jay Sharma [Wed, 12 Apr 2017 04:40:40 +0000 (10:10 +0530)]
[Resource-Encapsulation] Fixes for Android and Tizen platform

   - Java SDK build fix.
   - Android sample Apps fix.
   - Tizen sample Apps fix.

Change-Id: Id9a2e636b2253bfed585cfcfdb9fbd2f7ca1ee75
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18779
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoChange a coap cloud server address to sign-up and sign-in
Jihun Ha [Tue, 11 Apr 2017 08:35:36 +0000 (17:35 +0900)]
Change a coap cloud server address to sign-up and sign-in

An address of coap cloud server for testing is changed to 13.124.29.169.
And an access token issued by github has no expiry time so refreshtoken
is not used anymore.

Change-Id: Ib8ef89bc075114374dd345b79f7205ec99918c7d
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18687
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1996] Make resource/csdk/connectivity W4 compliant.
Alex Kelley [Mon, 27 Mar 2017 16:38:24 +0000 (09:38 -0700)]
[IOT-1996] Make resource/csdk/connectivity W4 compliant.

These changes include the following:
- Fix W4 warnings under resource/csdk/connectivity.
- Fix W4 warnings under resource/csdk/connectivity/test.
- Enable /W4 /WX on resource/csdk/connectivity.
- Enable /W4 /WX on resource/csdk/connectivity/test.
- Update build_common/Windows/SConscript.

Change-Id: I98d93f4df6fc938f004ef2f6844ba120bb5e788a
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
(cherry picked from commit 7a811cc5b6ba90a99ada4a86da1632367a52304c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18749
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoSet request timeout to EXCHANGE_LIFETIME of CoAP.
Soemin Tjong [Thu, 6 Apr 2017 22:28:59 +0000 (15:28 -0700)]
Set request timeout to EXCHANGE_LIFETIME of CoAP.

EXCHANGE_LIFETIME value is 247 seconds.

Change-Id: I95b896e8459200fbd1a02598ea1537c96a8eccef
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18591
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit b024d2ee727fddedc2d6290dfcb5c49433e30523)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18835
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agohippomocks: Update to latest release (v5.0)
Philippe Coval [Fri, 24 Mar 2017 10:20:01 +0000 (11:20 +0100)]
hippomocks: Update to latest release (v5.0)

Refactor build scripts too

Previously we used revision:
8e210c5808d490b26fff69151c801fa28d291fcb

Since upstream tagged a version, so it's safer to align to it.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ib6674b60f70dbae163feea447273324bf7827d6d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18365
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge "Merge branch 'cloud-interface'"
Jee Hyeok Kim [Mon, 10 Apr 2017 10:03:43 +0000 (10:03 +0000)]
Merge "Merge branch 'cloud-interface'"

7 years agoCreate links OCRepPayloadValue for collection resource
uzchoi [Mon, 27 Mar 2017 12:41:29 +0000 (21:41 +0900)]
Create links OCRepPayloadValue for collection resource

By adding the payload definition includes links parameter in linklist
interface for collection. Server application developer should implement
it to comply to OCF specification, but this requires lots of coding work
with holding the policy map info and so on.

This API returns back links parameter which can be set as response
payload for linklist request for collection.
OCRepPayloadValue created by this function has following struct in depth.

 OCRepPayloadValue.arr->objArray[] as each resource links payload
   ..objArray[]->values->obj as policyMap

Patch10 include tcp, tls port in the policy map.
relocate code into occollection.c to better cohesion

Change-Id: I399c5b6e40d0a00f43e106619cdc17ac480ed985
Reviewed-on: https://gerrit.iotivity.org/gerrit/18195
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoMerge branch 'cloud-interface'
Jee Hyeok Kim [Fri, 7 Apr 2017 06:05:51 +0000 (15:05 +0900)]
Merge branch 'cloud-interface'

Change-Id: I4560ca5c7cb12782701051e72cca9ec014c14587
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoFix build break from bad merge
Kevin Kane [Fri, 7 Apr 2017 17:59:39 +0000 (10:59 -0700)]
Fix build break from bad merge

Change-Id: I37004fce7b941bf7ecd37e77defa481974c0bac4
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18615
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Tested-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1992] Bug in the ocf.patch
ol.beketov [Thu, 6 Apr 2017 12:13:24 +0000 (15:13 +0300)]
[IOT-1992] Bug in the ocf.patch

Bug in the ocf.patch while adding
TLS_ECDH_anon_WITH_AES_128_CBC_SHA
suite to the library(in ssl_cli.c)

Change-Id: I1f97c096e1f67f3b65e44d915ba8b9f115bee586
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18439
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1950] Add default ACL for roles resource
Greg Zaverucha [Wed, 29 Mar 2017 22:25:09 +0000 (15:25 -0700)]
[IOT-1950] Add default ACL for roles resource

Update the default ACL to include access to the roles resource.
Fix double-free on error paths in GetDefaultACL.
Update .json/.dat files for samples and unit tests containing the default ACL.
Remove workaround from end-to-end tests.
Add unit test to check default ACL includes ACE for roles resource.

Change-Id: Icff8e64195f1ce75ad6e3b05c8e2de1763eaf653
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18465
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-2005] Correct PEM encoding of test certs in SSL tests
Kevin Kane [Thu, 6 Apr 2017 16:57:03 +0000 (09:57 -0700)]
[IOT-2005] Correct PEM encoding of test certs in SSL tests

mbedTLS insists on newlines in PEM data, and the lack thereof is
causing SSL adapter tests to fail. Add newlines to the test certs
for correct parsing.

Change-Id: I5c42dbd648bf111ac00f746d4e59fc4a9a224208
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18575
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1785] Implement roles from symmetric pair-wise keys
Kevin Kane [Wed, 29 Mar 2017 20:26:01 +0000 (13:26 -0700)]
[IOT-1785] Implement roles from symmetric pair-wise keys

Implement roleId property of an oic.sec.cred object.

Fix error path bugs in CRED<->CBOR code to fail properly if
certain serialization subroutines fail; error codes were
being ignored. Fix error path memory leaks.

Also fix the ACL/ACL2<->CBOR code to use the correct JSON
field names per the schema. Fix error path memory leaks.

Change-Id: Ie9aa8baba5903c482acb3adc6ef617a1ced7db31
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18463
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoRemove uses of WITH_X509
Greg Zaverucha [Thu, 6 Apr 2017 21:32:35 +0000 (14:32 -0700)]
Remove uses of WITH_X509

GetCredEntryByCredId was using WITH_X509 instead of WITH_DTLS,
causing a block of code to not be included in certain build
configurations.

Change-Id: I16c05f38c7d2e317a727d6480289151e30229d71
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18581
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-1939] Fix for failure of test cases in C++ Notification Service due to time...
Poovizhi [Mon, 27 Mar 2017 13:49:01 +0000 (19:19 +0530)]
[IOT-1939] Fix for failure of test cases in  C++ Notification Service due to time delay

Unit test of notification service sometimes fails due to time delay.
In this patch, network related procedure was separated in C++ layer of notification service.
The changes are based on the C layer changes from the patch "https://gerrit.iotivity.org/gerrit/#/c/17397"

Change-Id: Ib0c859f9052be2049135226cc6abd9f314875b09
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18197
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd two APIs in EnrolleeConf class
Jihun Ha [Mon, 3 Apr 2017 12:07:13 +0000 (21:07 +0900)]
Add two APIs in EnrolleeConf class

The two APIs are added in EnrolleConf class so that provisioning status
and last error code properties can be passed to application as a response
of getConfiguration API call.
Note that those APIs are already provided in EnrolleeStatus class which
is a GET request with baseline interface.

Change-Id: I46133a189fff5201df9526bf2ef6009834ab77ab
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18445
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd Firmware update sample
Minji Park [Mon, 3 Apr 2017 04:15:00 +0000 (13:15 +0900)]
Add Firmware update sample

Change-Id: I4c3609551932f7d80996074060dc71d199475841
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18475
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoFixed missing null terminator in mpm_sample_client
George Nash [Tue, 4 Apr 2017 22:00:04 +0000 (15:00 -0700)]
Fixed missing null terminator in mpm_sample_client

The string in contained in the MPMMessage passed to the onCallback
funtion may not be null terminated.

This is accounted for when creating the message_char variable but
the message_char variable was not used when MPMAddDevice was called
causing a non-terminated string to be passed to the to the plugin.

Using the message_char variable with size+1 solved the missing null
terminated string issue.

Change-Id: If760cc77fba9fe46b191b3c5a7ec2abac9da63ac
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18491
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
7 years agoIOT-1583: Updating cJSON version to remove /W4 warnings.
Pawel Winogrodzki [Wed, 29 Mar 2017 19:24:38 +0000 (12:24 -0700)]
IOT-1583: Updating cJSON version to remove /W4 warnings.

The code is updated to commit b0db7a6308f8948dd4a68f06b787cb425ce7254d
from the main cJSON repo: https://github.com/DaveGamble/cJSON.

Change-Id: I43b2bae1fa4fde5eee12f7d74990d5263f4ec51b
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18381
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix a wrong calculation of buffer size to make coap options
Jihun Ha [Tue, 4 Apr 2017 02:32:32 +0000 (11:32 +0900)]
Fix a wrong calculation of buffer size to make coap options

A 'buflen' variable produced by coap_split_query has a meaning of
remained buffer size after filling a set of coap query options to pBuf which
has CA_MAX_URI_LENGTH(512) size.
It means option data is filled upto pBuf + (CA_MAX_URI_LENGTH - buflen).
Thus, accessing pBuf can reach to the above location.

Change-Id: I1320531730800a57e78e4bc56552c51525903468
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18363
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoPython no longer prefers use of has_key method, use "in" instead
Mats Wichmann [Fri, 10 Mar 2017 20:22:28 +0000 (13:22 -0700)]
Python no longer prefers use of has_key method, use "in" instead

Fix sense of one test broken in first version.

Change-Id: I0374d68320fd4591c8f3e8632322682b5c573f39
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoPrint elevator server's device ID.
Soemin Tjong [Tue, 4 Apr 2017 21:47:30 +0000 (14:47 -0700)]
Print elevator server's device ID.

This simplifies identifying the target elevator when there are multiple
of them running.

Also, remove hardcoded device ID in the configuration file so multiple
servers don't conflict.

Change-Id: I18b318c844e769529ae9f50e79ff85114a9f5b6d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18489
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoUpdate IPCA to use new OCPlatform::start/stop().
Soemin Tjong [Wed, 29 Mar 2017 00:49:30 +0000 (17:49 -0700)]
Update IPCA to use new OCPlatform::start/stop().

https://jira.iotivity.org/browse/IOT-1966

This allows the IoTivity stack to shut down gracefully after
applications call IPCAClose().

Change-Id: Ie800577f157e4ce2a6b7086495501cda8fe133d4
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18379
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd clearing network callback info when CATerminate()
Jaewook Jung [Mon, 3 Apr 2017 02:26:26 +0000 (11:26 +0900)]
Add clearing network callback info when CATerminate()

Change-Id: Ie6b2ecd307e93e92f67340fe494076b3f0ae2778
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18427
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoadded option field related to accept and content version
Jung Seungho [Tue, 4 Apr 2017 07:45:38 +0000 (16:45 +0900)]
added option field related to accept and content version

- added get, set accpet & content version
- added DEFAULT_VERSION_VALUE
- modified encodeOptions function in CoapEncoder

Change-Id: I5ca387a49fbf6e1eaf70cfd1e249b04d0aa3ddcf
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18473
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoadd websocket feature and dashboard
Minji Park [Wed, 5 Apr 2017 04:13:39 +0000 (13:13 +0900)]
add websocket feature and dashboard

- added dashboard using websocket
- modified websocket spec related to length 0
- added websocket client

Change-Id: I14bf29702165448d364d7544544519b48866e1c0
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18519
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Yeonghun Nam <yeonghun.nam@samsung.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoIOT-1985: Fixing SimpleClientServer include paths.
Pawel Winogrodzki [Fri, 31 Mar 2017 18:54:46 +0000 (11:54 -0700)]
IOT-1985: Fixing SimpleClientServer include paths.

SimpleClientServer adds libcoap to its include paths,
which is no longer needed.

Change-Id: I613205e50d1b2f45ae51fa5eed9e036f6d6cc151
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18411
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoWindows: Remove unused provision exports
Dan Mihai [Fri, 31 Mar 2017 23:53:24 +0000 (16:53 -0700)]
Windows: Remove unused provision exports

Those functions are intended to be used internally, by security
provisioning code. It was a mistake to export them in the previous
IoTivity release.

Change-Id: If624a73e6c00c04b027de0567b5c77ef7a017a25
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18419
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoIOT-1583: Removing /W4 warnings from mbedtls.
Pawel Winogrodzki [Mon, 20 Mar 2017 19:39:43 +0000 (12:39 -0700)]
IOT-1583: Removing /W4 warnings from mbedtls.

Removing all /W4 warnings from mbedtls and adding
/WX to the mbedtls' SConscript to make sure no new ones
get added.

I'm adding a separate header for Windows builds, because
they require a different set of macros to build correctly
("MBEDTLS_HAVE_WINSOCK2" has to be available). The config
headers are not generated automatically for mbedTLS and
a default version is just checked into the repo, so each
separate configuration/platform build requires a separate
header.

Change-Id: I3b423fb2d0b978da5e9907e58df6b6818533ba22
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18013
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agocsdk: Relocate timerlib to c_common/octimer
Philippe Coval [Mon, 20 Mar 2017 14:07:28 +0000 (15:07 +0100)]
csdk: Relocate timerlib to c_common/octimer

It never was an external library while it was located there,
the code is small enough to be part c_common utility library.

No functionnal changes were introduced, just reformated source.

Note, For Arduino, timer object is built using C++ compiler tricks,
that could be removed once support is dropped.

Bug: https://jira.iotivity.org/browse/IOT-1889
Change-Id: I776c5273315a7552495974f58a199a38073fb45e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agofix JNI crash issue related send data for android BLE
jihwan.seo [Fri, 31 Mar 2017 07:55:57 +0000 (16:55 +0900)]
fix JNI crash issue related send data for android BLE

Change-Id: Ie7a4b5268f445a4c9da50dd0acec9a9b8a8e06e1
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18401
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoFix build issue caused by #16731
Andrii Shtompel [Tue, 4 Apr 2017 15:05:27 +0000 (18:05 +0300)]
Fix build issue caused by #16731

Patchset #16731 changed callback API, and then some time it wasn't rebased.
During that time CA API tests were updated, and old callback API were used.
Gerrit showed no conflicts, Jenkins build were successful.
It is required to rebase more frequently.

I've fixed build error + fix compiler warnings in that file.

Change-Id: I360f22cba5ec70075eff4f814f319678bbf099c8
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18481
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoAdd missing system include <string.h>, if available
Mats Wichmann [Wed, 29 Mar 2017 21:28:12 +0000 (15:28 -0600)]
Add missing system include <string.h>, if available

Purpose is to squish recently introduced warnings:

resource/c_common/oic_platform/src/oic_platform.c: In function 'HashStrToUuid':
resource/c_common/oic_platform/src/oic_platform.c:92:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
     memcpy(platformUuid, hash, OIC_UUID_LENGTH);
     ^~~~~~
resource/c_common/oic_platform/src/oic_platform.c:92:5: warning: incompatible implicit declaration of built-in function 'memcpy'
resource/c_common/oic_platform/src/oic_platform.c:92:5: note: include '<string.h>' or provide a declaration of 'memcpy'
In file included from resource/c_common/oic_platform/src/oic_platform.c:57:0:
resource/c_common/oic_platform/src/oic_platform.c: In function 'OICGetPlatformUuid':
resource/c_common/oic_platform/src/oic_platform.c:119:67: warning: implicit declaration of function 'strerror' [-Wimplicit-function-declaration]
         OIC_LOG_V(WARNING, TAG, "Failed gethostname() errno: %s", strerror(errno));
                                                                   ^
resource/c_common/oic_platform/src/oic_platform.c:154:42: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
     if (!HashStrToUuid(fqdnComputerName, strlen(fqdnComputerName), platformUuid))
                                          ^~~~~~
resource/c_common/oic_platform/src/oic_platform.c:154:42: warning: incompatible implicit declaration of built-in function 'strlen'
resource/c_common/oic_platform/src/oic_platform.c:154:42: note: include '<string.h>' or provide a declaration of 'strlen'

Change-Id: Ic3755bd59fd80b68011352117c09c88d27b5e4fa
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18351
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoAdd a README.md to give clearer guidance to github users.
Mats Wichmann [Thu, 16 Mar 2017 15:00:34 +0000 (09:00 -0600)]
Add a README.md to give clearer guidance to github users.

The information just points to various resources, may be
useful to others as well.

Revised version to reflect review comments.

Change-Id: I1ba4f2b017bf8b60a9c382260131d23c734001b2
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17871
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix to prevent of crash on the unit test.
KIM JungYong [Tue, 21 Mar 2017 10:00:43 +0000 (19:00 +0900)]
Fix to prevent of crash on the unit test.

As-Is, Notification unit test sometimes crash on running.

Cause by,
1) When provider unit test running,
it use invalid request information.
this invalid request is not made by stack,
made by inside unit test as uninitialized variables.

2) When consumer was destroyed, task queue was deinitilzed.
but main task thread waitting for mutex unlocking,
when mutex unlock, main thread does not update address of queue.
actually, address of queue is modified,
in this moment, main thread try to reference unmodified queue and crash.

Fixed,
1) Uninitialized variables are initialized.
2) When main thread mutex was unlocked, updating queue.
   Exception handling what data of queue is invalid.

Change-Id: I41cd4a100ea2bb7b3e68be3017475c9ecbfbb144
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18047
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoPSK check before ciphersuite selection
Andrii Shtompel [Wed, 25 Jan 2017 14:16:03 +0000 (16:16 +0200)]
PSK check before ciphersuite selection

Checking identity added to avoid including PSK suite
if no appropriate PSK in SVR DB.

Change-Id: I118c4b5864929cc8fdd0597af855f3c06b9332dc
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16731
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoMerge branch 'master' into cloud-interface
Jee Hyeok Kim [Mon, 3 Apr 2017 04:20:22 +0000 (13:20 +0900)]
Merge branch 'master' into cloud-interface

Change-Id: I90cc0049c72082a1ce630e9c7bade9d67e1afd0f
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>