platform/upstream/iotivity.git
7 years agoIOT-1583: Fixing /W3 warnings in /resource directory - part 2.
Pawel Winogrodzki [Wed, 3 May 2017 00:57:11 +0000 (17:57 -0700)]
IOT-1583: Fixing /W3 warnings in /resource directory - part 2.

Fixing all /W3s inside resource-directory.

Change-Id: I1abb83e96d3553ee1c6f8ef7b69986f57142d588
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19557
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-1583: Fixing /W3 warnings in /resource directory - part 1.
Pawel Winogrodzki [Tue, 2 May 2017 07:41:38 +0000 (00:41 -0700)]
IOT-1583: Fixing /W3 warnings in /resource directory - part 1.

Fixing all /W4s inside the IPCA directory and a few minor
once inside service/.

Change-Id: I4054c9dff35ac415e0866652ba7fb9c39720f213
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19555
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: clean previously generated config files
Philippe Coval [Wed, 26 Apr 2017 07:48:55 +0000 (09:48 +0200)]
build: clean previously generated config files

Before this fix the observed behaviour was:

  scons
  find . -iname "iotivity_config.h"
  ./resource/c_common/iotivity_config.h
  scons -c .
  find . -iname "iotivity_config.h"
  ./resource/c_common/iotivity_config.h

with scons-2.5.1 on on Ubuntu 17.04

Bug: https://jira.iotivity.org/browse/IOT-2111
Change-Id: I967b050c9cc57a45df9e138807c0227397073dfd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19299
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Joe Leong <jleong@vtmgroup.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years ago[IOT-2190][Simulator] Replaced all strings with macro values from octypes.h
Senthil Kumar G S [Wed, 3 May 2017 14:28:10 +0000 (19:58 +0530)]
[IOT-2190][Simulator] Replaced all strings with macro values from octypes.h

Hard-coded device and platform property keys, 'if's, 'rt's, etc are replaced by the
macro constants defined in octypes.h

Change-Id: I1139401793300dada81c2f30cc4a343831d5171f
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19589
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1941] Add support for all oic.wk.d properties to
Todd Malsbary [Tue, 2 May 2017 18:52:27 +0000 (11:52 -0700)]
[IOT-1941] Add support for all oic.wk.d properties to
OCSetPropertyValue, OCGetPropertyValue.

Bug: https://jira.iotivity.org/browse/IOT-1941
Change-Id: Ia594c1e0dc8c47b4bbc430e630b5ad025544d2fd
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19539
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 ago[IOT-2215] Loading notification wrapper library fails in Android version 6 & above
Abitha Shankar [Wed, 3 May 2017 07:02:56 +0000 (12:32 +0530)]
[IOT-2215] Loading notification wrapper library fails in Android version 6 & above

libnotification_provider_wrapper.so & libnotification_consumer_wrapper.so
fails to load in android version 6 and above due to invalid
'DT_NEEDED' entry error. SONAME is added, since in higher
android versions search by soname is now implemented.

Change-Id: Ie5c311d6c378ec87ea837d53ad6c0297f717af70
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Signed-off-by: Abitha Shankar <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19583
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2148]Fix for removeTopic() API crash
abitha.s [Fri, 5 May 2017 06:01:58 +0000 (11:31 +0530)]
[IOT-2148]Fix for removeTopic() API crash

Change-Id: I424f5e3842577bc85d73ceb1fa68eb7b09e22ca4
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19649
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2189] Fix dos transition
Dan Mihai [Tue, 2 May 2017 22:11:07 +0000 (15:11 -0700)]
[IOT-2189] Fix dos transition

Also, improve logging and add failed assert for inconsistent state of
the SVR.

Change-Id: Id18916c88a3e5a3caf769d3a17069e670db522ef
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19549
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2121] [IOT-2116] Fix CTT "message mac does not match"
Dan Mihai [Tue, 2 May 2017 00:25:39 +0000 (17:25 -0700)]
[IOT-2121] [IOT-2116] Fix CTT "message mac does not match"

Test case CT1.7.2.1-2 from CTT v1.5.6 fails with "message mac does
not match":
- After CTT successfully posted the owner credential
- While trying to establish a new DTLS session, using the new
credential

Change-Id: I282632d1071c76afba629081d6853d376c347473
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19515
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-1958] CR 22 State Specific Property Access for /cred Resource
Nathan Heldt-Sheller [Mon, 1 May 2017 06:07:46 +0000 (23:07 -0700)]
[IOT-1958] CR 22 State Specific Property Access for /cred Resource

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

