platform/upstream/iotivity.git
4 years agoDisable Easy Setup Test Cases 53/236353/1
Kush [Wed, 29 Apr 2020 06:01:56 +0000 (11:31 +0530)]
Disable Easy Setup Test Cases

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/692
(cherry-picked from 8ad1554bd5996b8902b9aa093fe66bbb4341a25e)

Change-Id: Ia4b3e78aaf00744f04acc2088850e0b7e100660f
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years ago[UnitTest]Enabling ocevent test cases 52/236352/1
Sudipto [Tue, 16 Jun 2020 10:26:19 +0000 (15:56 +0530)]
[UnitTest]Enabling ocevent test cases

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/691
(cherry-picked from 371b5fde8d1b0b29c70f77b5f261724b97cba1f9)

Change-Id: Ib87c0e026ebb815ab3b71c3112cfdf886f7c9f60
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoUpdate generate coverage report script 51/236351/1
Kush [Wed, 29 Apr 2020 04:55:59 +0000 (10:25 +0530)]
Update generate coverage report script

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/688
(cherry picked from 78cf5ff7048113cf3cbb86d1a693976c4d109294)

Change-Id: I601fa5291c2b12b53904a929e0b59b371a22215f
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years ago[Unit Test] Adding Unit Test for CAManager.cpp in IoTivity C++ Wrapper 50/236350/1
Sudipto [Tue, 16 Jun 2020 10:06:21 +0000 (15:36 +0530)]
[Unit Test] Adding Unit Test for CAManager.cpp in IoTivity C++ Wrapper

- Added Unit Test for CAManager.cpp
- Changed the SConscript to build CAManagerTest.cpp

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/684/commits
(cherry-picked from 08ce4fa0814b6c85a01e0a90be4821f523bdac3c)

Change-Id: Ie704b0fbb947365c741e100d0e48c809e79a5aeb
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoAdd Unit Tests for EasySetup APIs. 91/235991/1 accepted/tizen/unified/20200612.144948 submit/tizen/20200611.232159
Senthil Kumar G S [Wed, 4 Dec 2019 11:00:21 +0000 (16:30 +0530)]
Add Unit Tests for EasySetup APIs.

UT for some of the samsung specific APIs are added.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/633
(cherry-picked from 1798784a33171c8902d64fd5cbb083c370a04e13)

Change-Id: Ib37c3d3ce83a2272f82a43a6567dc996b0647199
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoAndroid build fix 90/235990/1
Oleksii Beketov [Mon, 13 Apr 2020 20:29:17 +0000 (23:29 +0300)]
Android build fix

After mbedTLS revision update, GCC < 5.0 treated the x86 ebx as a
fixed reserved register when building as PIC, leading to errors

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/678
(cherry-picked from f96e428b9658a9d4d60417c53d0689fe7b02d684)

Change-Id: I80928e1bfcfbae5cec0173a5dd8a9b655b1c277a
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoissue in OwnerUuidUpdateHandler 89/235989/1
Vitalii Irkha [Thu, 16 Apr 2020 10:24:03 +0000 (13:24 +0300)]
issue in OwnerUuidUpdateHandler

Fix possible crash in OwnerUuidUpdateHandler() API

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/682
(cherry-picked from 0132766ed5abdc8252f5ebbdd20583af0b203eda)

Change-Id: Iee6f14b176b52b72fb55e2d9b22ed11d9bc70492
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoFix for Sonarqube Bugs 88/235988/1
samanway [Fri, 17 Apr 2020 04:52:50 +0000 (10:22 +0530)]
Fix for Sonarqube Bugs

- Redundant condition checking reported in caleclient.c, corrected
- Added NULL check in NSProviderTopic.c

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/683
(cherry-picked from 904203befcb4bfd93a2f91f5b97c792715196992)

Change-Id: Id8c7d6e4b91693d4ef07c10e0628ef1546870cf6
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoDisable NSProvider unit test 87/235987/1
Kush [Tue, 14 Apr 2020 20:45:23 +0000 (02:15 +0530)]
Disable NSProvider unit test

Due to stack smashing error, disabling notiifcation provide unit test cases

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/681
(cherry picked from a622a60cb9abaf76f78403bbdf0e4adb444c1ab5)

Change-Id: I8e5e6d9882c9d9ed220b29de26c4ac3c4e3cc8d1
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoFix OCException Test Case 86/235986/1
Kush [Tue, 14 Apr 2020 17:16:17 +0000 (22:46 +0530)]
Fix OCException Test Case

Disable cloud from coverage report

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/680
(cherry-picked from d2157c697246b85622b8739150504377cfc61833)

Change-Id: I7563ded9ba7dcb8d95a903c1866212284fe87776
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoWhen compiling IoTivity with WITH_CLOUD=true 85/235985/1
Kush [Tue, 14 Apr 2020 04:43:37 +0000 (10:13 +0530)]
When compiling IoTivity with WITH_CLOUD=true

Aircon_controlee example fails to compile:
In file included from cloud/samples/client/airconditioner/aircon_controlee.cpp:12:0:
resource/csdk/resource-directory/include/RDClient.h:49:21: error: 'recursive_mutex' is not a member of 'std'
     std::shared_ptr<std::recursive_mutex> _csdkLock;

Including the mutex header fixes the issue.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/679
(cherry-picked from 942b81212d584d4471afb6af80aa54d170da80cf)

Change-Id: Ib03099dfdf8dee60439e4fffab579f45bd5978d2
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoAdd resetSVRDB method to OCSecure to synchronize with OCPlatform 84/235984/1
Michal Mank [Wed, 8 Apr 2020 12:41:57 +0000 (14:41 +0200)]
Add resetSVRDB method to OCSecure to synchronize with OCPlatform

[Model] LUX
[BinType] AP
[Customer] LUX

