23 months agoMerge branch '1.3-rel' (5fdb8a1) 33/22733/9
Philippe Coval [Fri, 17 Nov 2017 00:19:39 +0000 (01:19 +0100)]
Merge branch '1.3-rel' (5fdb8a1)

Change-Id: I3040a9e4ab81d6b4485bcb390a643955719ab8f5
Signed-off-by: Philippe Coval <>
23 months agoContinue improving libcoap build script 93/23093/2
Mats Wichmann [Mon, 6 Nov 2017 15:36:01 +0000 (08:36 -0700)]
Continue improving libcoap build script

* The variable-substitution section in building the coap.h
  config file (for the "upstream" version) not working, repaired.
* Move the coap.h comment down to where the work is done for
  easier reading.
* Use "with" statement for file handling (conventions)
* Clean up the glob handling to generate the file lists: use
  scons internal Glob.
* Save the correct coap path into a construction var LIBCOAP_INC.
  Other scripts will later be modified to use this, but as of
  this patch it has no active effect.

Along the way, found build script in plugins was using
WITH_UNFORKED_LIBCOAP (which is never set in the environment)
rather than WITH_UPSTREAM_LIBCOAP - this is adjusted.

Change-Id: I0398b440c5318516578426253a653024f3277fe4
Signed-off-by: Mats Wichmann <>
23 months agoImprove on test/valgrind setup 75/22275/11
Mats Wichmann [Wed, 30 Aug 2017 17:49:49 +0000 (11:49 -0600)]
Improve on test/valgrind setup

Problem: when Jenkins runs the unit_test configuration on Linux,
it looks for files suffixed .xml in the top directory, but it
does not know where they come from, and in a multi-stage run (as
unit_test currently is), since the collection happens only at the
end, there can be some confusion about which results apply to the
"failure count".

As a first stage in cleanup, to avoid programmer errors when
calling run_tests, the filename for the valgrind run is now
generated from the pathname of the test.  Until further cleanup,
the passed filename is ignored and just used as a boolean (that
aspect was already documented - empty string meaning do not
use valgrind).

Whether or not valgrind runs happen was selected based on platform.
An environment flag is added to allow it to be turned of for
small-memory platforms, or for testing whether valgrind is adding
problems (that is, if unit tests fail, can try again with valgrind
disabled to help narrow down where the problem is).

As a note, to combat the "overwrite" effect when unit_test
builder runs non-secure followed by secure build+test, was
attempting to separate those two builds by putting them in
distinct paths, but apparently the path is computed other places
than build_common/SConscript.  android, darwin and tizen all found
some existing instance of the current path style even after it
was changed and so broke.  So as of this commit, this topic is
not addressed.

Change-Id: I57213dce98a9a0f8ced3a18e82d0a51691b024bd
Signed-off-by: Mats Wichmann <>
23 months agobuild: Generate iotivity_config.h in build_dir 89/21989/8
Philippe Coval [Thu, 17 Aug 2017 13:48:20 +0000 (15:48 +0200)]
build: Generate iotivity_config.h in build_dir

The file from "out" dir will be also installed to system include path
using scons install (to /usr/include/ on linux)

Change-Id: Icddfb9354f47fd40ba998fe336b4963be7ade871
Signed-off-by: Philippe Coval <>

23 months agosecurity: Remove Direct Pairing (Again) 69/23069/4
Philippe Coval [Fri, 14 Jul 2017 08:51:47 +0000 (11:51 +0300)]
security: Remove Direct Pairing (Again)

Remove direct pairing and pconfresource

It was reintroduced by mistake in:

Change-Id: Ia71db37f0c2ecbf2d7a62a8363c0949a00000001
Credit-to: v.riznyk <>
Signed-off-by: Philippe Coval <>
2 years agoAdapt gcc version-compare to deal with gcc7, py3 17/23117/1
Mats Wichmann [Thu, 26 Oct 2017 16:02:36 +0000 (10:02 -0600)]
Adapt gcc version-compare to deal with gcc7, py3

cherry-pick because this is causing problems for me.

For gcc starting with 7, gcc -dumpversion returns a single (non
dotted) number. This is actually an illegal version to distutils'
version.StrictVersion, so use LooseVersion instead, where that is a
legal number but the comparison still works fine.

For Python 3.x, subprocess.check_output returns a byte string,
which needs to be decoded before it can be passed to the version
comparator function. Instead of bothering with the decoder, which is
hard to get right so it works for both Py2 and Py3 case, call the new
subprocess.getoutput() method, falling back to check_output if not

Change-Id: I29e1f43f8fbde130103099be1972b574a23442cf
Signed-off-by: Mats Wichmann <>
(cherry picked from commit 754d84d22e253e3b3d54be827d3e8f071bc919b0)

2 years agoMerge "Merge branch '1.3-rel' (5cfded4d) into 'master'"
Dan Mihai [Thu, 9 Nov 2017 20:48:27 +0000 (20:48 +0000)]
Merge "Merge branch '1.3-rel' (5cfded4d) into 'master'"

2 years agoBuild gtest output paths correctly 87/23087/3
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:


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 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 <>
2 years agoWindows: Enable UWP to be built on master 35/23035/2
Ibrahim Esmat [Thu, 26 Oct 2017 21:09:31 +0000 (14:09 -0700)]
Windows: Enable UWP to be built on master

If you are building for UWP, then you can't build and run a regular
desktop program/exe. Therefore, needed tools like json2cbor will
fail to run and the build will fail to generate the .dat files that
are needed.
- Change run.bat to build the win32 version of the security tool
(resource/csdk/security/tool) which will be copied to the uwp output
directory to use for the build.
- Change the security tool SConscript file to check for this when
building for UWP.

Change-Id: I2d83cdf3d78cc73a9e31be2741251d533c1ae93a
Signed-off-by: Ibrahim Esmat <>
2 years agoUpdate default return status to OC_STACK_ERROR. 95/22995/2
Sushil Yadav [Wed, 25 Oct 2017 05:34:44 +0000 (11:04 +0530)]
Update default return status to OC_STACK_ERROR.

Change-Id: I42ab6d08a64fa1a5b60f39384617f00160686afc
Signed-off-by: Sushil Yadav <>
2 years agobuilds: stop defeating Variant dir Part 2/3 79/21979/9
Mats Wichmann [Wed, 16 Aug 2017 14:50:21 +0000 (08:50 -0600)]
builds: stop defeating Variant dir Part 2/3

This intends to pick up only three stray misplaced files from resource/
which were actually also being built in normal sequence in the expected
places and added to their respective libraries there; thus the problem
was a reference from elsewhere in the tree - which turned out to be the
Zigbee wrapper. The files in question are oic_malloc.c, oic_string.c
and logger.c.  There are no executables built in this tree, only some
libraries.  In the original form these files are just built in to the
libraries as follows:

$ ar t out/linux/x86_64/debug/plugins/zigbee_wrapper/telegesis_wrapper/src/libtelegesis_wrapper.a
$ ar t out/linux/x86_64/debug/plugins/zigbee_wrapper/src/libzigbee_wrapper.a
$ ar t out/linux/x86_64/debug/plugins/src/libplugin_interface.a

