contrib/iotivity.git
7 years ago[Resource-Encapsulation] Removed Linux Secured samples.
Jay Sharma [Wed, 12 Apr 2017 07:31:18 +0000 (13:01 +0530)]
[Resource-Encapsulation] Removed Linux Secured samples.

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

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

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

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

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

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

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

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

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

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

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

Fixed Proxy service build issues.

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

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

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

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

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

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

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

EXCHANGE_LIFETIME value is 247 seconds.

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

Refactor build scripts too

Previously we used revision:
8e210c5808d490b26fff69151c801fa28d291fcb

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fix sense of one test broken in first version.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

No functionnal changes were introduced, just reformated source.

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

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

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

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

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

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

Purpose is to squish recently introduced warnings:

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

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

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

Revised version to reflect review comments.

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

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

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

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

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

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

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

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

Change-Id: I90cc0049c72082a1ce630e9c7bade9d67e1afd0f
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoMerge "[IOT-1785] Merge branch 'iot-1785'"
Greg Zaverucha [Mon, 3 Apr 2017 21:00:53 +0000 (21:00 +0000)]
Merge "[IOT-1785] Merge branch 'iot-1785'"

7 years agobuild: Download gtest 1.7.0 from upstream source
Philippe Coval [Thu, 23 Mar 2017 09:58:37 +0000 (10:58 +0100)]
build: Download gtest 1.7.0 from upstream source

Fedora mirror was used before, as fallback to googlecode repo.
Then upstream relocated to github, and changed (its tarball form),
so it was changed in iotivity's Sconscripts,
but not in that prep.sh scriptlet.