[Issue#] TTES-534
[Request] N/A
[Occurrence Version] 1.2.1-61

[Problem] resetting svr db only in c api
[Cause & Measure] added version in c++ api; this will
synchronize resetting svrdb with the rest of OCPlatform
methods using csdkLock mutex
[Checking Method] build & test on device

[Team] IoT Connectivity
[Developer] m.mank
[Solution company] Samsung
[Change Type] new feature

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/673
(cherry-picked from 7a46617818b08af0b75a61893465b007134f4098)

Change-Id: If8ae77355ab268478ec7dfed08ce6a8e0468f331
Signed-off-by: Michal Mank <m.mank@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoRevert "[CONPRO-1568] Ignoring duplicate IPv6/Ipv4 messages" 52/230752/1 accepted/tizen/unified/20200416.001142 submit/tizen/20200414.045530
DoHyun Pyun [Tue, 14 Apr 2020 04:13:18 +0000 (13:13 +0900)]
Revert "[CONPRO-1568] Ignoring duplicate IPv6/Ipv4 messages"

This reverts commit d386e3797794d970b5e96c25fc00780c80b2a6fe.

Native iotcon ITC fail issues are occured with this patchset in
FHub 6.0 image. After re-checking the patchset, we will apply.

Change-Id: I34e07c6e07f1c6b602cbf861ea51459a639ab80e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoFix -Wreturn-type build warning 37/229537/1 accepted/tizen/unified/20200407.130847 submit/tizen/20200402.005546 submit/tizen/20200403.000136 submit/tizen/20200405.215959
DoHyun Pyun [Wed, 1 Apr 2020 22:55:52 +0000 (07:55 +0900)]
Fix -Wreturn-type build warning

With new toolchain gcc9.2, these cases go to 100%
crash. So Must Fix this warning error.

Change-Id: I8354a2d6c57d2da16feca5151e1b5ebe99be55fe
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoUpdate snapshot_history.txt 03/229403/1
DoHyun Pyun [Wed, 1 Apr 2020 01:35:41 +0000 (10:35 +0900)]
Update snapshot_history.txt

Change-Id: Ifa3a4052f715dbd849e30cc674ea8c6550c4a8fa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdding thread safety in notification service. 02/229402/1
Kush [Fri, 13 Mar 2020 15:05:19 +0000 (20:35 +0530)]
Adding thread safety in notification service.

Issue: Push Event and exit are called at same time.
       Then there is a race condition and deadlock occurs.

Solution : Adding mutex which will synchronize tasks between
           handler thread and push event thread.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/669
(cherry-picked from 0b58e0e487a3e2d4e6fe5b02d7fb1dab6b040a6f)

Change-Id: I4db8cd03283cfc1824a32651a63cd6f509621931
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdding fix for bi directional request 01/229401/1
Kush [Thu, 6 Feb 2020 07:52:04 +0000 (13:22 +0530)]
Adding fix for bi directional request

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/664
(cherry-picked from e7010477b877fc74ba3773c2661ec289da6de8ae)

Change-Id: Ia7c0bb9dc15c0fde7bbd34262fc39c57356ddf66
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1568] Ignoring duplicate IPv6/Ipv4 messages 00/229400/1
Kush [Wed, 4 Mar 2020 15:32:39 +0000 (21:02 +0530)]
[CONPRO-1568] Ignoring duplicate IPv6/Ipv4 messages

Issue : There can be duplicate messages coming from multiple ipv6 (or v4)
addresses in the system. The presence of ipv6 link-local for instance
could cause duplicate messages to appear.

Solution : Remove check based on IPv4/Ipv6

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/668
(cherry-picked from 7d5e906bedb032f88f2dd2fca97f70a631c1346e)

Change-Id: I7fd73ad9401a30192141a048db9d88cd7bfea3b6
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1558] Adding check for tasks already freed through ca_thread_pool_free 99/229399/1
Kush [Mon, 2 Mar 2020 12:46:29 +0000 (18:16 +0530)]
[CONPRO-1558] Adding check for tasks already freed through ca_thread_pool_free

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/667
(cherry-picked from 2977211f5c3927ac9613688e37cc4cd06e44f1d6)

Change-Id: Ie7dd756317d1cab004861c7b85aa9822e94b4b0d
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1571] Fix for DeleteObserver in case of GATT adapter 98/229398/1
Kush [Fri, 28 Feb 2020 09:52:38 +0000 (15:22 +0530)]
[CONPRO-1571] Fix for DeleteObserver in case of GATT adapter

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/666
(cherry-picked from bd25a20961dc89dd4c7fedb5a3f4e881ddb53b0a)

Change-Id: Id9259093a010533ec20fc4061f2283d7d69d016a
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1557] Iotivity crash (keep alive thread) 97/229397/1
Sourav Bhuwalka [Fri, 31 Jan 2020 17:45:57 +0000 (23:15 +0530)]
[CONPRO-1557] Iotivity crash (keep alive thread)

Added try catch block before std::thread

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/660
(cherry-picked from eb06ec216a4595c565ad62901f5ab5029ed2a93d)

Change-Id: Ia0e4faf4c832a06a4826ddb732703a12ab65110a
Signed-off-by: Sourav Bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1561] Crash in memcpy 89/225289/2 submit/tizen/20200219.001638
samanway [Tue, 4 Feb 2020 11:07:38 +0000 (16:37 +0530)]
[CONPRO-1561] Crash in memcpy

- In Caremotehandler.c, function CACloneInfo was copying token into buffer in vulnurable way
- Fixed it appending NULL in destination string

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/662
(cherry-picked from f8af2d6ca117bdf270c97c5c28f86bb0169659e5)

Change-Id: I84dfff77ecbf3a333913ce341060d7e30444ac62
Signed-off-by: samanway <samanway-dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1560] iotivity crash in data receiver thread 88/225288/2
samanway [Wed, 5 Feb 2020 11:14:29 +0000 (16:44 +0530)]
[CONPRO-1560] iotivity crash in data receiver thread

- In function CADropSecondMessage(), an input argument pointer NULL check was missing, added the same
- In function CAGetInfoFromPDU(), 512 bytes memory was getting assingned from stack, which may fail in case stack overflow.
Hence allocated memory from heap. this fix is already in IoTivity 2.0-rel.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/663
(cherry-picked from 7c12ddb7711cbb9af9d7c68635c171692222bdb4)

Change-Id: I09e987240e7d37460ba7c567f7b6593d6b3b9e3a
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1564] Doxm deadlock 87/225287/2
Oleksii Beketov [Thu, 13 Feb 2020 11:53:23 +0000 (13:53 +0200)]
[CONPRO-1564] Doxm deadlock

Deadlock in case of not supported oxm method fixed

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/665
(cherry-picked from 2ce7a0c66285f62eeac4db9260cea0f077adf2ad)

Change-Id: I280d323cd27eccfe233e0ea91efc2a4cb393591e
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1549] Create new method in RDClient 86/225286/2
Sourav Bhuwalka [Fri, 24 Jan 2020 13:00:49 +0000 (18:30 +0530)]
[CONPRO-1549] Create new method in RDClient

Added new (publishAllResourceToRD) to publish resources to resource-
directory.Dont include virtual resources /oic/p and /oic/d to resourceHandles
argument of this API.This API internally appends the two virtual resources.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/655
(cherry-picked from 3f75969eec27bc8b6264de42faf01cf811de5037)

Change-Id: I3a6877d885d8c1537b2d767d06f8e1e1e9acd8cd
Signed-off-by: Sourav Bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years ago[CONPRO-1555] oneconnect:Core / Application crashed 85/225285/2
samanway [Tue, 28 Jan 2020 16:38:04 +0000 (22:08 +0530)]
[CONPRO-1555] oneconnect:Core / Application crashed