Binaries should just get these interfaces by linking with libc_common
(for oic_string and oic_malloc) and liblogger (for logger). The unit
test here is the only binary built, and it doesn't seem to need either.

Meanwhile, all the build scripts in plugins were cleaned up a bit.
They now use the SCons #-at-start-of-string reference to refer to
the top of the tree, instead of fetching saved src_dir and joining it
to paths, and a bit of other cleanup also done.

Change-Id: I01d95a757aea8e955fd5af4951e1ba3ad52228d3
Signed-off-by: Mats Wichmann <>
2 years agoUpdate vagrant config to ubuntu 16.04LTS 81/23081/7
Mats Wichmann [Thu, 2 Nov 2017 19:27:37 +0000 (13:27 -0600)]
Update vagrant config to ubuntu 16.04LTS

Provisions the current Ubuntu LTS release with a usable iotivity
build environment.

Also adds commented-out options to provision the other two
current (non-LTS) Ubuntu releases, 17.04 and 17.10

Change-Id: Ia5cda2e77d00de65367a57c1faaf226558a5e7b6
Signed-off-by: Mats Wichmann <>
2 years agoMerge branch '1.3-rel' (5cfded4d) into 'master' 01/23001/2
George Nash [Thu, 26 Oct 2017 00:30:15 +0000 (17:30 -0700)]
Merge branch '1.3-rel' (5cfded4d) into 'master'



Change-Id: Ia7f9297dda815fb518f6d869f8ad94fcae953633
Signed-off-by: George Nash <>
2 years agosecurity: Publish doxmresource.h as experimental 93/21193/10
Philippe Coval [Thu, 14 Jul 2016 22:45:28 +0000 (07:45 +0900)]
security: Publish doxmresource.h as experimental

It was needed by tizen's IoT con, this is replacing downstream patch
that install internal security headers:

tizen: Ship more security headers if enabled

- Add header files related to security

[Philippe Coval]
- If built with security on, ships all headers or none
- To be used by iotcon
- Only ship them if usable (with security flag on)

Change-Id: I9c8edccddec5626119cb3adb39959437ab350413
Signed-off-by: youngman <>
Credit-to: youngman <>
Signed-off-by: Philippe Coval <>
2 years ago[Easy Setup] POST Request Schema Alignment 11/23011/9
Abhishek Pandey [Fri, 27 Oct 2017 15:48:45 +0000 (21:18 +0530)]
[Easy Setup] POST Request Schema Alignment

JIRA IOT-2847:

Updated updateEasySetupResource() to process "rep" property which is
mandatory as per batch schema.

Change-Id: I0371e68106728d375a390ac395c256ea5e2361c6
Signed-off-by: Abhishek Pandey <>
2 years agobuild: Generate iotivity_config.h in build_dir 51/22351/5
Philippe Coval [Thu, 17 Aug 2017 13:48:20 +0000 (15:48 +0200)]
build: Generate iotivity_config.h in build_dir

The file from "out" dir will be also installed to system include path
using scons install (to /usr/include/ on linux)

Change-Id: Icddfb9354f47fd40ba998fe336b4963be7ade871
Signed-off-by: Philippe Coval <>

2 years agobuild: Install headers to iotivity namespace 37/8137/13
Philippe Coval [Fri, 21 Jul 2017 11:52:38 +0000 (13:52 +0200)]
build: Install headers to iotivity namespace

Introducing "iotivity" namespace for headers,
to avoid potential clash in /usr/include on Linux systems.

Developers should rely on pkg-config to look for headers locations,
or/and use "#include <iotivity/*>" in application sources.

Packagers can still symlink to legacy path if needed,
to ensure a smooth transition (See upcoming Tizen/Yocto changes).

For more details please check chapter:

Change-Id: I40533ad76037dc9376724d4e4397e2246d801013
Signed-off-by: Philippe Coval <>
2 years ago[IOT-2854][IOT-2858] anon ciphersuite disable 25/23025/5
Nathan Heldt-Sheller [Fri, 27 Oct 2017 04:21:26 +0000 (21:21 -0700)]
[IOT-2854][IOT-2858] anon ciphersuite disable

Right now the /doxm handler code to disable the anon cipher suite is
not correct, so it's removed in this patch.  Instead, the /cred code disables
the anon suite after calculating PSK.

If there is a request is over secure channel, but requester ID
is Nil UUID, then (in current IoTivity at least) it means that this request
arrived over DTLS established via anon cipher suite.  A successful
connection has taken place, and that's an opportunity to disable the anon cipher
suite so no other anon connections can be made during OTM.

For now, we're just removing the incorrect /doxm code to disable,
and leaving the more aggressive disable timing for another release.

See [IOT-2858] for more info.

Change-Id: I99c2a48abbfc6f3e5aa52385ee5b778c4c80ccfc
Signed-off-by: Nathan Heldt-Sheller <>
2 years ago[IOT-2826][IOT-2851]dat file with zero rownerid 93/22993/11
akk0rd [Tue, 24 Oct 2017 17:59:45 +0000 (20:59 +0300)]
[IOT-2826][IOT-2851]dat file with zero rownerid

Fixed false generating dat file, added wrapper functions with rowner parameter

Change-Id: Ia8badb9b0b78de5f620f8dbad6f070c1276ebf74
Signed-off-by: akk0rd <>
2 years agoIOT-2826 Update *.dat files for samples 21/23021/2
George Nash [Thu, 26 Oct 2017 18:55:30 +0000 (11:55 -0700)]
IOT-2826 Update *.dat files for samples

Both client and the server used the incorrect encoding
for the certificate data. When the server .dat file was
updated with the fix from I did not
update the client .dat file because I had not made any modifications to the client. This then caused the
certificates to miss match. If I run json2cbor on both the client and the server *.json input files the error no
longer occurs.

Change-Id: I8d5acc8a49533b7cca7b5c4f46371e495449aa73
Signed-off-by: George Nash <>
2 years agoIOT-2848 Fix for intermitent read error 19/23019/2
George Nash [Thu, 26 Oct 2017 18:07:03 +0000 (11:07 -0700)]
IOT-2848 Fix for intermitent read error

Valgrind was reporting intermitent read errors
from the provisiontest. I think the result of the
failure was a change made for IOT-2599 the name
of the tests db file was changed from ./dbpath
to ./dbpath.tmp however the name of the file was
used in more than one test.

Change-Id: Id72a07b51aee10abe34a428239ca74dfbf7a2641
Signed-off-by: George Nash <>
2 years agoReturn one error response from RD server. 25/22325/4
Todd Malsbary [Tue, 5 Sep 2017 18:59:16 +0000 (11:59 -0700)]
Return one error response from RD server.

Change-Id: I183ad1a588f3646bd0dc3b370c16cf359552f3eb
Signed-off-by: Todd Malsbary <>
2 years agoFixing Build Errors after applying -Werror 09/23009/6
Abhishek Pandey [Thu, 26 Oct 2017 08:43:31 +0000 (14:13 +0530)]
Fixing Build Errors after applying -Werror

