platform/upstream/iotivity.git
7 years agobuild: Windows: Work around coap.h race
Dan Mihai [Fri, 16 Jun 2017 14:41:45 +0000 (07:41 -0700)]
build: Windows: Work around coap.h race

Build coap.h before everything else, to work around an apparent
multi-threaded build race condition.

Bug: https://jira.iotivity.org/browse/IOT-2376
Change-Id: Ic112cfea42dfa1ac12735b4af882dc45a74c853d
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20891
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
7 years agoIOT-1583: Removing /W4 warnings - part 5.
Pawel Winogrodzki [Mon, 12 Jun 2017 22:31:27 +0000 (15:31 -0700)]
IOT-1583: Removing /W4 warnings - part 5.

Removing variable type and size mismatch warnings.

Change-Id: Ic0c2f4935faf5136c93c79f58f58cb0f3f59d2ab
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20731
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoresource/examples: Removing /W4 warnings
Pawel Winogrodzki [Mon, 12 Jun 2017 22:17:36 +0000 (15:17 -0700)]
resource/examples: Removing /W4 warnings

Removing "unreachable code" warnings due to infinite waits.

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

Change-Id: I8d057494e39540f35f1ec447217d70eff556d1c0
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20727
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRD: Removing /W4 warnings
Pawel Winogrodzki [Mon, 12 Jun 2017 22:07:15 +0000 (15:07 -0700)]
RD: Removing /W4 warnings

Making sure variables are always initialized before they get used.
This was an issue in case we'd hit an error and use "goto" to skip
parts of the code.

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

Change-Id: I35a114585371c61dab94a67d957f0b01a98938a5
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20723
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agooc_logger: Removing /W4 warnings
Pawel Winogrodzki [Mon, 12 Jun 2017 22:26:38 +0000 (15:26 -0700)]
oc_logger: Removing /W4 warnings

Disabling "unreachable code" warning for a known issue
inside a boost header.

See: https://svn.boost.org/trac/boost/ticket/5904.

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

Change-Id: Ic313fd1debc9df73eca2d747d6eda1b883b7b9be
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20729
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Reformat the examples SConscript to be more pythonic.
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>
7 years agostack/samples: Removing /W4 warnings.
Pawel Winogrodzki [Tue, 13 Jun 2017 00:12:12 +0000 (17:12 -0700)]
stack/samples: Removing /W4 warnings.

Removing variable shadowing warnings: there were a few
variables using the same name in one scope and thus one
overwritten the other.

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

Change-Id: I9b20da2c4ebea8bdb4bbc3b64c7d308060bf258e
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20735
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoresource/examples: Removing /W4 warnings.
Pawel Winogrodzki [Tue, 13 Jun 2017 00:12:53 +0000 (17:12 -0700)]
resource/examples: Removing /W4 warnings.

Removing variable shadowing warnings: there were a few
variables using the same name in one scope and thus one
overwritten the other.

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

Change-Id: Ifb3d1237bea27faa4b94739c13607c48cb0de46a
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20737
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoconnectivity: Fix permission of sources
Philippe Coval [Tue, 9 May 2017 17:28:56 +0000 (19:28 +0200)]
connectivity: Fix permission of sources

Change-Id: Ibc63061b15d67481370214fc322c7db302537018
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20657
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
(cherry picked from commit 98f5dc539f79f02615791397d4827480e2cc05f4)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20675

7 years agoresource/unittests: Removing /W4 warnings.
Pawel Winogrodzki [Tue, 13 Jun 2017 00:14:13 +0000 (17:14 -0700)]
resource/unittests: Removing /W4 warnings.

Removing variable shadowing warnings: there were a few
variables using the same name in one scope and thus one
overwritten the other.

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

Change-Id: I6405fd2119722b24c3a29c7f8478d1b801d0c1d4
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20741
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRD: Removing /W4 warnings.
Pawel Winogrodzki [Tue, 13 Jun 2017 00:06:31 +0000 (17:06 -0700)]
RD: Removing /W4 warnings.

Removing variable shadowing warnings: there were a few
variables using the same name in one scope and thus one
overwritten the other.

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

Change-Id: I13a8e9456f280347e2035cc80a9c7818facc51e9
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20733
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2409] IUT rejects /acl2 Update from CTT
Nathan Heldt-Sheller [Wed, 14 Jun 2017 00:59:48 +0000 (17:59 -0700)]
[IOT-2409] IUT rejects /acl2 Update from CTT

The CTT was posting an Update to /acl2 that included only
rowneruuid in the payload.  The IUT was rejecting because it
could not determine that the payload was /acl2 (vs. /acl v1).

This is wrong behavior by IUT because such a payload is actually
valid /acl2 and/or /acl v1 payload.

This patch changes the logic so that it only rejects an Update
based on version if it can determine it is an incompatible version -
in this case, v1 - and accepts it otherwise.

A similar problem exists in the /cred Update handler, which
(in a particular state) treats a payload containing just rowneruuid
as a failed attempt to Update the Owner credential.

This patch changes that logic too, to no longer treat a "NO_SECURITY_MODE"
credType as an Owner credential.

Change-Id: Ica9bde112cb87bd6ad6ee014cf7526928545d786
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20779
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoresource/src: Removing /W4 warnings.
Pawel Winogrodzki [Tue, 13 Jun 2017 00:13:28 +0000 (17:13 -0700)]
resource/src: Removing /W4 warnings.

Removing variable shadowing warnings: there were a few
variables using the same name in one scope and thus one
overwritten the other.

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

