iotivity.git
18 months agobuild: Enable proxy for linux_full 53/24353/4
Philippe Coval [Tue, 7 Nov 2017 14:20:52 +0000 (15:20 +0100)]
build: Enable proxy for linux_full

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Id580b4f484be8263ea95375a7a7c62551688b8c5
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/24353/

18 months agoCertificate Logging. 33/24033/4
Steven Saunders [Mon, 29 Jan 2018 18:07:29 +0000 (11:07 -0700)]
Certificate Logging.

Ignore VSCode files in .gitignore.

Change-Id: I6278498245915df370937c69d4835fc8ce980c69
Signed-off-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
18 months agoAnnotate deprecated functions with macro 87/24387/6
George Nash [Tue, 13 Mar 2018 22:57:46 +0000 (15:57 -0700)]
Annotate deprecated functions with macro

If a function was already marked as deprecated using
the @derecated doxygen annotation the OC_DEPRECATED_MSG
macro was added to generate compiler warnings when a
deprecated function was used.

The date the function was deprecated was obtained by
using git blame to find when the @deprecated tag
was added to the function documentation. The date the
tag was added was used in the macro.

Three instances of the function registerDeviceInfo
are marked as deprecated but the macro was not added
due to inheritance and mock objects implementing
their own version of the registerDeviceInfo. Caused
difficulty adding the macro to them without breaking
the build.

An attempt was made to clean up any remaining usages
of deprecated functions that were not part of unit tests.
It is possible that one or more instances of the
'registerDeviceInfo' function was missed.

Java is still using deprecated functions:
IOT-3011 and IOT-3012 to address the fact that Java is
still using deprecated functions.

Change-Id: I39b1af690b99d52f2e0d026e4c27b908e2f6c052
Signed-off-by: George Nash <george.nash@intel.com>
18 months ago[IOT-2052] Update to support OCF 1.0 85/24385/3
v.riznyk [Tue, 13 Mar 2018 16:13:58 +0000 (18:13 +0200)]
[IOT-2052] Update to support OCF 1.0

Update Acl recource with adding partial generating CBOR.

Change-Id: I03853040433e091ecb99daa559e12cd37496b7ad
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
19 months agoSupport Signaling Message for CoAP over TCP 57/24357/14 1.4.0-RC1
Harry [Tue, 6 Mar 2018 17:43:34 +0000 (23:13 +0530)]
Support Signaling Message for CoAP over TCP

Implement signalling messages as per COAP over TCP
spec in RFC 8323

Change-Id: I25baf80c4b4380d1f9f9a8f81281f371927f7ed1
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: Harry <h.marappa@samsung.com>
19 months agoDrop arduino support: SINGLE_THREAD 69/23869/4
Mats Wichmann [Wed, 3 Jan 2018 13:26:33 +0000 (06:26 -0700)]
Drop arduino support: SINGLE_THREAD

After dropping the other iotivity arduino support, the
SINGLE_THREAD usage which was only for the ardunio platform
(not capable of multi-threaded) remains.  Since arduino is
gone, this may be no longer needed.

This change is a followon to https://gerrit.iotivity.org/gerrit/23723
for separate consideration.

Change-Id: Ie72873ba4ba90c10e9d8a41d638b0f7de3f76945
Signed-off-by: Mats Wichmann <mats@linux.com>
19 months agoresource: Declare strict void function 61/23861/8
Philippe Coval [Mon, 13 Nov 2017 14:59:14 +0000 (15:59 +0100)]
resource: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I742ca3720209eec1f58382abdaff88ae08006a0e
Origin: https://gerrit.iotivity.org/gerrit/#/c/23861/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months ago[IOT-2928] Account/Tokens 71/24271/25
Oleksii Beketov [Fri, 16 Mar 2018 16:37:05 +0000 (18:37 +0200)]
[IOT-2928] Account/Tokens

The new cloud provisioning(CR1698v24)

Change-Id: I31873dc510455bc36905a35ea4f629dfdec33fd6
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
19 months agoEasy Setup CoAPCloudConf Resource Update 89/24389/9
Abhishek Pandey [Wed, 14 Mar 2018 13:14:22 +0000 (18:44 +0530)]
Easy Setup CoAPCloudConf Resource Update

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

In the upcoming version of OCF Spec, there are some changes in
definition of CoAPCloudConf Resource (oic.r.coapcloudconf). This patch
is for aligning the same with IoTivity implementation.

Following changes are done in this patch:

1) [Enrollee] Removed setting of Access Token Type (att) in GET
Response Payload.
2) [Enrollee] Removed reading of Access Token Type (att) from POST
Request Payload and passing a default value of "Bearer" to application.
3) [Enrollee] Removed Auth code Property from Enrollee. (this shouldn't
cause any harm).
4) [Mediator] Deprecated Getter and Setter APIs for Auth Code and
Access Token Type from Mediator

Change-Id: I6997b9e1b13cb9cd8bf95777e9984e4a749c87dd
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
19 months agoIOT-3010 Add OCPlatform::getResourceHandleAtUri 81/24381/5
George Nash [Mon, 12 Mar 2018 22:26:26 +0000 (15:26 -0700)]
IOT-3010 Add OCPlatform::getResourceHandleAtUri

This makes is possible to do things like get
the resource at `/oic/d` when to add the device
type.

This helps developers to avoid mixing C and C++
code in their projects.

Updated Cpp samples and unit test code to use
the new function.

Bug: https://jira.iotivity.org/browse/IOT-3010
Change-Id: I781081a5889807cea59ca5b569561da5d7d748e4
Signed-off-by: George Nash <george.nash@intel.com>
19 months agobuild: Check memory.h presence 91/23191/11
Philippe Coval [Tue, 14 Nov 2017 08:01:10 +0000 (09:01 +0100)]
build: Check memory.h presence

Some systems like TizenRT are not providing this header

Bug: https://jira.iotivity.org/browse/IOT-694
Change-Id: I46b118113241c921d7502f640900d2d7537957d9
Origin: https://gerrit.iotivity.org/gerrit/#/c/23191/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months ago[IOT-3007] Delete for /acl and /cred 59/24359/3
Nathan Heldt-Sheller [Thu, 8 Mar 2018 21:23:39 +0000 (13:23 -0800)]
[IOT-3007] Delete for /acl and /cred

Delete should be disallowed in RESET and RFNOP, just like Update is.

This is documented in CR 1805; see JIRA 3007 for details.

Change-Id: Ice108d3efa696b14e23e0e184784f0c17eacc524
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
19 months agoresource-encapsulation: Sync JSON and CBOR files 51/21851/10
Philippe Coval [Thu, 16 Nov 2017 16:52:20 +0000 (17:52 +0100)]
resource-encapsulation: Sync JSON and CBOR files

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

