iotivity.git
2 years agoMerge branch '1.3-rel' (907be8b7) 73/21273/1
Philippe Coval [Thu, 6 Jul 2017 09:46:07 +0000 (11:46 +0200)]
Merge branch '1.3-rel' (907be8b7)

Related:
https://gerrit.iotivity.org/gerrit/21061

Conflicts:
  resource/src/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: If0cb3733ba7b1d7e1ed690f94be7cf84670007d5
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoSCons android realign 79/20979/6
Mats Wichmann [Fri, 23 Jun 2017 17:48:17 +0000 (11:48 -0600)]
SCons android realign

after this patch went into 1.3-rel and then 1.3-rel was merged
into master, build_common/android/SConscript were left slightly
different.  As there is no reason, this is repurposed to realign
the two. There's also one lingering change from the other script.

Change-Id: I094cd6ecc6fecd1055f8742dd33f45d4134c2876
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20979
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2405] Enable building generic java in Windows 61/21061/10
George Nash [Tue, 13 Jun 2017 21:49:56 +0000 (14:49 -0700)]
[IOT-2405] Enable building generic java in Windows

Changed the name of the iotivity-linux folder to
iotivity-java. Update the build scripts to account
for the name change of the folder. The name of the
output jar file is no longer iotivity-linux.jar it
is now iotivity.jar.

The JNI code links against the static librarys not
the shared librarys for oc, oc_logger, octbstack,
and connectivity_abstraction. Not all libraries are
have a dll built for windows, they must be statically
linked. This insures the Java code is identical for
all platforms. This also greatly reduces the number
of dependencies for the java code on native libraries.
The code now only needs to import ocstack-jni for the
IoTivity stack and ca-interface for security.

Other small updates to address compiler warnings.

Bug: https://jira.iotivity.org/browse/IOT-2405
Change-Id: I98392a6d0c2a5299746fa7dd6540724b0f5a4bc8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21061
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
2 years ago[IOT-2068] EP payload creation function 81/20981/12 PF13_PRE
uzchoi [Mon, 26 Jun 2017 05:45:20 +0000 (14:45 +0900)]
[IOT-2068] EP payload creation function

This is internal function which can be used to other function.

Change-Id: I6e1f70a801bca14bd9651395a0e29c9ba0fa6ce2
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20981
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>
2 years ago[IOT-2378] .json and .dat matching 81/20481/7
ol.beketov [Wed, 31 May 2017 14:11:24 +0000 (17:11 +0300)]
[IOT-2378] .json and .dat matching

Bug: https://jira.iotivity.org/browse/IOT-2378
Change-Id: I2f5fc880f2f5ef324566adead3e8b5822278e2a3
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20481
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
2 years agoMerge "Merge branch '1.3-rel' (27355aa8)"
Gerrit Code Review [Wed, 5 Jul 2017 08:44:15 +0000 (08:44 +0000)]
Merge "Merge branch '1.3-rel' (27355aa8)"

2 years agoFix static analysis issues in CA layer 09/21209/2
Veeraj Khokale [Mon, 3 Jul 2017 10:19:18 +0000 (15:49 +0530)]
Fix static analysis issues in CA layer

Fix issues reported by static analysis tool in
connectivity abstraction layer

Change-Id: I49b10536e65219d5f28ebd5acc0c83ffa833d3da
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21209
Reviewed-by: Sushil Kumar Yadav <sushil.ky@samsung.com>
Reviewed-by: koushik girijala <g.koushik@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
2 years ago[IOT-2086]Fix FTBFS when WITH_MQ, 29/20929/4
abitha.s [Wed, 14 Jun 2017 12:25:24 +0000 (17:55 +0530)]
[IOT-2086]Fix FTBFS when WITH_MQ,

the incorrect use of OICFree macro is removed

Change-Id: Ib9fdb7e994850475b233c914a71d4b94346e0c01
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20801
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20929
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoMerge branch '1.3-rel' (27355aa8) 29/20229/4
Philippe Coval [Tue, 4 Jul 2017 08:01:37 +0000 (10:01 +0200)]
Merge branch '1.3-rel' (27355aa8)

Conflicts:
  extlibs/libcoap/SConscript
  extlibs/wksxmppxep/SConscript
  resource/csdk/security/provisioning/unittest/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: I907be8be5fbe6cd7d244dd307eb443b983ba015e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoAdd Unit Test Reports generation in XML format 05/21205/3
Sushil Yadav [Fri, 30 Jun 2017 07:59:00 +0000 (13:29 +0530)]
Add Unit Test Reports generation in XML format

The report are generated in the UnitTestReport directory
module wise.

Change-Id: I4d1af8d9a79d46f70aeea76589669e9340791703
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21205
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
2 years agoTweak provisioning unittest sconscript 65/21165/2
Mats Wichmann [Fri, 30 Jun 2017 15:22:42 +0000 (09:22 -0600)]
Tweak provisioning unittest sconscript

New version (addressing [IOT-2396]) was pushed, which undid some of
  the "new" formatting style, restore
Refactor slightly, use src_dir and out_dir which are already
  defined, instead of re-fetching from env
Define an action for Popen on separate line, for readability

Change-Id: Id90944a50d7ec626d2e29a1822208c67b2c7b438
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21165
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoReformat extlibs SConscripts to be more Pythonic 99/21199/2
Mats Wichmann [Sat, 1 Jul 2017 13:31:39 +0000 (07:31 -0600)]
Reformat extlibs SConscripts to be more Pythonic

There are not intended to be any functional changes.

Minor additonal changes:
  starred error/notice boxes trimmed to not be so wide, drop trailing stars
  minor language cleanup in a few messages
  a little reorg of comments in mbedtls
  instead of "print MESSAGE; Exit(1)" now do "msg = MESSAGE; Exit(msg)"
    to send error messages to the error stream instead of the output stream

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I9d7da2559eee30c8a3e076aeeae7b5a5f2c40843
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21199
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Add support for Tizen:4:Unified (x86_64) 85/20785/5
Philippe Coval [Fri, 9 Jun 2017 08:39:15 +0000 (10:39 +0200)]
tizen: Add support for Tizen:4:Unified (x86_64)

To use on x86_64:
gbsarch=x86_64 gbsprofile=tizen_4_0_unified_x86_64 ./gbsbuild.sh

Other arch might come later, if needed.

x86_64 was preferred, because that way,
we could run units tests on build hosts (TBC).