Change-Id: Ic30ecba67a98154eb506929ef23b1fabb560a42a
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20739
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Enable WITH_PROXY by default
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>
7 years agobuild: Set executables mode on extlibs scriptlets
Philippe Coval [Fri, 26 May 2017 10:17:50 +0000 (12:17 +0200)]
build: Set executables mode on extlibs scriptlets

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I767a9c68b0270b71ca4bd814526e51ddd4dad990
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20433
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
(cherry picked from commit 1191376d2ae3ccdf9888c105f21e8d9d68934638)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20577
Reviewed-by: Habib Virji <habib.virji@samsung.com>
7 years agonotification: Drop unnecessary gtest flags
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

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>
7 years ago[IOT-1802] Changing POST to PUT for creating a resource in sample
saurabh.s9 [Sun, 21 May 2017 09:34:00 +0000 (15:04 +0530)]
[IOT-1802] Changing POST to PUT for creating a resource in sample

Change-Id: I8b57b71a2642c0da041034f85c4c66f55e67d782
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20191
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoReformat the resource/csdk SConscripts to be more Pythonic 1/4
Mats Wichmann [Sat, 3 Jun 2017 18:54:54 +0000 (12:54 -0600)]
Reformat the resource/csdk SConscripts to be more Pythonic 1/4

This is now part 1 of 4, containing the sconscripts not
in connectivity, stack or security (see other three parts for those)

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

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

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: I3f818ef972a9c84f9d0aec27348ec6da07f49e02
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20817
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
7 years agotizen: prepare mbedtls for tizen_unsecured
Philippe Coval [Tue, 13 Jun 2017 22:32:55 +0000 (00:32 +0200)]
tizen: prepare mbedtls for tizen_unsecured

crypto functions are used by connectivity module

This prevents instalation of obsolete version,
like on jenkins:

https://build.iotivity.org/ci/job/iotivity-verify-tizen_unsecured/151/consoleFull

  + '[' '!' -d /home/jenkins-ci/workspace/iotivity-verify-tizen_unsecured/extlibs/mbedtls ']'
  + cp -r /home/jenkins-ci/iotivity-extlibs-03272015/mbedtls/mbedtls /home/jenkins-ci/workspace/iotivity-verify-tizen_unsecured/extlibs/mbedtls/mbedtls

Bug: https://jira.iotivity.org/browse/IOT-2237
Change-Id: Iffc8929e646b4edb624a12481b32f4929b743af4
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20773
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Peter Hatina <phatina@gmail.com>
Reviewed-by: Sushil Kumar Yadav <sushil.ky@samsung.com>
(cherry picked from commit 77da2a4856a79a1ab08e9c474d297e7ed6b75594)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20775
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
Tested-by: C.J. Collier <cjcollier@linuxfoundation.org>
7 years agotizen: Also build without security all configs
Philippe Coval [Wed, 17 May 2017 10:33:49 +0000 (12:33 +0200)]
tizen: Also build without security all configs

Introduce tizen_{secured,unsecured} for jenkins
For smooth transition tizen builder is preserved.

Also use bash for advanced tests (to parse options args)

Bug: https://jira.iotivity.org/browse/IOT-2237
Change-Id: Ib0a648b889d7d9956d6b26a9dc2111e7b9623b02
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19955
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
7 years agoresource-encapsulation: Isolate unit_tests building
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>
7 years ago[IOT-1928] Update mbedTLS to version 2.4.2
Kevin Kane [Thu, 18 May 2017 16:28:58 +0000 (09:28 -0700)]
[IOT-1928] Update mbedTLS to version 2.4.2

Make the build script a bit smarter about figuring out if it
needs to update and re-patch the mbedTLS dependency.

Change-Id: I6402a045ea03121b0704b9d83be0224bdb98ada4
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20059
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT 1819: Return URI of new resource in option header.
Soemin Tjong [Tue, 25 Apr 2017 06:33:57 +0000 (23:33 -0700)]
IOT 1819: Return URI of new resource in option header.

https://tools.ietf.org/html/rfc7252#section-5.8.2 specifies that the URI
of a new resource created by a server is returned in Location-Path
option.

Change-Id: I358d8ee127a598c2f2fdb8f101413eebbf100a89
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19245
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRef count IPCAOpen() with same app ID.
Soemin Tjong [Thu, 6 Apr 2017 01:52:31 +0000 (18:52 -0700)]
Ref count IPCAOpen() with same app ID.

In codegen implementation, it is difficult to pass around IPCAAppHandle
returned by IPCAOpen() to compartmentalized code generated for
each device or resource type.

IoTivity currently supports 1 server (an app is also a server) per
process (tracked by https://jira.iotivity.org/browse/IOT-1379).
Therefore multiple calls to IPCAOpen() in the same process is not
supported.

This change makes an exception so that IPCAOpen() will now return same
IPCAAppHandle when called with same app ID.

Change-Id: I9a3a2334e6fc9230595a68e3451c2a863c532824
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18851
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT - 2386] Fix for NULL reference possibility.
arya.k [Tue, 6 Jun 2017 06:56:09 +0000 (12:26 +0530)]
[IOT - 2386] Fix for NULL reference possibility.

Change-Id: I89898afd650f7095dd89b4b9616176092fd41c3a
Signed-off-by: arya.k <arya.kumar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20565
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2063] Enabled ca_api_unittest for CAGetNetworkInformation
hyuna0213.jo [Tue, 23 May 2017 04:49:24 +0000 (13:49 +0900)]
[IOT-2063] Enabled ca_api_unittest for CAGetNetworkInformation

Change-Id: I2279dc5ce94ae7262d7f425d857d929791c18796
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20293
Reviewed-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: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agocsdk: Fix permission of sources
Philippe Coval [Tue, 9 May 2017 17:29:22 +0000 (19:29 +0200)]
csdk: Fix permission of sources

