iotivity.git
3 weeks agoAdd comments to websocket adapter code 63/23363/4 cloud-interface
Harish Kumara M [Mon, 20 Nov 2017 12:53:56 +0000 (18:23 +0530)]
Add comments to websocket adapter code

Add doxygen comments to cawsutil.h. Also add
comments to the websocket adapter implementation
in cawsadapter_lwsimpl.c.

Change-Id: Ib8a58ae67806c16953cb6183be88b1dd67b863fb
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: Harry <h.marappa@samsung.com>
7 weeks agoUT for CAWSGetPeerAddress() API 69/22969/1
Harry [Mon, 23 Oct 2017 14:48:10 +0000 (20:18 +0530)]
UT for CAWSGetPeerAddress() API

Change-Id: I11912c01d2be3faf9ae2a494c0df9714ab4d192d
Signed-off-by: Harry <h.marappa@samsung.com>
7 weeks agoChanges to use forked libwebsockets 57/22957/2
Harry [Mon, 23 Oct 2017 09:40:38 +0000 (15:10 +0530)]
Changes to use forked libwebsockets

libwebsockests upstream master branch has a patch
for creating secure server context without cert paths.
IoTivity uses v2.2.1 tagged codebase which does not have
that patch. Forked v2.2.1 to new branch and applied patch
of creating secure server context without cert paths.

Change-Id: Ic20857ae9f8cedf14958db96c02239853d7e164f
Signed-off-by: Harry <h.marappa@samsung.com>
2 months agoFree resources on failed websocket adapter start 45/22745/2
Veeraj Khokale [Tue, 10 Oct 2017 05:38:19 +0000 (11:08 +0530)]
Free resources on failed websocket adapter start

Correctly free all allocated resources in case websocket
adapter start fails at any stage. This includes stopping
and destroying queues and mutexes which may have been
allocated before the websocket adapter is completely
started.

Change-Id: Ie63f00f7e0ee4050a7ae09e1749dbaf7af663187
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
2 months agoBuild libwebsockets for various arm architectures. 13/22713/2
Senthil Kumar G S [Fri, 6 Oct 2017 11:35:07 +0000 (17:05 +0530)]
Build libwebsockets for various arm architectures.

Updated script to build libwebsockets library for the following
ARM architectures:-
1. armeabi-v7a, armeabi-v7a-hard
2. x86, x86_64
3. arm64-v8a

Change-Id: I8b866ff8cde243b5b02ba914a14f3144156d5d3a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 months agoWeb Sockets Adapter Implementation 47/18447/55
Senthil Kumar G S [Thu, 24 Aug 2017 18:05:17 +0000 (23:35 +0530)]
Web Sockets Adapter Implementation

The code changes are as follows:
* A new Web Socket adapter added (Similar to TCP,UDP,BT Adapter).
* Unsecure and Secure mode support for linux, android and tizen platforms.
* CoAP library changes for COAP over WebSocket message format.
* Sample app changes for WebSocket testing.
* Building dependent libwebsocket library.
* Unit test cases for Web Socket adapter API testing.
* Web Socket adapter implementation is under WITH_WS flag.

Change-Id: I3a653ce980da2f25b0034739017808b476f02853
Signed-off-by: Harry <h.marappa@samsung.com>
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
3 months agoMerge branch 'master' into cloud-interface 49/22049/2
Harry [Thu, 24 Aug 2017 06:56:57 +0000 (12:26 +0530)]
Merge branch 'master' into cloud-interface

Change-Id: I16a8335b23931f2776457db7160b68e38102f242
Signed-off-by: Harry <h.marappa@samsung.com>
3 months agoprovisioning: Use .tmp suffix for test file 99/21999/3
Philippe Coval [Fri, 18 Aug 2017 12:36:45 +0000 (14:36 +0200)]
provisioning: Use .tmp suffix for test file

We can use .tmp suffix for generated files to be ignored in git repo

Bug: https://jira.iotivity.org/browse/IOT-2599
Change-Id: I70d109e590784777a0ce2a87fa7451676bad20e8
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21999
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
3 months ago[IOT-2539] clean switch warning 85/21685/8
George Nash [Mon, 31 Jul 2017 20:00:55 +0000 (13:00 -0700)]
[IOT-2539] clean switch warning

The file deviceonboardingstate.c produced a warning:
enumeration value 'DOS_STATE_COUNT' not handled in switch

This is a result of adding the the DOS_STATE_COUNT as an
enum value. This is a common programming pattern but will
result in the -Wswitch warning if the enum values are
used in a case statement without a default state.

There are multiple ways to handle this warning.
- add an empty case for the unhandled count state
- add a default case to the switch statement
- move the count out of the enum

For this fix the unhandled count state was added
to the switch statment with an assert if that case
is ever encountered.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I14c390b34d33db9a82a3bd055dd513a96c941733
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21685
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoIPCA: Install libipca dir to libdir 91/21891/9
Philippe Coval [Mon, 7 Aug 2017 07:08:33 +0000 (09:08 +0200)]
IPCA: Install libipca dir to libdir

It needs to be install to variant dir along other libs then
dependency libs will be also be found using RPATH.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I4e9ff5ad8b72850f5ef79a093502edf53c8e64d7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21891
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoyaml: Add scriptlet to clone before scons 23/21623/3
Philippe Coval [Tue, 25 Jul 2017 16:13:18 +0000 (18:13 +0200)]
yaml: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Ief605d40b83d437df4049d18af7188eaea0ecbcb
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21623
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoraxmpp: Add scriptlet to clone before scons 35/21535/6
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
raxmpp: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Ibb074c1387826af783c2a8d18c3f12bfc34834c3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoConstructing payload based on accept type in WS. 07/19007/5
Harry [Wed, 26 Jul 2017 09:52:22 +0000 (15:22 +0530)]
Constructing payload based on accept type in WS.

1. Default accept format is JSON for websocket requests
   if one not specified in requets from clients.
2. [Workaround] As device stack does support only CBOR accept format,
   All requests accept format changed from JSON to CBOR and
   converting response to JSON if only the request has contained
   JSON as accept format, otherwise CBOR payload be untouched.

Change-Id: I3044213ffa06c62af6a3075805e405cfe0a6c949
Signed-off-by: Harry <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19007
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Tested-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
3 months ago[IOT-2539] Clean sign-compare warning 87/21687/4
George Nash [Mon, 31 Jul 2017 21:04:09 +0000 (14:04 -0700)]
[IOT-2539] Clean sign-compare warning

