platform/upstream/iotivity.git
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>
5 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>
5 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>
5 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>
5 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

5 years agoMerge "[CONPRO-1483] Implementation of API for setting scanfilter UUIDs" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:04:14 +0000 (06:04 +0000)]
Merge "[CONPRO-1483] Implementation of API for setting scanfilter UUIDs" into tizen

5 years agoMerge "Enabling build of simpleclientblescan application" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:04:09 +0000 (06:04 +0000)]
Merge "Enabling build of simpleclientblescan application" into tizen

5 years agoMerge "SimpleClient Android Application change for BLE" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:04:02 +0000 (06:04 +0000)]
Merge "SimpleClient Android Application change for BLE" into tizen

5 years agoMerge "Adding Retry logic for LUX disconnection issue" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:03:56 +0000 (06:03 +0000)]
Merge "Adding Retry logic for LUX disconnection issue" into tizen

5 years agoMerge "[CONPRO-1471]Adding logic for caching MTU in tizen LE Server" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:03:49 +0000 (06:03 +0000)]
Merge "[CONPRO-1471]Adding logic for caching MTU in tizen LE Server" into tizen

5 years agoMerge "Memory leak fixes" into tizen
Pyun DoHyun [Mon, 23 Sep 2019 06:03:42 +0000 (06:03 +0000)]
Merge "Memory leak fixes" into tizen

5 years agoUpdated snapshot_history.txt 85/214385/1
Sudipto [Fri, 20 Sep 2019 17:43:27 +0000 (23:13 +0530)]
Updated snapshot_history.txt

Change-Id: I74821c7fb5c5b33d0a08752d5f7b4ca1593dd0b9
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoEnabling build of simpleclientblescan application 83/214383/1
samanway [Tue, 17 Sep 2019 06:20:50 +0000 (11:50 +0530)]
Enabling build of simpleclientblescan application

A new android application "simpleclientblescan" was added recently
in commit 6d7c44e1c073d74ff117a456007156214b310f1c - The new app is
for android BLE client side, which enables BLE scan in app, and it will
show other devices around - User can select one from the list of devices
shown by app, app will connect to it - In this commit enabling the build
of the application

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

Change-Id: Iad103f1397efb0c59693cad19fa597c0a725f65b
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoSimpleClient Android Application change for BLE 82/214382/1
samanway [Tue, 3 Sep 2019 08:01:03 +0000 (13:31 +0530)]
SimpleClient Android Application change for BLE

This patch is to provide BLE scanning functionality in Android BLE client side.

- First application will start BLE scan for nearby devices.
- Then app will provide list of BLE devices which are advertising.
- Then user will select a device and app will internally connect to it.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/563/commits/6d7c44e1c073d74ff117a456007156214b310f1c
(cherry-picked from 6d7c44e1c073d74ff117a456007156214b310f1c)

Change-Id: I6efd7762ddb33c1e3dee2f2c225c8231d4381b93
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoAdding Retry logic for LUX disconnection issue 81/214381/1
Samanway Dey [Mon, 1 Jul 2019 14:10:17 +0000 (19:40 +0530)]
Adding Retry logic for LUX disconnection issue

 -Added retry logic for LUX disconnection issue
 -There is a mutex unlock placed under wrong nested block,
which will be corrected in a separate commit

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

Change-Id: If2ff7023db999d4bf160501014af5ec559f5bd8d
Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoMemory leak fixes 79/214379/1
Vitalii Irkha [Mon, 16 Sep 2019 10:44:38 +0000 (13:44 +0300)]
Memory leak fixes

Memory leak fixes in sec. res. provider

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

Change-Id: Iabb45f6c26ed1559314922e31871c0077522fb85
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoChanges in spec file for WITH_PROCESS_EVENT flag 16/214016/1 accepted/tizen/unified/20190918.010311 submit/tizen/20190917.081538
DoHyun Pyun [Tue, 17 Sep 2019 07:24:42 +0000 (16:24 +0900)]
Changes in spec file for WITH_PROCESS_EVENT flag