Now everything is aligned to upstream,
and will not be downloaded twice in different forms
(2d one is scons' puller).

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I0778499e96121124df0da536623155d9b049bb2f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18127
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix huge amount of warnings generated by logs
Andrii Shtompel [Thu, 30 Mar 2017 13:06:09 +0000 (16:06 +0300)]
Fix huge amount of warnings generated by logs

Next warning generated by each call OIC_LOG/OIC_LOG_V were removed:
warning: comparison of unsigned expression >= 0 is always true

Change-Id: Ic2c4b8ba0e032255086a0ec6a0c3d3b4d643ae79
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18373
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agotinycbor: Update import to v0.4.1
Philippe Coval [Wed, 29 Mar 2017 16:34:05 +0000 (18:34 +0200)]
tinycbor: Update import to v0.4.1

git "module" was converted to patch this way:

url=https://github.com/01org/tinycbor.git
tag=v0.4.1

git clone  -b $tag  extlibs/tinycbor/tinycbor
rm -rf extlibs/tinycbor/tinycbor/.git
git add -f  extlibs/tinycbor/tinycbor/
git commit -sm "tinycbor: Update import to $tag" extlibs/tinycbor/tinycbor/

Change-Id: I5365b1025b55091f371c4c7d8500b8e9b18f478c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18345
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agostack: Flag OCAdapterStateChangedHandler unused parameter
Philippe Coval [Wed, 29 Mar 2017 14:09:43 +0000 (16:09 +0200)]
stack: Flag OCAdapterStateChangedHandler unused parameter

Change-Id: I5e5c3c288311fc97ee7ea4014228f9d80fef71d6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18337
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoresource: Flag OCRepresentation unused parameters
Philippe Coval [Fri, 24 Mar 2017 01:56:14 +0000 (02:56 +0100)]
resource: Flag OCRepresentation unused parameters

Change-Id: I13da089d0fe2b1fcedc2d4b0c8f3e82e07ff74d6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18165
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRemove incorrect semicolons at end of for loop.
Soemin Tjong [Wed, 29 Mar 2017 23:19:47 +0000 (16:19 -0700)]
Remove incorrect semicolons at end of for loop.

This causes problem establishing all TCP connections to servers.

Change-Id: Icaa4071a27a84b156d2eeea508b70a64a45a649d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18353
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoRevert "Change default vaule of acceptVersion and acceptFormat.". This change has...
Ziran Sun [Mon, 3 Apr 2017 12:55:09 +0000 (12:55 +0000)]
Revert "Change default vaule of acceptVersion and acceptFormat.". This change has broke device discovery in provisioning (See IOT-1987)

This reverts commit feba13f7d0d8a4226e526c092eb050855c2caee8.

Change-Id: I64ff4508bb4583f70f5e6b3d88519b6ba8460e9d
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18455
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoAdd missing null checks [IOT-1190]
veeraj.sk [Tue, 21 Mar 2017 10:13:17 +0000 (15:43 +0530)]
Add missing null checks [IOT-1190]

Add missing null checks after calling OICMalloc and
OICStrdup in bt_le_adapter/linux/client.c, caradapter.c
and ocpayload.c.

Change-Id: I57c82caa0dea117b19b548562fa27bad0b2f3ec6
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18051
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>
7 years ago[IOT-1944] If handshake fails, mbedtls alert sent twice
Andrii Shtompel [Wed, 29 Mar 2017 18:26:17 +0000 (21:26 +0300)]
[IOT-1944] If handshake fails, mbedtls alert sent twice

Change-Id: I5d71be0f7f0fe2e499bd1940083db6cb84e0df75
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18349
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoeasy-setup: Fix Initialization warning (var is char not string)
Philippe Coval [Wed, 29 Mar 2017 07:59:28 +0000 (09:59 +0200)]
easy-setup: Fix Initialization warning (var is char not string)

Observed issue was:

  service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c:262:19: \
  warning: initialization makes integer from pointer without a cast [enabled by default]
  char option = "";

Change-Id: Ib86e46094dee109a82cd483669480dbe97e8c570
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18329
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agobuild: take compiler options from environment
Hauke Mehrtens [Sat, 10 Dec 2016 17:08:05 +0000 (18:08 +0100)]
build: take compiler options from environment

This makes it possible to compile IoTivity with custom compiler
options. This way someone can use optimized compiler settings for the
target CPU. I want to use this in OpenWrt / LEDE to build specific
IoTivity binaries for each CPU architecture, there the build system
provides the matching compiler options.

Change-Id: I86772f73b81c41d7e96e51b434fd9e3b4992753a
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15435
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoWindows: remove cbor exports
Dan Mihai [Fri, 31 Mar 2017 21:30:39 +0000 (14:30 -0700)]
Windows: remove cbor exports

Security sample apps used to need them, but not anymore.

Change-Id: If196e429e2e70ab4f21039faf69774686bc98318
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18417
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years ago[IOT-1785] Merge branch 'iot-1785'
Kevin Kane [Fri, 31 Mar 2017 19:59:42 +0000 (12:59 -0700)]
[IOT-1785] Merge branch 'iot-1785'

Change-Id: I9f8270ab9643dcf203b9fbcd20a37ee482659e16
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years agoMerge branch 'master' into iot-1785
Kevin Kane [Fri, 31 Mar 2017 19:41:13 +0000 (12:41 -0700)]
Merge branch 'master' into iot-1785

Conflicts:

    resource\csdk\security\include\internal\acl_logging.h
    resource\csdk\security\src\aclresource.c

Change-Id: Ide5322ac5c02c82af08586c4dc2fb2ec80b1b301
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years agoCreate PSKs with the correct encoding type
Kevin Kane [Thu, 30 Mar 2017 22:33:16 +0000 (15:33 -0700)]
Create PSKs with the correct encoding type

Encoding/decoding code that currently ignores the value of this
field, but this will change when certificates and role features
are merged in.

Change-Id: Idf8d2b1ffd95d2e517e4da7c76ce767a57ce428d
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18407
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoIOT-1583: Removing boost usage from stack sample.
Pawel Winogrodzki [Wed, 29 Mar 2017 01:00:30 +0000 (18:00 -0700)]
IOT-1583: Removing boost usage from stack sample.

There is no need to have an additional dependency on boost
for the sake of this sample.

Change-Id: I4bc65730aebb62f5b3d0e9edc0ff9ff8ae16a7e2
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18307
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFixed memory leak detected by valgrind
Jaewook Jung [Tue, 28 Mar 2017 00:04:26 +0000 (09:04 +0900)]
Fixed memory leak detected by valgrind

Fixed memory leak detected by valgrind

Change-Id: I96c4d0816ea5be4a90e20af59e64ea3aec454c27
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18227
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1785] Finish role certs feature
Greg Zaverucha [Tue, 28 Mar 2017 23:23:39 +0000 (16:23 -0700)]
[IOT-1785] Finish role certs feature