JIRA IOT-2845:

This seems to be side effect of JIRA [IOT-2539]. Build is
breaking on some linux platforms (i.e. i686). Most
compilation errors are related to printf format
specifiers. Probably this wasn't caught by jenkins
when merging patch for IOT-2845 due to its system
configuration matches expected size for all data types.

Fixed the error by using portable format specifiers while

%PRId - for int64_t
%PRIu - for unit64_t
%PRIuPTR - for size_t (unsigned)

Change-Id: I30a21cacdddc84776392100ee783ccbe7e1eae0d
Signed-off-by: Abhishek Pandey <>
2 years ago[IOT-2810] [RE] Static Analysis fix for CPP SDK. 65/22865/2
Jay Sharma [Tue, 17 Oct 2017 12:13:53 +0000 (17:43 +0530)]
[IOT-2810] [RE] Static Analysis fix for CPP SDK.

1. Indentation fixes.
2. Uninitialized variable fixes

Change-Id: Ibccf1bc11e590cf1b282e77cac3a9901ccf29fa2
Signed-off-by: Jay Sharma <>
2 years agoChange OICFree to NSOICFree in notification 99/20899/6
jake [Tue, 28 Mar 2017 05:53:21 +0000 (14:53 +0900)]
Change OICFree to NSOICFree in notification

 - Be used OICFree without NULL checking.

[Philippe Coval]


Change-Id: I1ce65d0e41a3b9f276a2b517d7b3d1c06faa92e6
Signed-off-by: jake <>
Reviewed-by: JungYong KIM <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Phil Coval <>
Reviewed-by: Uze Choi <>
(cherry picked from commit acbf9ffd474b3151a1fc5ea6337b4ad53cc1a081)

2 years agoCT1.7.4.5: Avoid DER key parse error 05/23005/3
Dan Mihai [Thu, 26 Oct 2017 03:09:48 +0000 (20:09 -0700)]
CT1.7.4.5: Avoid DER key parse error

mbedtls_pk_parse_key was not able to parse the key converted to DER
by GetDerKey(). It encountered in the DER an unexpected key format

However, mbedtls_pk_parse_key is able to parse correctly the original
PEM format of the same key.

This patch allows CT1.7.4.5 to establish a connection to an IoTivity
server. This test case still fails later on - to be investigated.

Change-Id: I933ea9d3b761ed159faa2c4f371890e477caf23f
Signed-off-by: Dan Mihai <>
2 years ago[IOT-2837] Enable IoTivity build on Raspbery pi 99/22999/2
Rami Alshafi [Mon, 23 Oct 2017 22:53:01 +0000 (15:53 -0700)]
[IOT-2837] Enable IoTivity build on Raspbery pi

cherry-pick from 1.3-rel

The default arch for the raspberry pi board is either armv6l or
armv7l depending on board hardware version. Neither of them are
included in the valid values for the TARGET_ARCH build option.
The current workaround is to pass TARGET_ARCH=arm to the build
command. This change will enable the default arch.

Change-Id: I7f07734f5e06d79d13275254fb01f924227e229a
Signed-off-by: Rami Alshafi <>
(cherry picked from commit 7ee4eee534723dad6b8ee32e5770b6a6c02a779a)

2 years ago[IOT-2843] remove SVR restore behavior 03/23003/3
Nathan Heldt-Sheller [Thu, 26 Oct 2017 03:06:56 +0000 (20:06 -0700)]
[IOT-2843] remove SVR restore behavior

These functions were applied at incorrect times (e.g. if a normal
Update was rejected due to read-only properties during OTM, the entire
system would "restore" to a wrong state).  They were also wrong,
in that they restored some values, left others unchanged, and set
others to wrong values (e.g. presumed JustWorks OTM).

Also, the duplicate message logic was not being used to any consistent
effect and causing warnings.  It's also completely optional and so was

Change-Id: I23d23f946fbafe02cdc2d2ac6ac46abcedd1f149
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoIOT-2838 Fix javadoc warnings 77/22977/3
George Nash [Mon, 23 Oct 2017 23:31:59 +0000 (16:31 -0700)]
IOT-2838 Fix javadoc warnings

Documented all the functions referencing the native code.

Note the OcProvisioning setPinType method had a return value
int. The was returning the return value of the native call
that was the status. Due to the way the code was writen the
only value that could be returned was when things worked as
expected. All other values were thrown so the return value
was un-needed. The function was changed to have a return type
of void.

Change-Id: I3b5955a336661574dde9f70c87b6ead3dcd5ea7b
Signed-off-by: George Nash <>
2 years agoIOT-2539 Enable the -Werror build flag 11/22811/16
George Nash [Thu, 12 Oct 2017 23:08:53 +0000 (16:08 -0700)]
IOT-2539 Enable the -Werror build flag

The coding standard states:
Code must compile with no warnings. Without flags
forcing warnings off.

Its possible that using an untested version of gcc could
result in build warings that are not yet fixed. For this
reason the build option ERROR_ON_WARN was added to make
it possible to turn off the -Werror flag. This should
only be used locally an not changed on the CI build.

Due to some bugs in older version of gcc some warnings
are forced off when using an older version of gcc.

This change will force code to follow the coding
standard of building with no warnings.

The coapHttpParser code produces a build warning
that currently is not solved. When building the
coap_http_proxy library the -Werror build flag is

Don't use the -Werror build option for extlib yaml

Don't use the -Werror build option for coap library

Change-Id: Ifcc25ed7e5b8637ac4383a7bfa51ace105ed9458
Signed-off-by: George Nash <>
2 years agoUpdate security .dat files 19/22919/3
Mats Wichmann [Thu, 19 Oct 2017 19:14:51 +0000 (13:14 -0600)]
Update security .dat files

After recent changes to either the json2cbor tool or to the source
security files, the checked-in .dat files no longer match what
is being generated. Check in the ones that show changes.

Change-Id: I78a1e3032057261630f54b8dc608863c1b6dc216
Signed-off-by: Mats Wichmann <>
2 years agoChanges to support Python 3 87/22787/16
Mats Wichmann [Wed, 11 Oct 2017 16:30:22 +0000 (10:30 -0600)]
Changes to support Python 3

SCons 3 works with Python 3.x.  Try to eliminate places where the
scons scripts don't work with Py3.  The most "interesting" one is that
subprocess calls to run an external system command do not return a
string, so if we need to do "if substring in string" type queries on
the subprocess return, we need to call a decoder method to turn it into
a string. SCons provides SCons.Util.to_String for this purpose.

Also on strings, there is no longer a 'string_escape' encoder, Py3
strings are unicode so 'unicode_escape' is available. This is handled
with a try block.

Another change is in lambda usage: Python 3 abolished tuple argument
unpacking, and since lambdas only take a single argument usages which
look like multiple arguments (but are actually a tuple), this has an
effect in a couple of places.  The 2to3 tool suggested the changes here.

The local imports in build_common/iotivityconfig were changed to use
the relative-import syntax (a preceding dot). This has been around for
a long time, so causes no problem for Python 2 (in since 2.4).