Reminder, It's developer duty to commit those files on each changes on json source or any change that produce a different result

This way we're not leaving inconsistent 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 committed by security team, check status of json and dat files)

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: If35e21b531cc84a6e17a3edcae56bd35d33a8048
Origin: https://gerrit.iotivity.org/gerrit/#/c/21851/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months ago[IOT-2931] additional ACE2 Resource wildcards 39/24339/3
Nathan Heldt-Sheller [Wed, 7 Mar 2018 08:27:03 +0000 (00:27 -0800)]
[IOT-2931] additional ACE2 Resource wildcards

Resource wildcards (*, + and -) are redefined in Bangkok to narrow
scope and reduce the number of Resources to which they apply.  New def'ns
are:
"+" All discoverable NCRs which expose at least one Secure Endpoint
"-" All discoverable NCRs which expose at least one Unsecure Endpoint
"*" All NCRs

Change-Id: Ia5b145cd366c71aea3c4a8716930638430aea711
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
19 months ago[IOT-2930] Device Config Resources 87/24287/5
Nathan Heldt-Sheller [Mon, 5 Mar 2018 21:51:43 +0000 (13:51 -0800)]
[IOT-2930] Device Config Resources

Adds functions to determine if a request is for a DCR; denies
requests for NCRs outside of RFNOP.

Note: the SRMIsSecurityVirtualResourceURI() function is not new, but
moved from secureresourcemanager.h to srmutility.h as it is used in
more than one SRM source file now.

Change-Id: I98c707fc6dcf46e903f6adf1c0485d4484f7a1a9
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
19 months agoresource-encapsulation: Install examples 79/23679/5
Philippe Coval [Thu, 7 Dec 2017 13:14:27 +0000 (14:14 +0100)]
resource-encapsulation: Install examples

Yocto manually installed then,
so let's rely on scons from now on.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Id4a3825bfdf29e2cfddaf15c17451c86c332d2c1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agoOne more certprofile unit test 81/24281/3
Steven Saunders [Mon, 5 Mar 2018 17:29:33 +0000 (10:29 -0700)]
One more certprofile unit test

Change-Id: I0b55256c48fac998018a4a9089630d8b03e03482
Signed-off-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
19 months agoMerge "Merge branch '1.3-rel' (0c441f6)"
C.J. Collier [Wed, 7 Mar 2018 21:05:43 +0000 (21:05 +0000)]
Merge "Merge branch '1.3-rel' (0c441f6)"

19 months agoMerge branch '1.3-rel' (0c441f6) 45/24345/1
Philippe Coval [Wed, 7 Mar 2018 09:46:07 +0000 (10:46 +0100)]
Merge branch '1.3-rel' (0c441f6)

Change-Id: I0c441f6d94474bd18ba8b950d1d94f2523c9f36e
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agonotification: Sync JSON and CBOR files 35/24335/1
Philippe Coval [Tue, 6 Mar 2018 11:51:48 +0000 (12:51 +0100)]
notification: Sync JSON and CBOR files

File is updated after running test.

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: I874c14c46c229ff9d0aee56000bd9c4f68786090
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agoexamples: Sync JSON and CBOR files 27/24327/3
Philippe Coval [Tue, 6 Mar 2018 11:51:48 +0000 (12:51 +0100)]
examples: Sync JSON and CBOR files

File is updated after running test.

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: If8212a54393b74110e6804847b8acaac4c2dce7c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agoIPCA: Sync JSON and CBOR files 01/22001/12
Philippe Coval [Fri, 18 Aug 2017 12:02:40 +0000 (14:02 +0200)]
IPCA: Sync JSON and CBOR files

File is updated after running test.

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: I6570f84ea66652b3cbab7d5182e23cb4d087dbff
Origin: https://gerrit.iotivity.org/gerrit/#/c/22001/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agocoap-http-proxy: Sync JSON and CBOR files 19/24319/2
Philippe Coval [Tue, 6 Mar 2018 11:51:48 +0000 (12:51 +0100)]
coap-http-proxy: Sync JSON and CBOR files

File is updated after running test.

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: I07a7482eab8eef04c26604e0113020d5c62603a1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agocsdk: Sync JSON and CBOR files 15/24315/2
Philippe Coval [Tue, 6 Mar 2018 11:51:47 +0000 (12:51 +0100)]
csdk: Sync JSON and CBOR files

File is updated after running test.

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: I5ef7105eacf52f3c0e5b79fc1a3da77c987ec601
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months ago[IOT-2019] Add missing mutex include. 35/24235/5
Martin Roesch [Tue, 27 Feb 2018 12:31:07 +0000 (13:31 +0100)]
[IOT-2019] Add missing mutex include.

When compiling IoTivity with WITH_CLOUD=true WITH_MQ=PUB,SUB
the aircon_controlee example fails to compile:
In file included from cloud/samples/client/airconditioner/aircon_controlee.cpp:12:0:
resource/csdk/resource-directory/include/RDClient.h:49:21: error: 'recursive_mutex' is not a member of 'std'
     std::shared_ptr<std::recursive_mutex> _csdkLock;

Including the mutex header fixes the issue.

Change-Id: I1aa4a7fcc5b66ea05382dc3a821598abf5a91c0b
Signed-off-by: Martin Roesch <martin.roesch@kistler.com>
19 months agoprovisioning: Include system headers 73/22073/27
Philippe Coval [Thu, 24 Aug 2017 09:56:01 +0000 (11:56 +0200)]
provisioning: Include system headers

This change is just to test infra, can be merged anytime.

Bug: https://jira.iotivity.org/browse/IOT-2279
Change-Id: I2e0e6d80edec94d6cd8050ce42656d8aa86482db
Origin: https://gerrit.iotivity.org/gerrit/#/c/22073/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agoGen/Check certs against Bangkok requirements 77/24077/13
Steven Saunders [Fri, 2 Feb 2018 21:50:23 +0000 (14:50 -0700)]
Gen/Check certs against Bangkok requirements

Change-Id: I3ee0fb005c6c9ce91a0e4c16454b6856c508616f
Signed-off-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
19 months agotinycbor: Update repo url to supported one 53/253/7
Philippe Coval [Sun, 18 Feb 2018 14:29:38 +0000 (15:29 +0100)]
tinycbor: Update repo url to supported one

01org is deprecated

Change-Id: Ief6f9239fa5e7ef383e6c5d432b99187a6ab70f1
Bug: https://jira.iotivity.org/browse/IOT-2279
Origin: https://gerrit.iotivity.org/gerrit/#/c/253/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months agoSupport VS2017 for Building UWP 29/23629/4
Ibrahim Esmat [Fri, 17 Nov 2017 07:00:21 +0000 (23:00 -0800)]
Support VS2017 for Building UWP