Use type casting to prevent the sign-compare warning
from occertutility.c code.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Ief40445dbb6445de246e9004aa42f4892a431d74
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21687
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
3 months ago[IOT-2494] SVR DB Editor : Add doxm edit features 31/21831/6
Sangjoon Je [Wed, 9 Aug 2017 08:23:09 +0000 (17:23 +0900)]
[IOT-2494] SVR DB Editor : Add doxm edit features

Add doxm add, remove, modify
Apply InputUuid allow empty input or zero input from user

New Feature: https://jira.iotivity.org/browse/IOT-2494
Change-Id: I9c5dc06bdbc29c5ba7e0a8e0a6e898e162e7959d
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21831
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
3 months agoIOT-2539 Fixed incompatible-pointer-types warning 27/21927/4
George Nash [Tue, 15 Aug 2017 19:50:20 +0000 (12:50 -0700)]
IOT-2539 Fixed incompatible-pointer-types warning

The function GetResourceFromHandle was returning a PIResource**. When
the actual code was inspected it was returning a PIResourceBase** that
was being cast to a PIResource**. That value was then used as a
PIResource**. The only reason this code worked is because the way C
lays out structs in memory is sequential Since the first element of the
PIResoruceBase is a PIResource treating the the PIResourceBase like
a PIResource worked only by virtue of the memory layout rules for C
structs.

Later in the zigbee_wapper.c it relies again on the memory layout
rules for structs to assign PIResource** to a PIResource_Zigbee**.

This relies too much on internal knowledge of memory layout and is
a potential management problem. The code tied 3 structs together
based on there memory layout.

To fix the issue. The GetResourceFromHandle now returns PIResourceBase**
which was the actual type returned. In the cleanup code the pointer
is change from PIResource* to PIResourceBase*. Now when the value is
passed into the DeleteResource function it no longer generates the
incompatible-pointer-types warning.

In zigbee_wrapper.c we no longer cast the PIResource_Zigbee* to
PIResource* we now pass in the part of the PIResource_Zigbee that is
actually the PIResourceBase.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I6b147a52c522d036d016e2cd15e2900e6fc06249
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21927
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
3 months agoIOT-2539 Remove missing-field-initializers warning 59/21759/2
George Nash [Fri, 4 Aug 2017 21:18:13 +0000 (14:18 -0700)]
IOT-2539 Remove missing-field-initializers warning

OicSecKey_t contains a 3rd field.  Even though the field
is a work around for a that will be replaced soon. Till
it is replaced this will be added to preven this warning

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Ib826de1a159d33c2ac2032c546090fb1905842f0
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21759
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
3 months ago[RE] Fixed indentation of Android Sample Apps. 55/21955/2
Jay Sharma [Sun, 13 Aug 2017 10:22:03 +0000 (15:52 +0530)]
[RE] Fixed indentation of Android Sample Apps.

Change-Id: I9ef3d14f39831b7c110daed8b07bc867256a3f89
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21955
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
3 months ago[IOT-2539] clean unused-variable warning 05/21705/5
George Nash [Tue, 1 Aug 2017 18:59:36 +0000 (11:59 -0700)]
[IOT-2539] clean unused-variable warning

The global variable are not being used because the code that
uses them was blocked out using #if 0 till IOT-2106 is fixed.

The variables have also been blocked out same as the code
that was using the variables.

Bug: https://jira.iotivity.org/browse/IOT-2539
Bug: https://jira.iotivity.org/browse/IOT-2106
Change-Id: I6f6289c3a34a83e69a2ac7918086d3752e7fd93e
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21705
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agocoap-http-proxy: cast size_t type in test 63/21563/4
Philippe Coval [Thu, 20 Jul 2017 11:17:59 +0000 (13:17 +0200)]
coap-http-proxy: cast size_t type in test

Suppress a warning using clang-3.5

Change-Id: I8c740970a536a3bbc0d3d6d16cd4fe1dc81df6be
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21563
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoeasy-setup: Generate CBOR files from JSON 95/20895/15
Philippe Coval [Mon, 19 Jun 2017 16:59:07 +0000 (18:59 +0200)]
easy-setup: Generate CBOR files from JSON

CBOR files (.dat) are generated
using json2cbor tool at build time.
If not possible they are just copied.

Change-Id: Ib000a648b889d7d9956d6b26a9dc2111e7b96201
Bug: https://jira.iotivity.org/browse/IOT-2310
Origin: https://gerrit.iotivity.org/gerrit/#/c/20895/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20895
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months ago[IOT-2539] Remove maybe-uninitialized warning 03/21703/4
George Nash [Tue, 1 Aug 2017 18:21:09 +0000 (11:21 -0700)]
[IOT-2539] Remove maybe-uninitialized warning

The compiler was indicating that the request.len and
request.bytes maybe used uninitialized. Best I can
tell the OCByteString is initilaized in the GenerateCSR
function. The compiler can not tell that it is
initilaized so it is zero initialized at creation.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I19dd9818b1485ec0da64b48dc2510c8e939c6c0f
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21703
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agonotification: Sync JSON and CBOR files 47/21847/5
Philippe Coval [Wed, 19 Jul 2017 08:48:01 +0000 (10:48 +0200)]
notification: Sync JSON and CBOR files

To avoid local changes on build,
let's commit the updated .dat files (using json2cbor),

Reminding, It's developer dutty to commit those files on each changes
on json source or any change that produce a different result.
This way we're not leaving inconsistant binary files in tree.

JSON file was not modified because it is already in UNIX format

Note: those files may need to be updated to support current ACL
(and commited by security team, check status of json and dat files)

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: Ie452375af9418e0cbf3513e5334ce15cb4994a86
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21847
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoresource: Sync CBOR files for examples 49/21849/6
Philippe Coval [Wed, 9 Aug 2017 11:16:40 +0000 (13:16 +0200)]
resource: Sync CBOR files for examples

To avoid local changes on build,
let's commit the updated .dat files (using json2cbor),

Reminding, It's developer dutty to commit those files on each changes
on json source or any change that produce a different result.
This way we're not leaving inconsistant binary files in tree.

JSON file was also converted to UNIX format

Note: those files may need to be updated to support current ACL
(and commited by security team, check status of json and dat files)

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: If307ffb75e8ad39cd2b547f48209fa9dc0b420e7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21849
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months ago[IOT-2539] Fix -Wparentheses warning in ocstack. 25/21625/8
George Nash [Tue, 25 Jul 2017 22:40:53 +0000 (15:40 -0700)]
[IOT-2539] Fix -Wparentheses warning in ocstack.

The parentheses warning suggest parentheses around
'&&' within '||'. This makes interpreting the boolean
logic clear for humans. Less chance the compiler will
interpret code different than the developer.