Python 3 eliminates the cmp method, so the call to sort the help
message by argument name generated a syntax error.  It turns out
the sort named argument can also take a boolean value (undocumented;
scons3 docs will fix that for next release), so instead set sort=True.

Change-Id: I0582e99a83f6ca5246dc566727c0b04b5ed4199b
Signed-off-by: Mats Wichmann <>
2 years agobuild: variant-dir fix in IPCA 27/22727/4
Mats Wichmann [Fri, 6 Oct 2017 22:23:29 +0000 (16:23 -0600)]
build: variant-dir fix in IPCA

One more place turned up where build happens in src dir instead of
in variant dir, which impacts parallel builds of different flavors.
It seems that placing a source file from another part of the
project into the source list defeats the variant dir.  This proposal
takes it out and linked to the library it appears in instead.

Change-Id: I73283fb854fd899e5609017f2bb8a52fc8c00675
Signed-off-by: Mats Wichmann <>
2 years agoMerge "Merge branch '1.3-rel' (9cff398) into 'master'"
Ashok Babu Channa [Wed, 25 Oct 2017 05:24:53 +0000 (05:24 +0000)]
Merge "Merge branch '1.3-rel'  (9cff398) into 'master'"

2 years ago[IOT-2830] add PSK callback logging 53/22953/6
Nathan Heldt-Sheller [Mon, 23 Oct 2017 06:48:32 +0000 (23:48 -0700)]
[IOT-2830] add PSK callback logging

See JIRA IOT-2830 for more information.

Change-Id: If043f6705ccdede4630b469c13e1933a2b53af16
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoIOT-2455 Add missing files to javadoc 75/22975/3
George Nash [Mon, 23 Oct 2017 22:03:55 +0000 (15:03 -0700)]
IOT-2455 Add missing files to javadoc

Change-Id: I1415ec047ebc8ce4f2679b8789a104c627ec2db4
Signed-off-by: George Nash <>
2 years ago[IOT-2837] Enable IoTivity build on Raspbery pi 79/22979/2
Rami Alshafi [Mon, 23 Oct 2017 22:53:01 +0000 (15:53 -0700)]
[IOT-2837] Enable IoTivity build on Raspbery pi

The default arch for the raspberry pi board is either armv6l or
armv7l depending on board hardware version. Neither of them are
included in the valid values for the TARGET_ARCH build option.
The current workaround is to pass TARGET_ARCH=arm to the build
command. This change will enable the default arch.

Change-Id: I7f07734f5e06d79d13275254fb01f924227e229a
Signed-off-by: Rami Alshafi <>
2 years agoBuild and print fix 33/22033/17
Oleh Vasyliev [Tue, 10 Oct 2017 11:02:52 +0000 (07:02 -0400)]
Build and print fix

Change-Id: Ie7b0a00963b22ee1189918ed67ed64ae05f500cf
Signed-off-by: Oleh Vasyliev <>
2 years ago[IOT-2821] Fix /doxm Update handling 51/22951/7
Nathan Heldt-Sheller [Sun, 22 Oct 2017 23:27:25 +0000 (16:27 -0700)]
[IOT-2821] Fix /doxm Update handling

The Update handler is still doing things such as
self-updating /doxm.rowneruuid or /doxm.owned.  Also, the
logic for determining OTM start/stop is wrong.  This patch
cleans up the JustWorks flow as a template, and the same
fix will be applied to Random PIN and Cert-based once
verified and reviewed.

Change-Id: Ieb68911de87cf816597352aec760b3ef85baa87d
Signed-off-by: Nathan Heldt-Sheller <>
2 years ago[IOT-2835] reset /cred.rowneruuid 73/22973/2
Nathan Heldt-Sheller [Mon, 23 Oct 2017 15:54:19 +0000 (08:54 -0700)]
[IOT-2835] reset /cred.rowneruuid

The fix to /cred.rowneruuid (from many to one) means we have to reset the
single global rowneruuid also.

Change-Id: I309e5bfe9926290785d4943d2b9358fc06448a20
Signed-off-by: Nathan Heldt-Sheller <>
2 years ago[IOT-2827] Fix For OCProvisionACL Bug 29/22929/2
imtiaz.h [Fri, 20 Oct 2017 06:00:00 +0000 (12:00 +0600)]
[IOT-2827] Fix For OCProvisionACL Bug

1. for selectedDeviceInfo = NULL api returns OC_STACK_INVALID_PARAM

Change-Id: Idb316438a76d70fcc7a91a2e119aadd0c771bde7
Signed-off-by: imtiaz.h <>
2 years ago[IOT-2833]Sync java ESResult with C++ one. 65/22965/1 1.3.1-RC4
Harry [Mon, 23 Oct 2017 12:23:03 +0000 (17:53 +0530)]
[IOT-2833]Sync java ESResult with C++ one.

Java ESResult is not in sync with C++ SDK ESResult
enum values.

Change-Id: I0ab0e1ba88858fc8c511a56d046d40c1708760cd
Signed-off-by: Harry <>
2 years ago[IOT-2806] patch 22855 overwritten mistakenly 49/22949/3
Nathan Heldt-Sheller [Fri, 20 Oct 2017 23:54:15 +0000 (16:54 -0700)]
[IOT-2806] patch 22855 overwritten mistakenly

A recent patch over-wrote the fix to 2806 (patch 22855)
so this is just a re-creation of 22855.  However gerrit
can't figure out how to re-apply 22855, and I don't know how to
force it, so I'm just creating a new patch.

Change-Id: I5c4b67a3cdfa1f9a4368fc8f7b24203da1644524
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoIOT-2539 clean unused-result warnings 23/22923/3
George Nash [Thu, 19 Oct 2017 20:35:05 +0000 (13:35 -0700)]
IOT-2539 clean unused-result warnings

the -Werror=unused-result is due to not checking the return
value when using scanf. This error is specific to certan
versions of the compiler and may not occure on all systems.

Change-Id: Ifcaa05f7f7df69da84bd3a514ad3f29a63955b02
Signed-off-by: George Nash <>
2 years agoSync CACloneResponseInfo with CAResponseResult_t. 81/22881/2
Todd Malsbary [Tue, 17 Oct 2017 21:21:50 +0000 (14:21 -0700)]
Sync CACloneResponseInfo with CAResponseResult_t.

Change-Id: I43631fe750b529b6e90dd625c160717c854a2100
Signed-off-by: Todd Malsbary <>
2 years agoresource: Enable OCRepresentationSubscript test 25/21825/11
Ziran Sun [Tue, 23 Aug 2016 15:05:50 +0000 (16:05 +0100)]
resource: Enable OCRepresentationSubscript test

Retest OCRepresentationSubscript.Boolean unit test.

Change-Id: Ibe291d4b0f6371235ba7397b186a87ef8939beab
Signed-off-by: Ziran Sun <>
Reviewed-by: Phil Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Ashok Babu Channa <>
(cherry picked from commit fa632fb35a6670da9ffd4cdfd1bc2da5592cd629)

2 years agoIOT-2539 Fix warnings in routing code 35/22935/2
George Nash [Fri, 20 Oct 2017 20:04:01 +0000 (13:04 -0700)]
IOT-2539 Fix warnings in routing code