Add support for building iotivity UWP with Visual Studio 2017

Change-Id: Ic10d427cc2f5b8fea19905de6c647e40e4f24384
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
19 months agoRevert "Sample implementation of ocf_light" 53/24253/2
George Nash [Wed, 28 Feb 2018 23:19:17 +0000 (15:19 -0800)]
Revert "Sample implementation of ocf_light"

The sample code was not ready to be merged. Needs more improvment before it should be merged.

This reverts commit 138b472a3429e539bf00936e7a16eaad050dda35.

Change-Id: I34f955d4b70a5d4a97e723adb842b78aa4b93e21
Signed-off-by: George Nash <george.nash@intel.com>
19 months ago[IOT-3001]Fix rownerId in PostOwnerCredential 39/24239/3
Aleksey Volkov [Wed, 28 Feb 2018 12:58:08 +0000 (14:58 +0200)]
[IOT-3001]Fix rownerId in PostOwnerCredential

Fix rownerId value in PostOwnerCredential request

Change-Id: I8a18fa99d19709f5ca260fc4ff68b3497e110687
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
19 months agoMerge "Merge branch '1.3-rel' (df031b0)"
C.J. Collier [Thu, 1 Mar 2018 16:02:38 +0000 (16:02 +0000)]
Merge "Merge branch '1.3-rel' (df031b0)"

19 months agoSample implementation of ocf_light 75/23375/18
George Nash [Fri, 9 Feb 2018 22:57:25 +0000 (14:57 -0800)]
Sample implementation of ocf_light

This sample borrows a lot of code from the server
sample generated from the DeviceBuilder project
https://github.com/openconnectivityfoundation/DeviceBuilder

Change-Id: I4fa40119fb8fdc1594905491fa362ae33a7cc7fc
Signed-off-by: George Nash <george.nash@intel.com>
19 months ago[IOT-2762] CreateEndpoint err in secured mode 19/24219/2
uzchoi [Mon, 5 Feb 2018 08:31:58 +0000 (17:31 +0900)]
[IOT-2762] CreateEndpoint err in secured mode

In case of server process and client process exist in a same machine,
ifindex of CAEndpoint_t is different from the ifindex of Request DevAddr
because the ifindex of request DevAddr indicate local loopback in
secured mode while CAEndpoint_t shows physical interface.
This error can be fixed by checking whether the sender is from loopback.
However, some machine shows wrong print in if_indextoname() such as
eth0 instead of lo.
For this reason, I removed the comparison of ifindex. For more exact
check, we can put IP address is from my machine but looks inefficient.

Change-Id: Ic67fd2b4609df5779cb2775f632dca79b2bc7232
Signed-off-by: uzchoi <uzchoi@samsung.com>
19 months agoMLK: Clean 5 stack unittest valgrind leak reports 29/22729/20
Mats Wichmann [Sat, 7 Oct 2017 14:47:32 +0000 (08:47 -0600)]
MLK: Clean 5 stack unittest valgrind leak reports

These are in the test code only.

1/2. The test TEST(LinksPayloadArray, BuildCollectionLinksPayloadArray)
has multiple allocations that are not freed.

  736 bytes in 1 blocks are definitely lost in loss record 962 of 988
  alloc ~3019:  CAGetNetworkInformation(&info, &size);
  added OICFree(info); at function end

  184 bytes in 1 blocks are definitely lost in loss record 922 of 988
  allocated ~3015: OCDevAddr* devAddr = (OCDevAddr*)OICCalloc(1, sizeof(OCDevAddr));
  added OICFree(devAddr); at function end

3. Still in TEST(LinksPayloadArray, BuildCollectionLinksPayloadArray),
  134 bytes in 4 blocks are definitely lost in loss record 901 of 988
  alloc ~3125:   ASSERT_TRUE(OCRepPayloadGetPropString(epsMap[k], OC_RSRVD_ENDPOINT, &outUri));
  outUri is allocated, tested, not freed.

  Added an OICFree at the end of the loop

4/5. two calls to OCRepPayloadGetPropObject happen in a pair of loops;
freeing is outside the loops which means that iterations other than
the last have their allocation lost, not freed.

  252 (48 direct, 204 indirect) bytes in 1 blocks are definitely lost in loss record 929 of 988
  115 (48 direct, 67 indirect) bytes in 1 blocks are definitely lost in loss record 892 of 988

Note for reviewers: some other leak reports for this
unittest were traced to flaws in the stack code, and
were split off into separate commits as a result, since
"approve change to stack" might be quite different than
"approve change to unittest".  See:
https://gerrit.iotivity.org/gerrit/23847
https://gerrit.iotivity.org/gerrit/23849

With the items in this change and the two referenced change,
the 12 "definitely lost" leak reports for the stack
unittest are reduced to two.

Change-Id: I6f1c74eedc6e9be40173bde8c1f321e84dbc83f0
Signed-off-by: Mats Wichmann <mats@linux.com>
19 months ago[IOT-2965] SaveTrustCertChain update 55/23955/2
Oleksii Beketov [Thu, 18 Jan 2018 15:27:43 +0000 (17:27 +0200)]
[IOT-2965] SaveTrustCertChain update

SRPSaveTrustCertChain switched to save root certificate
from optional data to public data.

Change-Id: Ic3584eb41c85d636065c3e78e2cc45aa21fce960
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
19 months agonotification: Declare strict void function 65/23865/5
Philippe Coval [Mon, 13 Nov 2017 15:53:52 +0000 (16:53 +0100)]
notification: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I7740d360a34dc114cf205fdf3a366ea1537c6f9f
Origin: https://gerrit.iotivity.org/gerrit/#/c/23865/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
19 months ago[IOT-2972] Extend linux error-on-warn to C++ 35/24035/7
George Nash [Tue, 6 Feb 2018 23:18:12 +0000 (15:18 -0800)]
[IOT-2972] Extend linux error-on-warn to C++

-Werror, which causes warnings to be treated as errors,
is set in Linux build in CFLAGS, which applies only to
C builds. This moves the -Werror to CCFLAGS so it applies
to both C and C++.

This also fixes build warnings in C++ code a the same time.

OICMiddle/Server.cpp [-Werror=int-in-bool-context]
The logic `&&` was used when `&` should have been used in
the if statment

OCResource.cpp [-Werror=int-in-bool-context]
An enum constant was in a bool context. This was using
different logic if security was enabled vs. when it was
not enabled. The code was changed to use preprocessor
macros instead of the value of OC_SECURED in an if statment.

NSProvider.h and NSProvider.cpp: [-Werror=deprecated]
Throw expresions have been deprecated since C++11. They
were replaced with `nothrow`.

See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3051.html

Since IoTivity's C++ implementation must support C++11
no effort has been made to keep the code backwards compatible
with compilers that do not support the `nothrow` keyword.