Add end-to-end testing of role certificate scenario:
- provision role certs
- test role-based ACLs provisioning and enforcement
- test assertion of role certificates

Fix bugs and add new functions as necessary. Added the ROLE_CERT
usage to distinguish role certs (which can't be used for TLS)
from identity certs. Previously they were both saved as PRIMARY_CERT.
Some small changes to save and retrieve role certificates locally. Add
functionality to assert roles (POST the certs to /oic/sec/roles).

Change-Id: I9080e0ca6b0809608621eb8b23dd4bbbfbbb176c
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18219
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoFix defect detected by static code analyzer
YunheeHwang [Wed, 29 Mar 2017 09:45:47 +0000 (18:45 +0900)]
Fix defect detected by static code analyzer

Problem : Dynamic memory referenced by (*set)->actionsetName was allocated by calling malloc and lost without free before exit
Resolve : add OCFREE((*set)->actionsetName) before OCFREE(*set)

Problem : Dynamic memory referenced by payload was allocated by calling function 'OCRepPayloadCreate' and lost without free before exit
Resolve : add OCRepPayloadDestroy(payload) to free them

Change-Id: I2f8bbbd009c567cda8c091ffde925f1692416c9b
Signed-off-by: YunheeHwang <yunhee.hwang@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18259
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoChange default vaule of acceptVersion and acceptFormat.
Ziran Sun [Tue, 28 Mar 2017 14:48:07 +0000 (15:48 +0100)]
Change default vaule of acceptVersion and acceptFormat.

Change the value that was for OIC 1.1 to OCF 1.0.0.

Bug: https://jira.iotivity.org/browse/IOT-1959
Change-Id: Iac714ab5bc410c09f5ca4e20071b9749ce405340
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18263
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-1792] rectified bad check issue in pstatresource
saurabh.s9 [Wed, 29 Mar 2017 04:46:18 +0000 (10:16 +0530)]
[IOT-1792] rectified bad check issue in pstatresource

Change-Id: Id8dbb670961d1efc40114f9de757cd31b296c2d4
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18311
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoVersion option is not associate with application/cbor format.
Ziran Sun [Fri, 24 Mar 2017 15:24:56 +0000 (15:24 +0000)]
Version option is not associate with application/cbor format.

    1. Remove versioing option settings for application/cbor format.
    2. Correct default versioing number value.

Change-Id: Ia9a5f1edfc834a450106eefc4097c60726e4d740
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18167
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
7 years agoFix defect detected by static code analyzer
Parkhi [Wed, 29 Mar 2017 00:52:57 +0000 (09:52 +0900)]
Fix defect detected by static code analyzer

 - Changed return value because function declared void returns a non-void value.

Change-Id: I154e572292d95905ddd222b049cde7e870bd67f8
Signed-off-by: Parkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18305
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd missing exports.
Todd Malsbary [Tue, 28 Mar 2017 23:10:16 +0000 (16:10 -0700)]
Add missing exports.

- OCCreateEndpointStringFromCA needed by resource_directory.lib

Change-Id: Ifdaeb6489dd32d5a9e9cb6b0788dd6ae555b4316
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18301
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agombedtls: Display exceptions on issue
Philippe Coval [Wed, 22 Feb 2017 01:33:02 +0000 (02:33 +0100)]
mbedtls: Display exceptions on issue

To help to understand instability issues:

https://build.iotivity.org/ci/job/iotivity-verify-tizen/8815/

Observed message is:

  mbedtls SConscript: cannot copy
  /home/abuild/rpmbuild/BUILD/iotivity-1.2.0/extlibs/mbedtls/config-iotivity.
h
  to
  /home/abuild/rpmbuild/BUILD/iotivity-1.2.0/extlibs/mbedtls/mbedtls/include/
mbedtls/config.h

Change-Id: I08504251bd7768ff237bb757b82fc6d17d8f6dde
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17417
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoIPCA: Change to not use deprecated APIs.
Soemin Tjong [Mon, 20 Mar 2017 05:57:00 +0000 (22:57 -0700)]
IPCA: Change to not use deprecated APIs.