The logic was complicated enough that the longer lines
were pulled out into there own individual boolean flags,
then the flags are used in the if statment.

This makes reading the if statment clearer. The parentheses
were modified so the code would no longer report the error.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I297ac10d8e0c78d49d41920d17df5b086dbe64ad
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21625
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agolibstrophe: Add scriptlet to clone before scons 31/21531/4
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
libstrophe: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Iac4a2df91c81bc65af6742378bda2b67e66dc0cf
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21531
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agonotification: Fix wrong NULL affectation 65/21565/5
Philippe Coval [Thu, 20 Jul 2017 11:17:59 +0000 (13:17 +0200)]
notification: Fix wrong NULL affectation

To numbers or pthread type

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Id0e1354608f83553cc84cc855becf46ced3d0cd2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21565
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months agoplugins: Avoid unsupported empty structs 51/18251/9
Philippe Coval [Tue, 28 Mar 2017 08:23:26 +0000 (10:23 +0200)]
plugins: Avoid unsupported empty structs

Observed issue on clang-3.5:
  plugins/include/plugintypes.h:52:9: \
  error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]

It might help MSC compiler too

Change-Id: Ib7cea3d37001ba1256478c1895972d519353feb2
Credit-to: Pawel Winogrodzki <pawelwi@microsoft.com>
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18251
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
3 months agobuild: install experimental logging headers 95/21195/14
Philippe Coval [Fri, 9 Jun 2017 13:51:56 +0000 (15:51 +0200)]
build: install experimental logging headers

Functions in payload_logging.h can be used in examples,
so it's installed in "experimental" sub namespace
along dependencies.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: If3a9e4309601c356ab9a2faaa9fbe26283408633
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21195
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
3 months ago[IOT-2494] SVR DB Editor : Add pstat edit features 99/21799/7
Sangjoon Je [Tue, 8 Aug 2017 23:46:41 +0000 (08:46 +0900)]
[IOT-2494] SVR DB Editor : Add pstat edit features

Add pstat add remove modify
Cleanup svrdbeditoracl.c

New Feature: https://jira.iotivity.org/browse/IOT-2494
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Change-Id: I851e8555f5a1d14332399f0c9aedc53bfa302bb3
Reviewed-on: https://gerrit.iotivity.org/gerrit/21799
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoIPCA: Generate CBOR files from JSON 87/21087/10
Philippe Coval [Thu, 8 Jun 2017 11:30:13 +0000 (13:30 +0200)]
IPCA: Generate CBOR files from JSON

CBOR.dat files are generated
using json2cbor tool at build time.
If not possible they are just copied.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: Ic55f01284934aa0415f8f7cdea78c40fa8aaa459
Origin: https://gerrit.iotivity.org/gerrit/#/c/21087/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21087
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months ago[IOT-2539] Clean sign-compare warnings 89/21689/5
George Nash [Mon, 31 Jul 2017 21:12:13 +0000 (14:12 -0700)]
[IOT-2539] Clean sign-compare warnings

It is common to do a compair with a const value in unit
tests. For example EXPECT_EQ(3, value).  If `value` is an
unsigned type this will produce the sign-compare compiler
warning. The compiler defaults to treating constant
numbers as a signed data type.  Adding a sufix u (i.e. 3u)
will tell the compiler to treat the constant as an
unsigned data type.

In other cases the type is cast to an unsigned or signed
value before the comparison.

In aclresourcetest.cpp the return type for GetNumberOfResource
function was updated to return size_t since in all the test
conditions it is compared with variable of size_t or a
constant number.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I7e47bfb9f027304abd975eb0d8e577cbd484545a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21689
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoresource-container: Enable -Wnoexcept for g++ only 61/21561/3
Philippe Coval [Thu, 20 Jul 2017 12:10:12 +0000 (14:10 +0200)]
resource-container: Enable -Wnoexcept for g++ only

As not supported on clang-3.5

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I7bb4f53a0a0e2eba56e670f87ac163a211173fb6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21561
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months ago[IOT-2539] Clean implicit-function warning 07/21707/4
George Nash [Tue, 1 Aug 2017 19:34:06 +0000 (12:34 -0700)]
[IOT-2539] Clean implicit-function warning

pmutility.c code would give an implicit-funtion-declaration
warning when the usleep function was used. On linux the
usleep function is part of unistd.h which was already
included.

usleep is not exposed unless _DEFAULT_SOURCE or _BSD_SOURCE
is defined before including unistd.h. To prevent another warning
[-Wcpp] both macros are included. As directed in the glibc
release notes:
https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I7002ef303ba685bda76f70590d7c9593435b4ba7
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21707
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoprovisioning: Generate CBOR files from JSON 85/21085/5
Philippe Coval [Thu, 8 Jun 2017 11:24:28 +0000 (13:24 +0200)]
provisioning: Generate CBOR files from JSON

CBOR files (.dat) are generated
using json2cbor tool at build time.
If not possible they are just copied.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I9ec2e6661252ea73c6b6c81ec399b4c7ee731984
Origin: https://gerrit.iotivity.org/gerrit/#/c/21085/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21085
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoIOT-2539 Cleanup unused-parameter warning 69/21769/3
George Nash [Mon, 7 Aug 2017 21:40:26 +0000 (14:40 -0700)]
IOT-2539 Cleanup unused-parameter warning

This is a set of code that will sometimes have a warning
depending on what is defined. To prevent the
unused-parameter warning the parameters are cast to void.
A empty operation that will be compiled out but prevents
the warning.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I08c73fb565b62d3a760956976a012331863a6c73
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21769
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoIOT-2539 Fix write-strings warning 53/21753/2
George Nash [Fri, 4 Aug 2017 18:57:02 +0000 (11:57 -0700)]
IOT-2539 Fix write-strings warning

The write-strings warning comes from assigning
the a const string to a char* that is not const.
From everything I see in this example the string
is not changed so simply using const_cast will
remove the warning.

If these values are always expected to be constant
we may want to consider changing the strutures
to hold const char * not char *. Without further
investigation I did not feel safe making that
change.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Ib9053a1041b72b1fd05329999efc7a7ff28aab94
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21753
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agoIOT-2539 Cleanup -Wformat= warnings 71/21771/5
George Nash [Mon, 7 Aug 2017 20:40:28 +0000 (13:40 -0700)]
IOT-2539 Cleanup -Wformat= warnings

The -Wformat= warning is given when the conversion specifier
in a printf or scanf command does not match the value actually
passed in.