CoapHttpParser.c: [-Werror]
This is generated from the Curl code.
When the `CURLINFO_PRIVATE` option is used with the
`curl_easy_getinfo` function the expected argument type is `char **`.
The documentation says it is used like a `void **` but for historic
reasons a `char **` is expected.

To fix the warning a simple type cast is used.

Change-Id: Ia24e1c6df01d39923cbfb6705d0dc0af7d4f3870
Signed-off-by: George Nash <george.nash@intel.com>
19 months agoMerge branch '1.3-rel' (df031b0) 33/24133/5
Philippe Coval [Mon, 12 Feb 2018 08:29:38 +0000 (09:29 +0100)]
Merge branch '1.3-rel' (df031b0)

Relate-to:
https://gerrit.iotivity.org/gerrit/#/q/If8eb4fd34191da7144f39b9e6d1870209d17c9ca

Change-Id: Idf031b02c00bfd1a780243c07bec9cbfbc22fe0c
Bug: https://jira.iotivity.org/browse/IOT-2453
Origin: https://gerrit.iotivity.org/gerrit/#/c/24133/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoignore: Generated .dat files from tests 63/22963/5
Philippe Coval [Fri, 18 Aug 2017 12:24:10 +0000 (14:24 +0200)]
ignore: Generated .dat files from tests

Tests are run from toplevel's dir
and some .dat files are created from them,
and should not be commited,
while those along json files (not in project dir)
should be on changes, and they won't be ignored by this change.

Bug: https://jira.iotivity.org/browse/IOT-2599
Change-Id: I6c0cdde527889390661c14d0dc98dcced702c73d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21995
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit c6bbeacab3d224ff94c9f98dd30d61214780e7b8)

20 months agoFixed unused-param warning in JNI code 43/24143/1
George Nash [Tue, 13 Feb 2018 20:57:44 +0000 (12:57 -0800)]
Fixed unused-param warning in JNI code

Change-Id: I234863733168d6246f899f89c5a7a2b881844347
Signed-off-by: George Nash <george.nash@intel.com>
20 months agoUse cdn instead of download.tizen.org 39/24139/1
C.J. Collier [Tue, 13 Feb 2018 16:38:14 +0000 (16:38 +0000)]
Use cdn instead of download.tizen.org

builds are failing due to connection reset by peer.  Making use of a
distributed package source could fix this.

Change-Id: Id9411eb2c87c4301d360341cb0bf61b1d7fe9002
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
20 months agotizen: Install configuration settings in package 95/23495/4
Philippe Coval [Wed, 22 Nov 2017 01:13:11 +0000 (02:13 +0100)]
tizen: Install configuration settings in package

To track versions config options (SCONSFLAGS)
are shared into dev package.

Also introduce EXTRA_RPM_SCONSFLAGS that could be used outside (ie: rpmbuild)

It will be helpful for ARTIK7 support on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I15a3dcc3d3f74078e561143804562c750d9c4660
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23393/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoiOS: Fix to build iOS Iotivity 1.3-Rel branch 45/23945/7
Yogisha Poojary [Fri, 12 Jan 2018 10:18:08 +0000 (05:18 -0500)]
iOS: Fix to build iOS Iotivity 1.3-Rel branch

Bug: https://jira.iotivity.org/browse/IOT-1897 https://jira.iotivity.org/browse/IOT-2570

Change-Id: If8eb4fd34191da7144f39b9e6d1870209d17c9ca
Signed-off-by: Yogisha Poojary <yogisha.poojary@lnttechservices.com>
20 months ago[IOT-2961] save doxm section 05/24005/5
Oleksandr Dmytrenko [Tue, 9 Jan 2018 15:38:13 +0000 (17:38 +0200)]
[IOT-2961] save doxm section

add json2cbor save doxm section

Change-Id: I2578ebd8162978b489833edc7e6159b30cb851ec
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
(cherry picked from commit 2a46516cf905d3931862b252db84e0d727c9b2ce)
Origin: https://gerrit.iotivity.org/gerrit/#/c/23903/

20 months agoTrap error testing Java version 99/24099/2
Mats Wichmann [Tue, 23 Jan 2018 20:08:24 +0000 (13:08 -0700)]
Trap error testing Java version

In case user is not pointing to correct JAVA_HOME,
the java version check will error out without being
very descriptive.  Catch the error and print a
message.

Change-Id: Ie78bc0882d8f1f1436352c8c1e26307ce2cad731
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit 954bec4b65398540ab6fac43d2ebae98cdc2d6e0)

20 months agotinycbor: Update to v0.5.0 49/24049/2
Philippe Coval [Wed, 31 Jan 2018 10:46:40 +0000 (11:46 +0100)]
tinycbor: Update to v0.5.0

Bug: https://jira.iotivity.org/browse/IOT-1600
Origin: https://gerrit.iotivity.org/gerrit/#/c/24049/
Change-Id: If890fb0afd9362b090a2623b3b8b91f9f2e30af7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agotinycbor: Update to v0.4.2 23/18423/14
Philippe Coval [Thu, 16 Nov 2017 20:16:45 +0000 (21:16 +0100)]
tinycbor: Update to v0.4.2

Expect regressions if applied directly to 1.3.1-RC5

Change-Id: I8637f086795c36b5b049db84f2cb1cf34bbdb1ec
Origin: https://gerrit.iotivity.org/gerrit/#/c/18423/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoMerge "Merge branch '1.3-rel'"
Phil Coval [Thu, 8 Feb 2018 13:05:37 +0000 (13:05 +0000)]
Merge "Merge branch '1.3-rel'"

20 months agoDrop use of two deprecated defines 53/23953/2
Mats Wichmann [Mon, 15 Jan 2018 15:08:15 +0000 (08:08 -0700)]
Drop use of two deprecated defines

Per the header ocstackconfig.h, two defines are
deprecated with replacement. Change the single file
which still uses the old names.  The header comment:

/**
 * Maximum length of the Manufacturer name supported by the server
 * for manufacturer name.
 * @deprecated use MAX_PLATFORM_NAME_LENGTH instead.
 */

/**
 * Maximum length of the URL to the Manufacturer details supported by
 * the server.
 * @deprecated use MAX_PLATFORM_URL_LENGTH instead.
 */

Change-Id: I40ae198120de175750447996ebd43bed9ec25fa8
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agotizen: Guess system arch 89/23689/3
Philippe Coval [Tue, 28 Nov 2017 20:40:19 +0000 (21:40 +0100)]
tizen: Guess system arch

There is no reason to hardcode this,
when It can be guessed at build time.