Change-Id: I2acb34b8ceff1eeba0a4b12101fa60d7c2dee9dc
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19481
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1965] Introspection update to follow spec
Srikrishna Gurugubelli [Mon, 1 May 2017 16:52:49 +0000 (09:52 -0700)]
[IOT-1965] Introspection update to follow spec

Change-Id: I5e6c0d1a016e409429498835587c73d5ef0b7fea
Signed-off-by: Srikrishna Gurugubelli <srikguru@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19513
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd completion callback to IPCACloseHandle().
Soemin Tjong [Wed, 1 Mar 2017 05:39:06 +0000 (21:39 -0800)]
Add completion callback to IPCACloseHandle().

This addresses the scenario where the app needs to be certain when all
callbacks related to the handle it is closing are completed.

Change-Id: I75b211d477405be27c6c804bc89e529088aa1a90
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18217
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 932638ede757aa7feef4a85303af456543532a0d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19013

7 years agoFix for the crash in RI sample app
Poovizhi [Tue, 18 Apr 2017 14:16:05 +0000 (19:46 +0530)]
Fix for the crash in RI sample app

The roomserver app crashes due to Invalid free in ocserverrequest.c
Flow: sendResponse->OCDoResponse->HandleAggregateResponse->DeleteServerResponse->OCPayloadDestroy
The payload is already freed in the caller function of sendResponse in InProcServerWrapper.cpp
OCPayloadDestroy is called twice during sendResponse causing a crash in the app.
Hence removing the OCPayloadDestroy called in the method DeleteServerResponse

Change-Id: If8155238120789736c39b396b65989a2dfc59ded
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19155
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years ago[RE] Added NULL check in Android sample application.
Jay Sharma [Fri, 28 Apr 2017 18:12:12 +0000 (23:42 +0530)]
[RE] Added NULL check in Android sample application.

Bug : https://jira.iotivity.org/browse/IOT-2141
Change-Id: I6a77b388b401d9ee5364e9de2859e1c91978fca5
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19447
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoCheck string length before passing to OICStrDup
Sushil Yadav [Fri, 28 Apr 2017 10:51:07 +0000 (16:21 +0530)]
Check string length before passing to OICStrDup

Assuming that a remote server will always send a string
larger than CA_MSG_ARBITER_DI_URI_LENGTH is wrong.
A length check before indexing should fix the issue.

Fixed issue: https://jira.iotivity.org/browse/IOT-2109

Change-Id: I63b2584acfa250569957e369fe0415f824052585
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19437
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2113][IOT-2114]Added fix for double free issue.
abitha.s [Tue, 2 May 2017 11:44:02 +0000 (17:14 +0530)]
[IOT-2113][IOT-2114]Added fix for double free issue.

Change-Id: I665727fffac64ac7635d4a5855a2f2b6462bb377
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19529
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2128] Check that parsed CborValue is valid before using it.
Todd Malsbary [Wed, 26 Apr 2017 22:14:04 +0000 (15:14 -0700)]
[IOT-2128] Check that parsed CborValue is valid before using it.

Bug: https://jira.iotivity.org/browse/IOT-2128
Change-Id: Ie4532842d687a69b25d8f215135edeb2fd2029c6
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19343
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRevert "[IOT-1957] Remove oic.r.acl Resource from IoTivity 1.3"
Nathan Heldt-Sheller [Tue, 2 May 2017 22:44:08 +0000 (22:44 +0000)]
Revert "[IOT-1957] Remove oic.r.acl Resource from IoTivity 1.3"

This reverts commit 819b3fe1d60907cd9f142a6834d37e0da5ce7154.

Change-Id: I0dc38a639f6d9558a0b41df8eb42c41e09adca11
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19547
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
7 years ago[IOT-2184] Expost OCResoruce.getAllHosts method in Java
George Nash [Mon, 1 May 2017 22:22:10 +0000 (15:22 -0700)]
[IOT-2184] Expost OCResoruce.getAllHosts method in Java

Bug: https://jira.iotivity.org/browse/IOT-2184
Change-Id: Iea34fa38db79da58f7245ea24ed5d85e26cf68c8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19511
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Thiago Moura <thiagogcm@gmail.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoconnectivity: Link unitests to sqlite3
Todd Malsbary [Thu, 27 Apr 2017 20:24:04 +0000 (13:24 -0700)]
connectivity: Link unitests to sqlite3

Problem was observed while building with RD_MODE and gcc-6.3.