In this commit all of the issues are found in LOG functions.
If type passed in was a variable size parameter like a pointer or
size_t. The the PRIuPTR value from the inttypes.h
header is used. For ssize_t variables the PRIdPTR was used.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I4977253ac7ee68d2e80a26a0963b770b2ce87032
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21771
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoIOT-2539 remove unused function warning 35/21735/2
George Nash [Wed, 2 Aug 2017 22:40:48 +0000 (15:40 -0700)]
IOT-2539 remove unused function warning

The static function GenerateEccKeyPair in occertutility.c
in unused and can be delete.

Note: there is a line for line copy of this function also
found in certhelpers.c that is used. So deleting this
function will not cause the code to be lost.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I3a5aefdd316cf5cedd6af58811358ebdd3589838
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21735
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>
4 months ago[IOT-2542] Wrap bt_le_files with gcc pragma 41/21641/5
George Nash [Wed, 19 Jul 2017 15:33:58 +0000 (08:33 -0700)]
[IOT-2542] Wrap bt_le_files with gcc pragma

Wrap the files that are generated using the gdbus-codegen
tool with the GCC diagnostic ignore -Wunused-parameter
pragma to prevent this code producing the unused-parameter
warning.

If transports was set to ALL the build script was calling
build for all of the connectivity transports twice. This
caused SCons to print a warning that two builds were
specifying the same build target. To fix the extra
unneeded call to the build script was removed.

Bug: https://jira.iotivity.org/browse/IOT-2542
Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I997506b43099425718a7f04f9c66be49a49dc717
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21641
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months ago[IOT-2539] clean implicit-function-declaration 83/21683/3
George Nash [Mon, 31 Jul 2017 16:55:14 +0000 (09:55 -0700)]
[IOT-2539] clean implicit-function-declaration

The pdu.c file was producing an implicit-function-declaration
warning for the ntohs() function. The ntohs function is part
of the arpa/inet.h header.  This is conditionally included
based on the HAVE_ARPA_INET_H macro. The HAVE_ARPA_INET_H
macro is defined in the iotivity_config.h header. So
iotivity_config.h must be included in pdu.c to properly detect
the macro.

It looks like some systems may supply the ntohs() function
without arpa/inet.h. So it is unclear if the call to the
function its self needs some added macros.

Change-Id: I7e19d65e1371d46b35d70a5ecdf06fb0b73152ff
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months ago[IOT-2539] remove the -Wcpp warning from octimer.c 55/21655/2
George Nash [Thu, 27 Jul 2017 17:49:05 +0000 (10:49 -0700)]
[IOT-2539] remove the -Wcpp warning from octimer.c

This warning comes from teh glibc library. The library
has a # warning in the code if _BSD_SOURCE or _SVID_SOURCE
are defined in the code. The code that was enabled using
the two macros has been depricated. The new _DEFAULT_SOURCE
macro should be used to enable the features that were
enabled by the old macros.

If you need to build with old and newer versions of glibc
the glibc release notes recomend using both the old and
new macros.
see: https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I000d3bbfe4fdc473066d8c50862070c8b49788ca
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21655
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months ago[IOT-2082] Tizen 3.0 support for BLE transport 59/13459/13
Veeraj Khokale [Mon, 5 Jun 2017 08:37:52 +0000 (14:07 +0530)]
[IOT-2082] Tizen 3.0 support for BLE transport

1. Modify tizen BLE server to use the 3.0 API's.
2. Add unicast send logic to tizen BLE client
3. Add tizen 3.0 profile to gbs build and use
   it as the default profile for BLE transport

Change-Id: I527d71adf1daf9142353e87fbb6ff59a9cdae935
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13459
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
4 months agotools: Add exec permissions on scripts 37/21537/5
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
tools: Add exec permissions on scripts

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I77d8f514e88d8157b1d5948b76d63519fa2957b4
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21537
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agowksxmppxep: Add scriptlet to clone before scons 33/21533/5
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
wksxmppxep: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Icb301bb46ca5faab46576deea35ac623646a1ade
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21533
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoMerge branch '1.3-rel' (0d609e16) 41/21841/1
Philippe Coval [Thu, 10 Aug 2017 06:06:19 +0000 (08:06 +0200)]
Merge branch '1.3-rel' (0d609e16)

Relate-to:
https://gerrit.iotivity.org/gerrit/21713
https://gerrit.iotivity.org/gerrit/21601
https://gerrit.iotivity.org/gerrit/21621
https://gerrit.iotivity.org/gerrit/21741
https://gerrit.iotivity.org/gerrit/17411
https://gerrit.iotivity.org/gerrit/21555

Change-Id: I0d609e1639ca9bf4a08e6cf765e17ad5d6e36bda
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months ago[IOT-2555] Update path in ProvisioningTest.py 13/21713/4
Alex Kelley [Tue, 1 Aug 2017 23:07:56 +0000 (16:07 -0700)]
[IOT-2555] Update path in ProvisioningTest.py

Change-Id: If6aead88b0958237df73da77c41123755c7e4ee9
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21713
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months ago[IOT-2536] Fix regression with RD delete. 01/21601/3
Todd Malsbary [Mon, 24 Jul 2017 17:32:34 +0000 (10:32 -0700)]
[IOT-2536] Fix regression with RD delete.

Bug: https://jira.iotivity.org/browse/IOT-2536
Change-Id: Ib3760af5db55bfb464daf692100e8731a7d52092
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21601
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoignore: Gcov generated files 11/21711/4
Philippe Coval [Sun, 30 Jul 2017 11:13:41 +0000 (13:13 +0200)]
ignore: Gcov generated files

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Id528461dcc6c07551554a07def899f612df97be6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21711
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoIOT-2539 fix int-conversion warning 39/21739/3
George Nash [Wed, 2 Aug 2017 23:17:56 +0000 (16:17 -0700)]
IOT-2539 fix int-conversion warning

On linux pthread_t is not a pointer type so
assigning it as NULL is an error. pthread_t should be
assigned using the functions like pthread_create which
is already done.

Change-Id: I55559a3ed3d4de82dd4863b1ee6e0ce11dd1726b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21739
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agoIOT-2539 Removed unused-function 47/21747/2
George Nash [Thu, 3 Aug 2017 23:50:04 +0000 (16:50 -0700)]
IOT-2539 Removed unused-function

The CompareCredential function is unused. Any code
that is unused is not maintained. This removes the
unused function. If the CompareCredential is needed
in the future it can be restored by reverting this
commit.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Ib5c1fee9a2bd90db3b55066a6e3b057760199b68
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21747
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months ago[IOT-2539] Fix format= warining 01/21701/2
George Nash [Tue, 1 Aug 2017 17:18:56 +0000 (10:18 -0700)]
[IOT-2539] Fix format= warining