Even %_arch is not reliable, for instance Fedora-24 on ARTIK7
defines %_arch as "arm".

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I545ba2b5128291951e47f7e98a2932af994187f6
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23497/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoFix memory leak in transportEndpointsPayload 49/23849/3
Mats Wichmann [Sat, 30 Dec 2017 18:34:13 +0000 (11:34 -0700)]
Fix memory leak in transportEndpointsPayload

The internal function transportEndpointsPayload in occollection.c
creates endpoint strings and copies them into a payload.
However, the memory holding the generated string allocated by
OCCreateEndpointString is not freed after the payload copy is
made, and each time through the loop the pointer that refers to
this memory, createdEPStr, goes out of scope so the memory leaks.

valgrind of the stack unittests detected this with the
following leak report:

  264 bytes in 4 blocks are definitely lost in loss record 937 of 988

If traced back, this is triggered in the test for
BuildCollectionLinksPayloadArray, where inside a loop, the
function is called twice;

    linksRepPayloadArray = BuildCollectionLinksPayloadArray("/a/kitchen", false,
    devAddr, false, &arraySize);

    linksRepPayloadArray = BuildCollectionLinksPayloadArray("/a/kitchen", true, devAddr, false,
         &arraySize);

BuildCollectionLinksPayloadArray (not public API) calls
translateEndpointsPayload as described above.

Fix: add OICFree to the stanza where an endpoint string is created
and added with OCRepPayloadSetPropString.

Bug: https://jira.iotivity.org/browse/IOT-2951
Change-Id: Ie1fcbf6dc01479f01134bdb0ace09fa974df80c8
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agoFix resource attribute cleanup function 47/23847/3
Mats Wichmann [Sat, 30 Dec 2017 18:16:45 +0000 (11:16 -0700)]
Fix resource attribute cleanup function

The internal cleanup function OCDeleteResourceAttributes does not
properly account for two of attribute names, which indicate the
matching value will be an OCStringLL, instead freeing them as if
they were strings.  This leads to a memory leak. valgrind on the
stack unittests was showing four side effects of these:

0x4     3 bytes in 1 blocks are definitely lost in loss record 3 of 988
0x5     3 bytes in 1 blocks are definitely lost in loss record 4 of 988
0x259   75 (16 direct, 59 indirect) bytes in 1 blocks are definitely lost in loss record 600 of 988
0x268   76 (16 direct, 60 indirect) bytes in 1 blocks are definitely lost in loss record 615 of 988

If you trace these back in the report they are attributable to
exactly the two tests which use the unhandled cases:

    OCStringLL *ld = NULL;
    OCResourcePayloadAddStringLL(&ld, "en");
    OCResourcePayloadAddStringLL(&ld, "Description");
    OCResourcePayloadAddStringLL(&ld, "de");
    OCResourcePayloadAddStringLL(&ld, "Beschriebung");
    EXPECT_EQ(OC_STACK_OK, OCSetPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_DEVICE_DESCRIPTION, ld));

and

    OCStringLL *dmn = NULL;
    OCResourcePayloadAddStringLL(&dmn, "en");
    OCResourcePayloadAddStringLL(&dmn, "Manufacturer");
    OCResourcePayloadAddStringLL(&dmn, "de");
    OCResourcePayloadAddStringLL(&dmn, "Hersteller");
    EXPECT_EQ(OC_STACK_OK, OCSetPropertyValue(PAYLOAD_TYPE_DEVICE, OC_RSRVD_DEVICE_MFG_NAME, dmn));

The fix is simply to detect these two cases and free them the
proper way.

Bug: https://jira.iotivity.org/browse/IOT-2950
Change-Id: Idf95552035fdbc725a3b7919bb1036e8885e66cd
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agobuild: Install security tools 99/23499/14
Philippe Coval [Tue, 28 Nov 2017 12:13:54 +0000 (13:13 +0100)]
build: Install security tools

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Idb2b2da72104f91d4a1257f571abdea4ca10d88a
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoMerge branch '1.3-rel' 31/24031/3
Philippe Coval [Tue, 6 Feb 2018 11:47:22 +0000 (12:47 +0100)]
Merge branch '1.3-rel'

Arduino files are explicitly removed again

Origin: https://gerrit.iotivity.org/gerrit/#/c/24031/
Change-Id: I0f0508779102ae17bbb739849a029044afaa7923
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agoFix issues dealing with OOM checking in CBOR 03/24003/3
Thiago Macieira [Fri, 26 Jan 2018 07:44:37 +0000 (23:44 -0800)]
Fix issues dealing with OOM checking in CBOR

Since we're doing err |=, the correct way to check for OOM is with &.

TinyCBOR 0.5 is capable of reporting if you added too many or too few
elements to a container. So don't skip adding one: always add them all,
so we can get the actual size you need.

Change-Id: I56b444f9d6274221a3b7fffd150d4c8e2cb6618a
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
20 months agoplugins: Declare strict void function 63/23863/6
Philippe Coval [Mon, 13 Nov 2017 16:16:32 +0000 (17:16 +0100)]
plugins: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I2e4c75799119b3c47eb66c457c109589b5071967
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agotizen: Add dependency to boost for devel package 89/23489/8
Philippe Coval [Tue, 28 Nov 2017 10:43:00 +0000 (11:43 +0100)]
tizen: Add dependency to boost for devel package

Bug: https://jira.iotivity.org/browse/IOT-2541
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Change-Id: Ia37aade9f23db37bb7e86a81e8639d2b6e0300cd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit b5d0182daf8be1a808abd7073df71c836fd51d0f)

20 months agoClean build warnings 65/23965/3
George Nash [Fri, 19 Jan 2018 23:30:31 +0000 (15:30 -0800)]
Clean build warnings

This cleans new build warnings discovered when building
iotivity with GCC 7.2.1

-Werror=format-truncation
Fixed in json2cbor that was a result of incorrect buffer size in snprintf

-Werror=implicit-fallthrough
With the addition of the [[fallthrough]] keyword in C++17 GCC now detects
fallthrough locations. The fallthrough error can be hidden by adding
the comment "fall through" to the case that is falling though.

-Werror=pragmas and -Werror=attributes
are from the external tinyCbor code. We Ignore build warnings from extern
libraries. We may fix the warnings by working witht he external project
but it should not block any work in IoTivity.

Change-Id: I86c9fb42b987858c66698fe48e4c2a405769b004
Signed-off-by: George Nash <george.nash@intel.com>
20 months agobuild: Add all BuildRequires for fedora 69/23369/5
Philippe Coval [Sun, 19 Nov 2017 01:45:23 +0000 (02:45 +0100)]
build: Add all BuildRequires for fedora

This was needed for ARTIK7 on fedora-24

Change-Id: Ice95627b6afdf19f16c1e9277015f63938d2c132
Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/23373/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 5bf81a0cb5afd31d4e589c37c713da03cfc1a74d)