g++ \
-o out/linux/x86_64/release/resource/csdk/connectivity/test/catests \
(...)
/bin/ld: \
out/linux/x86_64/release/liboctbstack_internal.a(oicresourcedirectory.o): \
undefined reference to symbol 'sqlite3_close'

Change-Id: I6f0a3588cd816fd186db25df92b4b79db0bae6a5
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19379
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2173] Fix server PSK suite
Dmitriy Zhuravlev [Thu, 27 Apr 2017 16:27:12 +0000 (19:27 +0300)]
[IOT-2173] Fix server PSK suite

Server should be able to load PSK suite without discovery

Change-Id: I957760b16325ac6b9f01c901f02cf6598e1aeb9e
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19369
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-2014] linker changes for connectivity_abstraction
Dan Mihai [Tue, 18 Apr 2017 13:26:19 +0000 (06:26 -0700)]
[IOT-2014] linker changes for connectivity_abstraction

Windows currently has several different copies of
connectivity_abstraction code and data in a single process.
Other platforms are using a single copy of shared library
connectivity_abstraction, 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, continue to link with connectivity_abstraction.

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
   connectivity_abstraction_internal.

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

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

Change-Id: I48667d08d5be48e828800da2807c030753beab16
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18981
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoOCF client connects to OIC server.
Ziran Sun [Thu, 27 Apr 2017 14:50:46 +0000 (15:50 +0100)]
OCF client connects to OIC server.

When a OCF client connects to an OIC server with VND_CBOR format,
it will be rejected. The client should reissue the request using
OIC cbor format and does this automatically in the stack.

Bug: https://jira.iotivity.org/browse/IOT-2120
Change-Id: I393283cefc8307c5eceb861a9b97375604dff53b
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19367
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-1957] Remove oic.r.acl Resource from IoTivity 1.3
Nathan Heldt-Sheller [Mon, 1 May 2017 06:38:57 +0000 (23:38 -0700)]
[IOT-1957] Remove oic.r.acl Resource from IoTivity 1.3

OCF 1.0 Security Spec requires Servers to expose only /oic/sec/acl2,
and not /oic/sec/acl.

Change-Id: I86550d160421f76bd89c72ee31864f029a83212b
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19485
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2057] Updating README file for tizen enrollee sample.
Harry [Tue, 18 Apr 2017 16:09:06 +0000 (21:39 +0530)]
[IOT-2057] Updating README file for tizen enrollee sample.

Change-Id: Ic0e754afd3bfef91fa4340a6536b84303de47022
Signed-off-by: Harry <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19043
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix result of notification valgrind memory checker.
KIM JungYong [Mon, 17 Apr 2017 11:41:03 +0000 (20:41 +0900)]
Fix result of notification valgrind memory checker.

When valgrind of notification service(including cpp wrapper) is run,
several leak was detected. (memory leak and invalid use of memory)

in this patch, result of valgrind was fixed.
1. invalid use of string in the unit test code, was fixed.
2. when returnning with error, allocated memory was freed.
3. unfreed variable was freed.
4. unit test build warning was fixed.

Change-Id: I4c8367bfda86813bb1ce1c71cf7841067c489ccc
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 296711bf4683301528220e14be0356c78089afb6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19033
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoFix for catching of exception on the RE linux sample.
KIM JungYong [Fri, 28 Apr 2017 08:25:04 +0000 (17:25 +0900)]
Fix for catching of exception on the RE linux sample.

getCachedAttribute API can throw exceptions,
but RE linux sample does not handle for exception.

In this patch, Exception is caught in the RE linux sample.

Change-Id: I8b049835ec64e2929312c61d270bc54525a18b74
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19421
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1843] Reject unsecure request for unknown resource
Nathan Heldt-Sheller [Mon, 1 May 2017 04:39:39 +0000 (21:39 -0700)]
[IOT-1843] Reject unsecure request for unknown resource

Previously, a null return from FindResourceByUri() may have resulted
in Unsecure Channel CREATE access to an OC_SECURE resource.  Until
the Policy Engine is updated to comprehend conntype access this
hole should be closed.

Change-Id: I4dbba12b108b103704cc931b3f03ef096e2ffc48
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19479
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2139][RE]fix for use of invalid uri on the discovery..
KIM JungYong [Fri, 28 Apr 2017 08:12:09 +0000 (17:12 +0900)]
[IOT-2139][RE]fix for use of invalid uri on the discovery..

When discoveryResource API was called in the RE layer,
used invalid uri as empty resource type like "uri?rt=".

In this patch, if resource type is empty, rt query is removed.

