iotivity.git
21 months agoMerge branch '1.3-rel' (df031b0) 33/24133/5
Philippe Coval [Mon, 12 Feb 2018 08:29:38 +0000 (09:29 +0100)]
Merge branch '1.3-rel' (df031b0)

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

Change-Id: Idf031b02c00bfd1a780243c07bec9cbfbc22fe0c
Bug: https://jira.iotivity.org/browse/IOT-2453
Origin: https://gerrit.iotivity.org/gerrit/#/c/24133/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agoiOS: Fix to build iOS Iotivity 1.3-Rel branch 45/23945/7
Yogisha Poojary [Fri, 12 Jan 2018 10:18:08 +0000 (05:18 -0500)]
iOS: Fix to build iOS Iotivity 1.3-Rel branch

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

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

add json2cbor save doxm section

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

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

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

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

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

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

Expect regressions if applied directly to 1.3.1-RC5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

and

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

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

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

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

Arduino files are explicitly removed again

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

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

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

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

Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

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

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

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

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

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

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

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

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

This was needed for ARTIK7 on fedora-24

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

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

add json2cbor save doxm section

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

Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

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

Could be done in scons install too

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

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

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

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

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

This was needed for ARTIK7 on Fedora-24

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

This was needed for ARTIK7 on fedora-24

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

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

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

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

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

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

Added provisioningclient menu 21 with selective OTM

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

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

gcc manual:

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

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

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

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

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

 #ifdef __cplusplus
 }

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

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

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

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

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

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

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

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

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

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

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

Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

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

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

Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Idc9e1ac5f318e4324bff6401e38097a6ea9cacda
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
21 months agobuild: install experimental logging headers 51/23051/10
Philippe Coval [Fri, 9 Jun 2017 13:51:56 +0000 (15:51 +0200)]
build: install experimental logging headers

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

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: If3a9e4309601c356ab9a2faaa9fbe26283408633
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21195
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
21 months agoSupport VS2017 for Building UWP 85/23985/1
C.J. Collier [Tue, 23 Jan 2018 23:13:41 +0000 (15:13 -0800)]
Support VS2017 for Building UWP

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Observed issue was:

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

This was needed for ARTIK7 on fedora-24

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

To support fedora-24 for ARTIK7

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

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

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

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

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

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

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

This was needed for fedora-24 for ARTIK7

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

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

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

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

This was needed for fedora-24 for ARTIK7

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

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

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

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

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

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

occlient was exiting on failure of discovery request
by OCDoResource.

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

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

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

See python comments for more details.

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

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

This was needed for ARTIK7 on fedora-24

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

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

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

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

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

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

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

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

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

For instance:

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

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

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

By loading credentials and ACL using presistant storage

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

Bug: https://jira.iotivity.org/browse/IOT-2505
Change-Id: If8e2044ae3d8850cc163bca1511de406202b1ab6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agoRemove arduino support 3/3 23/23723/5
Mats Wichmann [Sun, 10 Dec 2017 15:59:28 +0000 (08:59 -0700)]
Remove arduino support 3/3

Arduino is now supported only in iotivity-constrained,
but all the support in the iotivity build remains.
Remove in three phases (just to make shorter commits
to review).  This patch removes conditional Arduino code
in source files, as well as updates more text files
with instructions, etc.

The following files are *not* completely cleaned
of arduino mentions:

a) release notes: don't rewrite history on past releases
    resource/releaseNotes/Dec20th2014.txt
    resource/releaseNotes/Dec6th2014.txt
    resource/releaseNotes/Feb1st2015.txt
    resource/releaseNotes/Jan17th2015.txt
    resource/releaseNotes/Nov15th2014.txt
    resource/releaseNotes/Oct14th2014.txt
    resource/releaseNotes/Oct31st2014.txt
    resource/releaseNotes/Sept17th2014.txt
    resource/releaseNotes/Sept30th2014.txt
    resource/csdk/connectivity/RELEASE_v0.7
   the last file was moved to resource/releaseNotes