20 months ago[IOT-2961] save doxm section 03/23903/5
Oleksandr Dmytrenko [Tue, 9 Jan 2018 15:38:13 +0000 (17:38 +0200)]
[IOT-2961] save doxm section

add json2cbor save doxm section

Change-Id: I2578ebd8162978b489833edc7e6159b30cb851ec
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
20 months agocoap-http-proxy: Declare strict void function 01/23701/5
Philippe Coval [Tue, 14 Nov 2017 11:04:34 +0000 (12:04 +0100)]
coap-http-proxy: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I175b1790afcd01ea614da707bd51881ed4556a8d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agotizen: Fix typo on chrpath 05/23305/4
Philippe Coval [Thu, 16 Nov 2017 18:42:19 +0000 (19:42 +0100)]
tizen: Fix typo on chrpath

Could be done in scons install too

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I60f4684d17d260e1917fe5840b4eda626c196056
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit df6ca6d52b87dcdae701151a8531479c30c79f5f)
Origin: https://gerrit.iotivity.org/gerrit/#/c/23301/

20 months agocoap-http-proxy: Build shared lib also on linux 43/23243/9
Philippe Coval [Wed, 15 Nov 2017 17:57:55 +0000 (18:57 +0100)]
coap-http-proxy: Build shared lib also on linux

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ie7196851c3e623f383e6727b5cbd1c29cf1ae6ac
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agobuild: Install Extra Files for samples tests etc 71/23471/10
Philippe Coval [Wed, 22 Nov 2017 19:23:27 +0000 (20:23 +0100)]
build: Install Extra Files for samples tests etc

Working tests will be sorted out in later changes,
for now hierarchy is kept.

libcoap is installed as static lib used by com-oic-es-sample.

This was needed for ARTIK7 on Fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Idca20f1ddd00fbaf8c980e959a041397887f123b
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23471/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agorpm: Also support OS without manifest 67/23367/11
Philippe Coval [Sun, 19 Nov 2017 01:08:19 +0000 (02:08 +0100)]
rpm: Also support OS without manifest

This was needed for ARTIK7 on fedora-24

Change-Id: I9a5081fe78299ca57dd2fbfa4efb70b051e4ad28
Bug: https://jira.iotivity.org/browse/IOT-524
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 924f632d0af575193899b872ecddfd0459a8f49a)
Origin: https://gerrit.iotivity.org/gerrit/#/c/23371/3

20 months agoTrap error testing Java version 83/23983/2
Mats Wichmann [Tue, 23 Jan 2018 20:08:24 +0000 (13:08 -0700)]
Trap error testing Java version

In case user is not pointing to correct JAVA_HOME,
the java version check will error out without being
very descriptive.  Catch the error and print a
message.

Change-Id: Ie78bc0882d8f1f1436352c8c1e26307ce2cad731
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agoSquash gcc7 warnings (-> fails) 91/23991/3
Mats Wichmann [Thu, 25 Jan 2018 15:41:05 +0000 (08:41 -0700)]
Squash gcc7 warnings (-> fails)

base64 stuff in iotivity is deprecated, but while it is
only deprecated, not removed, the unit tests should
continue to exist and run.  Thus, the one test source file
should not fail the build due to emitting warnings over
the use of deprecated features.  The pragma works only
for gcc, so protect it from other compilers.

Change-Id: Id5d375c7d0bb601d87134f701d0da9e363c9fd76
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months ago[IOT-2702] provisioningclient selective OTM 75/23875/3
Oleksandr Dmytrenko [Tue, 12 Sep 2017 10:38:46 +0000 (13:38 +0300)]
[IOT-2702] provisioningclient selective OTM

Added provisioningclient menu 21 with selective OTM

Change-Id: Ibda9f863b83c299f240c6a753f8c2ed5c4f533a8
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
20 months agoMerge "Merge branch '1.3-rel' (1484a56)"
C.J. Collier [Fri, 26 Jan 2018 20:01:00 +0000 (20:01 +0000)]
Merge "Merge branch '1.3-rel' (1484a56)"

20 months agoFix more files in service for -Wstrict-prototypes 59/23859/3
Mats Wichmann [Tue, 2 Jan 2018 16:03:16 +0000 (09:03 -0700)]
Fix more files in service for -Wstrict-prototypes

gcc manual:

-Wstrict-prototypes (C and Objective-C only)
    Warn if a function is declared or defined without specifying
    the argument types

One header file was in DOS format, so it looks like everything
changed, the actual change is here:

--- service/notification/include/NSProviderInterface.h.orig 2017-07-18 06:51:48.764314430 -0600
+++ service/notification/include/NSProviderInterface.h 2018-01-02 08:55:35.675185847 -0700
@@ -82,7 +82,7 @@
  * Terminate notification service for provider
  * @return ::NS_OK if the action is requested succesfully
  */
-NSResult NSStopProvider();
+NSResult NSStopProvider(void);

 /**
  * Request to publish resource using remote relay server
@@ -138,7 +138,7 @@
  * Service sets mandatory fields which message id and provider(device) id are filled with.
  * @return ::NSMessage *
  */
-NSMessage * NSCreateMessage();
+NSMessage * NSCreateMessage(void);

 /**
  * Add topic to topic list which is located in provider service storage
@@ -181,7 +181,7 @@
  * Request topics list already registered by provider user
  * @return :: Topic list
  */
-NSTopicLL * NSProviderGetTopics();
+NSTopicLL * NSProviderGetTopics(void);

 #ifdef __cplusplus
 }

Change-Id: I099e0c79196fa3373afdc50477e1ab38cd34c36f
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agoBuild gtest output paths correctly 23/23323/2
Mats Wichmann [Sun, 5 Nov 2017 16:08:49 +0000 (09:08 -0700)]
Build gtest output paths correctly

Currently, when the run_tests function is called twice from the
the same scons script (that is, the script has more than one unit
test binary to register), the GTEST_OUTPUT environment variable
becomes malformed.  This is because the string to add is added
to a list instead of just being appended as a string.  The result
is that while all the test output binaries are expected to go to
BUILD_DIR/test_out, in these cases they go deep down underneath
that directory.  Here are the unexpected paths in an unmodified
testing run:

out/linux/x86_64/debug/test_out/:xml:
out/linux/x86_64/debug/test_out/:xml:/home
out/linux/x86_64/debug/test_out/:xml:/home/mats
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/unittest.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/stacktests.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/cbortests.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/provisiontests.xml

The :xml: is intended as a tag used to signal gtest, it is never
supposed to be part of the real filesystem path.

Note fix was already proposed as part of
https://gerrit.iotivity.org/gerrit/#/c/22275/ but since it's a
distinct error with a very simple fix, wanted to get it pushed
through by itself while that one is under consideration.

Change-Id: I05c57d54034686a7c77c783eab758e7f501e86ea
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit 0d010e4b64ff853fefb6e55038e6ecaa072fc760)