Change-Id: I2e15f2378c03ddaa5972ebc4e126b6f914158f42
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20135
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ondrej Tomcik <ondrej.tomcik@kistler.com>
Reviewed-by: Thiago Moura <thiagogcm@gmail.com>
7 years agoBuild warning cleanup policyengine.cpp unit test
George Nash [Tue, 30 May 2017 22:49:12 +0000 (15:49 -0700)]
Build warning cleanup policyengine.cpp unit test

This cleans up [-Wcomment] warning from gcc.

This warning is given if comments end in the '\',
i.e. the line continuation character, because this
will cause the comment to be wrapped to the next
line of code.

This removes the error without changing the code.

Change-Id: I1323d4236f73985613b4acadc5655863310ab9f2
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20489
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
(cherry picked from commit 1e70a844529a8810975f091c1869cef92946f8d2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20595
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2276] Add Calling Convention to Public APIs on Windows
Omar Maabreh [Tue, 23 May 2017 00:33:43 +0000 (17:33 -0700)]
[IOT-2276] Add Calling Convention to Public APIs on Windows

Change-Id: Ia7b382c29c12d5997894234eee93c57edaec819c
Signed-off-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20289
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-1583: Temporary fix for remaining /W3 warnings.
Pawel Winogrodzki [Sat, 20 May 2017 05:34:21 +0000 (22:34 -0700)]
IOT-1583: Temporary fix for remaining /W3 warnings.

This change suppresses some of the remaining /W3 VS compiler warnings,
fixes for which are too intrusive to meet the 1.3-rel bar.

In addition to that we're enabling the /WX compiler option
to prevent any new /W3 warnings from being checked in.

Change-Id: I061bc1c83615e052d77f8eb6b96fd488d1f49e4b
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20487
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-2246 Avoid touching already-freed peer
Dan Mihai [Sat, 13 May 2017 03:40:22 +0000 (20:40 -0700)]
IOT-2246 Avoid touching already-freed peer

Change-Id: I55802664860aec4a02da209d3597d68ad405a4a9
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19859
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoFix potential infinite wait in IPCAFactoryReset() and IPCAReboot().
Soemin Tjong [Thu, 1 Jun 2017 01:59:43 +0000 (18:59 -0700)]
Fix potential infinite wait in IPCAFactoryReset() and IPCAReboot().

Without the predicate parameter, the wait_for() won't be unblocked from
earlier notify_all().

Also, relax the timing waiting for notifications in the unit tests.

Change-Id: I04d34f8221dc92239b27877b365dcb0d211c3458
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20519
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-2355: Change IPCA unit test agressive timeout.
Soemin Tjong [Wed, 24 May 2017 22:52:01 +0000 (15:52 -0700)]
IOT-2355: Change IPCA unit test agressive timeout.

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

The IPCA unit test "IsIoTivityWorking" has failed sporadically.
This test directly uses IoTivity OC APIs to ensure that the underlying
IoTivity stack is working.
The 2 second timeout is incorrect, it should follow RFC 7252.

Change-Id: Iff640c2dbc2423e4865a4d2c8856a766d5345fa4
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20375
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-2126 IOT-2349 CA: Windows: shutdown improvements
Dan Mihai [Tue, 23 May 2017 16:52:21 +0000 (09:52 -0700)]
IOT-2126 IOT-2349 CA: Windows: shutdown improvements

Continuing to use WSA after shutting it down might have unpredictable
side effects.

Change-Id: I738097cd83baacc24c673eb751fb363a05b67ebd
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20335
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoWindows: Fix Intermitent build error
Ibrahim Esmat [Thu, 25 May 2017 02:19:20 +0000 (19:19 -0700)]
Windows: Fix Intermitent build error

Linking to mbedcrypto fails when running build with multiple threads.
Add workaround to use the lib from the source of InstallTarget().
Also, Minor change to add an output line between building and
running tests.

Change-Id: I887bdaa99fe7d00728b5a0e40543bc77c5d726e3
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20403
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoeasy-setup: Fix permissions of sources
Philippe Coval [Tue, 9 May 2017 17:26:52 +0000 (19:26 +0200)]
easy-setup: Fix permissions of sources

Change-Id: I82e895918b69dc3eddd35917349807a3be03c40e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20365
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
7 years agotizen: Remove extlibs git history for gbs export
Philippe Coval [Tue, 23 May 2017 23:03:26 +0000 (01:03 +0200)]
tizen: Remove extlibs git history for gbs export

Note this is executed just before gbs build,
to allow prepare scripts to use git if needed.

Note:
I noticed an old version of mbedtls is cached on jenkins.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I6d28421e2778ca5f6815a450678df3a8e08033e3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/20345/
Reviewed-on: https://gerrit.iotivity.org/gerrit/20345
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 5fb0d3438b27afb6a1284bba5e4898c2daed6202)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20343

7 years agoFix ocserver sample code that causes memory corrupt.
Ziran Sun [Wed, 31 May 2017 14:08:05 +0000 (15:08 +0100)]
Fix ocserver sample code that causes memory corrupt.

Bug: https://jira.iotivity.org/browse/IOT-2381
Change-Id: I3aca7c79d97a2e4295568dbbb24de384b6993f50
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20497
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2380] Update ocserver sample to working with versioning.
bg.chun [Wed, 31 May 2017 06:10:46 +0000 (15:10 +0900)]
[IOT-2380] Update ocserver sample to working with versioning.

Update ocserver sample to work with versioning.

Change-Id: Idae7063273a41b7a522719d830d464e7e0490eb9
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20493
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agotizen: Support Tizen:4:Unified
Philippe Coval [Tue, 23 May 2017 15:05:53 +0000 (17:05 +0200)]
tizen: Support Tizen:4:Unified

Tizen:3 Profiles are not more used into Tizen:4:Unified,
so generic BT package is used.