Bug:https://jira.iotivity.org/browse/IOT-2139
Change-Id: I1e8d0c20bee661a822f977987742e2f10455af25
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19419
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 agoresource-encapsulation: Define OC_CONSTEXPR_INLINE for clang
Philippe Coval [Thu, 30 Mar 2017 08:24:17 +0000 (10:24 +0200)]
resource-encapsulation: Define OC_CONSTEXPR_INLINE for clang

Change-Id: I390887ac1585a170a023672a4f35e3f40631afe2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19117
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2152][NS]Fix input value in sample.
KIM JungYong [Fri, 28 Apr 2017 08:37:42 +0000 (17:37 +0900)]
[IOT-2152][NS]Fix input value in sample.

NS provider sample has same input value for 2 different menu item.
but there are for same functionality.
so, in this patch this is fixed as two different menu item became one.

Bug:https://jira.iotivity.org/browse/IOT-2152
Change-Id: I5d0b57addefc28e43ed09c57cc51bfa034cf92a4
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19423
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 ago[RE] Added NULL check in Tizen sample application.
Jay Sharma [Fri, 28 Apr 2017 17:59:57 +0000 (23:29 +0530)]
[RE] Added NULL check in Tizen sample application.

Bug: https://jira.iotivity.org/browse/IOT-2140
Change-Id: I80c0eb6a150c05bac61300b3885cda3ee7593dab
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19445
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 ago[IOT-2046] Fix to display Spec Version
Larry Sachs [Thu, 13 Apr 2017 16:49:32 +0000 (09:49 -0700)]
[IOT-2046] Fix to display Spec Version

Property name for spec version is incorrectly
named 'lcv' it should be 'icv'

Change-Id: Ic703857325a520fd8b30b4b8d0ef6a8b2c4e0c31
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18931
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoReplace TAB characters with space characters
Dan Mihai [Fri, 28 Apr 2017 17:20:08 +0000 (10:20 -0700)]
Replace TAB characters with space characters

This file was using a combination of them.

(Clean-up requested by reviewers of
 https://gerrit.iotivity.org/gerrit/#/c/18981/)

Change-Id: Id1a8a0ae5f4f9bf718fc91c581ca46b865d26126
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19435
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agozigbee_wrapper: Use right enum type for result
Philippe Coval [Fri, 24 Mar 2017 02:03:09 +0000 (03:03 +0100)]
zigbee_wrapper: Use right enum type for result

This was discovered with clang on GNU/Linux

Change-Id: Ia6ae233bb4aadc4165c0115d986b4588bcec7885
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19235
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
7 years agoBuild IPCA for Linux.
Soemin Tjong [Fri, 31 Mar 2017 17:01:47 +0000 (10:01 -0700)]
Build IPCA for Linux.

Change-Id: Ida29aa63931ace03f91aa1faeb05345645f8adb8
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18409
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19079
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years ago[IOT-1480] Removed internal API export
Dan Mihai [Thu, 27 Apr 2017 15:17:20 +0000 (08:17 -0700)]
[IOT-1480] Removed internal API export

IOT-1480 removed the IoTivity 1.2 call to this non-Public API.

Change-Id: I6d688597b9049179beb227ce0f0e3219f15caf6a
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19389
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 agoWindows: Remove exports for non-Public APIs
Dan Mihai [Thu, 27 Apr 2017 22:53:20 +0000 (15:53 -0700)]
Windows: Remove exports for non-Public APIs

Exporting these in IoTivity 1.2 was just due to the incipient
procedure for building octbstack.dll.

Change-Id: I13b066aeff2bd27a23c7b65c4bfb2a67efd049b0
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19399
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 agoconnectivity: Link unitest to ocsrm
Philippe Coval [Wed, 26 Apr 2017 13:19:54 +0000 (15:19 +0200)]
connectivity: Link unitest to ocsrm

Problem was observed while building with clang on GNU/Linux or gcc-6.3

  clang++-3.5 \
  -o out/linux/x86_64/release/resource/csdk/connectivity/test/catests \
  (...)
  /usr/bin/ld: \
  out/linux/x86_64/release/liboctbstack_internal.a(ocpayloadparse.o): \
  undefined reference to symbol 'cbor_value_leave_container'
  liboctbstack.so: error adding symbols: DSO missing from command line

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Icf8196858f46e5458e70b3e3bd6239ff0d4c688b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Change-Id: I13aceaa9817b77991a316888efe7cf761bcd2266
Reviewed-on: https://gerrit.iotivity.org/gerrit/19303
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2054] Avoid calling CA API from the C++ layer
Dan Mihai [Thu, 27 Apr 2017 03:07:54 +0000 (20:07 -0700)]
[IOT-2054] Avoid calling CA API from the C++ layer