Change-Id: Ie827470e85b5eeacdcc3c35a1e596768f74e1e58
Bug: https://jira.iotivity.org/browse/IOT-2397
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20667
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
(cherry picked from commit 71e39d052c37c6fbc85deedb041ff32bf3db417d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20785
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
2 years agobuild: Fix permissions fo extlibs build files 97/21197/2
Philippe Coval [Sat, 1 Jul 2017 12:00:40 +0000 (14:00 +0200)]
build: Fix permissions fo extlibs build files

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ied0d6b123f99be4f076a814080949893e98eeb80
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21197
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
2 years agobuild: Replace SCons.Error with exit message 59/21159/6
George Nash [Tue, 20 Jun 2017 21:39:07 +0000 (14:39 -0700)]
build: Replace SCons.Error with exit message

The build would crash if JAVA_HOME was not specified
because SCons.Error was not imported into the script.
This replaces the error with an exit message.

Change-Id: Ic950ae3dc0d0c3308d7bbd90ab965b17f4563f0f
Signed-off-by: George Nash <george.nash@intel.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Reviewed-on: https://gerrit.iotivity.org/gerrit/20947
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit 369d43b707cabcf715f50ff4827670196c4f425f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21159
Reviewed-by: Mats Wichmann <mats@linux.com>
2 years agoMerge "Merge branch '1.3-rel' (6bf7601f)"
Gerrit Code Review [Mon, 3 Jul 2017 22:32:20 +0000 (22:32 +0000)]
Merge "Merge branch '1.3-rel' (6bf7601f)"

2 years agobuild: Replace SCons.Error with exit message 47/20947/6
George Nash [Tue, 20 Jun 2017 21:39:07 +0000 (14:39 -0700)]
build: Replace SCons.Error with exit message

The build would crash if JAVA_HOME was not specified
because SCons.Error was not imported into the script.
This replaces the error with an exit message.

Change-Id: Ic950ae3dc0d0c3308d7bbd90ab965b17f4563f0f
Signed-off-by: George Nash <george.nash@intel.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Reviewed-on: https://gerrit.iotivity.org/gerrit/20947
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
2 years ago[IOT-2412]Segment faults in ResourceContainerImpl 97/21097/2
abitha.s [Wed, 28 Jun 2017 13:24:18 +0000 (18:54 +0530)]
[IOT-2412]Segment faults in ResourceContainerImpl

function is calling erase on the map container which will invalidate it. Hence, added guard calls.

Change-Id: I555895089d8dfa0a3a7f0d804dd5ccef8e4e1ece
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21097
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
2 years ago[IOT-2414]Segment faults in RemoteSceneList. 47/21047/4
abitha.s [Tue, 27 Jun 2017 13:50:58 +0000 (19:20 +0530)]
[IOT-2414]Segment faults in RemoteSceneList.

Access to pointers are addressed by adding checks to ensure Segmentation fault errors

Change-Id: I024455adbf7d9f6fd887059a7361557e4907598d
Signed-off-by: abitha.s <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21047
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
2 years agoMerge branch '1.3-rel' (6bf7601f) 67/21167/2
Philippe Coval [Sat, 1 Jul 2017 11:33:45 +0000 (13:33 +0200)]
Merge branch '1.3-rel' (6bf7601f)

Conflicts:
  plugins/zigbee_wrapper/src/zigbee_wrapper.c

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: Ic02a458484a590e318be77053e67c77a20696bd6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Scan for JSON sources to convert to CBOR 77/21077/6
Philippe Coval [Tue, 13 Jun 2017 09:27:57 +0000 (11:27 +0200)]
build: Scan for JSON sources to convert to CBOR

At build time, CBOR files (.dat) .dat files are generated from sources (.json)
using generated json2cbor tool.

But in a crosscompiling environment (ie: yocto) binary can not be used,
so in that specific case previously generated files are just copied from
sources tree.

It is developer's duty to keep JSON and CBOR aligned,
differences will be spotted after build using git status
(because .dat are not ignored anymore).

Also an implicit dependency has been added to json2cbor executable.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I77ddac04b83dbb0d6050113bc0cfc50df90c5e38
Origin: https://gerrit.iotivity.org/gerrit/#/c/20655/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21077
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agozigbee_wrapper: Fix types and bitmasks mistakes 25/19625/5
Philippe Coval [Thu, 30 Mar 2017 11:38:53 +0000 (13:38 +0200)]
zigbee_wrapper: Fix types and bitmasks mistakes

I am assuming author wanted to use bit mask (& operator)
and not "boolean or" (|| operator).

This change wasn't tested on device, so double check welcome.

Observed warnings using clang on GNU/Linux:

  plugins/zigbee_wrapper/src/zigbee_wrapper.c:871:27: \
  warning: implicit conversion from enumeration type 'OCEntityHandlerResult' to different enumeration type 'OCStackResult' [-Wenum-conversion]
  stackResult = OC_EH_ERROR;
                        ~ ^~~~~~~~~~~
  plugins/zigbee_wrapper/src/zigbee_wrapper.c:1034:39: \
  warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
  if (attributeList.CIEMask || CIE_MOVE_TO_LEVEL)

Change-Id: Ieb8f20f121cdd11d5b697c8f8e199bd00ae295ea
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18403
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
(cherry picked from commit cc58983e9d2a050e529ecab9ff04afbea463afa4)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19625
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
2 years agobridging: Return false boolean instead of enum 71/21071/3
Philippe Coval [Wed, 28 Jun 2017 02:54:05 +0000 (04:54 +0200)]
bridging: Return false boolean instead of enum

Small Fix to support g++-7.1.0

It was tested on yocto poky master on iotivity-1.3.0 (and later):

  bridging/plugins/nest_plugin/nest_objects/nest.cpp: \
  In member function 'bool Nest::isAuthorized()':
  bridging/plugins/nest_plugin/nest_objects/nest.cpp:95:16: \
  error: enum constant in boolean context [-Werror=int-in-bool-context]

Change-Id: Ib53aa7be0198cd926b6901b173001910a324633e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21071
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
2 years agoMerge branch '1.3-rel' (112a21c5) 29/21129/7
Philippe Coval [Fri, 30 Jun 2017 17:49:57 +0000 (19:49 +0200)]
Merge branch '1.3-rel' (112a21c5)

Conflicts:
  auto_build.py
  build_common/SConscript
  build_common/android/SConscript
  build_common/arduino/SConscript
  build_common/windows/SConscript
  extlibs/gtest/SConscript
  resource/c_common/SConscript
  resource/c_common/unittests/SConscript
  resource/csdk/connectivity/build/android/SConscript
  resource/csdk/connectivity/src/SConscript
  resource/csdk/connectivity/test/SConscript
  resource/csdk/security/SConscript
  resource/csdk/security/provisioning/unittest/SConscript
  resource/csdk/security/provisioning/unittest/otmunittest.cpp
  resource/csdk/security/provisioning/unittest/sampleserver2.cpp
  resource/csdk/security/unittest/base64tests.cpp
  resource/csdk/stack/SConscript
  resource/csdk/stack/samples/tizen/build/SConscript
  resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
  resource/csdk/stack/samples/tizen/build/scons/SConscript
  resource/csdk/stack/test/SConscript
  run.bat
  service/easy-setup/mediator/richsdk/unittests/SConscript
  service/notification/cpp-wrapper/unittest/SConscript
  service/notification/unittest/SConscript
  service/resource-container/unittests/SConscript
  service/resource-encapsulation/src/common/SConscript
  service/resource-encapsulation/src/common/primitiveResource/unittests/SConscript
  service/resource-encapsulation/src/serverBuilder/SConscript
  service/resource-encapsulation/unittests/SConscript
  service/third_party_libs.scons

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: Ic7d9c3881bf50102a1acccc60262c9545de468ad
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoprovisioning: Support python 2 or 3 07/21107/2
Philippe Coval [Mon, 24 Apr 2017 14:28:35 +0000 (16:28 +0200)]
provisioning: Support python 2 or 3

Change-Id: I92cd2266e46c7f1b81de92ad4b6a0ad3fdf6f27d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19277
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit fd1d81adcc42bf36f1a8d8ac63420aa660e0baa5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21107
Reviewed-by: George Nash <george.nash@intel.com>
2 years ago[IOT-2441] Initialize OCByteString. 59/20959/7
Todd Malsbary [Thu, 22 Jun 2017 17:05:25 +0000 (10:05 -0700)]
[IOT-2441] Initialize OCByteString.

OCByteStringCopy tries to free any existing
buffer.  When OCByteString is not initialized it
is possible to free an invalid pointer.

Bug: https://jira.iotivity.org/browse/IOT-2441
Change-Id: Ic5ebf559f4a33ffed7864163238bb304342b794a
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20959
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agoSConscript android cleanups 53/21153/3
Mats Wichmann [Thu, 29 Jun 2017 17:36:49 +0000 (11:36 -0600)]
SConscript android cleanups

Rewrite if cmp()...elif cmp() sequence to not use slicing
  no more "magic numbers" referring to substring lengths
Update some comments
Update resource/csdk/connectivity/build/android/SConscript to
  be closer to build_common/android one
Pass error message to Exit instead of doing Exit(1) - this
  sends the error msg to stderr instead of stdout (convention)

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I094cd6ecc6fecd1055f8742dd33f45d4134c2876
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21153
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoservice/scene-manager: SConscript cleanup 69/20969/3
Pawel Winogrodzki [Thu, 22 Jun 2017 21:43:00 +0000 (14:43 -0700)]
service/scene-manager: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Ifc31a5a429f336b4fa17243e65eb5212d6253968
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21151
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit d31e8891e37aa57557e7eab6086a42b2269a3f4e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20969

2 years ago[IOT-2396] fix security provisioning unittest 39/20639/12
Oleksandr Dmytrenko [Thu, 8 Jun 2017 11:18:00 +0000 (14:18 +0300)]
[IOT-2396] fix security provisioning unittest

Enable provisioning unittest for linux and windows

Change-Id: Ia3134247a4e5f7ede45b06f59e02e560794585ab
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20639
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
2 years agoFixed typo on JniCaInterFace 43/21143/2
Jaewook Jung [Fri, 12 May 2017 02:31:09 +0000 (11:31 +0900)]
Fixed typo on JniCaInterFace

Fixed typo on JniCaInterFace

Change-Id: If8d1adbed2da8a29ce8f232e34db10d91d1506d4
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19815
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit b4256fb7f3f51255642cb23db8ba79f29b1220f2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21143
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agobridging: Cleaning up SConscript files. 49/21049/4
Pawel Winogrodzki [Thu, 15 Jun 2017 19:52:09 +0000 (12:52 -0700)]
bridging: Cleaning up SConscript files.

Removing settings already present in the global "env" variable
along with any modifications to that global environment to get rid
of cross dependencies between scripts and forcing them to be executed
in a specific order.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I383e01dcfaf23a323d51199e5d091e57751659bc
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20943
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 0cdda45574ab00fa99060693eeed0cfd7a11667b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21049

2 years agosecurity: Refactor json2cbor for error checking 45/21145/2
Philippe Coval [Fri, 16 Jun 2017 13:07:35 +0000 (15:07 +0200)]
security: Refactor json2cbor for error checking

Detect JSON type and make json2cbor fail on error.
IoTivity JSON are "upgraded" by default,
Swagger files are just converted.
Json2cbor report not zero on failure.
This prevents silent failure when generating CBOR from JSON.
Many MLK fixed.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I905b7d2ba1021686e3794167266b1853ad0f9872
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20795
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 48dfc99470067336f65ed2e7570b041805cd6d81)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21145