Fixed -Werror=unused-const-variable= found in
routingtablemanager.c the USECS_PER_SEC was not
used anywhere and was removed.

Fixed -Werror=format= found in routingmanager.c
current time is a uint64 from inttypes.h
%llu is long long unsigned.

C99 spec suggests the type long long int should
be at least 64 bits but may be more.  On some
platfroms it might be 128-bits. In printf %lld
could be interpreted as 64-bits or 128-bits which
could result in undefined behavior.

The PRIu64 macro from inttypes will always be interpreted
as 64-bits by printf.

Change-Id: Iaf45d5a8382c4af8f3db973700db1d90b4472cc1
Signed-off-by: George Nash <>
2 years agoMerge branch '1.3-rel' (9cff398) into 'master' 37/22837/3
George Nash [Fri, 13 Oct 2017 22:13:09 +0000 (15:13 -0700)]
Merge branch '1.3-rel'  (9cff398) into 'master'



Change-Id: I8a378b98876e916a3940fc707f3bfad1afcbf9c6
Signed-off-by: George Nash <>
2 years agoMerge "Merge branch '1.3-rel' (3040a9e)"
Ashok Babu Channa [Fri, 20 Oct 2017 21:24:04 +0000 (21:24 +0000)]
Merge "Merge branch '1.3-rel' (3040a9e)"

2 years agoIOT-2539 clean unused-function in caleadapter.c 33/22933/1
George Nash [Fri, 20 Oct 2017 19:46:07 +0000 (12:46 -0700)]
IOT-2539 clean unused-function in caleadapter.c

The static functions:

Are all only called if both ROUTING_GATWAY and
SINGLE_THREAD are not defined. When the are not
called gcc will produce the -Werror=unused-function

Rather than spatering the macros all over the file
I moved all of the functions into a single block

The code in the functions are not modified.

Change-Id: Ic15e4e91028b87fb8d2680f2e64c724d1fae25cc
Signed-off-by: George Nash <>
2 years ago[IOT-2821] implicit access for DOXS, AMS and CMS 21/22921/4
Nathan Heldt-Sheller [Thu, 19 Oct 2017 20:23:07 +0000 (13:23 -0700)]
[IOT-2821] implicit access for DOXS, AMS and CMS

There are a few cases of missing implicit access that are
added by this patch:
1) DOXS has access to all SVRs
2) AMS and CMS have access to /pstat

Change-Id: I7eebc86c88b392dc2a6447c64f3a216afee70b19
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoRelocate rd-mode-dependent functions in .def files 05/21505/8
Gabriel Schulhof [Tue, 11 Jul 2017 20:52:25 +0000 (23:52 +0300)]
Relocate rd-mode-dependent functions in .def files

OCBindResourceInsToResource and OCGetResourceIns are only defined if
RD_MODE is either "client" or "server", but not if it is "none". Thus,
octbstack_product.def must not include those functions.

Change-Id: I88bbf033006e82d1655d39d7f3127a1e40a1d4e7
Signed-off-by: Gabriel Schulhof <>
Reviewed-by: Alex Kelley <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit f4fb7430a9b9a6601b80634d96b8a08fed42802b)

2 years agoIOT-2539 clean unused-function in caleadapter.c 83/22883/4
George Nash [Tue, 17 Oct 2017 21:25:20 +0000 (14:25 -0700)]
IOT-2539 clean unused-function in caleadapter.c

The CAInitLEServerQueues functions was moved
moved within the ifndef SINGLE_THREAD macros
since that is the only time the function is

Change-Id: Ic942b096eb5bffd2ac17b613afebbfa947a158b7
Signed-off-by: George Nash <>
2 years agoFix typo causing build break for TARBZ 25/22925/2
Dan Mihai [Thu, 19 Oct 2017 20:39:48 +0000 (13:39 -0700)]
Fix typo causing build break for TARBZ

Change-Id: I91e0210a03683041600ff26e3fd09b5bde19123d
Signed-off-by: Dan Mihai <>
2 years ago[IOT-2726][IOT-2107] doxm POST handler fix 19/22619/19
Oleksandr Dmytrenko [Wed, 27 Sep 2017 11:59:06 +0000 (14:59 +0300)]
[IOT-2726][IOT-2107] doxm POST handler fix

Fixed doxm POST handler modifies values without request from OBT

Change-Id: I4631063002ebf830160b772f55c9a9f139b78dbc
Signed-off-by: Oleksandr Dmytrenko <>
Signed-off-by: Dan Mihai <>
2 years agoIOT-2539 clean unused-function in credresource.c 79/22879/3
George Nash [Tue, 17 Oct 2017 21:14:53 +0000 (14:14 -0700)]
IOT-2539 clean unused-function in credresource.c

When built with build option SECURED=0 some functions
are no longer used due to preprocessor macros.

The functions WithinBounds and IsEmptyCred were moved
within the
if defined(__WITH_DTLS__) || defined(__WITH_TLS__)

Change-Id: I9c0e3fa57dee5531bd9661216f2b5160fb002f33
Signed-off-by: George Nash <>
2 years agoIOT-2443 Fix simpleserver acls for non-secure 15/22915/2
George Nash [Wed, 18 Oct 2017 22:47:29 +0000 (15:47 -0700)]
IOT-2443 Fix simpleserver acls for non-secure

Fix the simplerserver acls so the non-secure run
option will also work as well as the secure option.

Change-Id: I27b8aaf3db0ece5ad08a16d451cecb26fe8cd3a7
Signed-off-by: George Nash <>
2 years ago[IOT-2820] make /pstat.dos.p read-only 95/22895/3
Nathan Heldt-Sheller [Wed, 18 Oct 2017 05:59:59 +0000 (22:59 -0700)]
[IOT-2820] make /pstat.dos.p read-only

The Parameter "p" in the /pstat "dos" Property is meant
to be read-only in every Device Onboarding State.  This
fixes the Update handler to treat "p" as read-only.  It
also fixes the pstat->CBOR marshaling code to provide the
option to omit "p". And it updates the provisioningclient
code to omit "p" from Updates to /pstat.

Change-Id: I25a92bd33e5476d7d5896021e42102762deb6c31
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoWindows: Avoid using NULL event handle 05/22905/2
Dan Mihai [Wed, 18 Oct 2017 15:36:50 +0000 (08:36 -0700)]
Windows: Avoid using NULL event handle

Avoid using NULL event handle during catests.

Change-Id: I7e7d2ef95e8141082f7694735f20a77d773b42b4
Signed-off-by: Dan Mihai <>
2 years agoIOT-2539 Fix -Wmissing-field-initializers 91/22891/2
George Nash [Tue, 17 Oct 2017 22:57:15 +0000 (15:57 -0700)]
IOT-2539 Fix -Wmissing-field-initializers

Fix the missing-field-initializers warning in the
simulator code. OCDeviceInfo contains four
values not two.

Change-Id: Ifab39f7a5eb054eeb301cece2123e9cc6d19011c
Signed-off-by: George Nash <>
2 years agoresource-directory: free unusued endpoints 69/22069/10
Philippe Coval [Tue, 22 Aug 2017 08:56:42 +0000 (10:56 +0200)]
resource-directory: free unusued endpoints