Add OCGetIpv6AddrScope, a thin wrapper over CAGetIpv6AddrScope.

Change-Id: Idc573542c7a2b6103ff254399bd286515aa56d8e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19351
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoconnectivity: Link unitest to mbedcrypto
Todd Malsbary [Thu, 27 Apr 2017 20:03:40 +0000 (13:03 -0700)]
connectivity: Link unitest to mbedcrypto

Problem was observed while building with SECURED=0 and gcc-6.3

g++ \
-o out/linux/x86_64/release/resource/csdk/connectivity/test/catests \
(...)
/bin/ld: \
out/linux/x86_64/release/libc_common.a(oic_platform.o): \
undefined reference to symbol 'mbedtls_md_info_from_type'
liboctbstack.so: error adding symbols: DSO missing from command line

Change-Id: I46fc1f4cb7597b3396cb1bc29889db5ba9828d57
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19377
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoExit batch interpreter with error on failure: IOT-2119, RT#40028
C.J. Collier [Wed, 26 Apr 2017 16:11:37 +0000 (09:11 -0700)]
Exit batch interpreter with error on failure: IOT-2119, RT#40028

Raise error on failure of "build"
Raise error on failure of "test"
Raise error on invalid target specification

Change-Id: Icbcaaa8d3b3541ecdce640632b6fdeff9df4b142
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19401
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
7 years agoIPCA: Declare class in namespace
Philippe Coval [Wed, 26 Apr 2017 13:09:31 +0000 (15:09 +0200)]
IPCA: Declare class in namespace

Issue was reported using clang-3.5:

  resource/IPCA/src/inc/callback.h:39:7:
  error: forward declaration of class cannot have a nested name specifier
  class OC::OCResource;

Change-Id: I1dd8c37a116b7f281aecb3f1c24700af69bf2b88
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19327
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobridging: Fix empty string test (on static allocation)
Philippe Coval [Thu, 30 Mar 2017 12:20:27 +0000 (14:20 +0200)]
bridging: Fix empty string test (on static allocation)

Observed issue using clang on GNU/Linux:

  bridging/common/pluginServer.cpp:211:14:\
  error: comparison of array 'ctx->reconnect_file_name' \
  not equal to a null pointer is always true \
  [-Werror,-Wtautological-pointer-compare]
  if (ctx->reconnect_file_name != NULL)

Change-Id: Ifc5e40ba8d7943ca648e93627ed77cbc25f2731a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18369
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit 995c584afef7af741d32fc024366d245fa2cf1ca)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19129
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2056] Align baseline /oic/res response with spec.
Todd Malsbary [Tue, 18 Apr 2017 20:28:21 +0000 (13:28 -0700)]
[IOT-2056] Align baseline /oic/res response with spec.

This only applies to the application/vnd.ocf+cbor content format.
- Response type is array, not object.
- "di" is not part of baseline properties.

Bug: https://jira.iotivity.org/browse/IOT-2056
Change-Id: I27a890509e888e82879afe87801249dc13c1c862
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19077
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2063] Publish only secure/nonsecure eps when resource is same.
Todd Malsbary [Wed, 19 Apr 2017 18:22:32 +0000 (11:22 -0700)]
[IOT-2063] Publish only secure/nonsecure eps when resource is same.

Also, don't publish IP eps with port of 0.

Bug: https://jira.iotivity.org/browse/IOT-2063
Change-Id: I6c06c84a77ee8bbf3fa1c66ede8cdf776d2c1981
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19125
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: byonggon chun <bg.chun@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoMigrating from C style to C++ style of coding in nest plugin
vijendrx [Wed, 1 Mar 2017 10:42:36 +0000 (16:12 +0530)]
Migrating from C style to C++ style of coding in nest plugin

Replacing fgets/fputs with fstream equivalents and using std::string
in nest_plugin, wherever applicable.

Change-Id: I5c54556876cc09d1816672a1c30d641856b1c1c7
Signed-off-by: vijendrx <vijendrax.kumar@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17579
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit f3016c9416863700ab1c161b104ac46005d07296)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19169
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMigrating from C style to C++ style of coding in lifx plugin
vijendrx [Wed, 1 Mar 2017 12:10:20 +0000 (17:40 +0530)]
Migrating from C style to C++ style of coding in lifx plugin

Replacing fgets/fputs with fstream equivalents and using std::string
in lifx_plugin, wherever applicable.