The sscanf was using %lu flag that is a long unsigned int
while passing in a uint32_t value which is an unsigned int

This changes the flag from %lu to %u to clean the format
warning.

Change-Id: Iba1d10e2b2403fa5adb94650764ee04c290c951b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21701
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agoIOT-2539 Fix return-type warning 37/21737/2
George Nash [Wed, 2 Aug 2017 22:59:06 +0000 (15:59 -0700)]
IOT-2539 Fix return-type warning

The _worker function expects a void * return type
only functions with return type of void do not have
to have a return.

Since the return value does not appear to be used
simply return NULL.

Change-Id: I3cee6f7a491320d21b1d70f9a8df0f7b4538087b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21737
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months ago[IOT-2539] Clean unused-variable warning 09/21709/2
George Nash [Tue, 1 Aug 2017 20:46:09 +0000 (13:46 -0700)]
[IOT-2539] Clean unused-variable warning

g_MotCtx is not used anywhere in the code and can
be removed.

Change-Id: I382c16b26a0aafac366f47a1fb01c3b13b1fdb4a
Bus: https://jira.iotivity.org/browse/IOT-2539
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21709
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agoMerge "Merge branch '1.3-rel' (73b7fa38)"
Gerrit Code Review [Wed, 9 Aug 2017 18:04:14 +0000 (18:04 +0000)]
Merge "Merge branch '1.3-rel' (73b7fa38)"

4 months ago[IOT-2428] Ownership Transfer support 21/21621/4
Alex Kelley [Thu, 20 Jul 2017 23:50:29 +0000 (16:50 -0700)]
[IOT-2428] Ownership Transfer support

Update OCClient and OCServer to support ownership transfer.

Change-Id: Iab48685ca4fe6a8b19d6b8cba597a5e25833a7d4
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21621
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
4 months ago[IOT-2560] ProvClient return -1 on timeout 41/21741/2
Alex Kelley [Thu, 3 Aug 2017 00:11:25 +0000 (17:11 -0700)]
[IOT-2560] ProvClient return -1 on timeout

This change updates ProvisioningClient's waitCallbackRet to return -1 if it
times out waiting for a callback to indicate the operation has finished.

Change-Id: I904e41fa7fc5fbed73344b08c30c45235678b646
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21741
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
4 months agologger: Fix OCLogv by testing EOL 55/21555/3
Philippe Coval [Wed, 22 Feb 2017 00:54:43 +0000 (01:54 +0100)]
logger: Fix OCLogv by testing EOL

Change-Id: Ie070f4d01c9a665373221d6924453b7da50cfa4f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17411
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 4f456acd2e564c5f271832b6519e1b634f41c60f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21555
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agocsdk: Sync JSON and CBOR files 27/21627/2
Philippe Coval [Tue, 25 Jul 2017 21:58:36 +0000 (23:58 +0200)]
csdk: Sync JSON and CBOR files

By the way JSON files are also converted to use unix EOL

Note: those files may need to be updated to support current ACL
(and commited by security team, check status of json and dat files)

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: If6e0c1d29c53556a57d31ced1224ae75eeb0c9c1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21627
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoMerge branch '1.3-rel' (73b7fa38) 05/21805/1
Philippe Coval [Wed, 9 Aug 2017 07:44:18 +0000 (09:44 +0200)]
Merge branch '1.3-rel' (73b7fa38)

Relate-to:
https://gerrit.iotivity.org/gerrit/21613
https://gerrit.iotivity.org/gerrit/20475
https://gerrit.iotivity.org/gerrit/21629
https://gerrit.iotivity.org/gerrit/21669

Change-Id: I73b7fa38d5cbc805756e563129cb4251972f1c42
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months ago[IOT-2530] Security provisioning crash fix 13/21613/5
Aleksey Volkov [Tue, 25 Jul 2017 09:29:10 +0000 (12:29 +0300)]
[IOT-2530] Security provisioning crash fix

Change-Id: I456a0d09266561c7b6d6f6912e234aac2ca550c0
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21613
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months ago[IOT-2343] Fix ignoring send failure 47/20847/4
Dmitriy Zhuravlev [Tue, 30 May 2017 07:12:31 +0000 (10:12 +0300)]
[IOT-2343] Fix ignoring send failure

CATCPPacketSendCB changed to synchronous completion

Change-Id: I4ed43d5c580ba4beee510d0e0475481c57e571c6
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20847
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months ago[IOT-2343] Fix ignoring send failure 75/20475/5
Dmitriy Zhuravlev [Tue, 30 May 2017 07:12:31 +0000 (10:12 +0300)]
[IOT-2343] Fix ignoring send failure

CATCPPacketSendCB changed to synchronous completion

Change-Id: I4ed43d5c580ba4beee510d0e0475481c57e571c6
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20475
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months ago[IOT-2494] SVR DB Editor : Add Acl Edit features 85/21585/17
Sangjoon Je [Mon, 24 Jul 2017 02:50:39 +0000 (11:50 +0900)]
[IOT-2494] SVR DB Editor : Add Acl Edit features

Print info for ACL_V2
Support Modify ACL
Split svrdbeditor.c into several files
Fix svace issue
Fix valgrind mem leak issue
Fix wrong error msg

New Feature: https://jira.iotivity.org/browse/IOT-2494
Change-Id: I02636ed59e293108a4e5cf6bf7e75a19dafeb455
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21585
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoIOT-2539 Cleanup warnings from subownerclient.cpp 57/21757/2
George Nash [Fri, 4 Aug 2017 21:01:52 +0000 (14:01 -0700)]
IOT-2539 Cleanup  warnings from subownerclient.cpp

Used the OC_UNUSED macro for unused parameters in callback
functions.

Deleted unused variables.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I5b1ad8bb52622217fc3a4ab11ff18b3e8f1376d9
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21757
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoConvert href, if, rt on links payload 29/21629/9
uzchoi [Wed, 26 Jul 2017 09:04:47 +0000 (18:04 +0900)]
Convert href, if, rt on links payload

Previously OCPayloadConvert logic in sever side only convert uri,
types and interfaces for the top level element.
Even if a RepPayload exists in the RepPayload, uri and so on are not
converted.

This patch move the uri, type and interface convert logic into
OCConvertSingleRepPayload which is recrsively called function.

Previous code skipped to convert href in case array payload size is 1
on the top level payload. This logic should be removed at least
considering collection resource with linked-list interface request.
Furthermore, this skip logic is not mandatory code for certification
as of now.