Apply the change into packaging/iotivity.spec

Change-Id: I4dbe93f535c2f6a725af363b291df25f73db33dd
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agombedTLS CVE fix 00/214000/1
Oleksii Beketov [Fri, 31 May 2019 12:14:05 +0000 (15:14 +0300)]
mbedTLS CVE fix

Added mitigations for CVE-2018-0497,
CVE-2018-0498, CVE-2018-0488, CVE-2018-0487

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

Change-Id: I8b0bd22bc5c5888e0cded89d6445d4c6e6ca1850
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate snapshot_history.txt 94/213994/1
Sudipto [Tue, 17 Sep 2019 06:34:07 +0000 (12:04 +0530)]
Update snapshot_history.txt

Change-Id: Ifd8bfc18448df8eb7348a41fdc92b3cd88bf1edc
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoSvace memory leak fixes 91/213991/1
Vitalii Irkha [Tue, 10 Sep 2019 16:05:52 +0000 (19:05 +0300)]
Svace memory leak fixes

Fix memory leaks

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

Change-Id: I2015af65b4c865377db746e232842b4d52df1545
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoMemleak fix 90/213990/1
Oleksii Beketov [Tue, 10 Sep 2019 12:11:00 +0000 (15:11 +0300)]
Memleak fix

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

Change-Id: Id194ae5ee25c1fb48c4a177836dec2a138d0869f
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoDelete client callback for error response. 89/213989/1
Senthil Kumar G S [Mon, 9 Sep 2019 12:36:31 +0000 (18:06 +0530)]
Delete client callback for error response.

After invoking application's callback from HandleCAErrorResponse(),
client callback is not removed from client callback list ('cbList').
This patch removes it.

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

Change-Id: I4e1732a3b47ba2879e02ad91577bb21264c764ae
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years ago[CONPRO-1471]Adding logic for caching MTU in tizen LE Server 80/214380/1
Kush [Tue, 10 Sep 2019 16:52:41 +0000 (22:22 +0530)]
[CONPRO-1471]Adding logic for caching MTU in tizen LE Server

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/573/commits/6e689edd472e098a873b64549006d026e597c667
(cherry-picked from 6e689edd472e098a873b64549006d026e597c667)

Change-Id: I8a7f8a5eee882894ac27cd98f501fe49345931ca
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoFix for android build failure. 88/213988/1
Senthil Kumar G S [Fri, 6 Sep 2019 12:51:37 +0000 (18:21 +0530)]
Fix for android build failure.

Background:
Recently, an API was added to retrieve the some internal values in TCP socket.
This requirement was from VD and hence it was verified on Tizen platform.
PR(merged): https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/537

There is a build issue on android because <ifaddrs.h> which is used in the above patch
is not available in android-21.

Solution:
Made the corresponding API to be available only for Tizen platform.

Change-Id: Idd64911aee0f817353c3376127f53a5ac8efe650
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agosvace fixes 87/213987/1
Aleksey Volkov [Thu, 5 Sep 2019 17:22:22 +0000 (20:22 +0300)]
svace fixes

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

Change-Id: Ic0361d29c7bc8f0aa4708ec103728e968b430a42
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoSvace issues fixed 86/213986/1
Iurii Metelytsia [Fri, 6 Sep 2019 10:40:34 +0000 (13:40 +0300)]
Svace issues fixed

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

Change-Id: Ib535052b5b934db1e16064b0e923994c7b3f7b68
Signed-off-by: Iurii Metelytsia <i.metelytsia@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoSome svace issues fixed 85/213985/1
Iurii Metelytsia [Thu, 5 Sep 2019 17:31:27 +0000 (20:31 +0300)]
Some svace issues fixed

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

Change-Id: I2e32b5b381de1c063dff9ef924a690e1113b2478
Signed-off-by: Iurii Metelytsia <i.metelytsia@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoChanges in spec file for WITH_PROCESS_EVENT flag 84/213984/1
Kush [Tue, 3 Sep 2019 16:32:38 +0000 (22:02 +0530)]
Changes in spec file for WITH_PROCESS_EVENT flag

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