Change-Id: I53d4dfe021e5271a7ccc05a9959d162fde4fede0
Signed-off-by: vijendrx <vijendrax.kumar@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17581
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit 7c996502c9a68c32a255775c4cc64b1e8fc497e0)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19167
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMigrating from C style to C++ style of coding in Lyric Plugin
Gaganpreet Kaur [Thu, 2 Mar 2017 07:05:01 +0000 (12:35 +0530)]
Migrating from C style to C++ style of coding in Lyric Plugin

Replacing fgets/fputs with fstream equivalents and using std::string
in lyric_plugin, wherever applicable

Change-Id: Iac3a65bc674fcff7576ebc6b8cd45e1bbd4410cd
Signed-off-by: Gaganpreet Kaur <gaganpreetx.kaur@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17611
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit 19896e71a673e710dc76cc4c575b12e03e57df34)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19165
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2067] Don't call ConvertUuidToStr from ocprovision
Dan Mihai [Wed, 19 Apr 2017 19:07:07 +0000 (12:07 -0700)]
[IOT-2067] Don't call ConvertUuidToStr from ocprovision

Don't call ConvertUuidToStr from ocprovision and the C++ apps
linking with this library.

Change-Id: Ie440f0d368b3bdc15a5055eb1161b0f33586a375
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19173
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix windows build issues discovered in 19215.
Nathan Heldt-Sheller [Thu, 27 Apr 2017 00:58:47 +0000 (17:58 -0700)]
Fix windows build issues discovered in 19215.

Somehow Jenkins passed 19215 with issues that break Windows build.

Kevin sent me the error messages and I'm attempting to fix without being able to
test compile myself.  Good luck, us.

Change-Id: I0ca92b11b007676b10f538f0adec88173f9a4bbe
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19347
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2063] provide available endpoints in CAGetNetworkInformation
hyuna0213.jo [Thu, 27 Apr 2017 07:25:34 +0000 (16:25 +0900)]
[IOT-2063] provide available endpoints in CAGetNetworkInformation

Current IoTivity is sending response including all available endpoints,
which is not desired.

Change-Id: Ib0f20bebc92e0fd8a443ba2a98594381746061fa
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19355
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[RE]Fixed Unit test cases for SECURED=1 and TEST=0 flag.
Jay Sharma [Tue, 25 Apr 2017 03:10:20 +0000 (08:40 +0530)]
[RE]Fixed Unit test cases for SECURED=1 and TEST=0 flag.

Bug:https://jira.iotivity.org/browse/IOT-2091
Change-Id: Ie121edeea0e824313a2bc9de906420af12d22055
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19231
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 agoWindows: Timer APIs are not Security APIs
Dan Mihai [Wed, 19 Apr 2017 22:41:11 +0000 (15:41 -0700)]
Windows: Timer APIs are not Security APIs

There are currently no callers inside IoTivity that are dependent on
these registerTimer and unregisterTimer exports. Also, callers can
get access to these APIs by linking with static lib c_common.

Given these circumstances, one might argue that octbstack.dll should
not exports these two functions. But, they were already exported in
IoTivity 1.2, so they might be important for compatibity with
hypothetical already-existing IoTivity apps on Windows.

Change-Id: I708d8230e3b6e2f631e89fae2d9b3fab41c93108
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19239
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years ago[IOT-1958] CR 22 State Specific Property Access for /doxm Resource
Nathan Heldt-Sheller [Mon, 24 Apr 2017 04:02:04 +0000 (21:02 -0700)]
[IOT-1958] CR 22 State Specific Property Access for /doxm Resource

Implementation of CR 22 feature to deny UPDATE to /doxm 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 /doxm.

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

Change-Id: I610012be5b19e0ac0218f9f8610cab5171187108
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19215
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agobridging: Remove lib/lib64 path as unsupported on clang
Philippe Coval [Thu, 30 Mar 2017 11:38:52 +0000 (13:38 +0200)]
bridging: Remove lib/lib64 path as unsupported on clang

I believe they are not used since they are built in in compiler (spec),
especialy on compilation step.

Observed issue on GNU/Linux is:

  clang++-3.5 \
  -o out/linux/x86_64/release/bridging/mpm_client/MPMSampleClient.o \
  -c -std=c++0x -Wall -Wextra -Werror -Os -Wall -Wextra -fPIC -m64 -Llib64 \
  (...) MPMSampleClient.cpp
  clang: error: argument unused during compilation: '-Llib64'