Change-Id: I17b1cc02aed37e9af55126d3af2d28310a3ae733
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21629
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
4 months ago[IOT-2066] refactoring ConvertUuidToStr() 69/21669/7
v.riznyk [Fri, 28 Jul 2017 14:39:56 +0000 (17:39 +0300)]
[IOT-2066] refactoring ConvertUuidToStr()

Change-Id: If5543c617c3f40193604349ea42df82be5645055
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21669
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoMerge branch '1.3-rel' (96293bfd) 65/21765/1
Philippe Coval [Sun, 6 Aug 2017 14:07:46 +0000 (16:07 +0200)]
Merge branch '1.3-rel' (96293bfd)

Relate-to:
https://gerrit.iotivity.org/gerrit/21461
https://gerrit.iotivity.org/gerrit/21425
https://gerrit.iotivity.org/gerrit/21465
https://gerrit.iotivity.org/gerrit/21733

Change-Id: I96293bfdf8f06e9ddc3716ef1fecb5bde04e8d38
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months agoCatch up 1.3-rel on resource scons reformats 61/21461/6
Mats Wichmann [Sun, 16 Jul 2017 15:33:08 +0000 (09:33 -0600)]
Catch up 1.3-rel on resource scons reformats

Some sconscripts got missed pulling reformats over from master.
This changeset is the scripts in resource (except third_party_libs.scons
which was submitted as a separate changeset)

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: If7e0010a29fec3b73812901916726e425c42df1d
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21461
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months agoReformat third_party scons in resource 25/21425/6
Mats Wichmann [Sun, 16 Jul 2017 15:37:59 +0000 (09:37 -0600)]
Reformat third_party scons in resource

This one somehow escaped the pull of reformats from master to 1.3-rel

Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Mats Wichmann <mats@linux.com>
Change-Id: Ia7b8e007f038e31c2bfd21ae9ce86509bebda1c0
Reviewed-on: https://gerrit.iotivity.org/gerrit/21425
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months agoConsistency change to one service scons script 65/21465/3
Mats Wichmann [Sun, 16 Jul 2017 21:24:17 +0000 (15:24 -0600)]
Consistency change to one service scons script

Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Mats Wichmann <mats@linux.com>
Change-Id: I63dc5476662aa8795748b0eb0c7abd78fb86ae79
Reviewed-on: https://gerrit.iotivity.org/gerrit/21465
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months ago[IOT-2463] Fix CTT failure for Get /oic/sec/roles 33/21733/2
Ibrahim Esmat [Tue, 1 Aug 2017 22:47:29 +0000 (15:47 -0700)]
[IOT-2463] Fix CTT failure for Get /oic/sec/roles

Currently the GET request to the /oic/sec/roles resource will fail
with a 400 Bad Request code if the client doesn't have a Public Key
(non-certificate auth) or if the Public Key doesn't match any roles
certificates.

However, that is incorrect since the GET request to the
/oic/sec/roles resource was correct, it just doesn't have any roles
associated with it.

Changed the /oic/sec/roles resource to return an empty "roles" array
if the client doesn't have a Public Key or if the Public Key doesn't
match any roles certificates. At minimum, the return should be:

{
  "roles": [ ],
  "rt": ["oic.r.roles"],
  "if": ["oic.if.baseline"]
}

Testcase: CT1.7.9.1 Verify Security Virtual Resources conform to OIC
Schema

Change-Id: Id71c233875a6ef9e251f2adccd48907e5dedb1a1
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21733
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoMerge branch '1.3-rel' (28c09f73) 29/21729/1
Philippe Coval [Wed, 2 Aug 2017 12:01:48 +0000 (14:01 +0200)]
Merge branch '1.3-rel' (28c09f73)

Relate-to:
https://gerrit.iotivity.org/gerrit/21549
https://gerrit.iotivity.org/gerrit/21373
https://gerrit.iotivity.org/gerrit/21573
https://gerrit.iotivity.org/gerrit/21591
https://gerrit.iotivity.org/gerrit/21595

Change-Id: I28c09f7365cfae2d9d6b2a4d41c6f2da9614fd5b
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months agosecurity: publish securevirtualresourcetypes.h 49/21549/8
Philippe Coval [Wed, 19 Jul 2017 19:47:36 +0000 (12:47 -0700)]
security: publish securevirtualresourcetypes.h

Designate securevirtualresourcetypes.h
as a "Public Experimental" header.

Those headers are needed for C applications in secured mode
(using OCRepPayloadCreate from ocpayload.h)

  Observed error is:
  .../resource/stack/ocpayload.h:42:40: \
  fatal error: securevirtualresourcetypes.h: \
  No such file or directory

For C++ app there is no such requierements

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I6a37fa82e3a1065541dba8be541ff4ac90e3294a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21549
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Martin Rösch <martin.roesch@kistler.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months ago[IOT-2539] remove type-limits warning 81/21681/2
George Nash [Mon, 31 Jul 2017 15:56:12 +0000 (08:56 -0700)]
[IOT-2539] remove type-limits warning

This removes the type-limits warning from caprotocolmessage.c.
The variable optionLength is of uint32_t so the expresion
optionLength >= 0 will always evaluate to true so is not needed.

Change-Id: Ib0e07905db3b1f6112e117854f1e7e0fa9d8da4d
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21681
Reviewed-by: Mats Wichmann <mats@linux.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
4 months ago[IOT-2494] SVR DB Editor : Improve code 73/21573/2
sangjoon.je [Tue, 11 Jul 2017 07:47:09 +0000 (16:47 +0900)]
[IOT-2494] SVR DB Editor : Improve code

Apply c, c++ code standards
Make printf macros

New Feature: https://jira.iotivity.org/browse/IOT-2494
Signed-off-by: sangjoon.je <sangjoon.je@samsung.com>
Change-Id: Iae65b1284d426244c9d9ac3f10691bbda63ac39b
Reviewed-on: https://gerrit.iotivity.org/gerrit/21373
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 8d09aa7a65b9206d02104fe4f105cd59b9a0bcc7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21573

4 months agoAllow empty array in OCRepPayloadSetIntArray 91/21591/6
Abhishek Pandey [Mon, 24 Jul 2017 12:00:14 +0000 (17:30 +0530)]
Allow empty array in OCRepPayloadSetIntArray

[IOT-2458] OCRepPayloadSetIntArray() did not allow empty
array.  Fixed by not returning false when dimTotal is 0
and instead letting the function to get executed when input
array is NULL & dimTotal is 0.

Also fixed the usage of API in easy setup enrollee code.
Now using OCRepPayloadSetIntArrayAsOwner() instead of
OCRepPayloadSetIntArray() as the later duplicates the
memory which can be avoided "by giving payload ownership
to stack".