Use setPropertyValue() instead of deprecated registerPlatformInfo() and
registerDeviceInfo().

Also, not calling setPropertyValue(OC_RSRVD_PLATFORM_ID) as platform ID
is automatically generated by OCStack.

Change-Id: Icf51cb27a408027a26eef51401b8b845cda7311d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18153
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix to print private log in logger.h
jihwan.seo [Thu, 23 Mar 2017 05:12:00 +0000 (14:12 +0900)]
Fix to print private log in logger.h

Change-Id: I25ae59500c9d7fbf18af52afdb96389bcd8f11d8
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18115
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoReenable IPCA unit tests.
Soemin Tjong [Sun, 26 Mar 2017 22:28:44 +0000 (15:28 -0700)]
Reenable IPCA unit tests.

Fix: https://jira.iotivity.org/browse/IOT-1960

Address a couple of items:
Make a snapshot of vector variables for calling back to apps to address
issue with vector update in the middle of callbacks.

Also, properly delete observe handles in the mock library when app
cancels resource observation.  Otherwise the unit tests slow down as
number of test iteration increases.

Change-Id: I0116deb534ddfaa8e29b84a942ba3d95c1986816
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18181
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-1583: Updating libcoap's SConscript.
Pawel Winogrodzki [Fri, 10 Feb 2017 20:24:16 +0000 (12:24 -0800)]
IOT-1583: Updating libcoap's SConscript.

Making changes to extlibs/libcoap/SConscript to switch
to the newest tag.

Change-Id: I31cd7be0e343e5dec2ba28ea36e09e891fcb76d7
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17181
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agozigbee_wrapper: Do IEEE754 test at runtime
Philippe Coval [Wed, 29 Mar 2017 12:44:06 +0000 (14:44 +0200)]
zigbee_wrapper: Do IEEE754 test at runtime

Some systems (Tizen) havent __STDC_IEC_559__ defined
while sizeof(double) = 8, build breaks.

Moving test to run time is more flexible

For the record:
  BUILD_ID=tizen-ivi_20170328.2_ivi-target-odroidxu3
  gcc -dM -E - < /dev/null | grep 559
  #define __GCC_IEC_559_COMPLEX 0
  #define __GCC_IEC_559 0

Change-Id: I427188afcb6178e9a5e15c341185eb1b3d951fc8
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18333
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Tested-by: Joseph Morrow <joseph.l.morrow@intel.com>
7 years agoIOT-1961: Fixing Windows c_common test build environment.
Pawel Winogrodzki [Fri, 24 Mar 2017 22:28:49 +0000 (15:28 -0700)]
IOT-1961: Fixing Windows c_common test build environment.

One test was missing the /W4 and /WX compiler options, because
it was using a default test environment variable.

Change-Id: I095d612e6778576384a4b78abf3a97b958e5f5ee
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18175
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agosecurity: Return error if invalid parameters as provided as input
Philippe Coval [Fri, 24 Mar 2017 10:26:09 +0000 (11:26 +0100)]
security: Return error if invalid parameters as provided as input

This warning was observed with clang on GNU/Linux:

  resource/csdk/security/src/psinterface.c:80:9: \
  warning: expression result unused [-Wunused-value]
  OC_STACK_INVALID_PARAM;

Change-Id: I91b17533ddcf04ba7576a4162f4af4e45755fbb9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18159
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-1785] Finish OCF 1.0 identity certificate support
Greg Zaverucha [Wed, 29 Mar 2017 00:23:07 +0000 (17:23 -0700)]
[IOT-1785] Finish OCF 1.0 identity certificate support

Add unit test to exercise certificate provisioning and use
(previously only provisioning was tested).  Fixed bugs in
credresource and ca_adapter_net_ssl. Configure mbedtls to use
 OCF certificate EKUs. Added more logging in many places. Exposed
 API to remove credentials locally for use by test code.

Change-Id: Ia55c7f3a7518f12c99f60280062f156954bdf4ac
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17983
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoresource: Use global LIBPATH for samples
Philippe Coval [Wed, 22 Mar 2017 14:53:21 +0000 (15:53 +0100)]
resource: Use global LIBPATH for samples