Change-Id: Ifaf6f0b4f67d992392ca60e53a2d8fd54e1051fb
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18421
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ossama Othman <ossama.othman@intel.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit 53d888e18973eb5e16a174ea75532bf42a3aa576)
Bug: https://jira.iotivity.org/browse/IOT-1745
Reviewed-on: https://gerrit.iotivity.org/gerrit/19149
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
7 years agobuild: Enable notification memchecks
Philippe Coval [Sat, 10 Dec 2016 12:02:56 +0000 (13:02 +0100)]
build: Enable notification memchecks

Bug: https://jira.iotivity.org/browse/IOT-1428
Change-Id: I8538c56dbc6ca0498d9603fc77197bf6278b858d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18889
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2060] Don't force-link with routingmanager
Dan Mihai [Wed, 19 Apr 2017 02:58:48 +0000 (19:58 -0700)]
[IOT-2060] Don't force-link with routingmanager

Don't force all IoTivity modules to link with routingmanager. Many
modules use the copy of routingmanager from the Shared Library
octbstack, so they don't need to link with routingmanager.

Also routingmanager currently calls into connectivity_abstraction, so
it adds unnecessary headaches when having to specify LIBS in the
strict order required by the gcc linker.

Change-Id: I1e262e62fecd0c01528d07170b8f115ba7fecd5e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19101
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2101] Don't automatically assert roles accessing DOXM
Kevin Kane [Mon, 24 Apr 2017 21:11:17 +0000 (14:11 -0700)]
[IOT-2101] Don't automatically assert roles accessing DOXM

During OTM, the DOXM resource is accessed while the SSL lock is
held. Attempting to assert roles causes this lock to be acquired
again, and recursive locking is not supported. Therefore, don't
automatically assert roles when accessing DOXM. Since this
resource seems to only be accessed either anonymously or with an
owner PSK, this shouldn't be needed, anyway.

Change-Id: I4b04d24544a5049d3a91827753d565e118cbf9d5
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19237
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoDon't call CA API from sample app.
Dan Mihai [Fri, 14 Apr 2017 19:11:47 +0000 (12:11 -0700)]
Don't call CA API from sample app.

Add OC API wrapper for CASelectCipherSuite.

Change-Id: I473847399eeeca86efc3679848280c4c4419b194
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19023
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agosecurity: Remove unused OicSecSecl structure
Philippe Coval [Mon, 10 Apr 2017 23:19:22 +0000 (08:19 +0900)]
security: Remove unused OicSecSecl structure

Note, the type Id is still present in emu

Change-Id: Ib1c537fb2b96794a5cfb36ebd80ba193a99dfb5d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18665
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
(cherry picked from commit cf1ff9ac226836509475712208855120617ac3ac)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19219

7 years ago[IOT-2027] Linux: use static octbstack library for tests
Dan Mihai [Tue, 11 Apr 2017 14:37:28 +0000 (07:37 -0700)]
[IOT-2027] Linux: use static octbstack library for tests

Change-Id: I57f3afe1a23bf51d2acbae2bfe27fdd7fa53c1f7
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18823
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoSupport different LIBS for product and unit test
Dan Mihai [Wed, 19 Apr 2017 13:45:48 +0000 (06:45 -0700)]
Support different LIBS for product and unit test

Move the provisioning/SConscript part that applies to product code
into provisioning/src/. That allows provisioning/src/ and
provisioning/unitest/ to link with a different set of LIBS.

The set of LIBs did not change yet. That change is coming up in a
future patch.

Change-Id: I9741db9730971d4567c971985111acfd0aa101f9
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19143
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoDon't use CA thread pool in sample app
Dan Mihai [Sat, 15 Apr 2017 01:14:12 +0000 (18:14 -0700)]
Don't use CA thread pool in sample app

The CA thread pool APIs are not intended to be Public.

Change-Id: Ic212c453c82e639be9f611b4b16a712054475de6
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18987
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoandroid: Use octimer from common lib
Philippe Coval [Thu, 13 Apr 2017 08:19:34 +0000 (17:19 +0900)]
android: Use octimer from common lib

As "extlibs/timer" has been integrated into internal common lib,
It should not be used anymore

Bug: https://jira.iotivity.org/browse/IOT-1889
Change-Id: I458f1a8051c2db742d6fbc46ff7550a7fa962f71
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18903
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoAdd missing exports from ocpayload.h.
Todd Malsbary [Thu, 20 Apr 2017 18:40:14 +0000 (11:40 -0700)]
Add missing exports from ocpayload.h.