2 years agoLogging improvements 49/21149/2
Dan Mihai [Tue, 28 Mar 2017 16:42:23 +0000 (09:42 -0700)]
Logging improvements

[Dan Mihai]

1. Define OC_LOG_PRIVATE_DATA bit that can be added to any of the
   DEBUG, INFO, WARNING, ERROR, or FATAL log levels.

2. Don't log OC_LOG_PRIVATE_DATA messages unless they have been enabled
   explicitly, by calling OCSetLogLevel.

3. Use a single OC_LOG_LEVEL instead of the old SET_LOG_INFO,
   SET_LOG_ERROR, SET_LOG_WARNING and SET_LOG_FATAL macros.

4. Always honor the value of g_level - e.g., don't log WARNING messages
   when g_level == ERROR.

5. Windows: add support for specifying the value of LOG_LEVEL in run.bat.

.

[Philippe Coval]

Ported from master to 1.3-rel

Change-Id: I85f6e7a8cb9798708344250ba2cbb278a0e6e7f6
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18279
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21149

2 years agotizen: Drop TARGET_ARCH from gbsbuild.sh 99/21099/2
Philippe Coval [Wed, 28 Jun 2017 04:18:04 +0000 (06:18 +0200)]
tizen: Drop TARGET_ARCH from gbsbuild.sh

Instead rely on gbs -a arg to select desired arch

Revert "tizen: Use TARGET_ARCH in samples"

This reverts commit 4be7601cb4b0747132b5ae04ceaeea7541976b93.
https://gerrit.iotivity.org/gerrit/#/c/19055/

Bug: https://jira.iotivity.org/browse/IOT-2032
Change-Id: I4be7601cb4b0747132b5ae04ceaeea7541976b93
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21099
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agoeasy-setup: Drop unnecessary gtest flags 83/19283/12
Philippe Coval [Wed, 26 Apr 2017 10:50:15 +0000 (12:50 +0200)]
easy-setup: Drop unnecessary gtest flags

This will help for upgrading gtest to latest release
.
Ported from 1.3-rel to master

Conflicts:
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ic807bfcd7356aa807671e0b378fcda2a558c24b2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20239
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19283
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
2 years agoservice/scene-manager: SConscript cleanup 51/21151/2
Pawel Winogrodzki [Thu, 22 Jun 2017 21:43:00 +0000 (14:43 -0700)]
service/scene-manager: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Ifc31a5a429f336b4fa17243e65eb5212d6253968
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21151
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoservice/simulator: SConscript cleanup 09/21109/2
Pawel Winogrodzki [Fri, 28 Apr 2017 04:15:08 +0000 (21:15 -0700)]
service/simulator: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I6f6e01d1c95b28637aba494feed2801670a7947f
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19565
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
(cherry picked from commit c8c8213b861b7400f66c03f4671db1bbf5b02f69)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21109
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agonotification: Drop unnecessary gtest flags 47/21147/3
Philippe Coval [Wed, 26 Apr 2017 10:50:27 +0000 (12:50 +0200)]
notification: Drop unnecessary gtest flags

This will help for upgrading gtest to latest release

Ported from 1.3-rel to master

Conflicts:
service/notification/cpp-wrapper/unittest/SConscript
service/notification/unittest/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I4ddf3bb98ad257d8bb21b5e0ef388405d574131c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19775
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21147
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agoservice/resource-container: SConscript cleanup 65/20965/3
Pawel Winogrodzki [Thu, 22 Jun 2017 21:33:29 +0000 (14:33 -0700)]
service/resource-container: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I637d27e2debfd184a19755eea56fbdeb083cd0b6
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21095
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit b3784cfa25b8efd597684947e6db7e13fd2c3d6e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20965