Change-Id: Ie2a8fc01f2649b7ab389081c52f1d6eec8801e87
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20327
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jooseok Park <jooseok.park@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
7 years ago[IOT-2384][CHP][SampleApp] Delete request not working in secure mode
Veeraj Khokale [Tue, 30 May 2017 09:48:22 +0000 (15:18 +0530)]
[IOT-2384][CHP][SampleApp] Delete request not working in secure mode

Modify server ACE to provide full permission (0xF) so
that client can perform delete request as well

Change-Id: Iff3687505d8d3c27baac1b58ffd262bc7f10bb53
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20477
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agosecurity: Force link to libm (workaround)
Philippe Coval [Fri, 12 May 2017 18:50:10 +0000 (20:50 +0200)]
security: Force link to libm (workaround)

This is a workaround for g++-4.7,

For some (really) weird reason ceil function was not found
when linking (even if added only at end of linker command line).

If doubled (-lm -lm) it worked.

Observed issue:

  scons VERBOSE=1 RELEASE=true WITH_RA=1 WITH_RA_IBB=1

  g++ -o out/linux/x86_64/release/resource/csdk/security/provisioning/unittest/sample_server1 \
  -m64 -pthread out/linux/x86_64/release/resource/csdk/security/provisioning/unittest/sampleserver1.o \
  -Lout/linux/x86_64/release -L. (...)
  -Lout/linux/x86_64/release/resource/c_common -Lresource/c_common \
  -Lout/linux/x86_64/release/resource/csdk/logger -Lresource/csdk/logger \
  -Lextlibs/gtest/googletest-release-1.7.0/lib/.libs
  -locpmapi_internal -loc -loctbstack_internal -locsrm -lroutingmanager \
  -loc_logger_internal -lconnectivity_abstraction_internal
  -lcoap -lgtest -lgtest_main -lc_common -llogger -ldl -lpthread -lstrophe -lssl -lcrypto -lresolv
  -lwksxmppxep -lm
  -lboost_system -lboost_thread -luuid -lrt -lmbedtls -lmbedx509 -lmbedcrypto -lsqlite3 -lgio-2.0 -lgobject-2.0 -lglib-2.0
  out/linux/x86_64/release/libwksxmppxep.so: undefined reference to `ceil'

  gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

Bug: https://jira.iotivity.org/browse/IOT-2244
Change-Id: Ie8a69a4fdd99c346244cfaee17cc7e3780942b5a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agobuild: Propagate RPATH for crosscompilers
Philippe Coval [Wed, 24 May 2017 16:33:51 +0000 (18:33 +0200)]
build: Propagate RPATH for crosscompilers

Without this change,
depended libraries need to be specified explitly to linker.

Observed problem on Yocto:

  i586-poky-linux/i586-poky-linux-g++ (...) \
  -Lout/yocto/i586/release (...) \
  -lipca -lc_common -llogger -ldl -lpthread -luuid -lrt -lmbedcrypto (...)
  i586-poky-linux/6.3.0/ld: warning: liboc.so, \
  needed by out/yocto/i586/release/libipca.so, not found \
  (try using -rpath or -rpath-link) (...) \
  out/yocto/i586/release/libipca.so: \
  undefined reference to `OC::operator<<(std::ostream&, OC::AttributeType)'

Change-Id: I1dcbf18af601415c2261b44185a84225a2869281
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/20273
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
7 years agoAdd Failure check for OCGetResourceIns() in OCRDDeleteWithDeviceId().
Ziran Sun [Tue, 23 May 2017 10:33:53 +0000 (11:33 +0100)]
Add Failure check for OCGetResourceIns() in OCRDDeleteWithDeviceId().

Bug: https://jira.iotivity.org/browse/IOT-1809
Change-Id: I1aac3d7fae0dfc5fbee4d9715b328d18bd492b14
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20317
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2359][IOT-2360][IOT-2364] Separate provisioning with DOS 1.3.0
Dmitriy Zhuravlev [Thu, 25 May 2017 12:03:12 +0000 (15:03 +0300)]
[IOT-2359][IOT-2360][IOT-2364] Separate provisioning with DOS

Restore functions removed in https://gerrit.iotivity.org/gerrit/#/c/19931/
Add NULL checking for pDev2 in SRPProvisionCredentialsDos

Change-Id: Icf3397247478c97c7029380aadcaa5dd89b42870
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20387
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agochecking on empty host case in OCResource::setHost().
Ziran Sun [Thu, 25 May 2017 12:53:36 +0000 (13:53 +0100)]
checking on empty host case in OCResource::setHost().

Change-Id: Ia3cb2fb34e6b64ad4a5874bf49045550f4c5426c
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20391
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoIOT-2204: Fix IPCA build warnings on Linux.
Soemin Tjong [Wed, 24 May 2017 17:49:59 +0000 (10:49 -0700)]
IOT-2204: Fix IPCA build warnings on Linux.

A couple of warnings didn't get fixed earlier.

resource/IPCA/src/ocfframework.cpp:237:17: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
resource/IPCA/src/ocfframework.cpp:255:17: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

Change-Id: Id901213b83a45a0f6798d7f2b8c501339b7af71c
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20367
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2357] Platform error messages
Ibrahim Esmat [Thu, 25 May 2017 00:32:20 +0000 (17:32 -0700)]
[IOT-2357] Platform error messages

Update expected WARNING/ERROR messages to be INFO when trying to
get the local application data path.

Change-Id: I434f12f0183261e38cc14d6b37a05618690e736d
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20381
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2362] Fix OT for sampleserver_mfg
ol.beketov [Thu, 25 May 2017 13:27:44 +0000 (16:27 +0300)]
[IOT-2362] Fix OT for sampleserver_mfg

.dat and .json from resource/provisioning/examples
updated with cred field