Fix ~2Kb MLK in rd_client.c:

  2,208 bytes in 1 blocks are definitely lost in loss record 1,056 of 1,061

  oic_malloc.c:102: OICCalloc
  cainterfacecontroller.c:643: CAGetNetworkInfo
  canetworkconfigurator.c:297: CAGetNetworkInformationInternal
  caconnectivitymanager.c:298: CAGetNetworkInformation
  rd_client.c:266: RDPublishPayloadCreate
  rd_client.c:383: OCRDPublishWithDeviceId
  rd_client.c:139: OCRDPublish
  rdtests.cpp:253: RDTests_RDPublishMultipleResources_Test::TestBody()

It was detected in:

Change-Id: I5c59f998a5b1f616fbcde27d3a215694c5bd0422
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Larry Sachs <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Habib Virji <>
Reviewed-by: Ashok Babu Channa <>
(cherry picked from commit 3a7fb5418f8276d80bf8d83ba2db1c0dd6cfb665)

2 years agoDelete client callback with OCCancel. 93/22093/7
Jaehong Jo [Tue, 23 May 2017 05:44:50 +0000 (14:44 +0900)]
Delete client callback with OCCancel.

Change-Id: I3bde95b535fcbfd3290a7b9ae0610c3e9333be7a
Signed-off-by: Jaehong Jo <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 94429e77972ccabbbaed53a850d4de27fa56de9c)

2 years agoIOT-2539 Clean -Wunused-parameter simulator 89/22889/2
George Nash [Tue, 17 Oct 2017 22:22:54 +0000 (15:22 -0700)]
IOT-2539 Clean -Wunused-parameter simulator

Remove the unused-parameter warning from the simulator code

Change-Id: Id1c3757e41443ae53126ac1ef1117e387f564327
Signed-off-by: George Nash <>
2 years agoIOT-2539 Fix -Wswitch simulator 93/22893/2
George Nash [Tue, 17 Oct 2017 23:20:04 +0000 (16:20 -0700)]
IOT-2539 Fix -Wswitch simulator

Fixed the switch warning in the simulator code.

In the request_model_builder the other posible values
for the switch are not expected if they occure print
an error and exit assert. Just in case it is a release
build an empty string is returned.

In simulatory_utils the un-handled case statments were
added to the switch.

Change-Id: Iebb79bd22410727c65c33ed73ec8704a1b8a33a4
Signed-off-by: George Nash <>
2 years ago[IOT-2789]Fix for NS sample crash 99/22899/3
abitha.s [Wed, 18 Oct 2017 09:02:47 +0000 (14:32 +0530)]
[IOT-2789]Fix for NS sample crash

Change-Id: I4aa2f68b36b70946c0bcee0e9da04feef596ea85
Signed-off-by: abitha.s <>
2 years agocsdk: Update OCByteStringCopy documentation 79/22779/2
Philippe Coval [Mon, 2 Oct 2017 16:20:56 +0000 (18:20 +0200)]
csdk: Update OCByteStringCopy documentation

Change-Id: Ie747f5512d12f782a3331c8eaf00984a63605b85
Signed-off-by: Philippe Coval <>
2 years agoresource-container: Enable -Wnoexcept for g++ only 61/22061/5
Philippe Coval [Thu, 20 Jul 2017 12:10:12 +0000 (14:10 +0200)]
resource-container: Enable -Wnoexcept for g++ only

As not supported on clang-3.5

Change-Id: I7bb4f53a0a0e2eba56e670f87ac163a211173fb6
Signed-off-by: Philippe Coval <>
Reviewed-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 99bfbb05a96d13baf3df4bf19cfde58eef87aefe)

2 years agoresource-encapsulation: boost as lib header 19/21819/15
Philippe Coval [Wed, 17 May 2017 14:26:23 +0000 (16:26 +0200)]
resource-encapsulation: boost as lib header

This change is harmless and done to test build process

Change-Id: Ia8889790f19d6e02a0fc5c2d857ac19e717e2ec4
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
(cherry picked from commit 68649b7a1709bb25ffe8cba4779d92bdeee9a7ae)

2 years agoresource-encapsulation: Workaround test for clang 57/22657/2
Philippe Coval [Thu, 30 Mar 2017 12:30:19 +0000 (14:30 +0200)]
resource-encapsulation: Workaround test for clang

Bypass the part which is crashing clang-3.5, and use reference

Change-Id: I8578509cb642be5d8dbaf1d5fbcdd944377b0fc8
Signed-off-by: Philippe Coval <>
2 years ago[IOT-2810][IS]Static analysis coding style issues 03/22903/4
Harry [Wed, 18 Oct 2017 15:28:46 +0000 (20:58 +0530)]
[IOT-2810][IS]Static analysis coding style issues

Changes are mostly related to indentation, adding curly
braces to single line conditional blocks.

Change-Id: I4fcade68805dc3c1a6970a34683e519708a609f7
Signed-off-by: Harry <>
2 years ago[IOT-2810][ES]Static analysis coding style issues 67/22867/3
Harry [Tue, 17 Oct 2017 12:53:19 +0000 (18:23 +0530)]
[IOT-2810][ES]Static analysis coding style issues

Changes are mostly related to indentation, catching
exception by reference-to-const.

Change-Id: I3aa27b58f507551ed2ed677c4b2c89b151b87bf3
Signed-off-by: Harry <>
2 years agoEnable just the appropriate OTM 75/22875/2
Dan Mihai [Tue, 17 Oct 2017 18:30:30 +0000 (11:30 -0700)]
Enable just the appropriate OTM

Don't enable Just Works for the Random PIN sample, etc.

Change-Id: I2109a1f8be41bef4c1672a35cfcffeb49ce28290
Signed-off-by: Dan Mihai <>

2 years agoIOT-2824 Remove doxygen warnings 13/22913/1
George Nash [Wed, 18 Oct 2017 21:12:18 +0000 (14:12 -0700)]
IOT-2824 Remove doxygen warnings

Remove doxygen warnings reproted from pkix_interface.h

Change-Id: I6640a1fc4037e34fd3fbb60d5c737d1f111c4548
Signed-off-by: George Nash <>
2 years agoIOT-2539 Fix format warning 73/22873/2
George Nash [Tue, 17 Oct 2017 17:38:16 +0000 (10:38 -0700)]
IOT-2539 Fix format warning

C99 spec suggests the type long long int should
be at least 64 bits but may be more.  On some
platfroms it might be 128-bits. In printf %lld
could be interpreted as 64-bits or 128-bits

To fix this the PRId64 macro from inttypes can
be used.

Change-Id: Ie25ea50630f97b4dde866d8042af1567b18522d9
Signed-off-by: George Nash <>
2 years agoLet Linux build upstream libcoap again 79/22679/4
Mats Wichmann [Tue, 3 Oct 2017 20:39:24 +0000 (14:39 -0600)]
Let Linux build upstream libcoap again