As set in shared file:
resource/c_common/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I4defd1996ed17c8e0701f48ebe54b4de0310442c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18093
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix for invalid discovery query in the RE.
KIM JungYong [Mon, 27 Mar 2017 11:09:03 +0000 (20:09 +0900)]
Fix for invalid discovery query in the RE.

When do discovery with specific uri using RE layer,
RE layer trigger to find resource with invalid uri
which is specific uri without wellknown-uri(/oic/res).

But, resource server never response for this discovery request.
Because discovery request only handled by /oic/res,
other discovery request does not a handled by base stack.

In this patch,
1) Request uri is changed to wellknown uri.
2) Related unit test is modified.

Change-Id: I529430834f8c48b0eb5e31b6f58da33fb55c946c
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18191
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix Cloud ACL CSdk issues
Andrii Shtompel [Fri, 10 Mar 2017 12:33:42 +0000 (14:33 +0200)]
Fix Cloud ACL CSdk issues

1. Rename:
   OCCloudAclIndividualDelete    -> OCCloudAclAcesDelete
   OCCloudAclIndividualDeleteAce -> OCCloudAclIndividualAceDelete
   OCCloudAclIndividualUpdateAce -> OCCloudAclIndividualAclUpdate
   OCCloudAclIndividualUpdate    -> OCCloudAclIndividualAceUpdate

2. Pass OCClientResponse *response to application layer to print
   received payload for every response in release mode

3. Create OIC_LOG_ACL/OIC_LOG_CRL macro instead of printACL/printCRL functions
   (they will print log in modules where TB_LOG enabled)

Change-Id: I2bff159c1cc7ad3620da21a0c2722a3445608a77
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17825
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoFix packet loss related BLE fragmentation & MTU attr value size
jihwan.seo [Thu, 23 Mar 2017 07:57:16 +0000 (16:57 +0900)]
Fix packet loss related BLE fragmentation & MTU attr value size

Change-Id: I26bd9c1303b5f6f4b5bf71a4e5a16989d90fe20b
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18117
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAuto generate platform ID.
Soemin Tjong [Wed, 22 Mar 2017 22:57:10 +0000 (15:57 -0700)]
Auto generate platform ID.

This allows all apps running on a platform (e.g. an installation of OS)
to register with the same platform ID in the platform info.

Applications can override this value by using the regular
OCSetPropertyValue(OC_RSRVD_PLATFORM_ID).

Change-Id: I638ab08a5e0a6319524052b95ac649f167e52a90
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18103
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1900] Implemented read-only pstat.cm
Nathan Heldt-Sheller [Fri, 24 Mar 2017 19:33:36 +0000 (12:33 -0700)]
[IOT-1900] Implemented read-only pstat.cm

Modifies pstatresource.c to change the UPDATE behavior and read-only nature of pstat.cm.

Also changes provisioning manager to write to pstat.tm instead of pstat.cm.

For now, the "cm" Prop just reflects the "tm" Prop.  This will change when
the other aspects are implemented including IOT-1958 fix.

patch set 2: merged the provisioning tool (OBT) changes from 18121;
renamed the map-size consts to make more sense and added comments for
future editors (plus a few TODO items for IOT-1958)

patch set 3: rebase

patch set 4: misc editorial cleanup on pstatresource.c

patch set 5: fix provisioning issue found by Jong-Min (thanks)

Change-Id: I42ef3b1128d34215067d81f2216a8de7a5812371
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18173
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
7 years agofix blocking issue related writeCharacteristic for Android BLE
jihwan.seo [Wed, 22 Mar 2017 07:51:56 +0000 (16:51 +0900)]
fix blocking issue related writeCharacteristic for Android BLE

Change-Id: Ibf3d7cdc69f7b9520a7c2763dd38c6dcc6c64ca1
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18085
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>
7 years agotizen: Depend on profile's bluetooth package if available
Philippe Coval [Mon, 29 Aug 2016 14:59:34 +0000 (16:59 +0200)]
tizen: Depend on profile's bluetooth package if available

This is needed for Tizen:Common (currently major version 3)

Change-Id: I768771e3d6eafe362e4678d3c13be3022eb79f85
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFixed memory leak on ocstack.c
Jaewook Jung [Mon, 27 Mar 2017 08:26:49 +0000 (17:26 +0900)]
Fixed memory leak on ocstack.c