Change-Id: I3f5e5ecbd3e08fda30762fb4b5ca57a4cad84d3c
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20393
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2368] fix JNI crash issue for client terminate
jihwan.seo [Thu, 25 May 2017 13:30:58 +0000 (22:30 +0900)]
[IOT-2368] fix JNI crash issue for client terminate

Change-Id: Ibc28948afc01f5a905d7cbd4f5bcac0772d270c7
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20395
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-2369] check the start flag when ip adapter is enabled
hyuna0213.jo [Thu, 25 May 2017 12:34:37 +0000 (21:34 +0900)]
[IOT-2369] check the start flag when ip adapter is enabled

Change-Id: I4fff403f809931b1bd2d4c49ea087b07d498333d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20389
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Masud Bhuiyan <m.parves@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1943] updated .json and .dat in /csdk/stack/samples/linux/secure
Nathan Heldt-Sheller [Mon, 22 May 2017 17:54:48 +0000 (10:54 -0700)]
[IOT-1943] updated .json and .dat in /csdk/stack/samples/linux/secure

These are being referenced as examples in addition to the files
in /csdk/security/provisioning/samples and so must be updated.

Please include these updates in 1.3.0 to avoid creating additional
bad .json and .dat files based off these.

Change-Id: I9f54988c1fb2914a2b63b7d4887edef99e27f440
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20267
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agofixed testcase for creating mongodb in account
Jung Seungho [Wed, 24 May 2017 08:16:16 +0000 (17:16 +0900)]
fixed testcase for creating mongodb in account

Change-Id: Ic391d7315225d04fd39a414d1400c2b8f5d24178
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20357
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Tested-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoFix invalid test case code
Jee Hyeok Kim [Wed, 24 May 2017 02:33:19 +0000 (11:33 +0900)]
Fix invalid test case code

1. Fix test case regarding changed framework

Change-Id: I13eadf1143e7118ba6d55416aa14d5c6838455c3
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20355

7 years agoFix a crash error on AccountManager APIs
Jaewook Jung [Wed, 24 May 2017 01:54:14 +0000 (10:54 +0900)]
Fix a crash error on AccountManager APIs

Fix a crash error occurred when throwing jni exception.

Change-Id: I941b0f90c62e7965bd112f27061c4835e5e3a9bc
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20353
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix TLSAdapter unit tests in RC3
ol.beketov [Tue, 23 May 2017 16:49:55 +0000 (19:49 +0300)]
Fix TLSAdapter unit tests in RC3

Change-Id: I4cf4a6a01c64e8e455e51a3fca88e512b516e60c
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20325
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoIOT-2351 CA: Parse all interfaces
Dan Mihai [Tue, 23 May 2017 20:49:32 +0000 (13:49 -0700)]
IOT-2351 CA: Parse all interfaces

The local variable interfaces gets decremented during the loop,
but the entire iflist has to be parsed.

Fixes new test errors that started on my machine with recent change
e3a3f65569f15fdf711c9d0a3123e6951f6499ba :

[ RUN      ] CATests.GetNetworkInformationTest
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error: Value of:
tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error: Value of:
strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
[  FAILED  ] CATests.GetNetworkInformationTest (5 ms)

Change-Id: If3a74a0739be6a53373f8b25436a50304029d751
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20337
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2340] Added NULL check for 'pdu->transport_hdr'
arya.k [Tue, 23 May 2017 10:07:50 +0000 (15:37 +0530)]
[IOT-2340] Added NULL check for 'pdu->transport_hdr'

Change-Id: Id8c6c86421f156cad612417c70aa58064b3ab5ad
Signed-off-by: arya.k <arya.kumar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20315
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2314] De-reference pResponse done after null check.
Sushil Yadav [Tue, 23 May 2017 10:34:20 +0000 (16:04 +0530)]
[IOT-2314] De-reference pResponse done after null check.

In InProcServerWrapper::sendReponse() pResponse tries to dereference before
checking for the null. The bug was introduced for as part of IOT-1583.
Change-Id: Ic4ec8a08d3934d698af493703de1966b78702dba
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20319
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2300] Call callback when delete roles resource
Greg Zaverucha [Mon, 22 May 2017 18:26:06 +0000 (11:26 -0700)]
[IOT-2300] Call callback when delete roles resource

When deleteting roles with OCDeleteRoleCertificateByCredId, the
callback provided by the caller was not being called.

Change-Id: I51da5fe61760ff5561fd676e5c220905f106f512
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20269
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2113] Change the logic not to delete double time
ol.beketov [Thu, 4 May 2017 13:59:56 +0000 (16:59 +0300)]
[IOT-2113] Change the logic not to delete double time

Change-Id: I56923e53e9b81da45b9ff9e50e7df9cdde233c25
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19631
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2342] Fix a crash issue on secureresourcemanager.c
Jaewook Jung [Tue, 23 May 2017 05:26:46 +0000 (14:26 +0900)]
[IOT-2342] Fix a crash issue on secureresourcemanager.c

Add null checking for a resource object which could be NULL if server
receives a request message including resource uri which server doesn't
have.

Change-Id: Idf29a43aeca5a919c0b22d3f0cd9ce507c8935ab
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20297
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix compile error with g++ 6.3.1 and RD unit tests.
Todd Malsbary [Mon, 22 May 2017 16:11:45 +0000 (09:11 -0700)]
Fix compile error with g++ 6.3.1 and RD unit tests.

gtest.h: In instantiation of 'testing::AssertionResult \
    testing::internal::CmpHelperNE(const char*, const char*, const \
    T1&, const T2&) [with T1 = long int; T2 = char*]':
rddatabase.cpp:126:9:   required from here
gtest.h:1577:28: error: ISO C++ forbids comparison between pointer \
    and integer [-fpermissive]