20 months agoRemove unused TIZEN package capi-network-wifi. 47/23347/3
Sushil Yadav [Mon, 12 Jun 2017 07:19:21 +0000 (12:49 +0530)]
Remove unused TIZEN package capi-network-wifi.

The following change has been merged in the master.
https://gerrit.iotivity.org/gerrit/20689

Pushing the change one the 1.3-rel branch as suggested by Phil.

Change-Id: I8d4b8b97d93521174273e08aa9202e6008e6abfe
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Reviewed-by: Jooseok Park <jooseok.park@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/23347/

20 months agocloud: Declare strict void function 55/23855/5
Philippe Coval [Mon, 13 Nov 2017 23:41:47 +0000 (00:41 +0100)]
cloud: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: If11d9a21fe99b96cad21369c6947d7d1c3b6f7c0
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/23855/

20 months agoeasy-setup: Declare strict void function 67/23867/4
Philippe Coval [Mon, 13 Nov 2017 15:44:16 +0000 (16:44 +0100)]
easy-setup: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Idc9e1ac5f318e4324bff6401e38097a6ea9cacda
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months agobuild: install experimental logging headers 51/23051/10
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>
20 months agoSupport VS2017 for Building UWP 85/23985/1
C.J. Collier [Tue, 23 Jan 2018 23:13:41 +0000 (15:13 -0800)]
Support VS2017 for Building UWP

Add support for building iotivity UWP with Visual Studio 2017
This is a manual rebase of Ibrahim Esmat's 23629 to master

Change-Id: I2025aca430deb61e0e3de379cc2c4f48452cff5b
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
20 months agoMerge branch '1.3-rel' (1484a56) 81/23981/1
Philippe Coval [Tue, 23 Jan 2018 19:39:29 +0000 (20:39 +0100)]
Merge branch '1.3-rel' (1484a56)

Relate-to:
https://gerrit.iotivity.org/gerrit/20599

Change-Id: I1484a56df7ed2509cebdc99ec1f908489482a30e
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
20 months ago[IOT-2957] Fix for crash on some Android phones. 59/23959/2
Larry Sachs [Thu, 18 Jan 2018 18:17:13 +0000 (10:17 -0800)]
[IOT-2957] Fix for crash on some Android phones.

Some Android phones (LG, HTC) crashed on removing listeners when
compiled WITH_CLOUD=1.  By reversing the order in which the
listeners were removed, the crash does not occur.

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

Change-Id: I32facaaf9a93ad6d0c7125e791c11618aa527587
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
20 months agoIOT-2966 Do not use -Werror by default 63/23963/2
George Nash [Fri, 19 Jan 2018 19:52:36 +0000 (11:52 -0800)]
IOT-2966 Do not use -Werror by default

Turning on the ERROR_ON_WARN has caused issues for
developers building the code on untested compilers.

We still want the build system to reject new warnings
but we don't want to preven developers from building
on their own system.

Bug: https://jira.iotivity.org/browse/IOT-2966
Change-Id: I69e9d52185db37d283645ee2fb41e39f288a38ef
Signed-off-by: George Nash <george.nash@intel.com>
20 months agoIOT-2399 Normalize run.bat line ending to CRLF 13/23313/2
Way Vadhanasin [Wed, 7 Jun 2017 20:53:12 +0000 (13:53 -0700)]
IOT-2399 Normalize run.bat line ending to CRLF

Windows needs run.bat to have line ending as CRLF and this change
ensures that.

Change-Id: I3f879424b72e101281c2bfe4a03784886332742e
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20599
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 88a4786c3829913d362011093478f450ffaa5ab4)

20 months agoMerge "Merge branch '1.3-rel' (c2772094)"
Ziran Sun [Fri, 19 Jan 2018 13:13:11 +0000 (13:13 +0000)]
Merge "Merge branch '1.3-rel' (c2772094)"

20 months ago[IOT-2957] Fix for crash on some Android phones. 57/23957/3
Larry Sachs [Thu, 18 Jan 2018 18:17:13 +0000 (10:17 -0800)]
[IOT-2957] Fix for crash on some Android phones.

Some Android phones (LG, HTC) crashed on removing listeners when
compiled WITH_CLOUD=1.  By reversing the order in which the
listeners were removed, the crash does not occur.

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

Change-Id: I32facaaf9a93ad6d0c7125e791c11618aa527587
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
20 months agoRemove exec-mode bits from files that do not need 41/23841/3
Mats Wichmann [Wed, 27 Dec 2017 17:50:29 +0000 (10:50 -0700)]
Remove exec-mode bits from files that do not need

Just for cleanup's sake, files that are not intended to
be executed as scripts are no longer marked with execute bits.

Change-Id: I969c5966f916509f9b54dacd1235dbe57af82e08
Signed-off-by: Mats Wichmann <mats@linux.com>
20 months agobridging: Add explicit dependency to libmpm 11/23411/10
Philippe Coval [Wed, 22 Nov 2017 17:16:45 +0000 (18:16 +0100)]
bridging: Add explicit dependency to libmpm

While working on "scons install", static lib were not resolved.
So I found this could be changed separately

Observed issue was:

 Linking shared .../libhueplugin.so
 g++: error: .../out/.../libmpmcommon.a: No such file or directory
 scons: *** [out/.../libhueplugin.so] Error 1

This was needed for ARTIK7 on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ibadd174bd84bcaf48d972fdb3071ba3b03ff1373
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23409
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agotizen: Use OS enrollee 17/23317/13
Philippe Coval [Thu, 16 Nov 2017 18:41:19 +0000 (19:41 +0100)]
tizen: Use OS enrollee

To support fedora-24 for ARTIK7

Change-Id: I8d40700b8f19fcbc71cb3ad3235cda990290792d
Origin: https://gerrit.iotivity.org/gerrit/#/c/23299/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 56ce7b649cdbf2618915d3ff3e3ced376464e343)

21 months agoDrop use of two deprecated defines 41/23941/1
Mats Wichmann [Mon, 15 Jan 2018 15:08:15 +0000 (08:08 -0700)]
Drop use of two deprecated defines

Per the header ocstackconfig.h, two defines are
deprecated with replacement. Change the single file
which still uses the old names.  The header comment:

/**
 * Maximum length of the Manufacturer name supported by the server
 * for manufacturer name.
 * @deprecated use MAX_PLATFORM_NAME_LENGTH instead.
 */

/**
 * Maximum length of the URL to the Manufacturer details supported by
 * the server.
 * @deprecated use MAX_PLATFORM_URL_LENGTH instead.
 */