Fixed memory leak on ocstack.c detected by valgrind

Change-Id: Idabf6cc8d0752663f2116f1c543d5879e29bf882
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18187
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix memory leak on ResourceCache Module
YounghyunJoo [Tue, 6 Dec 2016 01:23:10 +0000 (10:23 +0900)]
Fix memory leak on ResourceCache Module

- check memory leaks through Valgrind tool, and fix them

Change-Id: I58fb3356059a55313008fd04519779c35715b421
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15177
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoSet href value of rel=self links correctly.
Todd Malsbary [Thu, 2 Mar 2017 20:22:51 +0000 (12:22 -0800)]
Set href value of rel=self links correctly.

Change-Id: I1904a33e3ae1f41321df003ecd0bf83a6ae9c1e6
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17341
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoClean up error handling in resource directory.
Todd Malsbary [Thu, 9 Mar 2017 04:32:01 +0000 (20:32 -0800)]
Clean up error handling in resource directory.

- Response to /oic/res query of resource directory leaked the database
  handle and associated file descriptors.
- Update/delete transactions could be non-atomic.
- Short-circuit error paths did not clean up properly.

Change-Id: I0a6cb8e8332e4f1d6c960d61c8a39320c1381b5f
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17793
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoresource: Disable logging if not enabled
Philippe Coval [Mon, 13 Mar 2017 08:39:46 +0000 (09:39 +0100)]
resource: Disable logging if not enabled

Curently without logging (LOGGING=False or undefined)
some trace messages are appearing:

  0:
  In entity handler wrapper:

Now with this change those log lines are sent to null stream.

Change-Id: I26892c7ca6efca025c24e762305d59589ca26543
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17869
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd support for application/vnd.ocf+cbor to resource directory.
Todd Malsbary [Wed, 1 Mar 2017 19:52:54 +0000 (11:52 -0800)]
Add support for application/vnd.ocf+cbor to resource directory.

- Add support to RD for publishing and storing endpoints.  Only
  publish secure or non-secure eps depending on resource properties.
- When creating application/cbor response to discovery, create
  separate links with the fully-qualified URI containing the supported
  endpoints.

Change-Id: Ifc370825103a73335eddccb4bbde4225d0a0a736
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17631
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoupdate Doxygen comment for cautilinterface
jihwan.seo [Fri, 24 Mar 2017 06:44:19 +0000 (15:44 +0900)]
update Doxygen comment for cautilinterface

Change-Id: If43415acd3dbb12f090a06d8848ad398b2bf45be
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18157
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd support for application/ocf.vnd+ocf discovery payloads.
Todd Malsbary [Wed, 1 Mar 2017 01:10:38 +0000 (17:10 -0800)]
Add support for application/ocf.vnd+ocf discovery payloads.

- Remove baseURI and add anchor property.
- Plumb content format through to parsing/converting payloads.

Change-Id: I05d2a9263b085dec3683f6345190a4b4574ff2dc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17575
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1921] Remove compiler warning
Dan Mihai [Wed, 15 Mar 2017 23:10:46 +0000 (16:10 -0700)]
[IOT-1921] Remove compiler warning

Some of the compilers complain about static functions that are unused.

Change-Id: I8850112903e8e8e6d55d2465f96fedd4e792a69b
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17949
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoresource-encapsulation: Remove exec permission on sources
Philippe Coval [Mon, 6 Mar 2017 15:40:25 +0000 (16:40 +0100)]
resource-encapsulation: Remove exec permission on sources

Change-Id: Iabb87176a2a6d13fe74e7b92697a3273e8bf9f0c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17697
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
7 years agoMerge branch 'master' into iot-1785
Kevin Kane [Mon, 27 Mar 2017 15:32:09 +0000 (08:32 -0700)]
Merge branch 'master' into iot-1785

Change-Id: I7adad0e43bced555c87a3b3d7f220f2fff79a13a
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years agoFix result of static analyzer in primitive service.
KIM JungYong [Wed, 22 Mar 2017 11:37:31 +0000 (20:37 +0900)]
Fix result of static analyzer in primitive service.

In this patch, unhandled exception in the RC and RE was handled.