Added unit test in cbortests to test new API behavior.

Change-Id: If5352b1faf5a9355dd0f8a22882a6af545df6d29
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21591
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
4 months ago[IOT-2464][IOT-2525] Fix UPDATE impl for cred 95/21595/5
Andrii Shtompel [Mon, 24 Jul 2017 16:01:46 +0000 (19:01 +0300)]
[IOT-2464][IOT-2525] Fix UPDATE impl for cred

Change-Id: If167119a1f5c3e49ebc0e01600adb992e79ddbe6
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21595
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
4 months agoMerge "Merge branch '1.3-rel' (0ccb497a)"
Gerrit Code Review [Thu, 27 Jul 2017 18:48:50 +0000 (18:48 +0000)]
Merge "Merge branch '1.3-rel' (0ccb497a)"

4 months ago[IOT-2539] Removed unused-param warning 45/21645/2
George Nash [Thu, 27 Jul 2017 00:17:02 +0000 (17:17 -0700)]
[IOT-2539] Removed unused-param warning

Now that -Werror is turned on for JNI code the error
must be fixed to build. This was missed earlyer
because it is only build when WITH_CLOUD=1 is in the
scons options which is not a default build option.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I7790cba1baa140c3059f0a91b66882425ed5a6cb
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21645
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>
4 months agoMerge branch '1.3-rel' (0ccb497a) 49/21649/1
Philippe Coval [Thu, 27 Jul 2017 07:58:13 +0000 (09:58 +0200)]
Merge branch '1.3-rel' (0ccb497a)

Relate-to:
https://gerrit.iotivity.org/gerrit/21599
https://gerrit.iotivity.org/gerrit/21605

Change-Id: I0ccb497a563c54531593386097b709bb106a17ea
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months ago[IOT-2422] Add unimplemented crl GET handler 99/21599/6
Aleksey Volkov [Mon, 24 Jul 2017 16:34:12 +0000 (19:34 +0300)]
[IOT-2422] Add unimplemented crl GET handler

- This change adds only missing GET query handler to fix CT1.7.9.1 crl related error.

Change-Id: Icff644dba7df6701c4d3e0cabfc6d2f7cb630825
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21599
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
4 months agobuild: prevent unused-parameter warning 29/21429/3
George Nash [Thu, 13 Jul 2017 19:44:40 +0000 (12:44 -0700)]
build: prevent unused-parameter warning

the connectivity bt_le_adapter has auto generates files
  - bluez-glue.c
  - object_manager-glue.c

The files are included when building the connectivity_abstraction
library. This error is only disabled when bt_le_adapter is being
built. We don't want to hide the unused-parameter warning. This
is the simplest way to hide the warning without large changes
in the build.

Change-Id: Ieca1412ab744b7fccf408a80f66ef0add1a91fa6
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21429
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months ago[IOT-2268] cleanup unused-local-typedefs warning 19/21619/3
George Nash [Tue, 25 Jul 2017 16:38:19 +0000 (09:38 -0700)]
[IOT-2268] cleanup unused-local-typedefs warning

The definition used for the OC_STATIC_ASSERT created
an unused typedef with an array of an invalid size
if the assert condition was not met. This resulted
in an unused-local-typedef warning every time
OC_STATIC_ASSERT was used even if it did not cause
a static assert.

The macro was updated to create an enum of 1/condition
if the condition is false this will create a compiler
warning because 1/0 is an invalid value. Its supprisingly
difficult to find a macro that will satisfy C, and C++
for most standard compilers. With out producing a warning.

Also when possible the __COUNTER__ macro is used to create
the unique identifier for the OC_STATIC_ASSERT this
addresses the problem of using the static ASSERT on the
same line. This would have been an issue with the original
way the code was written.

Bug: https://jira.iotivity.org/browse/IOT-2268
Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I4a9cc8d61702eacaddfd1ae5679126af02208f5e
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21619
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months ago[IOT-2538] Add NONSECURE to the ResourceProperty 05/21605/2
George Nash [Mon, 24 Jul 2017 20:02:50 +0000 (13:02 -0700)]
[IOT-2538] Add NONSECURE to the ResourceProperty

This matches the OCResourceProperty value OC_NONSECURE
from octypes.h.

Bug: https://jira.iotivity.org/browse/IOT-2538
Change-Id: I9e536dbb4c3db5c8be9f219a8b95df1176859138
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21605
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agobuild: removed the -Wno-comment build flag 83/21583/4
George Nash [Fri, 21 Jul 2017 20:26:59 +0000 (13:26 -0700)]
build: removed the -Wno-comment build flag

This build flag was added because of the way the
copyright was writen mixed single line and multi-line
comments in many of the files. Resulting in multiple
-Wcomment warnings.  Since the extra forward slashes
`//` in the copyright were not needed. The copyright
was updated so the warning could be re-enabled.

The major reason for the comment warning is to make
sure users are not inadvertantly breaking the
compilers comment parsing. Its possible to
inadvertantly comment out more code than is intended.

With modern editors this is normally not an issue.
It was still easy to fix, so the warning was removed
from the list of ignored warnings.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I605775b498726e7fb3202473a9b8169b7c8c945e
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21583
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>
4 months agoMerge branch '1.3-rel' (be76a752) 87/21587/2
Philippe Coval [Tue, 25 Jul 2017 08:22:36 +0000 (10:22 +0200)]
Merge branch '1.3-rel' (be76a752)

Relate-to:
https://gerrit.iotivity.org/gerrit/21371
https://gerrit.iotivity.org/gerrit/21311

Change-Id: I1d8b6c23f0b1d3393033703bda880493158c5563
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months agomodify repositories for tizen 2.4 mobile 23/21523/5
Youngman [Wed, 19 Jul 2017 05:11:54 +0000 (14:11 +0900)]
modify repositories for tizen 2.4 mobile

currently, 2.4-base repository is for release,
while 2.4-mobile repository is for snapshot.
(mismatch between both repositories)
Both repositories shall be for release.

Change-Id: I94c6eaaba9fba56ca81f56d7973ec4c3f847626a
Signed-off-by: Youngman <yman.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21523
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months agobuild: removed no-unused-parameter warning 81/21581/3
George Nash [Fri, 21 Jul 2017 20:03:18 +0000 (13:03 -0700)]
build: removed no-unused-parameter warning

All unused-parameter warings were cleaned from the
JNI code to make it build for windows.