2 years agosimulator: Disable SECURED mode 91/21091/2
Philippe Coval [Mon, 12 Jun 2017 14:51:37 +0000 (16:51 +0200)]
simulator: Disable SECURED mode

Simulator will be built only in Unsecured mode on IP transport.

Bug: https://jira.iotivity.org/browse/IOT-2239
Change-Id: I1bf19643c7ffe53ea995ca4b1dfd5a713fbe864a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20703
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
(cherry picked from commit d398ef7e4d4c41ce739c18d18012a88c7cbc7c3d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21091
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agobridging: Cleaning up SConscript files. 43/20943/6
Pawel Winogrodzki [Thu, 15 Jun 2017 19:52:09 +0000 (12:52 -0700)]
bridging: Cleaning up SConscript files.

Removing settings already present in the global "env" variable
along with any modifications to that global environment to get rid
of cross dependencies between scripts and forcing them to be executed
in a specific order.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I383e01dcfaf23a323d51199e5d091e57751659bc
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20943
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoresource: Include functional header for g++-7.1.0 65/21065/4
Philippe Coval [Wed, 28 Jun 2017 02:54:05 +0000 (04:54 +0200)]
resource: Include functional header for g++-7.1.0

It was tested on yocto poky master on iotivity-1.2.1 (and later):

  resource/include/OCUtilities.h: \
  In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)':
  resource/include/OCUtilities.h:85:21: \
  error: 'bind' is not a member of 'std'
  return std::bind(fn, p, std::ref(params)...)();

  resource/include/OCApi.h: At global scope:
  resource/include/OCApi.h:362:18: \
  error: 'function' in namespace 'std' does not name a template type
  typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;

Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396
Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21067
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit 26c2798188497da22e0a70efebc47991dd755db2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21065
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
2 years agoservice/resource-container: SConscript cleanup 95/21095/2
Pawel Winogrodzki [Thu, 22 Jun 2017 21:33:29 +0000 (14:33 -0700)]
service/resource-container: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I637d27e2debfd184a19755eea56fbdeb083cd0b6
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21095
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Reformat resource/c_common SConscripts 47/20547/12
Mats Wichmann [Sat, 3 Jun 2017 13:19:05 +0000 (07:19 -0600)]
build: Reformat resource/c_common SConscripts

Reformat all of the resource/c_common SConscripts to be more Pythonic

There are not intended to be any functional changes
The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
  namespace unqualified unless it is really needed

Change-Id: I7957659932535f63f7e3e98a786b997c6a0dca3b
Signed-off-by: Mats Wichmann <mats@linux.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20547
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
2 years agobuild: let UnpackAll.py find 7z.exe on Windows 63/21063/4
Dan Mihai [Tue, 27 Jun 2017 22:33:54 +0000 (15:33 -0700)]
build: let UnpackAll.py find 7z.exe on Windows

Remove incomplete workaround - executing external_builders.scons
twice instead of just one time, from build_common\SConscript.
UnpackAll.py was not able to find the path to 7z.exe when using that
workaround, and SCons was not able to unpack Gradle.

Replace that workaround by fixing SCons's PATH earlier, before
UnpackAll.py starts - similarly to the way build_common\SConscript
handles the PATH on non-Windows platforms.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ic90337c6c34556043017f2c55afbc1edcac402ef
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21063
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
2 years agoRemove 'using namespace' keyword from JNI headers 59/21059/4
George Nash [Tue, 13 Jun 2017 21:32:25 +0000 (14:32 -0700)]
Remove 'using namespace' keyword from JNI headers

The use of the 'using namespace OC' was causing an
ambiguous symbol between the C++ OC::OCResource and
the C OCResource when including ocpayload.h.

It is bad practice to use 'using namespace' key words in
header files because any code that includes that header
also imports the namespace, whether they want it or not.

This defeats the purpose of namespaces and can cause name
collisions.

This is part of the work for IOT-2405

Bug: https://jira.iotivity.org/browse/IOT-2405
Change-Id: I8e7e01b1bf645b6333166bd4624a82e9f0345bf8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20767
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit ef076e24c7e81742b80c048a76a4023c635062d9)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21059

2 years agotizen: Guess TARGET_ARCH from gbs param 03/21003/12
Philippe Coval [Sat, 27 May 2017 23:29:05 +0000 (01:29 +0200)]
tizen: Guess TARGET_ARCH from gbs param

I noticed that previously arm binary where built into out/x86
Even if this is not harmful, It's better to rely on gbs's %{_arch}.

Change-Id: I1968c8d3c0705c536a2b055090ea142100f91bc2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20309
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 5c26449ec8c725cdc8f4f7a99f6ac9c664400760)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21003
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
2 years agobuild: Reformat resource/csdk to be more Pythonic 09/20909/18
Mats Wichmann [Mon, 12 Jun 2017 14:13:42 +0000 (08:13 -0600)]
build: Reformat resource/csdk to be more Pythonic

[Mats Wichmann]

Reformat resource/csdk SConscripts to be more Pythonic 2/4

These are the resource/csdk/stack subset

There are not intended to be any functional changes, with a minor
exception: in resource/csdk/stack/samples/linux/secure/SConscript,
the samples are now assigned to an appropriately constructed list,
which is assigned an Alias, rather than two similar but different
conditional Alias lines with the list inline.

There is no consistently "pretty" way to fold long lines,
the choices were made by a tool (yapf) but occasionally
overridden to be a little more consistent

The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
namespace unqualified unless it is really needed

[Philippe Coval]

Merge from master to 1.3-rel

Conflicts:
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript
resource/csdk/stack/samples/tizen/build/SConscript
resource/csdk/stack/samples/tizen/build/scons/SConscript
resource/csdk/stack/test/SConscript

Change-Id: I0e15b375a052ef792b2a1c4470552e5e0e4fb3fc
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20697
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Origin: master
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20909
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
2 years agobuild: Reformat resource/c_common SConscripts 73/20573/10
Mats Wichmann [Sat, 3 Jun 2017 13:19:05 +0000 (07:19 -0600)]
build: Reformat resource/c_common SConscripts

[Mats Wichmann]

Reformat all of the resource/c_common SConscripts to be more Pythonic

There are not intended to be any functional changes
The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
  namespace unqualified unless it is really needed

[Philippe Coval]

Ported to 1.3-rel from master

Conflicts:
resource/c_common/unittests/SConscript

Change-Id: I7957659932535f63f7e3e98a786b997c6a0dca3b
Signed-off-by: Mats Wichmann <mats@linux.com>
Origin: master
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20573
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agobuild: Reformat build_common SConscripts (follow) 73/21073/2
Philippe Coval [Wed, 21 Jun 2017 17:25:46 +0000 (19:25 +0200)]
build: Reformat build_common SConscripts (follow)

[Mats Wichmann]

build: Reformat all of the build_common SConscripts to be more Pythonic

There are not intended to be any functional changes.
The help variable definitions are split into multi-line,
in anticipation of later improving the descriptions and using
keyword-argument style to make the purpose of other args more clear.

Also included two files at the top level in this set,
as they seem to have the same intent as build_common.

In build_common/android/SConscript, an identical 4-line stanza, beginning:
  elif cmp(flags[0:9], 'PLATFORM=') == 0:  # get target platform: android-x
appears three times, the second and third were dropped in this change.

[Philippe Coval]

Port from master to 1.3-rel to help mergeback