Change-Id: I6e5a2863fc6d45dffb5bc61526ae9f786eb1c638
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20263
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2322][CHP][SampleApp] Coap http proxy is not working in secured mode
Veeraj Khokale [Tue, 23 May 2017 04:31:01 +0000 (13:31 +0900)]
[IOT-2322][CHP][SampleApp] Coap http proxy is not working in secured mode

1. Update dat files for proxy samples to be same as linux
   secure samples.
2. Modify logic to form server address according to linux
   secure samples while initiating proxy request.
3. Since request URI is NULL for proxy request check this
   condition before asserting role certificates in OCDoRequest().
   This also removes the need for NULL check of request info
   resource uri.

Change-Id: I20003ac7c7781666bbd4aa8955c4cc18b5a3262f
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: uzchoi <uzchoi@samsung.com>
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20257
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years ago[IOT-2303] Modify comment to OCProvisionCredentials
Jongmin Choi [Fri, 19 May 2017 07:35:28 +0000 (16:35 +0900)]
[IOT-2303] Modify comment to OCProvisionCredentials

IOT-2303. Comment modified to show optional parameter

Change-Id: Iae07f2496ca3295d569ab0653afc8b61b0643605
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20101
Reviewed-by: Md. Imtiaz Hossain <imtiaz.h@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2344] Use correct index when checking for alloc failure.
Todd Malsbary [Mon, 22 May 2017 18:45:40 +0000 (11:45 -0700)]
[IOT-2344] Use correct index when checking for alloc failure.

dimensions[0] and i may be different values.  The urlInfo is allocated
to dimensions[0] but checked against i.

Bug: https://jira.iotivity.org/browse/IOT-2344
Change-Id: Ibff3fc62d551417a71e7496027452b3d88cad413
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20271
Reviewed-by: Srikrishna Gurugubelli <srikguru@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
7 years agoFix build warning on RE.
KIM JungYong [Mon, 22 May 2017 08:54:28 +0000 (17:54 +0900)]
Fix build warning on RE.

When RE build as Tizen, one of defination was redefined.
In this patch, defination tag is changed.

Change-Id: Ice25e9907481f66dac4b8a1e0aeb535120c936f0
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20227
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2063] Enable endpoints filtering in CAIPGetInterfaceInformation()
hyuna0213.jo [Tue, 23 May 2017 04:03:48 +0000 (13:03 +0900)]
[IOT-2063] Enable endpoints filtering in CAIPGetInterfaceInformation()

https://gerrit.iotivity.org/gerrit/#/c/19355/ was modified to make
changes for all platforms.

Change-Id: Ib653daaad453556354b108c673b34c06a197c5f9
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19821
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove a build warning in Easy setup for Android build
Jihun Ha [Mon, 22 May 2017 10:22:41 +0000 (19:22 +0900)]
Remove a build warning in Easy setup for Android build

* Change minSdkVersion to 21 in AndroidManifest.xml
* Change target source files for jni build ONLY to cpp files

Change-Id: Ic45acb59d66d30c991514a2bec38583c0e7f1550
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20243
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2175] Fix regression with optional 'pri' property.
Todd Malsbary [Mon, 22 May 2017 16:01:10 +0000 (09:01 -0700)]
[IOT-2175] Fix regression with optional 'pri' property.

The checks added in commit 6758c572ecfa068d953bd3d5ed9614885dae01b1
made 'pri' mandatory again.

Bug: https://jira.iotivity.org/browse/IOT-2175
Change-Id: Idb6137f45bf06910a9789f23c87486df2289abca
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20261
Reviewed-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: Uze Choi <uzchoi@samsung.com>
7 years agoFix provisioning unit tests
Oleksandr Dmytrenko [Mon, 22 May 2017 10:58:28 +0000 (13:58 +0300)]
Fix provisioning unit tests

Update test due to DOS enabling

Change-Id: I9f0c4b0b01ee3fe79a2126cd580cca4e6d374afd
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20247
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2302] Don't assert roles for KeepAlive
hyuna0213.jo [Mon, 22 May 2017 11:29:46 +0000 (20:29 +0900)]
[IOT-2302] Don't assert roles for KeepAlive

Remove assert role in case of TCP KeepAlive

Patch #1: initial upload

Bug: https://jira.iotivity.org/browse/IOT-2302
Change-Id: If99610a3a302357aa33ac0d1466219e78fdd01fa
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20217
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2330] fix block issue related rfcomm accept logic
jihwan.seo [Mon, 22 May 2017 07:58:44 +0000 (16:58 +0900)]
[IOT-2330] fix block issue related rfcomm accept logic

Change-Id: I79f62fdd362542f1dc05cb77f986e34587c422e0
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20223
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoFilter out an exceptional case if a response payload of discovery is NULL
Jihun Ha [Mon, 22 May 2017 10:58:53 +0000 (19:58 +0900)]
Filter out an exceptional case if a response payload of discovery is NULL

If a response payload of discovery is NULL, which means discovery request
is failed for some reason, it should not proceed a further operation.
Only if a result of discovery request is OK, GET/PUT/POST requests can be
performed, further.

Change-Id: I95e79038dfae5e455f61db89aa9c7f3a724cee29
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20245
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Glen Youngjin Kim <glen.kim@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoIOT-2274 : Json2Cbor support for swagger files - introspection
Srikrishna Gurugubelli [Fri, 19 May 2017 23:46:07 +0000 (16:46 -0700)]
IOT-2274 : Json2Cbor support for swagger files - introspection

Change-Id: I0ae46770b08fb6b8c2d632189a060dc14e0e94c0
Signed-off-by: Srikrishna Gurugubelli <srikguru@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19541
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2205] g_sslContextMutex synchronization improvements
Dan Mihai [Thu, 4 May 2017 13:24:20 +0000 (06:24 -0700)]
[IOT-2205] g_sslContextMutex synchronization improvements