Change-Id: I8767b8caff5a4f09cdd87f64fce826f868cdc3d0
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21581
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agobuild: warnings as errors in jni code 79/21579/2
George Nash [Fri, 21 Jul 2017 19:46:44 +0000 (12:46 -0700)]
build: warnings as errors in jni code

All build warnings have been cleaned from the
Java JNI code to make sure it continues to build
without warnings we are treating all warnings
as errors.

Change-Id: I05e7d75b81bed25b5f62ba353ff41ea28bca620a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21579
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
4 months agoRevert "Revert "[IOT-2068] EP payload ..."" 71/21371/5
uzchoi [Mon, 26 Jun 2017 05:45:20 +0000 (14:45 +0900)]
Revert "Revert "[IOT-2068] EP payload ...""

including invalid function parameter input

Change-Id: I9af1142ed5fc28794e14dd29d599b7089d167df5
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21371
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
4 months agoTweak main build_common scripts 11/21311/16
Mats Wichmann [Fri, 7 Jul 2017 18:15:37 +0000 (12:15 -0600)]
Tweak main build_common scripts

build_common/SConscript:
  * list of supported target-os not general enough for helpmsg, updated
  * send error msg to stderr by passing it to Exit instead of doing print
  * Use simpler python slicing in Yocto tool setup
  * pull most Add(somekind of construction variable) into one big call
    to AddVariables; name some more arguments for better clarity
  Removed temporarily while chasing Jenkins fails:
  * turn all variables which behave like booleans actually into BoolVariable
build_common/external_libs.scons:
  * a bad combination of options used to "raise" an error, but there is
    no need for a stack bracktrace here, want just a simple msg+exit
  * send error msg to stderr by passing it to Exit instead of doing print
build_common/external_libs.scons
  * send error msg to stderr by passing it to Exit instead of doing print
build_common/linux/SConscript
build_common/windows/SConscript
  * reduce repeated calls to env.get for same key
  * windows: update style to like in linux script

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I928199f005af805cad0b0657ca62411caf7a2500
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21311
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
4 months agoMerge "Merge branch '1.3-rel' (0a92c096)"
Gerrit Code Review [Mon, 24 Jul 2017 08:12:31 +0000 (08:12 +0000)]
Merge "Merge branch '1.3-rel' (0a92c096)"

4 months agoservice: clean up compiler warning 59/21459/2
George Nash [Fri, 14 Jul 2017 20:36:08 +0000 (13:36 -0700)]
service: clean up compiler warning

Clean up the implicit-function-declaration warning in
CoapHttpHandler.c. The compiler is not finding the
OCParsePayload function so it is interpreting it as a
function that takes 4 parameters and returns an int.
This is a result of how old C compilers handle
implicit-functions.

The fact that OCParsePayload was used incorrectly was hidden
it should have 5 parameters not 4.  The code now includes the
internal header ocpayloadcbor.h and fixes the call to
OCParsePayload.

Change-Id: I894e3d423617c15c1ce2cf35825637984d1babd8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21459
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
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: Rick Bell <richard.s.bell@intel.com>
4 months agoresource-encapsulation: Generate CBOR files 81/20681/20
Philippe Coval [Thu, 8 Jun 2017 11:48:13 +0000 (13:48 +0200)]
resource-encapsulation: Generate CBOR files

CBOR files (.dat) are generated
using json2cbor tool at build time.
If not possible they are just copied.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I876b7d16c2f972b656f52f1edaa8a2bc22d994d7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20681
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoMake OCServerRequest rb-tree items linked lists 39/21239/12
Gabriel Schulhof [Sun, 16 Jul 2017 07:33:11 +0000 (10:33 +0300)]
Make OCServerRequest rb-tree items linked lists

If a notification is issued in response to an incoming observe request
then the CAToken_t of the OCServerRequest generated to perform the
notification has the same value as the CAToken_t of the incoming
observe request. Since requests are stored in a red-black tree keyed on
the CAToken_t there can be no duplicates. Thus, the OCServerRequest
corresponding to the notificatin is never added to the OCServerRequest
tree, and when the notification is completed the OCServerRequest
representing the original incoming observe request is removed. When the
application then proceeds to send a response to the original incoming
observe request via OCDoResponse(), the request is not found.

The solution is to allow the OCServerRequest red-black tree nodes to be
linked lists. Thus, for each CAToken_t there may be multiple entries at
that particular node. Only when the last entry at a node is removed is
the node itself removed from the tree.

Making this change also obviates the need to retrieve an
OCServerRequest by handle, since the handle is just the OCServerRequest
itself cast as an OCRequestHandle.

Bug: https://jira.iotivity.org/browse/IOT-2417
Change-Id: I9d39b9483d4dc3f6035ff03ad1962f4a586a6331
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21239
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agocoap-http-proxy: Generate CBOR files from JSON 83/20683/14
Philippe Coval [Thu, 8 Jun 2017 11:49:59 +0000 (13:49 +0200)]
coap-http-proxy: Generate CBOR files from JSON

CBOR files (.dat) are generated
using json2cbor tool at build time.
If not possible they are just copied.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I41dd044ef59a3503232630d52218eae9463dcf8b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agonotification: Generate CBOR files from JSON 83/21083/7
Philippe Coval [Tue, 13 Jun 2017 09:26:06 +0000 (11:26 +0200)]
notification: Generate CBOR files from JSON

CBOR files (.dat) are generated
using json2cbor tool at build time.
If not possible they are just copied.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: Iddf8116454fc9f33d7adfb577619c58e94f9b65b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21083
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
4 months agoMerge branch '1.3-rel' (0a92c096) 75/21575/1
Philippe Coval [Fri, 21 Jul 2017 11:45:18 +0000 (13:45 +0200)]
Merge branch '1.3-rel' (0a92c096)

Relate-to:
https://gerrit.iotivity.org/gerrit/17033
https://gerrit.iotivity.org/gerrit/21509
https://gerrit.iotivity.org/gerrit/21543
https://gerrit.iotivity.org/gerrit/21455
https://gerrit.iotivity.org/gerrit/21569
https://gerrit.iotivity.org/gerrit/21315
https://gerrit.iotivity.org/gerrit/21515
https://gerrit.iotivity.org/gerrit/21527

Change-Id: I0a92c0968c59eae7bae4e94e888124211ecf1bd0
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
4 months agoEasySetup:Fix for static analyzer reported issues 33/21233/4
Harry [Tue, 4 Jul 2017 13:07:48 +0000 (18:37 +0530)]
EasySetup:Fix for static analyzer reported issues

Removal of never used methods and catching exceptions by reference.

Change-Id: I10d3c83ce5b14174b6f82a49897738c98a461af7
Signed-off-by: Harry <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21233
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>