Conflicts:
build_common/SConscript
build_common/android/SConscript
build_common/windows/SConscript

Change-Id: I0077e7350754fef25e75621fdb4a41cf00000002
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Origin: master
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21073
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agosecurity: Refactor json2cbor for error checking 95/20795/22
Philippe Coval [Fri, 16 Jun 2017 13:07:35 +0000 (15:07 +0200)]
security: Refactor json2cbor for error checking

Detect JSON type and make json2cbor fail on error.
IoTivity JSON are "upgraded" by default,
Swagger files are just converted.
Json2cbor report not zero on failure.
This prevents silent failure when generating CBOR from JSON.
Many MLK fixed.

Bug: https://jira.iotivity.org/browse/IOT-2310
Change-Id: I905b7d2ba1021686e3794167266b1853ad0f9872
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20795
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agoresource: Include functional header for g++-7.1.0 67/21067/3
Philippe Coval [Wed, 28 Jun 2017 02:54:05 +0000 (04:54 +0200)]
resource: Include functional header for g++-7.1.0

It was tested on yocto poky master on iotivity-1.2.1 (and later):

  resource/include/OCUtilities.h: \
  In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)':
  resource/include/OCUtilities.h:85:21: \
  error: 'bind' is not a member of 'std'
  return std::bind(fn, p, std::ref(params)...)();

  resource/include/OCApi.h: At global scope:
  resource/include/OCApi.h:362:18: \
  error: 'function' in namespace 'std' does not name a template type
  typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;

Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396
Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21067
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
2 years agoModification as per SVACE result for Java layer 33/21033/2
saurabh.s9 [Tue, 27 Jun 2017 04:02:22 +0000 (09:32 +0530)]
Modification as per SVACE result for Java layer

Change-Id: If26f219c2e137efa292dae87468eb4fc8abe987b
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21033
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
2 years agobuild: Reformat build_common SConscripts 23/20923/14
Philippe Coval [Wed, 21 Jun 2017 17:25:46 +0000 (19:25 +0200)]
build: Reformat build_common SConscripts

[Mats Wichmann]

build: Reformat all of the build_common SConscripts to be more Pythonic

There are not intended to be any functional changes.
The help variable definitions are split into multi-line,
in anticipation of later improving the descriptions and using
keyword-argument style to make the purpose of other args more clear.

Also included two files at the top level in this set,
as they seem to have the same intent as build_common.

In build_common/android/SConscript, an identical 4-line stanza, beginning:
  elif cmp(flags[0:9], 'PLATFORM=') == 0:  # get target platform: android-x
appears three times, the second and third were dropped in this change.

[Philippe Coval]

Port from master to 1.3-rel to help mergeback

Conflicts:
build_common/SConscript
build_common/android/SConscript
build_common/external_builders.scons
build_common/linux/SConscript

Change-Id: I0077e7350754fef25e75621fdb4a41cfcf28ef2a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Origin: master
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20923
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agobuild: Reformat the service SConscripts 01/21001/9
Mats Wichmann [Sun, 4 Jun 2017 20:48:05 +0000 (14:48 -0600)]
build: Reformat the service SConscripts

[Mats Wichmann]

These reformattings are not supposed to change any behavior,
but they are not all purely whitespace. For example, consecutive
lines of Append(LIBS=  or Append(CPPPATH= were collapsed into
one call with multiple entries in the list.

A few comments were beefed up, as were occasional informative messages.

Import of run_test moved to top (Python style), except the two scripts
where the unittest code is not isolated to a subdirectory - the import
has to be protected so it is only called for targets that support
the tests - the import fails on Tizen for some reasons.  Change this
when separate patches to isolate unit test building/running are merged.

[Philippe Coval]

Ported to 1.3-rel from master

Conflicts:
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript
service/notification/cpp-wrapper/unittest/SConscript
service/notification/unittest/SConscript
service/resource-container/unittests/SConscript
service/resource-encapsulation/src/common/SConscript
service/resource-encapsulation/src/serverBuilder/SConscript
service/resource-encapsulation/unittests/SConscript

Change-Id: Ifaf3eb2d837e773a06e59b50132f0d3c8881fdd8
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20553
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21001
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agotizen: install library from variant dir 21/21021/4
Philippe Coval [Mon, 26 Jun 2017 16:47:57 +0000 (18:47 +0200)]
tizen: install library from variant dir

This change is imported from this json build change in master:
https://gerrit.iotivity.org/gerrit/#/c/20363/

Change-Id: I4f65b3947db8ffd37c687c5583b602f37d61ed3a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21021
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agobuild: Fail on unsupported argument 07/21007/2
Philippe Coval [Wed, 14 Jun 2017 07:30:47 +0000 (09:30 +0200)]
build: Fail on unsupported argument

Also use same sys.exit everywhere

1.3-rel should fail un tizen_unsecured
because that component is not yet merged

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I98e14eff713a6434d0521bc2235d127826a45acf
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20781
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit ae20072dc07ad11d770bbeccdcbefee685aeb504)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21007
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agotizen: Guess TARGET_ARCH from gbs param 09/20309/16
Philippe Coval [Sat, 27 May 2017 23:29:05 +0000 (01:29 +0200)]
tizen: Guess TARGET_ARCH from gbs param

I noticed that previously arm binary where built into out/x86
Even if this is not harmful, It's better to rely on gbs's %{_arch}.

Change-Id: I1968c8d3c0705c536a2b055090ea142100f91bc2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20309
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years agoRevert "[IOT - 2386] Fix for NULL reference..." 63/20963/4
Dan Mihai [Thu, 22 Jun 2017 19:32:59 +0000 (12:32 -0700)]
Revert "[IOT - 2386] Fix for NULL reference..."

This reverts commit 2819a9def15e8b401ee21ab1f941fa2af8a3f41e.

LL_FOREACH_SAFE already checks for NULL list entry, so there is no
need to check a second time inside the loop.

Change-Id: Ia7a33ce6a3c6bb88cd529831af07010729a2badb
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20963
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
2 years ago[IOT-2426] Update IPCA ElevatorServer files 61/20961/3
Alex Kelley [Tue, 20 Jun 2017 21:08:43 +0000 (14:08 -0700)]
[IOT-2426] Update IPCA ElevatorServer files

Update the JSON and DAT files to comply with the recent security changes.

Change-Id: I8b5f70a4f3153b4000eba9f5569ed54bc28529e9
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20961
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years agoeasy-setup: Add missing path for android ndk-r13b 19/21019/4
bg.chun [Mon, 27 Feb 2017 06:24:35 +0000 (15:24 +0900)]
easy-setup: Add missing path for android ndk-r13b

[IOT-1863]force to include missing  header for build with ndk-r13b

current android build script using ndk-r10d
when update ndk as ndk-r13b,
it showing build fail due missing header file.
So, force to include missing header file

Change-Id: Ic23ab789f907c4e576e83bccc0c26f41350a6446
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17525
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 73b39d4c5450f0863fce16743ee424b5cb95ddfd)
Bug: https://jira.iotivity.org/browse/IOT-1863
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21019

2 years agobuild: Enable WITH_PROXY by default 01/20701/10
Philippe Coval [Mon, 12 Jun 2017 14:42:34 +0000 (16:42 +0200)]
build: Enable WITH_PROXY by default