- In function NSConsumerMsgPushThreadFunc for locking 'msgHandleThread', there could be a
possibility of destruction of the thread running NSConsumerMsgHandleThreadFunc function
and destruction of the mutex as well at the time of locking it
- Hence handled this critical mutex with a global lock

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/657
(cherry-picked from 5289e48a0aa9ce007d44cd443dd73cc8f509fcee)

Change-Id: I1892df4276b6ffcb969a91fd23c9f3d9f3c5a959
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdd uuid convert 84/225284/2
Oleksii Beketov [Mon, 3 Feb 2020 13:59:37 +0000 (15:59 +0200)]
Add uuid convert

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/661
(cherry-picked from 43c552c67605b0e6a5980d85a897673233aff370)

Change-Id: Ia4e40da6f6cd56fe6827b9e588957a67804d1471
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoRemove unused source file in tizen bt_le_adapter 49/223449/1 accepted/tizen/unified/20200204.125838 submit/tizen/20200203.002206 submit/tizen/20200218.000626
DoHyun Pyun [Thu, 30 Jan 2020 01:47:54 +0000 (10:47 +0900)]
Remove unused source file in tizen bt_le_adapter

Change-Id: I8cf29c80bf61adcfba26c8a2acaa9a63f21b4460
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoCONPRO-1551 Adding support for LE bi directional request. 48/223448/1
Kush [Wed, 22 Jan 2020 13:20:46 +0000 (18:50 +0530)]
CONPRO-1551 Adding support for LE bi directional request.

Issue : Currently Tizen LE Server only supports sending response
        and LE Client supports sending request and response for response.
        But in some scenarios if server tries to send request using same BLE
        connection, then that is not possible.

Solution: This patch will allow LE server to send Request using same BLE connection

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/654
(cherry-picked from af41fb6485fdb0bb02bfd92e6e4993a0b1596a36)

Change-Id: Ie2a0bb3add5e56565d0059ac2d42dfd68336c958
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdding NULL check in CALEClientAddUuid 47/223447/1
samanway [Wed, 22 Jan 2020 08:23:41 +0000 (13:53 +0530)]
Adding NULL check in CALEClientAddUuid

- NULL check was missed before passing string to strcmp()
- Hence, added NULL check

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/652
(cherry-picked from 2f6b188bc90dc306f98414189d30206eef38be4a)

Change-Id: Ia92a7a308dcb73999df84d48e67aad6e4d7be0e0
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoUpdate mbedTLS sources 46/223446/1
Oleksii Beketov [Fri, 24 Jan 2020 13:35:59 +0000 (15:35 +0200)]
Update mbedTLS sources

Include updated in 28c4c80e (PR#609) mbedTLS source codes

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/656
(cherry-picked from 9592ed1c8f26b8ddb8cc44ac897a42f4a9209c5a)

Change-Id: I85ad3bc1045e6e1e5a53323c1c2ba3ad190a0397
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoUpdate snapshot_history.txt 90/223290/1
Sudipto [Tue, 28 Jan 2020 07:53:52 +0000 (13:23 +0530)]
Update snapshot_history.txt

Change-Id: I6d58b5392e2ce3a698cfcaa468fe2e2bff5fa0eb
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years ago[CONPRO-1552] Build fail for -Werror=implicit-function-declaration] 89/223289/1
samanway [Wed, 22 Jan 2020 11:54:07 +0000 (17:24 +0530)]
[CONPRO-1552] Build fail for -Werror=implicit-function-declaration]

- caadapterutils.h was not included in caipnwmonitor_common.c, hence added
- oic_malloc.c was not included in caipnwmonitor_common.c, hence added

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/649/commits/c536c5a5bbe66b0ac8eedcdefcf858d325718f23
(cherry-picked from c536c5a5bbe66b0ac8eedcdefcf858d325718f23)

Change-Id: I62d0185fe632d7a487ac88e4bf4f62cc47a3486f
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years ago[CONPRO-1552] Fixing lack of header guards in RDClient.h 88/223288/1
samanway [Fri, 17 Jan 2020 14:15:09 +0000 (19:45 +0530)]
[CONPRO-1552] Fixing lack of header guards in RDClient.h

- Added header guard in RDClient.h

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/649/commits/25aabe92979f70d22c42d735003f6b3d4605bd4d
(cherry-picked from 25aabe92979f70d22c42d735003f6b3d4605bd4d)

Change-Id: I764e966237c1f87b332da8c6977943c3d2a45281
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoUpdate snapshot_history 72/222672/1 submit/tizen/20200121.084836
Sudipto [Fri, 17 Jan 2020 05:45:06 +0000 (11:15 +0530)]
Update snapshot_history

Change-Id: Iaf49d04b13c0cb0876708e5a939f1329e88c57f8
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoIotivity crash on 502 Bad Gateway error 71/222671/1
Sourav Bhuwalka [Fri, 10 Jan 2020 07:26:17 +0000 (12:56 +0530)]
Iotivity crash on 502 Bad Gateway error

Initialising dimensions with 0 which was not done earlier
In case OCRepPayloadGetPropObjectArray function fails links
become NULL but since dimensions is not initailised with 0 it will
have some garbage value and will enter in loop and crash will occur

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/649/commits/3a10bc1df11c5c2bbf7465e3aa06a76adb4734c6
(cherry-picked from 3a10bc1df11c5c2bbf7465e3aa06a76adb4734c6)

Change-Id: I9f156c9f3459ad756d3fde2759aa518d48380d54
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoUpdate mbedTLS 38/222438/1
Oleksii Beketov [Mon, 18 Nov 2019 11:31:52 +0000 (13:31 +0200)]
Update mbedTLS

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/609
(cherry-picked from e75e05c54bbba696c56df79d72f5de3ca82d20a9)

Change-Id: Iee97e14f68f1e532886e4cb9bb265e0760b2c226
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoFixing Iotivity crash in catcpserver 57/221557/3
samanway [Thu, 19 Dec 2019 12:44:45 +0000 (18:14 +0530)]
Fixing Iotivity crash in catcpserver

- Memory was being freed in function CADisconnectTCPSession without checking NULL condition
- This caused crash in IoTivity, fix is patched
- Also, a potential dangling pointer issue fized in uqeue.c

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/ced81117e624a1f416df3f5ff226427b2d070515
(cherry-picked from ced81117e624a1f416df3f5ff226427b2d070515)

Change-Id: Ic6ede9df63aa8e5590c253f9430eeba401231347
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agocrash in NSConsumerMsgHandleThreadFunc 56/221556/3
Sourav Bhuwalka [Tue, 24 Dec 2019 18:11:09 +0000 (23:41 +0530)]
crash in NSConsumerMsgHandleThreadFunc