Change-Id: Ib5e6df4e02da583e086a07591ef1e35f367ae4f0
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19633
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoIOT-1828 Add oc_mutex_new_recursive
Way Vadhanasin [Thu, 27 Apr 2017 18:31:13 +0000 (11:31 -0700)]
IOT-1828 Add oc_mutex_new_recursive

This change adds ability to create oc_mutex with recursive support.

The function oc_mutex_new_recursive() will be used by a later change
in OCStack to remove the responsibility of calling OCProcess from
applications so that they don't have to call it in an endless loop.

Change-Id: I0d60188af9bce866f5ba18800292204c78daba11
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19605
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoIOT-1828 Fix oc_mutex_assert_owner bug
Way Vadhanasin [Thu, 27 Apr 2017 17:12:45 +0000 (10:12 -0700)]
IOT-1828 Fix oc_mutex_assert_owner bug

When a mutex goes through the condition variable wait API, there is a
bug that causes oc_mutex_assert_owner to fail. This patch fixes that
bug.

Change-Id: I0d60188af9bce866f5ba18800292204c78daba12
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19373
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19857
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2284] connectivity: Fixed dead lock issue in catcpserver
hyuna0213.jo [Sun, 21 May 2017 23:51:20 +0000 (08:51 +0900)]
[IOT-2284] connectivity: Fixed dead lock issue in catcpserver

use caqueueingthread to send tls message in CATCPPacketSendCB

Bug: https://jira.iotivity.org/browse/IOT-2284
Change-Id: Ie32ef9d9c593c3668232263ce9a58ad476986f83
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20109
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoRevert cloud sign-up response behavior
Jee Hyeok Kim [Mon, 22 May 2017 08:22:57 +0000 (17:22 +0900)]
Revert cloud sign-up response behavior

1. Revert cloud behavior not to disconnect client
   after cloud sends sign-up response to client.

Change-Id: I367dfe4ebe16567ada67ae2f7aac8b8a4c0f5db2
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20225
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMake loading of oauth libraries available without changing iotivity codebase.
Ondrej Tomcik [Wed, 17 May 2017 22:15:45 +0000 (00:15 +0200)]
Make loading of oauth libraries available without changing iotivity codebase.

Change-Id: I4ac25b7f605e355fc3aad286baa206d67584be69
Signed-off-by: Ondrej Tomcik <ondrej.tomcik@kistler.com>
Issue: IOT-2316
Reviewed-on: https://gerrit.iotivity.org/gerrit/20009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoUpdate cloud project README files
Jee Hyeok Kim [Mon, 22 May 2017 00:11:18 +0000 (09:11 +0900)]
Update cloud project README files

Change-Id: I10a04fcc499fa8de7fccfd6333d74f6688bb691b
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20209
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ondrej Tomcik <ondrej.tomcik@kistler.com>
7 years ago[IOT-2295] Some libraries in "services" don't have the soname set.
Herve Jourdain [Thu, 18 May 2017 08:06:57 +0000 (16:06 +0800)]
[IOT-2295] Some libraries in "services" don't have the soname set.

In the android case, this results in some jni libraries not being able
to load the shared libraries they depend upon, which results in errors.
The solution is to add the soname for the libraries that don't have it.

Change-Id: I52e3e3e182b1aeb9257862c7253d11023a634ac3
Signed-off-by: Herve Jourdain <herve.jourdain@beechwoods.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20105
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoIoT-1842: Fix OCRepresentation issues on VS2013.
Soemin Tjong [Wed, 3 May 2017 00:51:02 +0000 (17:51 -0700)]
IoT-1842: Fix OCRepresentation issues on VS2013.

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

Removed the not working shallow copy of the OCRepresentation object.
No problem is observed.

Deep copy should also fix the problem if any issue is found in the
future.

Change-Id: Ifc4aba57a591d0cb6a55e65e1a179e2c8a9ebc08
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19553
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-2271] [IOT-2308] fix hard-coded ACL for discovery and onboarding
Nathan Heldt-Sheller [Wed, 17 May 2017 02:34:21 +0000 (19:34 -0700)]
[IOT-2271] [IOT-2308] fix hard-coded ACL for discovery and onboarding

The GetDefaultACL() function needed to be updated to /acl2 format.
Fixed the printACL() function to support ace2 as well.
Fixed aclresourcetest.cpp unit tests.
Updated related .json and .dat files.

Change-Id: Id1a14067e3c9d743cab489c733486fcea1e91d52
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19971
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoFix defects detected by static code analyzer
Jaewook Jung [Fri, 19 May 2017 02:02:29 +0000 (11:02 +0900)]
Fix defects detected by static code analyzer

 - fixed memory leak
 - removed unreachable codes
 - add a null checking before refer a character pointer

Change-Id: Ie49c44f0d2e5211dec24a607382c202900b4f6a3
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20087
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Glen Youngjin Kim <glen.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-2334][IOT-2335] Fixed presence sample app crash issue
hyuna0213.jo [Mon, 22 May 2017 04:50:11 +0000 (13:50 +0900)]
[IOT-2334][IOT-2335] Fixed presence sample app crash issue

we should call CADestroyToken() to free memory after merging
https://gerrit.iotivity.org/gerrit/19263

Bug: https://jira.iotivity.org/browse/IOT-2334
Bug: https://jira.iotivity.org/browse/IOT-2335
Change-Id: I10fb78d1f6f63a31678b07d917da547e054161b0
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20211
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Glen Youngjin Kim <glen.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix build warning on Notification service.
KIM JungYong [Mon, 22 May 2017 06:23:26 +0000 (15:23 +0900)]
Fix build warning on Notification service.

1. unused parameters is resolved.
2. implicit using of functions is fixed as including owned header.
3. print format is fixed.