Change-Id: Icbd20289b1fdea7da1c8074775702c09ab865e1f
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoObservation without caching. 83/213983/1
Senthil Kumar G S [Fri, 26 Jul 2019 13:15:21 +0000 (18:45 +0530)]
Observation without caching.

Added support to receive all observe notifications.

Background:-
RE ignores the observe notification if there is no change in the representation.
This patch introduces a default argument in"RCSRemoteResourceObject::startCaching" to let users
decide whether all notifications need to be reported or not.

API Usage:
startCaching(std::move(cb), CacheMode::OBSERVE_ONLY, CacheReport::REPORT_ALL);

Note: Existing functionalities/usages are not affected.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/378/commits/8be52525d302ef933fda2ca4032fbd716b40582b
(cherry-picked from 8be52525d302ef933fda2ca4032fbd716b40582b)

Change-Id: Ib96e91da07edcdeb9bcedd4cf733f7966bd83e50
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoImplementation of Filtered Scan for BLE android client 82/213982/1
samanway-dey [Wed, 19 Dec 2018 14:30:25 +0000 (20:00 +0530)]
Implementation of Filtered Scan for BLE android client

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/550/commits/122fb3ee9a1ad66d5bbeeeeb6410f9f10e1977a6
(cherry-picked from 122fb3ee9a1ad66d5bbeeeeb6410f9f10e1977a6)

Change-Id: I537661ef606540fd36a8c352330ef831b96ed732
Signed-off-by: samanway-dey <samanway-dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years ago[CONPRO-1483] Implementation of API for setting scanfilter UUIDs 84/214384/1
samanway [Tue, 3 Sep 2019 15:54:59 +0000 (21:24 +0530)]
[CONPRO-1483] Implementation of API for setting scanfilter UUIDs

- Currently, IoTivity sets the custom UUIDs to set scanfilters for Android BLE client by hard coding UUIDs
- This patch implements CASetLEScanUuid API to set the UUIDs to add more scanfilters

Change-Id: I167bb7b7b24589e88d4b7c8120cea9b72a5918b1
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoUpdate snapshot info 15/213115/1
Sudipto [Fri, 30 Aug 2019 09:48:09 +0000 (15:18 +0530)]
Update snapshot info

Change-Id: Ia1e559e398090e88087e394cf031aca4c60969ce
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoReplace select with poll. 14/213114/1
SOURAV BHUWALKA [Thu, 22 Aug 2019 08:07:31 +0000 (13:37 +0530)]
Replace select with poll.

1. select has a limitation of 1024 file descriptors to be monitored.
2. Calling select() or FD_* macros with invalid file descriptor could
result in stack corruption.
3. Currently we don't validate the file descriptors which are passed to it.
Even if we add logic to validate, we cannot recreate the underlying socket
with file descriptor lesser than 1024.

Stack corruption:-
fd_set is an array of bits, of FD_SETSIZE elements.
A variable of fd_set is created in the stack segment.
FD_SET macro apparently doesn’t know about the FD_SETSIZE value,
so even if you pass a FD greater than 1024,
it will actually set to “1” the corresponding bit in the fd_set array of bits,
which actually is OUTSIDE the array. Thus, corrupting the stack.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/560/commits/842a27d1c6be3397687d7788d113f872308de2bc
(cherry-picked from 842a27d1c6be3397687d7788d113f872308de2bc)

Reference:
https://sigquit.wordpress.com/2009/12/24/stack-corruption-improper-use-of-fd_set/

Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Change-Id: Ie8f7e0b90c9a458ee82f247132c45ff82f2a37ae
Co-authored-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoUpdate snapshot history 19/212719/1
Sudipto [Mon, 26 Aug 2019 08:08:00 +0000 (13:38 +0530)]
Update snapshot history