Change-Id: If6337a3fa9e9cc2c3a3b055bffe384f90d6b555c
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18091
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agodocs: Update Doxyfiles for c-doc
George Nash [Thu, 23 Mar 2017 16:01:14 +0000 (09:01 -0700)]
docs: Update Doxyfiles for c-doc

- Only the cautilinterface.h from connectivity is currently
  intended as a public API. The documentation directly
  references values defined in cacommon.h. So cacommon.h
  is also included to prevent documentation errors.
- OPTIMIZE_OUTPUT_FOR_C has been changed to yes. This prevents
  the documentation adding things about classes and other
  documentation that does not make since in C only code.
- Updated the Home.txt. The page linked to no longer contains
  getting started guides.

Change-Id: I1bb5d42fcd1287bb0f5614ceb204b1e56f79aa2d
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18137
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix defects detected by static code analyzer
Jihun Ha [Thu, 23 Mar 2017 01:39:24 +0000 (10:39 +0900)]
Fix defects detected by static code analyzer

Checking if a OICMalloc is failed is added.
Calling OICFree to prevent a memory leak is added.

Follow coding convention padding after condition "if ("

Change-Id: Ifdd2ba5f747758bd0120ff396f7441b77a444b81
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17971
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoIPCA: Temporarily disable all unit tests + run.bat revert.
Soemin Tjong [Sat, 25 Mar 2017 00:28:49 +0000 (17:28 -0700)]
IPCA: Temporarily disable all unit tests + run.bat revert.

Observed a few cases of inexplainable unit tests failures today (all
with error 1033).

One example below where all unit tests were completed but scons reported
a failure.

https://build.iotivity.org/ci/job/iotivity-verify-windows-vs2015/11704/consoleText

[----------] 1 test from ElevatorServerStop
[ RUN      ] ElevatorServerStop.Stop
[       OK ] ElevatorServerStop.Stop (1 ms)
[----------] 1 test from ElevatorServerStop (1 ms total)

[----------] Global test environment tear-down
[==========] 31 tests from 6 test cases ran. (311 ms total)
[  PASSED  ] 31 tests.
scons: *** [out\windows\amd64\debug\resource\IPCA\unittests\utresource\ipca\unittests\ipcatests] Error 1033
scons: building terminated because of errors.
Build step 'Execute Windows batch command' marked build as failure

Change-Id: Ic9082e043b70e73e7d7eca20598e4500db5e364d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18179
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1520] Allow MOT to be disabled after it is enabled.
Alex Kelley [Tue, 21 Mar 2017 21:54:23 +0000 (14:54 -0700)]
[IOT-1520] Allow MOT to be disabled after it is enabled.

These changes do the following:
1. Fix updateWriteableProperty to honor the 'mom'
   property any time that it is changed.
2. Rename updateWriteableProperty to
   DoxmUpdateWriteableProperty to clarify its usage.
3. Fix an invalid check in the ProvisioningClient.
4. Added tests to ensure that mom can be enabled
   and disabled when MOT is available.

Change-Id: I97c01a9dc8f44bcf5a6aeac3bf459777c97e19b0
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18109
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1640] [IOT-1641] Fix MOT invalid pin handling
Alex Kelley [Thu, 16 Mar 2017 20:42:13 +0000 (13:42 -0700)]
[IOT-1640] [IOT-1641] Fix MOT invalid pin handling

These changes do the following:
1. Set up PDM for each MOT attempt.
2. Clean up invalid PDM entries on failure.
3. Clean up invalid credentials on failure.
4. Break out success and failure paths for
   MOTDtlsHandshakeCB to simplify code.
5. Update SubownerClient to allow a user to
   provide a preconfigured pin instead of using
   the default preconfigured pin.

Change-Id: I9c4e9b802e6fe6e68da18c34e9150c43ba01c445
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18029
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoRemoved unused function declarations
Jaewook Jung [Fri, 17 Mar 2017 05:03:17 +0000 (14:03 +0900)]
Removed unused function declarations

Removed unused function declarations
 - DeleteActionSets() in oicgroup.h
 - OCRepPayloadAddModelVersion() in ocpayload.h

Change-Id: Ia3109df490f47f6506b3a1a95d23f1017c443648
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17969
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>