Change-Id: I40ae198120de175750447996ebd43bed9ec25fa8
Signed-off-by: Mats Wichmann <mats@linux.com>
21 months agoMerge branch '1.3-rel' (c2772094) 37/23937/1
Philippe Coval [Mon, 15 Jan 2018 10:00:38 +0000 (11:00 +0100)]
Merge branch '1.3-rel' (c2772094)

Change-Id: I543dd96d8f524e18194a7f410c4afe42b39155b3
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agobuild: Ship IPCA in Linux RPM 29/23329/7
Philippe Coval [Thu, 16 Nov 2017 18:41:04 +0000 (19:41 +0100)]
build: Ship IPCA in Linux RPM

This was needed for fedora-24 for ARTIK7

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I177a277a07a0684e58f5935b5785de50b3d78af1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agoAdd CONTRIBUTING.md 15/23315/2
Mats Wichmann [Wed, 13 Sep 2017 17:53:02 +0000 (11:53 -0600)]
Add CONTRIBUTING.md

github evaluates the maturity of a project in part by whether it has
certain things set up: a readme, a license, a contributions document
and a code of conduct.  There's no cost to adding the CONTRIBUTING.md
which the github mirror will pick up - it's the content from a web page
(and points to that page as well).

Change-Id: Idb77d3b822482ddc430cf500eca0a6bae5ccc955
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit 140f1b9f0ca98661c582e03289610da3ad77316c)

21 months agobuild: Ship plugins on Linux RPM 45/23245/8
Philippe Coval [Wed, 15 Nov 2017 19:03:34 +0000 (20:03 +0100)]
build: Ship plugins on Linux RPM

This was needed for fedora-24 for ARTIK7

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I1dab992c31013170d2ec068e8ac05ef9c4d9c84a
Origin: https://gerrit.iotivity.org/gerrit/#/c/23271/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit c56974d40fd72b830588c5a5e3412c120c666a57)

21 months agoiOS: Fix to build iOS Iotivity library 1.3.0 55/23655/7
Yogisha_Poojary [Wed, 6 Dec 2017 10:03:15 +0000 (05:03 -0500)]
iOS: Fix to build iOS Iotivity library 1.3.0

Bug: https://jira.iotivity.org/browse/IOT-1897 https://jira.iotivity.org/browse/IOT-2570

Change-Id: If8eb4fd34191da7144f39b9e6d1870209d17c9ca
Signed-off-by: Yogisha Poojary <yogisha.poojary@lnttechservices.com>
21 months agoresource-container: Install examples 85/23685/3
Philippe Coval [Thu, 7 Dec 2017 13:29:45 +0000 (14:29 +0100)]
resource-container: Install examples

Yocto manually installed them,
so let's rely on scons from now on.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I900f68a0aef3709eaac1a81773abea0c85bd0787
Origin: https://gerrit.iotivity.org/gerrit/#/c/23685/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months ago[IOT-2587] occlient sample exits on start 81/23881/2
Harry [Thu, 30 Nov 2017 10:34:54 +0000 (16:04 +0530)]
[IOT-2587] occlient sample exits on start

occlient was exiting on failure of discovery request
by OCDoResource.

Change-Id: I028cb81149ba66f0ea3b55c62016bad531168e3a
Signed-off-by: Harry <h.marappa@samsung.com>
21 months agobuild: Support scons install 13/23413/10
Philippe Coval [Wed, 22 Nov 2017 17:17:00 +0000 (18:17 +0100)]
build: Support scons install

Fixed some Install rules and where they were missued,
InstalTarget and UserInstall* were somehow overlapping.

If prefix is not used, then install to separate folder in tree.

See python comments for more details.

Maybe this could be refactored later, but this change tried
to keep the difference minimal.

Other related fixes are separated in obvious patches.
Instalation of supported examples to come later

This was needed for ARTIK7 on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I2143f41c6dba7356617186f2d9cb68ef82323f5e
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23403/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agoIOT-2793 Add introspection for simpleserver 71/23871/5
George Nash [Fri, 27 Oct 2017 18:59:33 +0000 (11:59 -0700)]
IOT-2793 Add introspection for simpleserver

The light_introspection file was used in the
simpleserver instrospection. The light introspection
contained the oneiota defined interfaces for
BinarySwitch and Brighness. The problem is the
simpleserver does not contain those interfaces.

The simpleserver has a single resource core.light
with three properties name, power, and state.

Change-Id: Ib418b867afcf5d112481542bdd37d5689c1bf235
Signed-off-by: George Nash <george.nash@intel.com>
21 months agoIOT-1375 Add OC_DEPRECATED macros 11/23111/12
George Nash [Thu, 9 Nov 2017 17:50:03 +0000 (09:50 -0800)]
IOT-1375 Add OC_DEPRECATED macros

This add macros that enable marking deprecated for the compiler
This will add compiler specific annotations that will
cause compiler warnings when a deprecated function is used.

Adding the date the function was deprecated, was inspired by
the AllJoyn project. Adding the date a function or class was
deprecated can help when deciding to remove deprecated code.

The doxygen config files were modified to expand the macros
so doxygen properly documents the deprecated function not the
OC_DEPRECATED macro itself.

The macro was then used to mark the base64 implementation
deprecated. Since the base64 implementation is currently placed
in the public header files we should mark it as deprecated giving
other users time to move their code to the mbedtls
implementation.

Change-Id: I6e13e34caf84311e555d19aeb393e922d09d4b59
Signed-off-by: George Nash <george.nash@intel.com>
21 months agotizen: Build optionally as linux using gbs 19/23719/5
Philippe Coval [Fri, 8 Dec 2017 08:30:13 +0000 (09:30 +0100)]
tizen: Build optionally as linux using gbs

For instance:

  gbs build -P profile.tizen_4_0_unified_armv7l --arch armv7l \
    --define 'TARGET_OS linux' \
    --define 'TARGET_ARCH armv7l' \
    --define 'WITH_TEST False'

Bug: https://jira.iotivity.org/browse/IOT-2749
Change-Id: Ib9d179d5d95d77c7f5710e2ca6608e1948cc1c0c
Origin: https://gerrit.iotivity.org/gerrit/23719
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agoMerge "Merge branch '1.3-rel' (acdf0b6)"
Ashok Babu Channa [Wed, 3 Jan 2018 13:26:28 +0000 (13:26 +0000)]
Merge "Merge branch '1.3-rel' (acdf0b6)"

21 months agoresource: simpleserverHQ supports security PS 85/23585/2
Philippe Coval [Fri, 1 Dec 2017 14:12:44 +0000 (15:12 +0100)]
resource: simpleserverHQ supports security PS

By loading credentials and ACL using presistant storage

This was tested on iotivity-1.3.1~RC6 in secured mode

Bug: https://jira.iotivity.org/browse/IOT-2505
Change-Id: If8e2044ae3d8850cc163bca1511de406202b1ab6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>