Change-Id: I3d51e155908cb8f0449d05ac55ad6d55cbaf9a9a
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoCONPRO-1481 crash while fuzzing with nmap 18/212718/1
Vitalii Irkha [Thu, 22 Aug 2019 13:20:34 +0000 (16:20 +0300)]
CONPRO-1481 crash while fuzzing with nmap

Check dataLen before read data from TLS connection

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

Change-Id: I33e010519573155725e5f1986b60bdcacfa3db2b
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years ago[CONPRO-1476] Fix memory leak in TCP server. 17/212717/1
Senthil Kumar G S [Wed, 14 Aug 2019 14:31:06 +0000 (20:01 +0530)]
[CONPRO-1476] Fix memory leak in TCP server.

On starting TCP server, CAReceiveHandler thread is created but it is not destroyed when it is stopped.
Though the thread stops asynchronously, its handle which is stored in the thread pool is not removed and destroyed during stop
which causes memory leak to persist till stack termination.

Note: Cherry-picked the patch from https://github.sec.samsung.net/SES/SmartThingsThing/commit/c1d8cf83510f988fb4f8bf0e6b72cb18f618d4ec
Reviewed & Verified on current 1.2-rel codebase.

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

Change-Id: I8eeff40b22b57cc75717f8df3e34d1fbb1388c12
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years ago[CONPRO-1473] Fix for build error [-Werror=implicit-function-declaration] 16/212716/1
Senthil Kumar G S [Tue, 13 Aug 2019 09:56:19 +0000 (15:26 +0530)]
[CONPRO-1473] Fix for build error [-Werror=implicit-function-declaration]

Cherry-picked code changes from
https://github.sec.samsung.net/SES/SmartThingsThing/commit/cb59d751fc93d9715a514d85c33ee41969f43886

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

Change-Id: Idb186e07ece03a6a13f44830be125bd7ce16a51a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoCONPRO-1475: memleak fix 15/212715/1
Oleksii Beketov [Tue, 13 Aug 2019 09:52:27 +0000 (12:52 +0300)]
CONPRO-1475: memleak fix

Fixed memleak in doxmresource.c

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

Change-Id: I31544579f61eb309d19bc0e7e324472a5b0d4355
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoQR Code Random Pin CB 14/212714/1
Oleksii Beketov [Tue, 6 Aug 2019 10:49:33 +0000 (13:49 +0300)]
QR Code Random Pin CB

Added an API to set preconfigured PIN code

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

Change-Id: I0d1ccdf352ddabe9bb57c59a15c9a5ac8eb6f189
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoMap the error code of CAGenerateToken() to OCStackResult. 13/212713/1
Senthil Kumar G S [Mon, 15 Jul 2019 12:37:54 +0000 (18:07 +0530)]
Map the error code of CAGenerateToken() to OCStackResult.

CAGenerateToken could fail for memory overflow or invalid token parameters.
Currently, from OCDoRequest(), we return OC_STACK_ERROR for all failure cases.

This commit maps the error code to OCStackResult.

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

Change-Id: Ib26555a13eba9e7d925b0eb1db13b4fc12f74c6f
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoMake NS Consumer message handler thread as joinable thread. 41/212241/1
Senthil Kumar G S [Thu, 8 Aug 2019 15:09:23 +0000 (20:39 +0530)]
Make NS Consumer message handler thread as joinable thread.

Background:
Currently, NS Consumer message handler thread is a detached thread.
When stopping NS Consumer, we have to destroy thread handle and other resources of message handler thread.
We cannot destroy if message handler thread is running.
So before we destroy, we need to wait for the message handler thread to terminate.
pthread_join() is called internally. As it is on a detached thread, it is useless and it could result in undefined behavior.

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

Change-Id: I43113a1d6ac0dcbba15a6b12032d71c5369e8b3b
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoMerge "Update snapshot history" into tizen accepted/tizen/unified/20190816.112424 accepted/tizen/unified/20190819.112113 submit/tizen/20190814.040402 submit/tizen/20190819.064537
Pyun DoHyun [Mon, 12 Aug 2019 00:11:23 +0000 (00:11 +0000)]
Merge "Update snapshot history" into tizen