Bug: https://jira.iotivity.org/browse/IOT-2240
Change-Id: Iabf0f5bbff2c2c9fbb284a0614c206b66e3cd1bd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20819
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit 106d2a0de72c6ba45c8128a23eeedd23599a6c4f)
Origin: 1.3-rel
Reviewed-on: https://gerrit.iotivity.org/gerrit/20701
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>
2 years ago[IOT-1917]Fix memory leak: cert/key/CRL 33/20933/3
Oleksandr Dmytrenko [Tue, 21 Mar 2017 13:40:52 +0000 (15:40 +0200)]
[IOT-1917]Fix memory leak: cert/key/CRL

Fix memory leak: cert/key/CRL information returned by cred resource
https://jira.iotivity.org/browse/IOT-1917

Change-Id: Ic563b5e5b79ccac8855ebb5b215e475d1b4e57be
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18057
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
(cherry picked from commit dba44fd8ce7219897966054446c992184369fbfa)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20933
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Improve target message in build_common 79/20579/5
Mats Wichmann [Thu, 4 May 2017 15:09:12 +0000 (09:09 -0600)]
build: Improve target message in build_common

Improve the text of host/target unsup message in build_common

No operational changes

Change-Id: I6a8b95fac210a8f80132bebab148a67dfa76d51d
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19637
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 570d343aa00bb5b503c7c6cea904eb52691a42e0)
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20579
Reviewed-by: Habib Virji <habib.virji@samsung.com>
2 years agobuild: Use sys.exit instead of exit 05/21005/2
Philippe Coval [Wed, 17 May 2017 10:33:49 +0000 (12:33 +0200)]
build: Use sys.exit instead of exit

This change is to fix conflict between master and 1.3-rel

Reviewed-on: https://gerrit.iotivity.org/gerrit/19955

Bug: https://jira.iotivity.org/browse/IOT-2237
Change-Id: Ib000a648b889d7d9956d6b26a9dc2111e7b96200
Origin: https://gerrit.iotivity.org/gerrit/#/c/20877/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20877
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit f99878445ce793627a4af92e26c9b1ce797b8949)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21005
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
2 years ago[RE] Code coverage script fix for rcs_common_test 51/20951/3
Jay Sharma [Wed, 21 Jun 2017 09:33:32 +0000 (15:03 +0530)]
[RE] Code coverage script fix for rcs_common_test

  - Updated the executables path in the script.

Change-Id: I94e21911ef113edf5fa227cf1f438f61d85b111e
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20951
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
2 years ago[IOT-2424] Fixed non-UUID subject rowner. 77/20977/3
Nathan Heldt-Sheller [Fri, 23 Jun 2017 21:55:49 +0000 (14:55 -0700)]
[IOT-2424] Fixed non-UUID subject rowner.

Also added additional debug logging to rowner check.

Change-Id: Ic6c2849ebe9519568e789b2a4b34e40252746474
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20977
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
2 years agoservice/simulator: SConscript cleanup 65/19565/15
Pawel Winogrodzki [Fri, 28 Apr 2017 04:15:08 +0000 (21:15 -0700)]
service/simulator: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I6f6e01d1c95b28637aba494feed2801670a7947f
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19565
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
2 years agoModify observer list to be belong to resource 97/20397/9
Jaewook Jung [Thu, 25 May 2017 09:19:29 +0000 (18:19 +0900)]
Modify observer list to be belong to resource

Currently all observer info is managed in a global list in ocobserve.c.
Conceptually, observers should be belong to each resource which the
observer is interested in.
It is more intuitive and easy to manage observers per each resource.
And the function codes in ocobserve could be simple by optimization
after this patch merged.

Change-Id: Ic76816a2729d3fd1715ba5f3f1e5de4253167909
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20397
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2 years ago[IOT-2395] security: tcp provisioning fix 41/20641/4
Oleksandr Dmytrenko [Thu, 8 Jun 2017 11:29:54 +0000 (14:29 +0300)]
[IOT-2395] security: tcp provisioning fix

Security provisioning samples via tcp fixed

Change-Id: Iff96834af80413053dee9318a352132eeaf60ebb
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20641
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
2 years agoSwitch to preferred Python method for checking sys.platform 25/20925/4
Mats Wichmann [Thu, 4 May 2017 16:01:07 +0000 (10:01 -0600)]
Switch to preferred Python method for checking sys.platform

Older Pythons can set linux or linux2 in sys.platform.
The suffix is meaningless, deprecated, and no longer happens as of Python 3.3.
The preferred idiom (from Python docs) is:

    if sys.platform.startswith('linux'):

Twiddled a few other things, "imports at the top" rule,
and a couple of related error msgs, and a few strings

In a few places, more could have been done to clean up, but skipped
to keep the patches small

Change-Id: Iccdfa9eb77ff4bc1429e3b38837a8732455a5dfd
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19641
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 39f1ec664b3abc4e9d58b48a2e281a66ef11a153)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20925
Reviewed-by: Ossama Othman <ossama.othman@intel.com>
2 years agobuild: Add a way for auto_build.py to print actions without executing 89/20789/5
Mats Wichmann [Sun, 9 Apr 2017 15:25:37 +0000 (09:25 -0600)]
build: Add a way for auto_build.py to print actions without executing

[Mats Wichmann]

EXEC_MODE={one of: False, false, 0} python auto_build.py args
will print what the script would do without actually running the actions
Found it hard to keep track of all the different targets,
this is a quick way to report.

[Philippe Coval]

Port from master to 1.3-rel

Conflicts:
auto_build.py

Change-Id: I6e03cc45ef4e51a5accde6f9866f7b62d3e002b7
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18635
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20789
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
2 years agoresource-encapsulation: Fix typo on Destroyed word 73/20973/2
Philippe Coval [Thu, 15 Jun 2017 18:16:08 +0000 (20:16 +0200)]
resource-encapsulation: Fix typo on Destroyed word

Bug: https://jira.iotivity.org/browse/IOT-2267
Change-Id: I4f582fb992a0829de0549fd164c283726650c363
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20853
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 5f97a0d81aa2b495a4ce122ad193ec22955c8569)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20973

2 years ago[IOT-2207] Update build to use android-ndk-r10e 39/20939/2
George Nash [Mon, 5 Jun 2017 21:48:14 +0000 (14:48 -0700)]
[IOT-2207] Update build to use android-ndk-r10e

The android-ndk-r10d is unsupported. This updates the scripts
to download and use version r10e.

Bug: https://jira.iotivity.org/browse/IOT-2207
Change-Id: I730524749f76868f81756a1f704ee761819d1891
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20561
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 09dd38165eae5a7313cabf39ae2f817d892f1f7b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20939
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoconnectivity: Fix typo on success word 31/20931/3
Philippe Coval [Fri, 16 Jun 2017 11:10:33 +0000 (13:10 +0200)]
connectivity: Fix typo on success word

Change-Id: I74042b17ef67725c42b40eb239e977c43e60ec10
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20875
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit 62ea2a7f506ddf23ebb8985b03ad640ed361a8c4)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20931
Reviewed-by: Peter Hatina <phatina@gmail.com>
2 years agobuild: Enable MULTIPLE_OWNER by default 21/20821/3
Philippe Coval [Mon, 12 Jun 2017 14:24:48 +0000 (16:24 +0200)]
build: Enable MULTIPLE_OWNER by default

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Id2e1bd03d887076204117c6f7ab60e435804d886
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20699
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit 16e1df43f7f04a5c0950397f2282defb1bdb0c13)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20821
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
2 years agoRemoved print statments from SConscripts 87/20887/4
George Nash [Tue, 13 Jun 2017 23:47:32 +0000 (16:47 -0700)]
Removed print statments from SConscripts