b) obsolete, leave alone:
    resource/csdk/connectivity/lib/libcoap-4.1.1/*

c) diagram source contains arduino mention:
    resource/docs/c-doc/devdox/dot/ca_overview.gv - diagrams
    resource/docs/cpp-doc/devdox/dot/ca_overview.gv - diagrams

d) some comment mentions Arduino. Might refer to something
   done to accomodate Arduino that does not need to be
   done any longer, but there was no direct conditional
   code involved. take another look at these.
    resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c
    resource/csdk/include/octypes
    resource/csdk/resource-directory/src/rd_server.c
    resource/csdk/security/include/experimental/securevirtualresourcetypes.h
    resource/csdk/stack/include/experimental/payload_logging.h
    resource/csdk/stack/src/ocendpoint.c
    resource/csdk/stack/src/ocstack.c

Change-Id: Ia557e16c2e7890609ca7cf14bd0e5386b23261dc
Signed-off-by: Mats Wichmann <mats@linux.com>
22 months agoMerge branch '1.3-rel' (acdf0b6) 53/23853/1
Philippe Coval [Tue, 2 Jan 2018 09:32:37 +0000 (10:32 +0100)]
Merge branch '1.3-rel' (acdf0b6)

Relate-to:
https://gerrit.iotivity.org/gerrit/#/c/23485/

Change-Id: Iacdf0b66d970a07b93bdcab0c793ab4117076da6
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months ago[IOT-2912] randompin 85/23485/3
Oleksandr Dmytrenko [Tue, 28 Nov 2017 10:06:17 +0000 (12:06 +0200)]
[IOT-2912] randompin

sample randompin server refactoring

Bug: https://jira.iotivity.org/browse/IOT-2912
Change-Id: I4aa744a34d706a995fb8d4d7d2927ff29a2ec39a
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
22 months ago[IOT-2912] svr db editor 75/23475/8
Oleksandr Dmytrenko [Mon, 27 Nov 2017 16:32:18 +0000 (18:32 +0200)]
[IOT-2912] svr db editor

svr db editor refactoring

Bug: https://jira.iotivity.org/browse/IOT-2912
Change-Id: Id08cb65a06c296619bf81814bf4ca9490688e2c8
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
22 months ago[IOT-2912]cloud sample 73/23473/6
Oleksandr Dmytrenko [Mon, 27 Nov 2017 14:30:52 +0000 (16:30 +0200)]
[IOT-2912]cloud sample

cloud sample refactoring

Bug: https://jira.iotivity.org/browse/IOT-2912
Change-Id: I5b229f56dcd21efb823e2663e418cfaee99f6ab5
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
22 months ago[IOT-2912] cpp provisioning 65/23565/6
Oleksandr Dmytrenko [Thu, 30 Nov 2017 16:42:02 +0000 (18:42 +0200)]
[IOT-2912] cpp provisioning

cpp provisioning refactoing

Bug: https://jira.iotivity.org/browse/IOT-2912
Change-Id: Ic80a6a9df54d1f6930ea779ad0a95dcd5b843c1c
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
22 months ago[IOT-2912] secureresourceprovider 57/23557/3
Aleksey Volkov [Fri, 1 Dec 2017 16:43:29 +0000 (18:43 +0200)]
[IOT-2912] secureresourceprovider

possible NULL derefence fix

Change-Id: Ib1cb32a746555ae66bc89b26bb35fbcb52223c18
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
22 months ago[IOT-2912] multipleownershiptransfermanager 59/23559/4
Oleksandr Dmytrenko [Fri, 1 Dec 2017 08:55:14 +0000 (10:55 +0200)]
[IOT-2912] multipleownershiptransfermanager

Possible NULL dereference fix

Change-Id: I89f0883d2e20616585a143c6b96e00d19528a907
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
22 months agobuild: Refactor JSON scanner for UserInstall 71/23671/4
Philippe Coval [Thu, 7 Dec 2017 13:14:26 +0000 (14:14 +0100)]
build: Refactor JSON scanner for UserInstall

This was tested using poky master,
after scon install was introduced.

Change-Id: I5e154eff8b5e669f0dc0992b93f32c1d595bb322
Bug: https://jira.iotivity.org/browse/IOT-524
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agobuild: Add docker file to build on fedora 53/23453/9
Philippe Coval [Wed, 15 Nov 2017 09:56:32 +0000 (10:56 +0100)]
build: Add docker file to build on fedora

This is useful for ARTIK7,

Use as:

  docker build -f ./extra/fedora/Dockerfile .

Notes:

For ARTIK10 downgrade to fedora22, it should work same.

Bug: https://jira.iotivity.org/browse/IOT-2668
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23335/
Change-Id: I4a4157a0fc68ab984342447f1862ce4592f1accb
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agoiOS: Fix to build IoTivity 1.3.1-RC5 35/23835/2
Yogisha Poojary [Wed, 27 Dec 2017 11:38:52 +0000 (06:38 -0500)]
iOS: Fix to build IoTivity 1.3.1-RC5

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

Dependency::If8eb4fd34191da7144f39b9e6d1870209d17c9ca

Change-Id: Ia97785ff88ef0b7e83538f09a394eefe824ba54f
Signed-off-by: Yogisha Poojary <yogisha.poojary@lnttechservices.com>
22 months agojava examples: work around two scons 3.0.1 bugs 75/23775/3
Mats Wichmann [Sat, 16 Dec 2017 14:29:12 +0000 (07:29 -0700)]
java examples: work around two scons 3.0.1 bugs

1. Scons 3 (accidentally) requires the list passed to
Jar() to be flat; the Java() builder returns a list and in
simpleclient we make a two-item list of that list and the
manifest, so it is not flat.  scons github already calls
Flatten on the passed value, so this problem will not exist
in future versions, but it is harmless for us to do it here.

Note the simpleclientserver and simpleserver examples should
run into the same problem but avoid it because they are
using workaround for an older scons bug, they are passing
['classes', 'MANIFEST.MF'] instead of [somelist, 'MANIFEST.MF'],
so their lists are already flat.

2. In some circumstances, the Jar() builder fails to identify
a manifest file passed in the source list. If the manifest is
passed as a File object (an scons node) there is no problem,
but if it passed as a string, the jar code tries to identify it
by doing os.path.isfile(), which fails in our setup (variantdir
in effect, duplicate=0 - thus source files do not physically
exist in the variant/build dir, only in the mind of scons,
direct Python calls do not see). This is scons bug 3042.
The change here is to pass as a node, which is harmless in
the face of future scons changes.

Change-Id: If66bd6e9d4f6dc9937b49f897d084ade31ef4c97
Signed-off-by: Mats Wichmann <mats@linux.com>
22 months agobuild: Add WITH_TEST to build of tests optionnal 17/23717/4
Philippe Coval [Fri, 8 Dec 2017 08:47:24 +0000 (09:47 +0100)]
build: Add WITH_TEST to build of tests optionnal

There are some case we don't want to build unit_tests
(and also not run them),
ie when building for tizen as linux (without tizen API)

In some others caseswhere we want to build tests and not run them,
to eventually package them and test them on various devices (ie Yocto).

In future it would be good to try to build test in more platforms,
and remove if linux cases,
Also platforms that don't care about unit_testing can use this flag.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ib628aa572023578e007917b0c0e03d9a9a48cb33
Origin: https://gerrit.iotivity.org/gerrit/23717
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agoeasy-setup: Install examples 77/23677/4
Philippe Coval [Thu, 7 Dec 2017 13:14:26 +0000 (14:14 +0100)]
easy-setup: Install examples

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

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ic97ae000ab4793d2e3c5c6614a7c0873572381e9
Origin: https://gerrit.iotivity.org/gerrit/#/c/23677/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agoresource-directory: Install examples 75/23675/5
Philippe Coval [Thu, 7 Dec 2017 13:14:26 +0000 (14:14 +0100)]
resource-directory: Install examples

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

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/23675
Change-Id: Ic424c6d8258f421aa2cf5c1b7ba118b49b0f4fd9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agotizen: Install examples to usr,lib,iotivity 33/23333/7
Philippe Coval [Thu, 16 Nov 2017 18:40:02 +0000 (19:40 +0100)]
tizen: Install examples to usr,lib,iotivity

Previously .dat where placed in /bin this not nice

Note yocto should align to this too

Bug: https://jira.iotivity.org/browse/IOT-2541
Bug-Tizen: https://bugs.tizen.org/browse/TINF-861
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23293/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Change-Id: I1ea8ebbe63b6ff8d029a195882b9c7e8ec69e640
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
22 months agoIOT-582 Android build generate universal APK 31/23231/6
George Nash [Wed, 15 Nov 2017 21:14:13 +0000 (13:14 -0800)]
IOT-582 Android build generate universal APK

Two major modifications:
1) The aar file no longer adds the TARGET_ARCH to the
name of the file. The aar file contains all of the
architectures that were built upto that point. This
has been the case for quite a while so the architecture
in the name only indicated the build that created the
aar file not the contents of the aar file.

2) When APK files are built it will try to build all
possible architectures as well as the universal APK
file.

Bug: https://jira.iotivity.org/browse/IOT-582
Change-Id: I11f5db9f4cb8c634afe4417b280e5feec6c3d7e9
Signed-off-by: George Nash <george.nash@intel.com>
22 months agoMerge branch '1.3-rel' (0f2ae82) 77/23777/1
Philippe Coval [Mon, 18 Dec 2017 08:28:24 +0000 (09:28 +0100)]
Merge branch '1.3-rel' (0f2ae82)

Relate-to:
https://gerrit.iotivity.org/gerrit/#/c/23637/

Change-Id: I0f2ae826a9dbe6ad3f328c24a556d6786b31a6bc
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoMerge "Merge branch '1.3-rel' (4239a6c)"
Phil Coval [Thu, 14 Dec 2017 17:45:48 +0000 (17:45 +0000)]
Merge "Merge branch '1.3-rel' (4239a6c)"

23 months agoRemove arduino support 2/3 03/23703/8
Mats Wichmann [Fri, 8 Dec 2017 15:38:31 +0000 (08:38 -0700)]
Remove arduino support 2/3

Arduino is now supported only in iotivity-constrained,
but all the support in the iotivity build remains.
Remove in three phases (just to make shorter commits
to review).  Part 2 removes arduino from all the other
build scripts which referenced it, and from auto_build.py
and the vagrant setup.

Change also removes the remaining arduino directories, as
follows:

    extlibs/arduino
    resource/c_common/ocatomic/src/arduino
    resource/c_common/ocrandom/test/arduino
    resource/csdk/connectivity/build/arduino
    resource/csdk/connectivity/lib/arduino
    resource/csdk/connectivity/src/bt_le_adapter/arduino
    resource/csdk/connectivity/src/ip_adapter/arduino
    resource/csdk/connectivity/src/tcp_adapter/arduino
    resource/csdk/logger/test/arduino
    resource/csdk/stack/samples/arduino
    resource/csdk/stack/test/arduino
    service/easy-setup/sampleapp/enrollee/arduino
    tools/arduino

which means some code files are removed as well.

Bug: https://jira.iotivity.org/browse/IOT-2927
Change-Id: Idd5001a810ff4f67022f60bcb9d3252f7de7ccc2
Signed-off-by: Mats Wichmann <mats@linux.com>
23 months agoresource: Fix occlientbasicops to support coaps 37/23637/5
Philippe Coval [Tue, 5 Dec 2017 15:20:02 +0000 (16:20 +0100)]
resource: Fix occlientbasicops to support coaps

The fix is to do querry only on resource's address (to use CoAPs channel)

Observed issue was:

 ./ocserverbasicops

  ./occlientbasicops -u 0 -c 0 -d 1 -p 0 -t 2
  (...)

  INFO: occlientbasicops: Callback Context for GET query recvd successfully
  INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
  INFO: occlientbasicops: SEQUENCE NUMBER: 16777216
  INFO: PayloadLog: NULL Payload
  INFO: occlientbasicops: =============> Get Response

I fixed it to:

  INFO: occlientbasicops: StackResult: OC_STACK_OK (...)
  INFO: PayloadLog: Payload Type: Representation (...)
  INFO: PayloadLog:     URI:/a/led (...)
  INFO: PayloadLog:             state(bool):false (...)

Extra note, it look like the parse function is never returning false.

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

23 months agonotification: Install examples 83/23683/3
Philippe Coval [Thu, 7 Dec 2017 13:29:45 +0000 (14:29 +0100)]
notification: Install examples

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

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I58398d6cec1cbd5a08dd5fe365ebe83d4d377323
Origin: https://gerrit.iotivity.org/gerrit/#/c/23683/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agotizen: Align to default for transport feat (all) 15/23715/3
Philippe Coval [Sat, 9 Dec 2017 00:33:55 +0000 (01:33 +0100)]
tizen: Align to default for transport feat (all)

Match value in build_common/SConscript.

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: I0d54e3b5388b5bdbee557a9ea555bc67b9baf867
Origin: https://gerrit.iotivity.org/gerrit/#/c/23715/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agotizen: Align to default for CLOUD feature (off) 13/23713/4
Philippe Coval [Sat, 9 Dec 2017 00:26:45 +0000 (01:26 +0100)]
tizen: Align to default for CLOUD feature (off)

Match value in build_common/SConscript,
check linux_full build target for CLOUD status,
maybe tizen_full should be introduced, first.

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Id49455f9e1f85f352f11f7c00a80143ca1955c0a
Origin: https://gerrit.iotivity.org/gerrit/#/c/23713/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agocsdk: Declare void functions as strict prototype 99/23699/2
Philippe Coval [Mon, 13 Nov 2017 23:39:06 +0000 (00:39 +0100)]
csdk: Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I15ef08db79fd3e775dd063adf46410813268c238
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoc_common: Add missing stub function 97/23697/2
Philippe Coval [Mon, 13 Nov 2017 16:33:15 +0000 (17:33 +0100)]
c_common: Add missing stub function

oc_mutex_assert_owner was missing from "noop" flavour

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I80ac02ddaf4fcb7ad6785b7e81f891096f3a07a9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoc_common: Declare strict void functions 95/23695/2
Philippe Coval [Mon, 13 Nov 2017 14:09:55 +0000 (15:09 +0100)]
c_common: Declare strict void functions

Declare void functions as strict prototype

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

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I8586d443f4919802cdb45c8bdef0797eb355448e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoMerge branch '1.3-rel' (4239a6c) 35/23735/1
Philippe Coval [Mon, 11 Dec 2017 15:00:47 +0000 (16:00 +0100)]
Merge branch '1.3-rel' (4239a6c)

Change-Id: I4239a6c37d27f1d0b776f32a211be6bba7e4d5f8
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months ago[IOT-2709] MOT 79/23579/3
Oleksii Beketov [Fri, 1 Dec 2017 12:54:11 +0000 (14:54 +0200)]
[IOT-2709] MOT

Multiple ownership enable

Change-Id: Ic6cff37ada8f84417c623bead93539f73d61b68d
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
23 months agoscene-manager: Install examples 81/23681/4
Philippe Coval [Thu, 7 Dec 2017 13:14:27 +0000 (14:14 +0100)]
scene-manager: Install examples

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

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I5ff74e727a624d2c7bac4ec9c584ac5030836edc
Origin: https://gerrit.iotivity.org/gerrit/#/c/23681/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoplugins: Install examples 73/23673/4
Philippe Coval [Thu, 7 Dec 2017 13:14:26 +0000 (14:14 +0100)]
plugins: Install examples

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

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ic3f5519397ff05c6084cd607f55633eed0f29045
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoAdded option for randompin_certificate 21/23721/2
Mushfiqul Islam Antu [Thu, 30 Nov 2017 12:25:31 +0000 (18:25 +0600)]
Added option for randompin_certificate

If a server supports both randompin and certificate
then the doxm.sct value should be 24, instead of
current default 16 on IoTivity.

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c3
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
(cherry picked from commit 6888f190c2e8a1f9bd875dc3f6f362905488eadb)

23 months agotizen: Enable to default for MOT feature (on) 91/23291/4
Philippe Coval [Tue, 3 Oct 2017 12:54:33 +0000 (14:54 +0200)]
tizen: Enable to default for MOT feature (on)

Match value in build_common/SConscript.

Bug: https://jira.iotivity.org/browse/IOT-2241
Origin: https://gerrit.iotivity.org/gerrit/#/c/23291
Change-Id: I0501472ca5b3735a89122053dd3fdb3f741be456
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agotizen: Align to default for PROXY feature (on) 81/23281/3
Philippe Coval [Wed, 15 Nov 2017 15:55:51 +0000 (16:55 +0100)]
tizen: Align to default for PROXY feature (on)

Match value in build_common/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Ic21e1579b9960611b0a8e5a24dc5214152a3107c
Origin: https://gerrit.iotivity.org/gerrit/#/c/23281/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoIOT-2774 Add getResourceHandleAtUri 59/23659/3 otgc-dekra-changes 1.3.1 1.3.1-RC7
George Nash [Wed, 6 Dec 2017 21:25:58 +0000 (13:25 -0800)]
IOT-2774 Add getResourceHandleAtUri

This is needed to be able to set a deivice type to
the /oic/d resource.

Bug: https://jira.iotivity.org/browse/IOT-2774
Change-Id: I179d593f4b1e0408c18f7c28e6f8bda586223a9e
Signed-off-by: George Nash <george.nash@intel.com>
23 months agoAdded option for randompin_certificate 45/23545/3
Mushfiqul Islam Antu [Thu, 30 Nov 2017 12:25:31 +0000 (18:25 +0600)]
Added option for randompin_certificate

If a server supports both randompin and certificate
then the doxm.sct value should be 24, instead of
current default 16 on IoTivity.

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c3
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
23 months ago[IOT-2788] Unlink Pairwise things doesn't work 35/23635/2
Vitalii Irkha [Tue, 5 Dec 2017 11:49:14 +0000 (13:49 +0200)]
[IOT-2788] Unlink Pairwise things doesn't work

This is workaround.

One of callbacks provide OC_STACK_INVALID_QUERY instead of OC_STACK_RESOURCE_DELETED.
Details please see in https://jira.iotivity.org/browse/IOT-2788.

Change-Id: Iccf2d6e5308ba2bc8322fa66c3acec395ef21811
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
23 months agoDon't delete in-use credInfo. 65/23365/2
Todd Malsbary [Fri, 20 Oct 2017 18:04:07 +0000 (11:04 -0700)]
Don't delete in-use credInfo.

Bug: https://jira.iotivity.org/browse/IOT-2828
Change-Id: Iac85f39806857767bbc6f5dcab02057f791bb5bc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/22931/

23 months agoDon't delete in-use credInfo. 31/22931/2
Todd Malsbary [Fri, 20 Oct 2017 18:04:07 +0000 (11:04 -0700)]
Don't delete in-use credInfo.

Bug: https://jira.iotivity.org/browse/IOT-2828
Change-Id: Iac85f39806857767bbc6f5dcab02057f791bb5bc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
23 months agoMerge "Merge branch '1.3-rel' (36c7f82)"
Phil Coval [Fri, 8 Dec 2017 10:16:20 +0000 (10:16 +0000)]
Merge "Merge branch '1.3-rel' (36c7f82)"

23 months agoRemove arduino support 1/3 67/23667/2
Mats Wichmann [Thu, 7 Dec 2017 15:02:37 +0000 (08:02 -0700)]
Remove arduino support 1/3

Arduino is now supported only in iotivity-constrained,
but all the support in the iotivity build remains.
Remove in three phases (just to make shorter commits
to review).  This patch removes from the top level
(root of the tree and build_common).

Assumption: the logic to avoid multi-transport and the
logic to build without dtls support were both written
in a general way, but the list of targets in both cases
contained just 'arduino', so this logic was dropped.

Change-Id: Ib120ab7d82ff91b5f744c638d31f1b430a50ccd7
Signed-off-by: Mats Wichmann <mats@linux.com>
23 months agoresource: Fix occlientbasicops to support coaps 39/23639/2
Philippe Coval [Tue, 5 Dec 2017 15:20:02 +0000 (16:20 +0100)]
resource: Fix occlientbasicops to support coaps

The fix is to do querry only on resource's address (to use CoAPs channel)

Observed issue was:

 ./ocserverbasicops

  ./occlientbasicops -u 0 -c 0 -d 1 -p 0 -t 2
  (...)

  INFO: occlientbasicops: Callback Context for GET query recvd successfully
  INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
  INFO: occlientbasicops: SEQUENCE NUMBER: 16777216
  INFO: PayloadLog: NULL Payload
  INFO: occlientbasicops: =============> Get Response

I fixed it to:

  INFO: occlientbasicops: StackResult: OC_STACK_OK (...)
  INFO: PayloadLog: Payload Type: Representation (...)
  INFO: PayloadLog:     URI:/a/led (...)
  INFO: PayloadLog:             state(bool):false (...)

Extra note, it look like the parse function is never returning false.

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