Change-Id: I240ac626f6ed9f1aa02db7980ba657ae666653e9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20215
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agonotification: Build when cloud is not enabled
Philippe Coval [Fri, 12 May 2017 18:50:10 +0000 (20:50 +0200)]
notification: Build when cloud is not enabled

Problem was observed while building with:

scons VERBOSE=1 RELEASE=true SECURED=0 WITH_MQ=PUB,SUB,BROKER

  service/notification/examples/linux/notificationconsumer.c:268:23: \
  error: 'CLOUD_ADDRESS' undeclared (first use in this function)
  service/notification/examples/linux/notificationconsumer.c:268:23: \
  note: each undeclared identifier is reported only once for each function it appears in

Bug: https://jira.iotivity.org/browse/IOT-2244
Change-Id: I12f9a457ac7f838b90567794cbb030bdf80c3dc9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19835
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2281] /oic/sec/amacl responding to GET but not to POST
Nathan Heldt-Sheller [Sat, 20 May 2017 18:36:29 +0000 (11:36 -0700)]
[IOT-2281] /oic/sec/amacl responding to GET but not to POST

Until AMS and /amacl functionality is implemented, the /amacl Resource
should not be instantiated as it misleads Clients (including CTT) into
expecting full Specification behavior.

Change-Id: Id542b7a5974cb96ae84e7165326e4d2e8170d5dd
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20185
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoFix two "implicit function declarations
Mats Wichmann [Fri, 7 Apr 2017 16:42:20 +0000 (10:42 -0600)]
Fix two "implicit function declarations

service/easy-setup/enrollee/src/easysetup.c:182:9: warning: implicit declaration of function 'RegisterConnectRequestEventCallBack' [-Wimplicit-function-declaration]
service/notification/examples/linux/notificationprovider.c:99:14: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]

Change-Id: I0e449b2834da90422f44e116c6ee91f241d6ec9e
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18613
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit f33bfc11627ee1adc9bcde85fea4e5f1df0ca197)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19943

7 years agoWindows: single-threaded unit test run
Dan Mihai [Thu, 18 May 2017 17:29:06 +0000 (10:29 -0700)]
Windows: single-threaded unit test run

Serialize the tests, because otherwise investigation of failures is
too difficult. For an example of puzzling failure, see:
https://build.iotivity.org/ci/job/iotivity-verify-windows-x86-vs2015/1495/

Change-Id: I90b836b4c4c6587de108de32d761f99fb3073819
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20061
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2280] update /doxm.rowneruuid in POST handler
Nathan Heldt-Sheller [Fri, 19 May 2017 00:53:36 +0000 (17:53 -0700)]
[IOT-2280] update /doxm.rowneruuid in POST handler

This workaround fixes issue reported in 2280, but the root cause of
2280 is that the /doxm POST handler still does all sorts of strange
things per IOT-2107.  IOT-2107 will certainly result in another failed
TC shortly.  I am changing IOT-2107 to P1 and to Fix In 1.3.0.  This
patch doesn't hurt in the meantime to resolve 2280.

Change-Id: I2204cddabe943941f46136b60d0922a77f208665
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20083
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
7 years ago[IOT-2293] [IOT-2192] reject POST to /acl2 Resource with ACL1 payload
Nathan Heldt-Sheller [Sat, 20 May 2017 20:42:52 +0000 (13:42 -0700)]
[IOT-2293] [IOT-2192] reject POST to /acl2 Resource with ACL1 payload

/acl2 POST handler now calls a version-check-only optional CBORPayloadToAcl()
function and, if an acl1 payload is found, denies the POST request.

This update caught some unit test issues that were also corrected with
this patch.

Change-Id: I20d148ef037c82f5862fd9fec156bbb399ab7417
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20189
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
7 years agoIgnore introspection
Dmitriy Zhuravlev [Sun, 21 May 2017 14:55:35 +0000 (17:55 +0300)]
Ignore introspection

Skip /introspection resource in secure stack sample

Change-Id: I36dd6718ba57d0712b22a147e3a7d2c638fe1c92
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20199
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-2105] Removing undocumented property oxmtypes from doxm
saurabh.s9 [Mon, 8 May 2017 08:34:55 +0000 (14:04 +0530)]
[IOT-2105] Removing undocumented property oxmtypes from doxm

[patch 2] Retrigger jenkins

Change-Id: I2fc90f3814471ad6c0961b3d6266dc1a04fe1fc3
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19703
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2315] gAcl fix
Oleksandr Dmytrenko [Fri, 19 May 2017 10:36:30 +0000 (13:36 +0300)]
[IOT-2315] gAcl fix

1) Problem of accessing 'gAcl' global pointer variable fix
2) compile warning fix

Change-Id: Ib79d6b9e2ad3c6a377ca08b30252378356a31a28
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20127
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
7 years ago[IOT-2337] Fix credential resource warnings
Dmitriy Zhuravlev [Sun, 21 May 2017 10:23:59 +0000 (13:23 +0300)]
[IOT-2337] Fix credential resource warnings

Fix compiler warnings in credresource.c

Change-Id: Ibf6d9a115771c444e656329950a8f5c88e9f5ff6
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20195
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
7 years ago[IOT-2282] Do not update ACL in SVR DB when receive NULL aces from cloud
Andrii Shtompel [Sun, 21 May 2017 09:52:05 +0000 (12:52 +0300)]
[IOT-2282] Do not update ACL in SVR DB when receive NULL aces from cloud

Change-Id: I0aea3490cd9f41c6a192c2ed87d8f49c80f6ac3c
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20193
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
7 years ago[IOT-2087] Check NULL pointer after realloc
ol.beketov [Sun, 21 May 2017 09:37:48 +0000 (12:37 +0300)]
[IOT-2087] Check NULL pointer after realloc

Change-Id: Ia9eac5375ea4d322cbe4f685588a57b6af047deb
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19621
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>