Two problems:
(1) in a debug build, Linux builds with gcov options. Linux options
(build_common/linux/SConscript) add --coverage to build, -lgcov to link.
However before the two places that do configure checks for functions start
doing so, they clone an environment with LIBS cleared.  Thus when built
in debug mode, all of the links of the generated configure test programs
-lgcov is missing and the binaries don't link, so the tests report
fail. Fix is to add --coverage to link instead, that implies adding the
library at link time, but is not affected by the clearing of the LIBS var.

(2) upstream libcoap was depending on ipv6 features that only are included
if __GNU_SOURCE is defined, change the define from __DEFAULT_SOURCE to
__GNU_SOURCE only for the coap build environment.

This is like Bug IOT-2334 but since that one reports a windows problem
and thus can't be gcov related, it's not a direct linkage.

Change-Id: I5cab20eeeb10ccefe74d403dd204b33b39ed9a26
Signed-off-by: Mats Wichmann <>
2 years agoFix read through uninit in forked libcoap 03/22303/2
Mats Wichmann [Fri, 1 Sep 2017 16:42:23 +0000 (10:42 -0600)]
Fix read through uninit in forked libcoap

In the forked libcoap, in coap_new_context, a context type
is allocated, then if no address was passed, tries to free
it back up and quits.  This makes no sense: if we know we
can't proceed without listen_addr, check for that up front,
before allocations.  In the existing code, coap_free_context(c)
would cause the fields of c to be used during the freeing
process, but they've never been set up.

5. uninit_use_in_call: Using uninitialized value c->resources when calling coap_free_context.
6. uninit_use_in_call: Using uninitialized value c->sendqueue when calling coap_free_context.
7. uninit_use_in_call: Using uninitialized value c->recvqueue when calling coap_free_context.
CID 1379688: Uninitialized pointer read (UNINIT)
8. uninit_use_in_call: Using uninitialized value c->sockfd when calling coap_free_context.

Upstream doesn't look like this at all any more, so there's
really nothing to upstream on this one.

Change-Id: Ifee6acf0d8547c39c55140f92d397390a957ed50
Signed-off-by: Mats Wichmann <>
2 years agoEnable self link in collections 47/22747/8
Abhishek Pandey [Thu, 12 Oct 2017 13:18:40 +0000 (18:48 +0530)]
Enable self link in collections


- Enabled support for self link in collections.
- API OCLinksPayloadArrayCreate() modified to allow self links.
- New parameter (bool) in the API now allows to have a self link with
  "rel":["self", "item"], in links array as per OCF Core Spec.

Change-Id: I1f2e02dd33c993dc4b28fbc447b8d286c1f7f804
Signed-off-by: Abhishek Pandey <>
2 years ago[EasySetup] Fix links in baseline & ll response 29/22629/10
Ankur Bansal [Thu, 14 Sep 2017 05:35:10 +0000 (11:05 +0530)]
[EasySetup] Fix links in baseline & ll response

Update oic.r.easysetup baseline and link list response to correctly fill
links property.
Use OCLinksPayloadArrayCreate API to create the links payload for batch
& link list interface. OCLinksPayloadArrayCreate API internally takes
care of creating the most part of payload based on the properties of the
resource. This will replace the logic of creating each property of links
payload for each of the easy setup resources from the code.
In link list interface response, add handling for both OCF & OIC
response (for backward compatibility).


Change-Id: I46ca2e2d635cb78e8c7fc7c5ef95d9e16327abb9
Signed-off-by: Ankur Bansal <>
(cherry picked from commit 787a73bd227c69e313145ec978ee96769fa31112)

2 years ago[IOT-2710][IOT-2806] fix /pstat Update handler 55/22855/3
Nathan Heldt-Sheller [Tue, 17 Oct 2017 03:34:26 +0000 (20:34 -0700)]
[IOT-2710][IOT-2806] fix /pstat Update handler

The way CBOR->/pstat binary is written, the Properties in the
current gPstat are added to the binary representation even if
the CBOR payload doesn't contain that Property. This may be ok
in most cases since it means that (if a Property is omitted)
the gPstat value won't be changed from whatever it is.
But this also means that if /pstat.dos.s is Updated,
the /pstat.dos.s Property Update must be done after all other
Properties, so that if a /pstat.dos.s update changes other
/pstat Properties, the new values aren't subsequently overwritten.

Change-Id: I07369355ec3141c40b5178cae41ba02e5e7813fc
Signed-off-by: Nathan Heldt-Sheller <>
2 years agofix logging incorrectly labeled ERROR 57/22857/2
Nathan Heldt-Sheller [Tue, 17 Oct 2017 05:06:25 +0000 (22:06 -0700)]
fix logging incorrectly labeled ERROR

Fix a few log messages that are incorrectly logged as ERROR type.

Change-Id: I417b148840fbc6c6df641b0101fdfc3233f8b511
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoChange OCGetContentFormat into public API 75/21675/4
uzchoi [Mon, 31 Jul 2017 07:45:08 +0000 (16:45 +0900)]
Change OCGetContentFormat into public API

OCIsOCFConentFormat API was internal API to provide bool return
according to media content format(cbor, vnd.ocf+cbor).
However, it can be used to app developer when they handle the
collection resource request with linked-list interface due to
backward compatibility requirement.
This change make the bool return into type enum value on
OCPayloadFormat and Accept version.
Corresponding code is also changed.

Change-Id: I6c780d9ad9e4b68da4b5d431ff294931bcde787e
Signed-off-by: uzchoi <>
2 years agoIOT-2539 Targeted ignore of type-limits warning 33/22833/5
George Nash [Fri, 13 Oct 2017 20:03:39 +0000 (13:03 -0700)]
IOT-2539 Targeted ignore of type-limits warning

This will turn of the type-limits warning in very
targeted area in the code. The code is checking
that the user passed in value is within limits.

Although it is very unlikely to be outsite the
expected values it is possible. Tthis selectivly
shuts off the warning for the two functions the
warning is found in.

Change-Id: Id5da64534c05dffd479d911112d5569305c36d48
Signed-off-by: George Nash <>
2 years ago[IOT-2786] ignore wrong ACE version in ACL 21/22721/2
Nathan Heldt-Sheller [Fri, 6 Oct 2017 20:59:16 +0000 (13:59 -0700)]
[IOT-2786] ignore wrong ACE version in ACL

The current parsing code will accept a v1 ACE in a V2 /acl payload
and vice versa.  It should at least ignore and skip the wrong-version

Change-Id: I9cb3fc84671afe25a730484e4fb2904a0d3c5c95
Signed-off-by: Nathan Heldt-Sheller <>
2 years ago[IOT-2806] improve pstat->tm logging 13/22813/2
Nathan Heldt-Sheller [Fri, 13 Oct 2017 01:43:35 +0000 (18:43 -0700)]
[IOT-2806] improve pstat->tm logging

Please cherry-pick this patch and re-run TC.

Change-Id: Ic4cfd419bc11c76545e9e385993f4ae71c4bd52e
Signed-off-by: Nathan Heldt-Sheller <>
2 years ago[IOT-2746][IS] Static analysis warning fix. 23/22823/2
Harry [Fri, 13 Oct 2017 14:31:20 +0000 (20:01 +0530)]
[IOT-2746][IS] Static analysis warning fix.