Before checking size of queue adding a check to see
queue is null or not

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/2624fc610b13ad611d4bc73d5478c15382002940
(cherry-picked from 2624fc610b13ad611d4bc73d5478c15382002940)

Change-Id: I099a627a45b042debcf1cc841cbcd3be20aeae79
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoCONPRO-1542 Adding left out error codes conversion from EntityHandler to OCStackResult 55/221555/3
Kush [Fri, 20 Dec 2019 10:42:33 +0000 (16:12 +0530)]
CONPRO-1542 Adding left out error codes conversion from EntityHandler to OCStackResult

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/eb4f1b5d1cd3696e187ee1e6ec0d0a7a75cbe321
(cherry-picked from eb4f1b5d1cd3696e187ee1e6ec0d0a7a75cbe321)

Change-Id: Icb0e572691466ffd2cb94a277648e0c89b7f19a0
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoNew API for self ACL updating 54/221554/3
Iurii Metelytsia [Tue, 26 Nov 2019 15:13:42 +0000 (17:13 +0200)]
New API for self ACL updating

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/441765ad4ae9d09a2ff34023031e6e4f42edf917
(cherry-picked from 441765ad4ae9d09a2ff34023031e6e4f42edf917)

Change-Id: Ic9747cb71f669895ced90e442bcce1f090389e1c
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoBug fix in set/unset adapter state change callback. (#640) 53/221553/3
senthil.gs@samsung.com [Tue, 17 Dec 2019 05:40:07 +0000 (11:10 +0530)]
Bug fix in set/unset adapter state change callback. (#640)

A bug was introduced in a recent patch to reduce code complexity,
This patch fixes the issue.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/9a8ff7f20185944857848c6345f87d40ddcd0e87
(cherry-picked from 9a8ff7f20185944857848c6345f87d40ddcd0e87)

Change-Id: I5b15b5ed3bd70e8c81885b7208eba3fbf5ee3330
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoBLE Scan when GATT already connected. 52/221552/3
Kush [Tue, 15 Oct 2019 10:34:17 +0000 (16:04 +0530)]
BLE Scan when GATT already connected.

If GATT is already connected by some other service
then Iotivity should use that GATT connection only.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/427b61effdc348e139c27fb314b44c011689e523
(cherry-picked from 427b61effdc348e139c27fb314b44c011689e523)

Change-Id: I8bd79cd7752a0312b1fa73a91cf2851c8af24c85
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoAdding retry logic for gatt connection for VD client 51/221551/4
samanway [Wed, 30 Oct 2019 10:27:15 +0000 (15:57 +0530)]
Adding retry logic for gatt connection for VD client

- There was an issue initially reported for LUX, that Gatt Client disconnects just after it connects
- Connection retry logic was added as a fix in the commit 25ef240cc9978fa5945a26e72a8e763c436960db
- Again the same issue was reported for TV
- So adding the same fix in VD client

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/6faf5ba264411d383ec5c3225f9fdcd90690088d
(cherry-picked from 6faf5ba264411d383ec5c3225f9fdcd90690088d)

Change-Id: I0c7ad06e65b1c1774b9d7269be64a2f569d55664
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoDeadlock after BLE connection error in caleserver_mcd.c 50/221550/3
Kush [Thu, 12 Dec 2019 09:27:39 +0000 (14:57 +0530)]
Deadlock after BLE connection error in caleserver_mcd.c

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/15bf09e4501b18843ba6ad64dbe44a5d9003143b
(cherry-picked from 15bf09e4501b18843ba6ad64dbe44a5d9003143b)

Change-Id: I51fb612f1e44f85f7b120c9469ebe76dabf6583e
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoBuild fix for tizen when TARGET_TRANSPORT=BLE 49/221549/3
samanway [Fri, 22 Nov 2019 10:15:47 +0000 (15:45 +0530)]
Build fix for tizen when TARGET_TRANSPORT=BLE

- Commit 63d798167fd9695cb278bc3c228864163dde5292 in IoTivity 1.2-rel branch added 3 APIs which should build only for TCP adapter
- For this reason BLE build was being failed
- Corrected that with adding Flag

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/d2fd37d35129acf337d6895e2efe84c7331bbd3d
(cherry-picked from d2fd37d35129acf337d6895e2efe84c7331bbd3d)

Change-Id: Id34ae9edc4f5123932584151a8ac8f54432c1292
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoEnable GCOV Coverage & Logging in UT. (#628) 48/221548/2
senthil.gs@samsung.com [Thu, 28 Nov 2019 06:47:49 +0000 (12:17 +0530)]
Enable GCOV Coverage & Logging in UT. (#628)

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/41f3f11cfcbec2eb7a252efcde8d92746bcac327
(cherry-picked from 41f3f11cfcbec2eb7a252efcde8d92746bcac327)

Change-Id: I8a0fc10913d1eff4c2012357112b979d028c74ec
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
4 years agoRemove the unnecessary ignore options 81/221181/1 accepted/tizen/unified/20191230.120915 submit/tizen/20191230.033619
DoHyun Pyun [Mon, 30 Dec 2019 03:35:11 +0000 (12:35 +0900)]
Remove the unnecessary ignore options

Change-Id: I62a0ef80f750dcfd8cdf6d89549759c4c097bf17
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdd the build exception for tizen (gcc9) 64/221164/2
DoHyun Pyun [Mon, 30 Dec 2019 00:47:44 +0000 (09:47 +0900)]
Add the build exception for tizen (gcc9)

Change-Id: I1512f3d460cb6bf8cc63bf52efa91a8269d2eeb8
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoFix RE unit test case. (#632) 03/218803/1 accepted/tizen/unified/20191201.221455 submit/tizen/20191128.075235
senthil.gs@samsung.com [Thu, 28 Nov 2019 06:34:25 +0000 (12:04 +0530)]
Fix RE unit test case. (#632)

Unit test case which was failing:
RemoteResourceObjectTest.IsCachingReturnsTrueAfterStartCaching()

Reason for failure: Shared pointer reference for RCSRemoteResourceObject
was not released. Due to which, there was a problem in tearing down the test case.

This PR has the fix.
Additionally, application will receive caching callback
from RCSRemoteResourceObject only if remote resource object is available.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/632
(cherry-picked from e8fb156d8239ace91f9529830f4781ea16e85bd3)

Change-Id: Idf587d1f5add4360a717a6959dcc839bc7aacb9f
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoFix for crash at FindResourceByUri(). (#629) 02/218802/1
senthil.gs@samsung.com [Wed, 27 Nov 2019 05:45:02 +0000 (11:15 +0530)]
Fix for crash at FindResourceByUri(). (#629)

NULL check was not there before accessing "pointer->uri" due to which segmentation fault has occurred.
So NULL check is done at two different places.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/629
(cherry-picked from 727d5f58b67d83d3c82452b0afb7781bba59ec81)

Change-Id: I77878da7f89858235feafbc7b25a4e1fef39a52a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAvoiding code duplications in tizen BLE VD client files. 01/218801/1
samanway [Wed, 20 Nov 2019 13:58:26 +0000 (19:28 +0530)]
Avoiding code duplications in tizen BLE VD client files.

- Caleclient.c and Caleclient_vd.c two files had duplicate code
- Hence merged them into a single one
- Additionally, Sconscript is modified to enable build flag for VD

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/0622badee7ed2f6d424ac69d6796d443f8949953
(cherry-picked from 0622badee7ed2f6d424ac69d6796d443f8949953)

Change-Id: I24720556a7dce71a0a410da1ab7daf93fb55278e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoSplit TCP Server Mutex into different file 00/218800/1
Kush [Thu, 21 Nov 2019 15:54:26 +0000 (21:24 +0530)]
Split TCP Server Mutex into different file

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/f2afffe9f976f4f5a6d44f41daa113f5b30eb410
(cherry-picked from f2afffe9f976f4f5a6d44f41daa113f5b30eb410)

Change-Id: If2106577547a02e4412ffdc4ce54c44b3eab5db8
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoQB_linux_SECURED build failed 99/218799/1
Vitalii Irkha [Fri, 22 Nov 2019 09:46:14 +0000 (11:46 +0200)]
QB_linux_SECURED build failed

Fixed issues for SVR DB Validity APIs

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/49420e214b01e2656b123c0bae3fad245bec14f9
(cherry-picked from 49420e214b01e2656b123c0bae3fad245bec14f9)

Change-Id: I6c1826f501230414a8c04596ede23ff01a1651d9
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoSplit Android CaleClient in two different files. (#619) 98/218798/1
s.bhuwalka@samsung.com [Fri, 22 Nov 2019 07:54:26 +0000 (13:24 +0530)]
Split Android CaleClient in two different files. (#619)

caleclient.c is now divided into caleclient.c and caleclient_jni.h
Additionally caleclient_utils.h is also added

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/619
(cherry-picked from 6bb06b060dff697c20a13b638c6d6bbcd83a2360)

Change-Id: Ia1592b281ef64a293eb7075ea88bf03fd4db7228
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoSplit Routing Table into Gateway and Endpoint (#617) 97/218797/1
kush.agrawal@samsung.com [Fri, 22 Nov 2019 07:20:23 +0000 (12:50 +0530)]
Split Routing Table into Gateway and Endpoint (#617)

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/617
(cherry-picked from 0ec246dda82834e64d27705d59bcd13a61e81b12)

Change-Id: Ia81472992ef710fb6671e20d8d1480be0de7f4d3
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAdded changes for SVR DB Validity API 96/218796/1
Vitalii Irkha [Thu, 21 Nov 2019 16:37:45 +0000 (18:37 +0200)]
Added changes for SVR DB Validity API

Don't stop stack initialization process even if DVR DB corrupted

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/582794baea0c4db4dc8fdca566a7a8553b6d764c
(cherry-picked from 582794baea0c4db4dc8fdca566a7a8553b6d764c)

Change-Id: I0adf81f55a7a012730a792bac5e7f5b423190be7
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoRemoved duplicated code blocks (#615) 95/218795/1
kush.agrawal@samsung.com [Thu, 21 Nov 2019 14:30:39 +0000 (20:00 +0530)]
Removed duplicated code blocks (#615)

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/615
(cherry-picked from 1dd8501207e6c6865cf7bd0d5483003c4bad1ff7)

Change-Id: I2aae5778988d75b113bf4535241781a5f1678c84
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoDraft Created API for SVR DB Integrity check 94/218794/1
Vitalii Irkha [Thu, 14 Nov 2019 18:35:33 +0000 (20:35 +0200)]
Draft Created API for SVR DB Integrity check

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/610
(cherry-picked from b2f7a3c0a121bf83f3551b0bca18061d8b5263f1)

Change-Id: I6fe01f4de77a8e8f538666f8745b9b46cfd057fd
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoAndroid QuickBuild fix. 93/218793/1
Senthil Kumar G S [Tue, 19 Nov 2019 09:37:23 +0000 (15:07 +0530)]
Android QuickBuild fix.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/6c1a44b94988d8fe7147c64461d76ff666afa223
(cherry-picked from 6c1a44b94988d8fe7147c64461d76ff666afa223)

Change-Id: Icd343a4d03c71aff46dd48a935131e4a6dcdbb89
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoRemoving code duplication from Caleadapter.c (#606) 92/218792/1
samanway.dey@samsung.com [Tue, 19 Nov 2019 11:26:58 +0000 (16:56 +0530)]
Removing code duplication from Caleadapter.c (#606)

- Checking CAResult_t returning from different APIs called in Caleadapter.c was being checked multiple times
 - This was contributing in increasing code complexity
 - Replaced each block with a single macro

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/606
(cherry-picked from 7ecd31d8fc9d132bbd4e5cccc86e8189419eb930)

Change-Id: I54e7061743bdcf12acbe2bc201086b0e833db1f9
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
4 years agoAvoid CA IP NW monitor code duplications. 91/218791/1
Senthil Kumar G S [Mon, 18 Nov 2019 10:47:41 +0000 (16:17 +0530)]
Avoid CA IP NW monitor code duplications.

Code duplications in CA IP Network Monitor reported by Sonarqube
has been addressed in this patch.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/983a7d1076abb25b82321bed2fb5c4fa07da8389
(cherry-picked from 983a7d1076abb25b82321bed2fb5c4fa07da8389)

Change-Id: I801c5bb382f6beb05164d98653b2d309c6282d7c
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoRemove code duplication in easy-setup service. 90/218790/1
Senthil Kumar G S [Tue, 19 Nov 2019 06:05:11 +0000 (11:35 +0530)]
Remove code duplication in easy-setup service.

Code duplications in easy-setup service reported by Sonarqube
has been addressed in this patch.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/ecf2f9ec396bddceaa59aa4daa84506d6ea32e92
(cherry-picked from ecf2f9ec396bddceaa59aa4daa84506d6ea32e92)

Change-Id: Id89ba0f0ea8a712dad2c60873f4c6896491a7cb9
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoFix process event life cycle 89/218789/1
Jaehyun Cho [Fri, 11 Oct 2019 09:09:09 +0000 (18:09 +0900)]
Fix process event life cycle

process event variable need to initialize before OCInit(), event need to
register after OCInit and also event variable should be freed after OCStop()

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/586
(cherry-picked from 3a00d744cac2e026b2b7b195b8b2984fd06ca049)

Change-Id: I88ffc088a19a4a8bf7fc58c49d436d4813921a36
Signed-off-by: Jaehyun Cho <jaehyun3.cho@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoChange the header install path for c_common and logger 67/218267/1 accepted/tizen/unified/20191121.073426 submit/tizen/20191121.044045
DoHyun Pyun [Thu, 21 Nov 2019 03:43:38 +0000 (12:43 +0900)]
Change the header install path for c_common and logger

ttrace moudle installs "ttrace.h" header in /usr/include,
so conflict error is occured. To resolve this issue,
iotivity-dev changes the header install path.

[80s] [372/388] installing iotivity-devel-1.2.1-0
[80s] file /usr/include/trace.h from install of iotivity-devel-1.2.1-0.armv7l conflicts with file from package ttrace-devel-1.0.3-1.armv7l

Change-Id: I66c0395b3abce8700c8beea8e2eb4ca540e9f034
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoUpdate snapshot_history 57/217957/1 accepted/tizen/unified/20191119.083949 submit/tizen/20191119.000236
Sudipto Bal [Mon, 18 Nov 2019 04:26:42 +0000 (13:26 +0900)]
Update snapshot_history

Change-Id: I48591948e631c04cb6e4463cd0845c965dab37ec
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAdded check resetSVRDB callback to NULL 53/217953/1
Vitalii Irkha [Thu, 14 Nov 2019 08:35:24 +0000 (10:35 +0200)]
Added check resetSVRDB callback to NULL

Fixed possible NULL pointer dereferences

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/635bde6994b9ebcb84a1a9faaff2c985bf5faf09
(cherry-picked from 635bde6994b9ebcb84a1a9faaff2c985bf5faf09)

Change-Id: Ib52585b767e92e3f263a653a108e0b734e348eb1
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoStatic Analyzer Bug Fixes. (#603) 52/217952/1
senthil.gs@samsung.com [Wed, 13 Nov 2019 13:54:41 +0000 (19:24 +0530)]
Static Analyzer Bug Fixes. (#603)

Patch contains fixes for the bugs reported by Sonarqube Tool.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/603/commits/7eeacb4f04621469f044b64b42abc45e5b60792a
(cherry-picked from 7eeacb4f04621469f044b64b42abc45e5b60792a)

Change-Id: Ic3f0a6d27e4c2ec3f52d4452c0957887fe4a9889
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoFix Werror=implicit-function-declaration 51/217951/1
Vitalii Irkha [Wed, 13 Nov 2019 11:25:51 +0000 (13:25 +0200)]
Fix Werror=implicit-function-declaration

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/604/commits/a302bdd184f154164d855b7a8daf5fd52073d96c
(cherry-picked from a302bdd184f154164d855b7a8daf5fd52073d96c)

Change-Id: I8d79824b31d951e4712f4420ca4b4add2ed0610f
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAdded notification callback on reset SVR DB 50/217950/1
Vitalii Irkha [Fri, 8 Nov 2019 15:52:54 +0000 (17:52 +0200)]
Added notification callback on reset SVR DB

Created API's for notifing when SVR DB is reset

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/599/commits/93a9f532a2da7526cbede4f77f27c727480ec270
(cherry-picked from 93a9f532a2da7526cbede4f77f27c727480ec270)

Change-Id: Ib4ac7d36f2232dce6ce0f6a1ecb64d9d2e153cf7
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoWorkaround for CONPRO-1516 45/217945/1
Vitalii Irkha [Tue, 12 Nov 2019 14:21:42 +0000 (16:21 +0200)]
Workaround for CONPRO-1516

Added APIs for setting device ID in reset profile

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/602/commits/7ec27b13b5f7e14575f4c96000346ef4b18964dc
(cherry-picked from 7ec27b13b5f7e14575f4c96000346ef4b18964dc)

Change-Id: I815f3847727213fbefb5d4f930a3f08a1a7b9be0
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAdded missing catch block for std::exception (#598) 44/217944/1
kush.agrawal@samsung.com [Mon, 11 Nov 2019 07:03:33 +0000 (12:33 +0530)]
Added missing catch block for std::exception (#598)

* [CONPRO-1523]Added missing catch block for std::exception

This exception is thrown when thread execution fails

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/598/commits/2a57dc73fe7dc0d0c9fdf7b93ec3e4ac1974d9f2
(cherry-picked from 2a57dc73fe7dc0d0c9fdf7b93ec3e4ac1974d9f2)

Signed-off-by: Kush <kush.agrawal@samsung.com>
* Removed extra space

Change-Id: Ic45c377796668dce5ad417d89c17624267d21a33
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoReplace API's for reverting all secure resources 43/217943/1
Vitalii Irkha [Fri, 8 Nov 2019 10:38:35 +0000 (12:38 +0200)]
Replace API's for reverting all secure resources

Call ResetSecureResourceInPS() instead of RestoreDoxmToInitState() and RestorePstatToInitState()

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/599/commits/f8d712a5ee2cf1b58736fccb2cc168a93fc1c0c2
(cherry-picked from f8d712a5ee2cf1b58736fccb2cc168a93fc1c0c2)

Change-Id: I7d26a94cdf76eba05959d378a2839cbd51512c87
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAvoid adding elements to QueueingThread if it's stopped. (#596) 42/217942/1
senthil.gs@samsung.com [Wed, 6 Nov 2019 09:56:00 +0000 (15:26 +0530)]
Avoid adding elements to QueueingThread if it's stopped. (#596)

* Avoid adding elements to QueueingThread if it's stopped.

Background:-
-> If a thread has called CAQueueingThreadStop(), it signals the condition variable
to wake up the CAQueueingThreadBaseRoutine.

-> After signaling, it waits on the same condition variable
to wait for the completion of CAQueueingThreadBaseRoutine.

-> CAQueueingThreadBaseRoutine will finish its current task and signals the condition variable.

-> CAQueueingThreadStop should wake up upon signal and return back to caller.

Issue:-
-> CAQueueingThreadAddData also signals the condition variable which can wake up the thread that called CAQueueingThreadStop.
-> CAQueueingThreadStop returns back to caller assuming that the CAQueueingThreadBaseRoutine has stopped. But it could still be running which might
result in race condition/unwanted behavior.

This will have a positive impact for CONPRO-1515 in which IP send thread was not stopped during OCStop() and new requests were getting added.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/596/commits/a9cc86c208e1cf19d2725681d9e45dcb9ec8f663
(cherry-picked from a9cc86c208e1cf19d2725681d9e45dcb9ec8f663)

Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
* Indentation fix.

Change-Id: Iad6b385b0bf77bc1a9fabc1525a9acbcecc5bef3
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoRevert "Add empty string check of uuid" 41/217941/1
Aleksey Volkov [Wed, 6 Nov 2019 09:32:55 +0000 (11:32 +0200)]
Revert "Add empty string check of uuid"

This reverts commit ca00c37c2f8583fb754d03ca37c716d7c1cd1401.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/597/commits/061901767e9f842a83fb304a0a7d3d79ffc738af
(cherry-picked from 061901767e9f842a83fb304a0a7d3d79ffc738af)

Change-Id: I7cb645a5a42df6cf36a77b5ea2f65dda2fc77f1f
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAdded logging into IsRequestFromDevOwner() API 87/217887/1
Vitalii Irkha [Tue, 5 Nov 2019 09:42:41 +0000 (11:42 +0200)]
Added logging into IsRequestFromDevOwner() API

Added logging for CONPRO-1516 issue

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/592/commits/094b5ea90860840b4e0b7026ee6160d8c2866e8c
(cherry-picked from 094b5ea90860840b4e0b7026ee6160d8c2866e8c)

Change-Id: Ia53c60ec6d70675e5d40f48ff3bf903896fca5dd
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoFix OTM issue during DTLS handshake 86/217886/1
Vitalii Irkha [Thu, 31 Oct 2019 11:29:02 +0000 (13:29 +0200)]
Fix OTM issue during DTLS handshake

Revert all secure resources after DTLS handshake error

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/592/commits/ba8ed7dda2f9516ed446a65b877f26a506567491
(cherry-picked from ba8ed7dda2f9516ed446a65b877f26a506567491)

Change-Id: I3a94587fe5a31f5c6f889c74cbbb4ea0a293fbf6
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoSet error code to 0 for normal TCP disconnection. 85/217885/1
Senthil Kumar G S [Thu, 31 Oct 2019 05:04:42 +0000 (10:34 +0530)]
Set error code to 0 for normal TCP disconnection.

g_lastErrorCode is set to 0 to indicate normal session disconnections(recv() returns 0).

Background;
"g_lastErrorCode" is being set as errno when send() returns -1 or recv() returns under 0.
For instance, in case of recv(),
    - normal TCP session disconnect happens when recv() returns 0 len.
    - abnormal TCP session disconnect happens when recv() returns under 0. ( "g_lastErrorCode" is set as errno. )
Let's guess this scenario,
    - abnormal TCP session disconnect => "g_lastErrorCode" is set as X => ...... => retry TCP session connect => ...... => normal TCP session disconnect
From above scenario, then, is "g_lastErrorCode" not changed to default value 0?
I think, it is needed to set "g_lastErrorCode" as default value 0 when normal TCP session connect/disconnect happens.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/595/commits/db79794eab8a1dbbe93d2da4a5deeb4826e22ccb
(cherry-picked from db79794eab8a1dbbe93d2da4a5deeb4826e22ccb)

Change-Id: Iea0d2ed780b9dedee6870a8946c3c5c65d15757c
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
4 years agoAdded logging in CheckPermission() API 84/217884/1
Vitalii Irkha [Tue, 22 Oct 2019 14:05:20 +0000 (17:05 +0300)]
Added logging in CheckPermission() API

Allow to track valuable OTM parameters

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/592/commits/26549bd4237f6a4f8efa8d9a005adbf51d2de0db
(cherry-picked from 26549bd4237f6a4f8efa8d9a005adbf51d2de0db)

Change-Id: If6714129a488e5c198c39bacd220d0719c8392a5
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoAdd missing compile secure option in CXXFLAGS 41/217441/1 accepted/tizen/unified/20191112.125129 submit/tizen/20191112.082050
DoHyun Pyun [Mon, 11 Nov 2019 04:43:33 +0000 (13:43 +0900)]
Add missing compile secure option in CXXFLAGS

Change-Id: I1f162580ca001bd83532c459e78ae1fd3473f2fb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate snapshot_history.txt 01/216601/3 accepted/tizen/unified/20191101.042101 submit/tizen/20191031.021857
Sudipto [Tue, 29 Oct 2019 08:01:40 +0000 (13:31 +0530)]
Update snapshot_history.txt

Change-Id: I855c4a7941f0e690df1e8caacbfa36dae37e7e02
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoSet socket family for IPv4 00/216600/3
Senthil Kumar G S [Thu, 24 Oct 2019 07:11:00 +0000 (12:41 +0530)]
Set socket family for IPv4

Patch for [CONPRO-1509] https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/588 has a bug
due to which the following error comes in Tizen Platform.

"01-01 11:43:56.060+0900 E/OIC_CA_TCP_SERVER_1023(P 2022, T 2031): catcpserver.c:
CATCPCreateSocket(1029) > bind socket failed: Address family not supported by protocol"

Reason: Address family is not set.

This patch fixes the issue.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/992729fd6eab4f1b57280f6502ce09d460ace39c
(cherry-picked from 992729fd6eab4f1b57280f6502ce09d460ace39c)

Change-Id: I98edd8c18ec8183bd2208d587599bf9ae294db12
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoTCP Socket Bind API 99/216599/3
Kush [Mon, 14 Oct 2019 15:32:34 +0000 (21:02 +0530)]
TCP Socket Bind API

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/593
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/588/commits/1f7cb27e719bfd876fd0ff900747eeb3d7210d46
(cherry-picked from 1f7cb27e719bfd876fd0ff900747eeb3d7210d46)

Change-Id: I48954a2caa59d95464a29a257c67b38325b64d12
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoBuild fix for visual display files 98/216598/3
samanway [Mon, 21 Oct 2019 13:28:09 +0000 (18:58 +0530)]
Build fix for visual display files

- There was an undefined LOG TAG used in Caleclient_vd.c file
- Replaced that with another predefined TAG

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/591/commits/87dc9af44ba4e3cbf7ae87dcb5bb29434a6c672d
(cherry-picked from 87dc9af44ba4e3cbf7ae87dcb5bb29434a6c672d)

Change-Id: Ic4b5c7de3b92309d925261058bb6abe93ddce3f6
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoNew APIs to configure TCP Socket Keep-Alive. 97/216597/3
Senthil Kumar G S [Mon, 14 Oct 2019 06:46:30 +0000 (12:16 +0530)]
New APIs to configure TCP Socket Keep-Alive.

Added new APIs to enable TCP keep alive, set and unset configuration parameters.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/587/commits/731061249edabbf05b9e8cb4a35f7dfe41009183
(cherry-picked from 731061249edabbf05b9e8cb4a35f7dfe41009183)

Change-Id: Id63c1796832dcea842e0b059c977a38d307e27a5
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoFix for SVACE Issues 96/216596/3
Sudipto [Tue, 29 Oct 2019 07:48:31 +0000 (13:18 +0530)]
Fix for SVACE Issues

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/580/commits/ba60a95ac03fc844ec9ff22558624982d865f4f0
(cherry-picked from ba60a95ac03fc844ec9ff22558624982d865f4f0)

Change-Id: Iddefe17f317f724831aca9f7d943cee0133cbcc8
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoCrash in Select 95/216595/2
sourav bhuwalka [Mon, 14 Oct 2019 16:27:56 +0000 (21:57 +0530)]
Crash in Select

Fixing bug in counter of CAPollReturned in case of shutdownFds socket
for ipserver and also introducing sleep between each subsequent
poll system call whenever the system remains idle.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/583/commits/817a3e30d2c7f2fa6064cdfd13fc8a9294a5d956
(cherry-picked from 817a3e30d2c7f2fa6064cdfd13fc8a9294a5d956)

Change-Id: I4b6e96334fdb0c06fee2c4ce3099df9bf04ebaf3
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoRemove the white space in caleadapter.c 55/215655/1
DoHyun Pyun [Mon, 14 Oct 2019 04:18:39 +0000 (13:18 +0900)]
Remove the white space in caleadapter.c

Change-Id: I8739accdfe8f6e481847a2ed2019a237c4120aad
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoRemove the white space in snapshot_history.txt 54/215654/1
DoHyun Pyun [Mon, 14 Oct 2019 04:18:10 +0000 (13:18 +0900)]
Remove the white space in snapshot_history.txt

Change-Id: I109b611ded748feb30f5d3f2b37f9695e6fecdb7
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoCONPRO-1467: Improve Reset 35/215635/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.011923 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074315 accepted/tizen/unified/20191015.011920 submit/tizen/20191014.014400 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 tizen_5.5.m2_release
Oleksii Beketov [Mon, 5 Aug 2019 10:55:24 +0000 (13:55 +0300)]
CONPRO-1467: Improve Reset

Enable complete SVR DB reset on OTM error.
Recently, only pstat and doxm resources has been reset.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/552
(cherry-picked from 8c20c75f22a5e81c9c7814eaf18e5f7c73aca7b6)

Change-Id: I18a7a2accd82c51a57e14cd65b91431d5b5b84eb
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoCrash in select 34/215634/1
sourav bhuwalka [Wed, 9 Oct 2019 17:19:09 +0000 (22:49 +0530)]
Crash in select

When the system remains idle i.e. there is no exchange of data then
poll would be called repeatedly very fast.some of the fields/parameters
inside poll are not getting set/reset by kernel on calling repeatedly.
So applying a sleep whenever poll gets timed out.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/585
(cherry-picked from 4cc2d76d5835a4ccb9d7a7569376e8d0938db264)

Change-Id: I33dca282cdc9406d543b8f887bb8a5f576b7f4b3
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoMerge "Enable GATT server indication for Tizen Speaker" into tizen
Pyun DoHyun [Mon, 14 Oct 2019 01:15:09 +0000 (01:15 +0000)]
Merge "Enable GATT server indication for Tizen Speaker" into tizen

5 years agoFix for SVACE defects 33/215633/1
samanway [Wed, 25 Sep 2019 14:26:12 +0000 (19:56 +0530)]
Fix for SVACE defects

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/581
(cherry-picked from 0c9a4bdc0e7a2bfd4bbd2168366281b8741c2e29)

Change-Id: Ia5554e93f8b913f10053bf4a09bb3b1bd7dbb8ce
Signed-off-by: samanway-dey <samanway,dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoCrash at CADestroyDataSet() 32/215632/1
sourav bhuwalka [Thu, 26 Sep 2019 18:10:08 +0000 (23:40 +0530)]
Crash at CADestroyDataSet()

Setting info->token to NULL after free to avoid double free

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/582
(cherry-picked from 3fb0338b52b04ee58f12bb46f27ef20cf12c2d47)

Change-Id: If6268f9ebb9965b84809c54d38b3b3826cf51830
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoMove CASetSecureEndpointUuid APIs 31/215631/1
Jaehong Jo [Wed, 18 Sep 2019 08:08:55 +0000 (17:08 +0900)]
Move CASetSecureEndpointUuid APIs

Since this API is used externally,
moved it to the cautil header instead of the security header.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/577
(cherry-picked from 991775c94943140fd72ee564f142aee55df058ac)

Change-Id: I5d3221dcdb69d720fbd77bcbda878c2b20cba9dc
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoEnable GATT server indication for Tizen Speaker 95/213895/6
Anupam Roy [Thu, 19 Sep 2019 01:24:11 +0000 (10:24 +0900)]
Enable GATT server indication for Tizen Speaker

Change-Id: I7511f1ab1d2b010e0caf353ee51ef8eea67e244c
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
5 years agoupdated snapshot_history.txt 62/214862/1
himanshu [Fri, 27 Sep 2019 07:03:11 +0000 (12:33 +0530)]
updated snapshot_history.txt

Change-Id: I52cad3afcfa36dbd1f8ab5f2ffbe116229a4873a
Signed-off-by: himanshu <h.himanshu@samsung.com>
5 years agoFix for destroying gatt client in case of error. 61/214861/1
Kush [Thu, 19 Sep 2019 08:39:01 +0000 (14:09 +0530)]
Fix for destroying gatt client in case of error.

Client Handle was not destroyed.
Because of that from second time onwards client handle was not getting created.
MTU size was set to default and bt buffer overflow error was coming.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/578/commits/e51cc0061628ab0fb7710ed3a5c3df08b61e2d5a
(cherry-picked from e51cc0061628ab0fb7710ed3a5c3df08b61e2d5a)

Change-Id: I65e5092c8b9c230b4394dd6239706b5f2d28fd36
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: himanshu <h.himanshu@samsung.com>
5 years agoRemove a dependency of the deprecated wifi API 19/214819/1 accepted/tizen/unified/20190929.221425 submit/tizen/20190927.051042
DoHyun Pyun [Thu, 26 Sep 2019 22:34:50 +0000 (07:34 +0900)]
Remove a dependency of the deprecated wifi API

Wifi API deprecated, and wifi manager API is used in Tizen.
So remove the dependency and replace APIs to wifi manager.

Change-Id: I12930bd63c80d2c2570a2461d4f393ee1ae8b66c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoMerge "Updated snapshot_history.txt" into tizen accepted/tizen/unified/20190924.062108 submit/tizen/20190923.064511
Pyun DoHyun [Mon, 23 Sep 2019 06:04:21 +0000 (06:04 +0000)]
Merge "Updated snapshot_history.txt" into tizen