The print statments were basically added in for
debugging the SCons scripts. Unless the debug messages
are expected they provide zero help and cause
confusion.

Change-Id: I96cc33e93997fb2b9b7f55c664f2e2aa059d25a3
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20777
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 673cccdd0b656158c7d35474d419c8bf40466aca)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20887

2 years agosimulator: Disable SECURED mode 03/20703/5
Philippe Coval [Mon, 12 Jun 2017 14:51:37 +0000 (16:51 +0200)]
simulator: Disable SECURED mode

Simulator will be built only in Unsecured mode on IP transport.

Bug: https://jira.iotivity.org/browse/IOT-2239
Change-Id: I1bf19643c7ffe53ea995ca4b1dfd5a713fbe864a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20703
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
2 years agobuild: Reformat the examples SConscript to be more pythonic. 41/20541/7
Mats Wichmann [Fri, 2 Jun 2017 15:22:56 +0000 (09:22 -0600)]
build: Reformat the examples SConscript to be more pythonic.

There are no functional changes.  A comment was updated.

Change-Id: I9200be3cc66559de0c40c0d3c99c09f15a039291
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20571
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 480d03d55d2c811f468fc238c73b7f8af5da3455)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20541
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
2 years agoReformat the rest of resource SConscripts to be more Pythonic 49/20549/8
Mats Wichmann [Sat, 3 Jun 2017 14:01:59 +0000 (08:01 -0600)]
Reformat the rest of resource SConscripts to be more Pythonic

There are not intended to be any functional changes
file lists are one-per-line
library lists are one-per-line if there are more than two libs

Change-Id: I7cefd2562bf275ceff5c4347c646fea4e681f080
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20549
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoresource-encapsulation: Fix typo on Destroyed word 53/20853/4
Philippe Coval [Thu, 15 Jun 2017 18:16:08 +0000 (20:16 +0200)]
resource-encapsulation: Fix typo on Destroyed word

Bug: https://jira.iotivity.org/browse/IOT-2267
Change-Id: I4f582fb992a0829de0549fd164c283726650c363
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20853
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years agoWrong use of fflush() standard library removed 33/17033/5
Manoj Gupta [Fri, 3 Feb 2017 07:06:27 +0000 (12:36 +0530)]
Wrong use of fflush() standard library removed

Change-Id: Ic78a44f9dec3144de5a043accaa18ca2a0b38b02
Signed-off-by: Manoj Gupta <manoj.g2@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17033
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years agoReformat all of the bridging SConscripts to be more Pythonic 69/20569/6
Mats Wichmann [Fri, 2 Jun 2017 15:37:24 +0000 (09:37 -0600)]
Reformat all of the bridging SConscripts to be more Pythonic

There are not intended to be any functional changes,

Change-Id: Ife37bdb04c0ff05fcf50d9f7274b71026f053fd9
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20543
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 900b6fcf57a2515880a1238ed794515f7dde9372)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20569
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
2 years agoReformat all of the cloud SConscripts to be more Pythonic 75/20575/3
Mats Wichmann [Fri, 2 Jun 2017 13:12:54 +0000 (07:12 -0600)]
Reformat all of the cloud SConscripts to be more Pythonic

There are not intended to be any functional changes, and
this set of changes turned out to be relatively minor.

Change-Id: I738b2f2f43d3edd069426daa06ba29f7aaa33bef
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit b3aa625df006bb6c0a5d6269e6a82219d0bffefc)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20575
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years agoconnectivity: Fix typo on success word 75/20875/4
Philippe Coval [Fri, 16 Jun 2017 11:10:33 +0000 (13:10 +0200)]
connectivity: Fix typo on success word

Change-Id: I74042b17ef67725c42b40eb239e977c43e60ec10
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20875
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
2 years agoReformat resource/csdk SConscripts to be more Pythonic 3/4 07/20807/8
Mats Wichmann [Mon, 12 Jun 2017 18:22:36 +0000 (12:22 -0600)]
Reformat resource/csdk SConscripts to be more Pythonic 3/4

These are the resource/csdk/connectivity subset.

There are not intended to be any functional changes.

In a couple of places, for general consistency, changed
  SConscript('#foo') to SConscript('#/foo') - these are equivalent
"help vars" assignments formatted so messages can be improved later
  without changing formatting
all EnumVariable usage now calls out allowed_values= to be more clear

Change-Id: Ic062a8e3a81586a6eddbc0ca414f5e51d5d97b86
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20807
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Reformat resource/csdk SConscripts to be more Pythonic 4/4 07/20907/5
Philippe Coval [Mon, 19 Jun 2017 10:22:37 +0000 (12:22 +0200)]
build: Reformat resource/csdk SConscripts to be more Pythonic 4/4

These are the resource/csdk/security subset

There are not intended to be any functional changes, with a minor exception:
in resource/csdk/security/provisioning/sample/SConscript, the samples are
now assigned to an appropriately constructed list, which is extended
in the case of MULTIPLE_OWNER, this list is then assigned an Alias.
This is done to avoid having two parallel lists and needing to keep
in sync.