Fixed all the static analyzer reported issues in
Simulator native code.

Change-Id: I04c6008c36bb5880bfabee9753433804d43a46bf
Signed-off-by: Harry <>
2 years agoIOT-2539 Fix return-type warning 49/22849/2
George Nash [Mon, 16 Oct 2017 17:16:16 +0000 (10:16 -0700)]
IOT-2539 Fix return-type warning

This fixes moved the return value out of the if statment so
the result of the operation will be returned even if
ehRequest->query is null.

Change-Id: I018776e8800aa51ed9a49a55554949fb869b9495
Signed-off-by: George Nash <>
2 years agoIOT-2539 Remove conversion-null warnings 35/22835/2
George Nash [Fri, 13 Oct 2017 20:40:28 +0000 (13:40 -0700)]
IOT-2539 Remove conversion-null warnings

For some reason using EXPECT_EQ or ASSERT_EQ
converts boolean values to char* which results in
the conversion-null warnings.

Places where EXPECT_EQ or ASSERT_EQ were using a
boolean result for the value was replaced with
EXPECT_FALSE as needed.

Change-Id: I9604b6a7f64545e468430cfdb597eaf18e444580
Signed-off-by: George Nash <>
2 years ago[IOT-2745] Static Analysis fix. 21/22821/2
Jay Sharma [Fri, 13 Oct 2017 12:01:28 +0000 (17:31 +0530)]
[IOT-2745] Static Analysis fix.

Java static analysis fix for resource-encapsulation:.
1. Updated exception handling for logging.
2. Updated sample applications and unit test cases.

Change-Id: I1aeb1b8b2b3338515cbc9733ef8fa032fd6f068e
Signed-off-by: Jay Sharma <>
2 years ago[IOT-2745][Simulator] Static Analysis issues fix. 25/22825/2
Senthil Kumar G S [Fri, 13 Oct 2017 14:37:53 +0000 (20:07 +0530)]
[IOT-2745][Simulator] Static Analysis issues fix.

1. Added log in exception catch blocks.
2. Merged conditional blocks and removed unnecessary conditions.
3. Incorporated proper usage of access specifiers such as final and static.

Change-Id: I78be7b865a30c1f8e746ed62213fb576d11505f8
Signed-off-by: Senthil Kumar G S <>
2 years ago[IOT-2745]Static Analysis fixes for Java NS. 17/22817/3
abitha.s [Fri, 13 Oct 2017 09:18:13 +0000 (14:48 +0530)]
[IOT-2745]Static Analysis  fixes for Java NS.

Change-Id: Ibb2a3e429702a0968a9aacc9ccce2c962a8db36b
Signed-off-by: abitha.s <>
2 years ago[IOT-2808]Static Analysis warning fixes for NS. 15/22815/6
abitha.s [Fri, 13 Oct 2017 05:40:32 +0000 (11:10 +0530)]
[IOT-2808]Static Analysis warning fixes for NS.

1. Indentation fixes.
2. Uninitialized variable fixes

Change-Id: Iea41f46fcd1540cf8ef3985a030fa7b07e399681
Signed-off-by: abitha.s <>
2 years ago[IOT-2808]Static Analysis warning fixes for SM. 99/22799/2
abitha.s [Thu, 12 Oct 2017 10:43:48 +0000 (16:13 +0530)]
[IOT-2808]Static Analysis warning fixes for SM.

1. Indentation fixes.
2. Uninitialized variable fixes

Change-Id: Icfeb1b998be90411e6f1c16d37f79ef0a47f699c
Signed-off-by: abitha.s <>
2 years agoIOT-2539 Cleanup -Wformat= warnings 07/22807/2
George Nash [Mon, 7 Aug 2017 20:40:28 +0000 (13:40 -0700)]
IOT-2539 Cleanup -Wformat= warnings

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

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

Change-Id: I4977253ac7ee68d2e80a26a0963b770b2ce87032
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 60d89aa88e246f3c5f7274dcccde2cd4fd3703fe

2 years ago[IOT-2726] /cred resource rownerid fix 87/22587/8
Aleksey Volkov [Fri, 13 Oct 2017 14:30:33 +0000 (17:30 +0300)]
[IOT-2726] /cred resource rownerid fix

Fixing usage rownerid.

Change-Id: I89f65d4f5ab404d2766fa179c26948439c16a686
Signed-off-by: Oleksandr Dmytrenko <>
Signed-off-by: Aleksey Volkov <>
2 years ago[IOT-2633] Add NULL check for reset profile 45/22845/2
Jongmin Choi [Mon, 16 Oct 2017 07:31:09 +0000 (16:31 +0900)]
[IOT-2633] Add NULL check for reset profile

Add NULL check for reset profile

Change-Id: Ic767c5af6c65dad64f355ab9bbfed8ad054d919b
Signed-off-by: Jongmin Choi <>
2 years agoC++ example for getting server version info. 19/21919/19
Ziran Sun [Tue, 15 Aug 2017 15:03:56 +0000 (16:03 +0100)]
C++ example for getting server version info.

Change-Id: I10eeedfbd1f4ec4231c2611ed8b496997faa13f7
Signed-off-by: Ziran Sun <>
2 years agoprovisioning: Close database in tests 99/22099/13
Philippe Coval [Thu, 24 Aug 2017 10:11:29 +0000 (12:11 +0200)]
provisioning: Close database in tests

Change-Id: Ie49d06287bc6fb3b0ac75c0271af3861c729d436
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Mats Wichmann <>
(cherry picked from commit 043d580965d448da6d15710cf6b0cc7b4c18e4f8)

2 years ago[IOT-2494] SVR DB Editor : Add doxm edit features 69/22169/4
Sangjoon Je [Wed, 9 Aug 2017 08:23:09 +0000 (17:23 +0900)]
[IOT-2494] SVR DB Editor : Add doxm edit features

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

New Feature:
Change-Id: I9c5dc06bdbc29c5ba7e0a8e0a6e898e162e7959d
Signed-off-by: Sangjoon Je <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Jongmin Choi <>
Reviewed-by: Randeep Singh <>
(cherry picked from commit 04875c73a33254c4f40cb61cc035583b9671ff63)

2 years ago[IOT-2803] Remove all roles if credid is zero 27/22827/2
Alex Kelley [Fri, 13 Oct 2017 16:59:46 +0000 (09:59 -0700)]
[IOT-2803] Remove all roles if credid is zero

Change-Id: I6905b2c836d61d05b20a47b43c9ce777c2af0f61
Signed-off-by: Alex Kelley <>
2 years ago[IOT-2746][ES] Static analysis warning fix. 19/22819/2
Harry [Fri, 13 Oct 2017 10:54:11 +0000 (16:24 +0530)]
[IOT-2746][ES] Static analysis warning fix.

Fixed all the static analyzer reported issues in
ES native code.

Change-Id: Ida916ed651fcdf4f02f3549ce987511ca8d5eaa0
Signed-off-by: Harry <>