Change-Id: I2dfc580ed736776dfc30efe9991d22d37732c2a4
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19177
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoIOT-1994 Simplify OCStack public header file requirements
Way Vadhanasin [Fri, 14 Apr 2017 14:47:47 +0000 (07:47 -0700)]
IOT-1994 Simplify OCStack public header file requirements

Applications that need to include ocstack.h for access to OC* APIs currently need to bring in
multiple unrelated (and platform-specific) headers. This is because octypes.h, a public type
definition header used by ocstack.h, is including more headers than it needs to. It is more
desirable for applications to bring in only requird headers.

This change reduces the number of required headers from the public surface, specifically ocstack.h,
by taking advantange of IoTivity's requirement that all supported compilers are at least
C++11-compliant. See https://wiki.iotivity.org/compiler_support?s[]=compiler for details.

Before this change, users of ocstack.h must also bring in (this example is from Windows):

    Ocstack.h
    Octypes.h
    Iotivity_config.h
    Ocpresence.h
    Ocstackconfig.h
    Platform_features.h
    Windows\include\memmem.h
    Windows\include\pthread_create.h
    Windows\include\vs12_snprintf.h
    Windows\include\win_sleep.h

After this change, the list becomes:

    Ocstack.h
    Octypes.h
    Ocpresence.h
    Ocstackconfig.h

Arguably ocpresence.h and ocstackconfig.h could be combined into octypes.h since they are just
simple type definitions, just like octypes.h. That work is lower priority as both ocpresence.h
and ocstackconfig.h are already platform independent.

Change-Id: I9943589603453730446b2d616b497fbb235774a5
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
(cherry picked from commit 140b6c46e2fc6c6ef896bd9ddac9b190bc9e6fd7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18869
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoIoT-1516: Return error when WSARecvMsg() fails.
Soemin Tjong [Mon, 17 Apr 2017 23:11:29 +0000 (16:11 -0700)]
IoT-1516: Return error when WSARecvMsg() fails.

https://jira.iotivity.org/browse/IOT-1516?

Change-Id: I5c16b47c9a462ac0b8d9f47cfaea89a5f84baeeb
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19021
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd missing OCGetPersistentStorageHandler export.
Todd Malsbary [Thu, 20 Apr 2017 18:38:49 +0000 (11:38 -0700)]
Add missing OCGetPersistentStorageHandler export.

Change-Id: Ie152c247ad7b824fc854376d5d5c8b1e1ab70aab
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19175
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2090] Linux: Fix the link order of c_common and logger
Dan Mihai [Thu, 20 Apr 2017 01:53:58 +0000 (18:53 -0700)]
[IOT-2090] Linux: Fix the link order of c_common and logger

Don't prepend logger after c_common has been prepended, because the
linker wants c_common followed by logger in its command line.

Change-Id: I6cc0c6bfdb2d7e47609d98db8be42fc9e878b1ba
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19145
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoLinking against version of libcoap in favor of the version in extlibs.
Ziran Sun [Tue, 18 Apr 2017 12:55:22 +0000 (13:55 +0100)]
Linking against version of libcoap in favor of the version in extlibs.

Bug: https://jira.iotivity.org/browse/IOT-2055
Change-Id: I3ca9b87ab33aeeb18607c582f2bdccfaa18b3d2f
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19063
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2053] Discoverable & Secure SVRs
Nathan Heldt-Sheller [Fri, 21 Apr 2017 18:28:46 +0000 (11:28 -0700)]
[IOT-2053] Discoverable & Secure SVRs

Implements CR1616 which requires all SVRs to be marked "Discoverable",
and also to expose a Secure Endpoint.

Change-Id: I0cae25b0ac83ac194fd03ed45245bcb9afc98eeb
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19201
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoWindows: Remove octbstack_static.lib
Dan Mihai [Thu, 20 Apr 2017 16:28:27 +0000 (09:28 -0700)]
Windows: Remove octbstack_static.lib

octbstack_static.lib was identical to octbstack_internal.lib.

IoTivity sample apps and apps outside IoTivity are using
octbstack.lib, so they don't need octbstack_internal.lib.

Change-Id: I6ffef4ba6ee1ea90e852c707a6c58a7f8e93c1f9
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19163
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoRename octbstack_test
Dan Mihai [Thu, 20 Apr 2017 16:07:18 +0000 (09:07 -0700)]
Rename octbstack_test

Rename octbstack_test to octbstack_internal - consistent with other
*_internal LIBS.

Change-Id: Id9a4ee7642e5f06f7172b5ee8794a537fb7de547
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19161
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
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>