Header lines with doubled comment styles were changed to just Python,
that is, change this style (quoted so git doesn't strip the lines):

"# // Copyright 2015 Samsung Electronics All Rights Reserved."

to this:

"# Copyright 2015 Samsung Electronics All Rights Reserved."

There is no consistently "pretty" way to fold long lines,
the choices were made by a tool (yapf) but occasionally overridden
to be a little more consistent

The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
namespace unqualified unless it is really needed

Change-Id: If1876589b2cad83c1c4795dae5e3ddc59c78fca1
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20805
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Origin: master
Signed-off-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20907
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years agoImprove the frustrating gtest SConscript 05/20905/5
Mats Wichmann [Sun, 9 Apr 2017 15:15:31 +0000 (09:15 -0600)]
Improve the frustrating gtest SConscript

Define gtest version in a single variable, for future-proofing
Fix to "python style" (except long lines and constant names) - indents, etc.
Fix redefinition of builtin name 'var' (windows section)
Quit right away if target does not need gtest, and remove extra checks
  for this elsewhere
Add checks for help and clean targets: should not unpack/config/build in
  these cases, and actually clean if clean is called
Split configure and build targets for non-windows:
  may still need to build even if already configured (due to clean target)

Change-Id: Ic9818fdd221eb2d3d7fead8c9585c41db80b3d5a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18633
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Origin: master
Reviewed-on: https://gerrit.iotivity.org/gerrit/20905
Reviewed-by: Peter Hatina <phatina@gmail.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
2 years ago[CHP] Unit test fixes for the Coap-http proxy. 13/20913/3
Jay Sharma [Mon, 19 Jun 2017 11:20:56 +0000 (16:50 +0530)]
[CHP] Unit test fixes for the Coap-http proxy.

Some build failure seen at:
https://build.iotivity.org/ci/job/iotivity-verify-unit_tests/16257/console

Reason : In the test cases we are sending the http request to the http server.
There is a possibility if http server does not respond, test case may fail.

Change-Id: I0a0a823779c8c30819af3973393d3fb744cc9d7f
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20913
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
2 years ago[RE] Added print statement in the rcs_common_test for fixing mocking crash. 03/20803/2
Jay Sharma [Wed, 14 Jun 2017 12:26:04 +0000 (17:56 +0530)]
[RE] Added print statement in the rcs_common_test for fixing mocking crash.

There is a crash on the specific ubuntu 16.04 [64-bit]version, while running the
rcs_common_test. Added the print statement to fix it,

Issue seems to be of mocking framework support for 16.04 [64-bit] as same code
is working on 14.04 [32-bit and 64-bit].
Moreover, I tried to remove the print statement in other services mocking calls
it also results in the crash.

bug: https://jira.iotivity.org/browse/IOT-2416
Change-Id: Ic848e889aa3985567dad2d88b4945efdcd0733fd
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20803
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoAdding Tizen UI app for Notification consumer 25/19825/6
Poovizhi [Fri, 12 May 2017 09:53:32 +0000 (15:23 +0530)]
Adding Tizen UI app for Notification consumer

Change-Id: I7cbd0ef964615035e41f37e582ca44e55a48ad9c
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19825
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
2 years agoReformat all of the build_common SConscripts to be more Pythonic 45/20545/21
Mats Wichmann [Fri, 2 Jun 2017 19:19:34 +0000 (13:19 -0600)]
Reformat all of the build_common SConscripts to be more Pythonic

There are not intended to be any functional changes.
The help variable definitions are split into multi-line,
in anticipation of later improving the descriptions and using
keyword-argument style to make the purpose of other args more clear.

Also included two files at the top level in this set,
as they seem to have the same intent as build_common.

In build_common/android/SConscript, an identical 4-line stanza, beginning:
  elif cmp(flags[0:9], 'PLATFORM=') == 0:  # get target platform: android-x
appears three times, the second and third were dropped in this change.

Change-Id: I0077e7350754fef25e75621fdb4a41cfcf28ef2a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
2 years agoeasy-setup: Drop unnecessary gtest flags 39/20239/4
Philippe Coval [Wed, 26 Apr 2017 10:50:15 +0000 (12:50 +0200)]
easy-setup: Drop unnecessary gtest flags

This will help for upgrading gtest to latest release

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ic807bfcd7356aa807671e0b378fcda2a558c24b2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20239
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
2 years ago[NS] Notification consumer valgrind invalid read/write fix. 63/20663/4
Jay Sharma [Fri, 9 Jun 2017 06:39:31 +0000 (12:09 +0530)]
[NS] Notification consumer valgrind invalid read/write fix.

Bug: https://jira.iotivity.org/browse/IOT-2373
Change-Id: Ifd3789538c3d368b7ca3da52d274bb7ed531c126
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20831
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit bdc2263c344879854b914ec5efd0e232137c49c2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20663
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
2 years agoReformat all of the java SConscripts to be more Pythonic 01/20901/2
Mats Wichmann [Fri, 2 Jun 2017 13:45:16 +0000 (07:45 -0600)]
Reformat all of the java SConscripts to be more Pythonic

There are not intended to be any functional changes

Some reformatting after initial comments

Change-Id: I2db5b04e2498974396ff3ba6033b521ebd3ab61a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20537
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 44c0f9d561e356d685544f15134999bf90184d9e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20901

2 years agoRemove 'using namespace' keyword from JNI headers 67/20767/5
George Nash [Tue, 13 Jun 2017 21:32:25 +0000 (14:32 -0700)]
Remove 'using namespace' keyword from JNI headers

The use of the 'using namespace OC' was causing an
ambiguous symbol between the C++ OC::OCResource and
the C OCResource when including ocpayload.h.

It is bad practice to use 'using namespace' key words in
header files because any code that includes that header
also imports the namespace, whether they want it or not.

This defeats the purpose of namespaces and can cause name
collisions.

This is part of the work for IOT-2405

Bug: https://jira.iotivity.org/browse/IOT-2405
Change-Id: I8e7e01b1bf645b6333166bd4624a82e9f0345bf8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20767
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
2 years ago[IOT-2097][IOT-2098] Cleanup of base64 code 87/19187/13
George Nash [Fri, 21 Apr 2017 05:48:41 +0000 (22:48 -0700)]
[IOT-2097][IOT-2098] Cleanup of base64 code

[IOT-2097] According to RFC4648 Base64 can accept empty data.
Fixed error for input containing no data for b64Encode and
b64Decode.

[IOT-2098] Add error checking to b64Decode. The original code
would decode any string even if it contained characters that are
invalid for base 64 encoding. Code now checks that all
characters found in the encoded string are [A-Z][a-z][0-9]+/=

The padding character '=' is checked to only be at the end of
the encoded string.

Unit tests improved. They now include test vectors from RFC4648
Unit tests now cover failure cases. Not just pass cases.

Improved documentation
 - Add file documentation for base64.h file
 - Add reference to RFC4648.
 - Documented all B64Result enum values
 - Add [in],[out] markup for b64Encode function
 - Add code example for b64Encode function
 - Add [in],[out] markup for b64Decode function
 - Add code example for b64Decode function

Bug: https://jira.iotivity.org/browse/IOT-2097
Bug: https://jira.iotivity.org/browse/IOT-2098

Change-Id: I3d6167c85a766ae8200339f00ef5c978f0ec55b7
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19187
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
2 years agoresource-encapsulation: Isolate unit_tests building 73/20873/15
Philippe Coval [Fri, 19 May 2017 16:53:57 +0000 (18:53 +0200)]
resource-encapsulation: Isolate unit_tests building

Previously gtest libs were propagated to shared libs:

  g++ -o .../resource-encapsulation/src/common/librcs_common.so \
  (...) \
  -lgtest -lgtest_main \
  -lc_common -llogger -ldl -lpthread -luuid -lrt -loc

Change-Id: I9bcaa39d8cd5e1166b2ec7d7ede14d44f79a476e
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20241
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Gregg Reynolds <dev@mobileink.com>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Origin: 1.3-rel
Reviewed-on: https://gerrit.iotivity.org/gerrit/20873
Reviewed-by: Alex Kelley <alexke@microsoft.com>
2 years agoTCP: Avoid calling WSASetEvent(NULL) 11/20711/5
Dan Mihai [Mon, 12 Jun 2017 17:36:35 +0000 (10:36 -0700)]
TCP: Avoid calling WSASetEvent(NULL)

Cope with unit tests calling CATCPStopServer even without
CATCPStartServer being called.

Change-Id: I9942985ea91a35992c7a9b6763c867748aed4b98
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20711
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
2 years agoTrigger OC_PRESENCE_TRIGGER_CHANGE on adapter and address change 31/12331/7
Harry [Tue, 27 Sep 2016 12:38:18 +0000 (13:38 +0100)]
Trigger OC_PRESENCE_TRIGGER_CHANGE on adapter and address change

Presence status is triggered to the connected clients when a adapter or
address change occurs.

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

Change-Id: Ia981a60aae63d9c386795ba25d0326a99fc13ae9
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Signed-off-by: Harry <h.marappa@samsung.com>
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12331
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>