platform/upstream/iotivity.git
5 years agoAdding fix for Sonarqube major issues for IoTivity 1.2-rel 70/211870/2
samanway [Tue, 23 Jul 2019 12:05:15 +0000 (17:35 +0530)]
Adding fix for Sonarqube major issues for IoTivity 1.2-rel

     - Fixed Invalid number of character ')'s in caleadapter.c
     - Fixed Possible null pointer dereference in ccmessagehandler.c
     - Fixed double memory free condition JniNotificationConsumer.cpp
     - Fixed double memory free condition JniNotificationProvider.cpp

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/548/commits/222bbb7e84830c5a2ecc17332df1c60f2bcf3a71
(cherry-picked from 222bbb7e84830c5a2ecc17332df1c60f2bcf3a71)

Change-Id: I724ee387dfc932c0614b7e19bb289b85d0254106
Signed-off by: samanway <samanway@samanway.sa.corp.samsungelectronics.net>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
5 years agoCA API to retrieve the some internal values in TCP socket 25/211025/2
Amit Singh [Tue, 16 Jul 2019 14:59:13 +0000 (20:29 +0530)]
CA API to retrieve the some internal values in TCP socket

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

Change-Id: Ibb9139afc3e2da1b88288c1f6a14c8676b23adbf
Signed-off-by: Amit Singh <amit.s.r@samsung.com>
Signed-off-by: Kush Agrawal <kush.agrawal@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoUpdated snapshot(2018-07-25) 23/211023/2
Sudipto Bal [Fri, 26 Jul 2019 16:32:29 +0000 (22:02 +0530)]
Updated snapshot(2018-07-25)

Change-Id: I35dc6e4f15eebc6543b3bf3f12e26c79700d776b
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoBuild support to generate gcov code coverage. 22/211022/2
Senthil Kumar G S [Wed, 24 Jul 2019 10:09:33 +0000 (15:39 +0530)]
Build support to generate gcov code coverage.

Build flag: COVERAGE_CHECKS
Supported mode: debug
Platform: linux

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

Change-Id: I32e16780891f1e97b91a4c0f9589ef8f56c4a048
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoReturn accurate error codes for error cases. 21/211021/3
Senthil Kumar G S [Wed, 17 Jul 2019 07:33:32 +0000 (13:03 +0530)]
Return accurate error codes for error cases.

1. Returning CA_MEMORY_ALLOC_FAILED instead of CA_STATUS_FAILED.
2. If request doesn't contain RequestURI/Proxy URI, then return OC_STACK_INVALID_URI.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/545/commits/a2e9bce4cc70b63f9a82cce82970167126794e9a
(cherry-picked from ac207215d4c4550ad89c9b72ab81b859a83a0c2b)

Change-Id: Ib5f2b05dbc621ee8cc70ae9760a70b44a8c476f8
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoCrash in OCCreateResource 20/211020/2
Kush [Tue, 16 Jul 2019 11:38:45 +0000 (17:08 +0530)]
Crash in OCCreateResource

Added check for uri before strncmp

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

Change-Id: Ieddc1809174a1360a1bb82a6aeec580cb34e4755
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoFixed build issue with SECURED=0 option 19/211019/2
Vitalii Irkha [Tue, 16 Jul 2019 10:00:53 +0000 (13:00 +0300)]
Fixed build issue with SECURED=0 option

Moved common APIs from secure definition section

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/543/commits/4612b9818aa6b21a8dc1e07b1b1522d69b1206e0
(cherry-picked from 4612b9818aa6b21a8dc1e07b1b1522d69b1206e0)

Change-Id: I47418a8488c774bb343a845d828f6a56999a20d7
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoInit pstat->sm to NULL 18/211018/2
Aleksey Volkov [Tue, 16 Jul 2019 06:52:30 +0000 (09:52 +0300)]
Init pstat->sm to NULL

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/542/commits/732215dde47f1ed69461f874707b38c98b518d08
(cherry-picked from 732215dde47f1ed69461f874707b38c98b518d08)

Change-Id: I6efcc7a268fa9027ac1b080ce865ef7cd4020372
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoAdd gPstat null check 17/211017/2
Aleksey Volkov [Fri, 12 Jul 2019 11:14:35 +0000 (14:14 +0300)]
Add gPstat null check

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

Change-Id: I1c0a5295ebc2962132933335cfb33b578b3cad55
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years ago[CONPRO-1454]:[VD][DF190528-00531] Crash 16/211016/2
sourav bhuwalka [Wed, 3 Jul 2019 08:59:18 +0000 (14:29 +0530)]
[CONPRO-1454]:[VD][DF190528-00531] Crash

resHandle is being freed twice once in DeleteClientCB and once
in OICFree(resHandle) in OCDoRequest in exit condition.
So freeing resHandle only if clientCB is NULL

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

Change-Id: I486cfb9038524292be6d311302719e36fce5aaa4
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoOCRemoveDeviceWithUuid doesn't change owned device 15/211015/1
Vitalii Irkha [Fri, 12 Jul 2019 11:23:07 +0000 (14:23 +0300)]
OCRemoveDeviceWithUuid doesn't change owned device

API should call SRPResetDevice() inside

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/539/commits/1211889827f00390219402eef5576b85347b6750
(cherry-picked from 1211889827f00390219402eef5576b85347b6750)

Change-Id: If1dc94edcc340b49506a8c580324756708de4091
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoUse GATT server's get mtu size API instead of GATT client API 29/210029/2
DoHyun Pyun [Mon, 17 Jun 2019 09:20:47 +0000 (18:20 +0900)]
Use GATT server's get mtu size API instead of GATT client API

GATT server's get mtu size API is added on Tizen 5.5 public.
So we also add Tizen BLE 5.5 build option for the compatibility.

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

Change-Id: I96137ae7382d189460edc7427f4f2d6add212817
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoRFNOP right reset 28/209928/2
Vitalii Irkha [Mon, 1 Jul 2019 10:02:21 +0000 (13:02 +0300)]
RFNOP right reset

Reset ACL, Cred, Doxm, Pstat in case of validation failed.

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

Change-Id: I9f3d6f02e5b4d2c6c8b18c53ee25c535e9af2d62
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoCheck devID for owned device 27/209927/1
Vitalii Irkha [Mon, 1 Jul 2019 10:33:19 +0000 (13:33 +0300)]
Check devID for owned device

devID should be the same for owned device.

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

Change-Id: Icd13121c99faf0cfde92667a5d5fcaf902e0f205
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoTracking OTM state on client side 26/209926/1
Vitalii Irkha [Tue, 2 Jul 2019 16:12:27 +0000 (19:12 +0300)]
Tracking OTM state on client side

Tracking OTM state in DB, to allow only one client start OTM.

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

Change-Id: Ic8d02209d8de41c5b6f9029daa2d55cd20661e67
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoMerge "Remove unused openssl-devel dependency" into tizen
Pyun DoHyun [Thu, 4 Jul 2019 23:19:49 +0000 (23:19 +0000)]
Merge "Remove unused openssl-devel dependency" into tizen

5 years agoRemove unused openssl-devel dependency 06/209306/1
Dariusz Michaluk [Thu, 4 Jul 2019 15:06:24 +0000 (17:06 +0200)]
Remove unused openssl-devel dependency

Change-Id: I721f5579439f1a77482130bdc2e98f65113ecb1b

5 years agoUpdate Snapshot(2019-06-27) 09/208909/1 accepted/tizen/unified/20190702.114916 submit/tizen/20190702.012330
DoHyun Pyun [Mon, 1 Jul 2019 07:30:27 +0000 (16:30 +0900)]
Update Snapshot(2019-06-27)

Change-Id: If755f04ec28c5c003897bd3e4bdaf460995bcce9
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoPutting check guard if thread already destroyed 92/208892/1
Kush [Thu, 27 Jun 2019 16:33:31 +0000 (22:03 +0530)]
Putting check guard if thread already destroyed

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

Change-Id: Id229f4f85ba9b06bfca84f5991d245584cfdfa48
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoValidate device state for RFNOP 91/208891/1
Vitalii Irkha [Thu, 27 Jun 2019 13:18:35 +0000 (16:18 +0300)]
Validate device state for RFNOP

Added more conditions before device set state to RFNOP

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/526/commits/09d560036053995d8bd1dee875d696e8d1eb3701
(cherry picked from 09d560036053995d8bd1dee875d696e8d1eb3701)

Change-Id: I9fccbd932a1f4e56af692300e3121b39358f88c6
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoAdd CASetSecureEndpointUuid APIs 90/208890/1
Jaehong Jo [Tue, 11 Jun 2019 09:03:59 +0000 (18:03 +0900)]
Add CASetSecureEndpointUuid APIs

In the tls connection, the subject name in the certificate is set to uuid.
So need this api to set the identity with doxm or device uuid.
Give the endpoint and uuid, it finds the peer and sets identity to uuid.

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

Change-Id: I61b701e2fb95b2af61894431ece9c164e68f9c9e
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
5 years agoSet the queue handle to null before stop & destroy. (#525) 45/208345/1 accepted/tizen/unified/20190626.040955 submit/tizen/20190625.065348 submit/tizen/20190625.235330
senthil.gs@samsung.com [Thu, 20 Jun 2019 14:02:45 +0000 (19:32 +0530)]
Set the queue handle to null before stop & destroy. (#525)

g_sendQueueHandle is set to NULL to prevent new requests from being enqueued.
It avoids a race condition which could occur when adding elements to QueueingThread if it's already stopped.

Race condition scenario:-
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.

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

Change-Id: I5b22c034b30b00fc1ae7f08c37c278c29910345c
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1429] 100% CPU usage by iotivity stack 44/208344/1
sourav bhuwalka [Mon, 3 Jun 2019 07:16:47 +0000 (12:46 +0530)]
[CONPRO-1429] 100% CPU usage by iotivity stack

Here before the max number of observers was 255 and when more
than 255 observers were there an infinite loop was running.
Increasing the number of observers and changing the logic so
that infinite loop should not be run when observer count reaches
max number of observers.

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

Change-Id: Ib0bb86817d2dbf8c2d5f5806cb49ffa2e002cd21
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFixing crash in ocrandom.c (#516) 43/208343/1
samanway.dey@samsung.com [Tue, 11 Jun 2019 18:32:40 +0000 (00:02 +0530)]
Fixing crash in ocrandom.c (#516)

* Fixing crash in ocrandom.c

-In function OCFillRandomMem() in ocrandom.c, location array was filled by incrementing the pointer. As a result,
the base pointer was pointing out the last byte of memory chunk instead of pointing the beginning of the array.

Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
* Update ocrandom.c

Iterating till i > 1 for random swaps.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/516
(cherry picked from 643d922896dfeaf5f3d829009bd1d5b09654d93b)

Change-Id: I8031d4cf5cc22c682ff5c0df607c78e276923bcf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix Build Error in cloudCommon.c 42/208342/1
Jaehyun Cho [Thu, 23 May 2019 08:09:03 +0000 (17:09 +0900)]
Fix Build Error in cloudCommon.c

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

Change-Id: I2e5642555a1f50e27fea73d939c05104c95a81e0
Signed-off-by: Jaehyun Cho <jaehyun3.cho@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFixing crash in OCFillRandomMem (#512) 41/208341/1
samanway.dey@samsung.com [Thu, 23 May 2019 11:18:06 +0000 (16:48 +0530)]
Fixing crash in OCFillRandomMem (#512)

- In commit ca4adaec79350756d58b124af22bece9c3ad186d there was
  a bug which causes crash in IoTivity, fixed that

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

Change-Id: I65d5e1ce3cd2a51ca9d0dd60b10158c9c97bbef7
Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAdding more randomised token generation logic 40/208340/1
Samanway Dey [Mon, 20 May 2019 14:18:38 +0000 (19:48 +0530)]
Adding more randomised token generation logic

- Added shuffling logic by each byte after generating token

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

Change-Id: I941397f2a5b6452299c9e80649d0de0efc4cdd7a
Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix for server request with duplicate token issue 39/208339/1
Samanway Dey [Mon, 20 May 2019 14:12:29 +0000 (19:42 +0530)]
Fix for server request with duplicate token issue

- Adding return statement so that server doesn't process a request
  if another one with same token already exists in serverRequestList

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

Change-Id: Iee2618576c4bbce9904251276848b493c731b9bc
Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1442] Fix crash in cpp wrapper. 38/208338/1
Jaehyun Cho [Mon, 20 May 2019 05:38:04 +0000 (14:38 +0900)]
[CONPRO-1442] Fix crash in cpp wrapper.

When application is run with Both mode, in InProcClientWrapper start
logic for making procession thread is not executed. But, when stop
application, thread join processing and event free logic is executed
regardless mode. So I moved that logic into mode check statement. This
can make that logic is executed only mode is client.

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

Change-Id: I713f0019051f4970d6122e458186795fd070112e
Signed-off-by: Jaehyun Cho <jaehyun3.cho@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1398] Adjust server request handling 37/208337/1
Robert Chudek [Tue, 12 Feb 2019 11:03:44 +0000 (12:03 +0100)]
[CONPRO-1398] Adjust server request handling

[Model] IoTivity
[BinType] AP
[Customer] IoT-Core

[Issue#] CONPRO-1398
[Request] Robert Chudek / r.chudek
[Occurrence Version] n/a

[Problem] IoT-Core needs some additional server request handling.
[Cause & Measure] n/a
[Checking Method] n/a

[Team] IoT Connection
[Developer] Robert Chudek / r.chudek
[Solution company] Samsung
[Change Type] adjustment

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

Change-Id: If183e682dd165c64830d71f70d74eb15a5bb82ab
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoRemove securevirtualresourcetypes.h from ocpayload 36/208336/1
Jaehyun Cho [Thu, 9 May 2019 05:14:18 +0000 (14:14 +0900)]
Remove securevirtualresourcetypes.h from ocpayload

OicSecKey_t is used to set/get Payload data. ocpyalod.h do not
need to use securevirtualresourcetypes.h file directly. that header
is moved to implement file and removed from ocpayload header.

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

Change-Id: I520f507624e99d5b0a3ea131f09c6d6f91dddc61
Signed-off-by: Jaehyun Cho <jaehyun3.cho@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix build error on gcc version 7.x 35/208335/1
Daedong Park [Thu, 18 Apr 2019 01:11:39 +0000 (10:11 +0900)]
Fix build error on gcc version 7.x

- Add missing standard library header
- Rebuild google test 1.7.0

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

Change-Id: Ia416aedec5c338088066b75667cec80f745969dc
Signed-off-by: Daedong Park <daedong.park@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1430] BlockWiseTransfer Error 34/208334/1
kush.agrawal [Wed, 17 Apr 2019 10:12:37 +0000 (19:12 +0900)]
[CONPRO-1430] BlockWiseTransfer Error

Issue : If packet is already received , then it was giving error.

Fix : Skip processing packet if it was received once. So after receving packet which was already received earlier, it will still wait for next packet.

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

Change-Id: I20889dc55a58665bc5507d1e2e2e39bb72f65b91
Signed-off-by: kush.agrawal <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFixed acl update issues 33/208333/1
Jaehong Jo [Mon, 29 Apr 2019 11:26:17 +0000 (20:26 +0900)]
Fixed acl update issues

When update aclresource then if using payload
with not fixed lenght of rt list, occur error.
And if an empty rel is received,
it will be updated to the garbage value.

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

Change-Id: I1ecd9eb2e23c1c2c2e3a752585b73b62d3b24247
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoDisable Tizen 40 option for VD release 06/208206/1 accepted/tizen/unified/20190624.075159 submit/tizen/20190620.045214
DoHyun Pyun [Thu, 20 Jun 2019 01:07:34 +0000 (10:07 +0900)]
Disable Tizen 40 option for VD release

Because the gatt client destroy API has an issue, we can't pass the
Easy Setup senario using Tizen 40 option. We will add Tizen 50 option
with new GATT server MTU get API, and enable Tizen 50 option.

Change-Id: I26cc574e4448a6fa5001bfc5b62e3b7202853c7b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoModify Tizen BLE 3.0 / 4.0 build option 48/206148/1
DoHyun Pyun [Thu, 9 May 2019 04:35:39 +0000 (13:35 +0900)]
Modify Tizen BLE 3.0 / 4.0 build option

tizen4 flag was defined in the code, but it was not used.
So tizen BLE CA layer is using internal APIs. This patchset
modifies build options and disable internal API usage.

Change-Id: I283085e4525207c4df2cd40b683e6f67b3aa6662
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoRevert "Avoid adding elements to QueueingThread if it's already stopped." 04/205204/1 accepted/tizen/unified/20190507.111910 submit/tizen/20190506.232846
DoHyun Pyun [Tue, 30 Apr 2019 07:02:19 +0000 (16:02 +0900)]
Revert "Avoid adding elements to QueueingThread if it's already stopped."

This reverts commit c04ac05a42d644464490feecf905cfd4aaf64b76.

Change-Id: I2c81a9641a58522671d8807465f1ec5a2f91dd51

5 years agoAvoid adding elements to QueueingThread if it's already stopped. 34/204734/1 accepted/tizen/unified/20190429.103659 submit/tizen/20190426.041844
Senthil Kumar G S [Fri, 12 Apr 2019 06:34:12 +0000 (12:04 +0530)]
Avoid adding elements to QueueingThread if it's already stopped.

Backgraund:-
-> 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.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/475
(cherry picked from 069d45ab60a7cd90d451aea4fdcf9d03dda421de)

Change-Id: Ib64d83a2560f31d44cb33148eba4f8b4e9a1289e
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoDefault OTM select CB 33/204733/1
Oleksii Beketov [Thu, 4 Apr 2019 11:42:59 +0000 (14:42 +0300)]
Default OTM select CB

Default OTM select callback introduced

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/469
(cherry picked from 051a32dd63c54a309ff698d9143e9cb8a9733a3c

Change-Id: I5f437da5c654d763c7c467e7ce11a39efbc67e19
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAlgorithm for obtaining uuid from TLS data changed 32/204732/1
i.metelytsia [Mon, 22 Apr 2019 12:52:26 +0000 (15:52 +0300)]
Algorithm for obtaining uuid from TLS data changed

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/487
(cherry picked from d42e96b2cea21f6c5ffa623d3a89f88789fdc260

Change-Id: I533bda62a54e3bad053764aaa99ac564b32e947e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoDisable auto-discovery of NSProvider over TCP. 31/204731/1
Senthil Kumar G S [Mon, 22 Apr 2019 13:18:54 +0000 (18:48 +0530)]
Disable auto-discovery of NSProvider over TCP.

For disabling auto-discovery, DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY flag should be set to 1
in scons build command.

Background:-
For TCP Connected events, NS Consumer automatically discovers initiates the discovery
of NS Provider. Due to which, there is a problem which occurs when app perform sign-in
and there is no TCP connection, then connection will be established first.
NS Consumer will then receive the TCP connected event and initiate NS Provider discovery.
Even before sign-in, upon receiving the NS Provider discovery closes the connection as it is
in the process of sign-in.

This patch addresses the problem by disabling auto-discovery of NSProvider over TCP
for TCP connected events.

As auto discovery is disabled, application should explicitly perform discovery by calling
"NSConsumerEnableRemoteService" API (strictly after sign-in).

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

Change-Id: I41910070ad8c60c64aa8fa4567f98d98690965a4
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix for crash in BLE receive thread. 30/204730/1
Harish Kumara M [Fri, 23 Nov 2018 15:34:29 +0000 (21:04 +0530)]
Fix for crash in BLE receive thread.

Synchronizing access to client and server senderinfo as there are
chances of data receive handler may be acting on deleted SenderInfo
data when connection is closed. When connection closed, all senderInfo
for that connection are cleared in another thread.

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

Change-Id: Ibc495dba0143eef908eaa35a0173dde77288d4be
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot(2019-03-21) 92/203792/1 accepted/tizen/unified/20190418.145712 accepted/tizen/unified/20190430.041044 submit/tizen/20190418.013653 submit/tizen/20190430.024419
DoHyun Pyun [Thu, 18 Apr 2019 00:49:03 +0000 (09:49 +0900)]
Update Snapshot(2019-03-21)

Change-Id: I3f24c2a727c70bb608b70748a75653aca41482fc
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoParse UUID in parentheses 91/203791/1
Oleksii Beketov [Wed, 10 Apr 2019 16:01:15 +0000 (19:01 +0300)]
Parse UUID in parentheses

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

Change-Id: Ic1509d9164c80d8cd9b10f0404db61b52772c48b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAdding changes in octhread related to Process Event 90/203790/1
kush.agrawal [Wed, 17 Apr 2019 14:42:06 +0000 (23:42 +0900)]
Adding changes in octhread related to Process Event

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

Change-Id: Ic4b846bfc46734a7ce32d193318c85afdd7d49e9
Signed-off-by: kush.agrawal <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoMake OCProcessEvent method. 89/203789/1
kush.agrawal [Mon, 15 Apr 2019 13:24:54 +0000 (22:24 +0900)]
Make OCProcessEvent method.

OCProcess() need to poll periodically to check if any
work to process. This can be burden in some cases.
OCProcessEvent can get wake-up time using out parameter.
So we can use timed_wait not polling every periodic seconds.
To wake up for handling any receive event, we need to register
oc_event and this will send a signal to waited one.

Following patches are taken frm 2.0-rel branch :

1. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/385
2. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/393
3. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/401
4. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/431
5. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/450
6. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/470

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

Change-Id: I27d1e17dcf21c5a45a7ff4a8b1a988b5c5edaf0a
Signed-off-by: kush.agrawal <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix the i586 build error for tizen 5.5's dlog format 22/201922/1 accepted/tizen/unified/20190321.062540 submit/tizen/20190321.032446
DoHyun Pyun [Thu, 21 Mar 2019 01:48:33 +0000 (10:48 +0900)]
Fix the i586 build error for tizen 5.5's dlog format

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

Change-Id: I407f4465557e1dc18bb757eeb9fd432ff32d8044
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix the build error for tizen 5.5's dlog format 46/201746/1 submit/tizen/20190320.085337
DoHyun Pyun [Tue, 19 Mar 2019 06:00:04 +0000 (15:00 +0900)]
Fix the build error for tizen 5.5's dlog format

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

Change-Id: I6ecc43e87901fd9c3c49e1bd119dd8b951b50f21
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoHiding Privacy Logs for LUX 24/201724/1
samanway-dey [Thu, 21 Feb 2019 16:26:14 +0000 (21:56 +0530)]
Hiding Privacy Logs for LUX

Changing INFO level private log to INFO_PRIVATE level
for LUX PRA.

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

Change-Id: I91a33553988de53d228c0e6b9179d212c1e87b4f
Signed-off-by: samanway-dey <samanway-dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate catcpserver.c 23/201723/1
h.marappa@samsung.com [Wed, 13 Mar 2019 14:03:43 +0000 (19:33 +0530)]
Update catcpserver.c

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

Change-Id: I28bf6c8d266ccd4334aea89f58431a704625c588
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoioTivity [BinType] AP [Customer] iot-core 22/201722/1
Michał Bonio [Wed, 13 Mar 2019 10:07:38 +0000 (11:07 +0100)]
ioTivity [BinType] AP [Customer] iot-core

[Issue#] CONPRO-1393
[Request] SRPOL
[Occurrence Version] n/a

[Problem] Build failed for platform others than Tizen
[Cause & Measure] Tizen specific code has not been commented out
[Checking Method] Build IoTivity

[Team] IoT Connection
[Developer] MichaÅ‚ Bonio
[Solution company] Samsung
[Change Type] Fix

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

Change-Id: I7f3d32b2dcaeea769d7e249d3e0a6861812414f2
Signed-off-by: Michał Bonio <m.bonio@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix HandleDoxmPostRequest() to discard duplicate user confirm request 21/201721/1
Oleksii Beketov [Mon, 11 Mar 2019 16:49:38 +0000 (18:49 +0200)]
Fix HandleDoxmPostRequest() to discard duplicate user confirm request

Sync with SES PR #537

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

Change-Id: I6597949a83663afdc464aba05d6477cb265ac6d7
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoModify CopyRequest() and add free code for ehRequest after confirm 20/201720/1
Oleksii Beketov [Mon, 11 Mar 2019 16:45:51 +0000 (18:45 +0200)]
Modify CopyRequest() and add free code for ehRequest after confirm

Sync with SES PR #546

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

Change-Id: I3a891f44c9d6c270f752eed6947d02a390b2d777
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAsynchronous User Confirm 00/201700/1 submit/tizen/20190319.025827
Oleksii Beketov [Wed, 13 Mar 2019 11:04:52 +0000 (13:04 +0200)]
Asynchronous User Confirm

API for asynchronous user confirmation added

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

Change-Id: I17d91e07793c2108ccaeb702e440d5d0c64f317c
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot(2019-03-14) 63/201663/1
Abhishek Sansanwal [Mon, 18 Mar 2019 11:32:59 +0000 (07:32 -0400)]
Update Snapshot(2019-03-14)

Change-Id: Iafeb135fd723cba69418d4b70caf25b798a31e05
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agowrap CAcloseSslConnectionFreeEndpoint method with __TIZEN__ flag 56/201656/1
Grzegorz Żakiewicz [Tue, 12 Mar 2019 15:47:05 +0000 (16:47 +0100)]
wrap CAcloseSslConnectionFreeEndpoint method with __TIZEN__ flag

[Model] IoTivity
[BinType] AP
[Customer] iot-core

[Issue#] CONPRO-1392
[Request] r.chudek
[Occurrence Version] n/a

[Problem] pthread might be not available on other platforms
[Cause & Measure] n/a
[Checking Method] n/a

[Team] IoTConnection
[Developer] g.zakiewicz
[Solution company] Samsung
[Change Type] fix

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/414
(cherry picked from 9dc9af2eabffb1d46c1671baa4b0decfeb173a1e)

Change-Id: Idac05cde4018b6b064721c2ada5706601c2cb0c3
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoAdd CAcloseSslConnectionFreeEndpoint method 55/201655/1
Robert Chudek [Tue, 12 Feb 2019 10:28:29 +0000 (11:28 +0100)]
Add CAcloseSslConnectionFreeEndpoint method

[Model] IoTivity
[BinType] AP
[Customer] IoT-Core

[Issue#] CONPRO-1392
[Request] Robert Chudek / r.chudek
[Occurrence Version] n/a

[Problem] After calling CAcloseSslConnection there was a memory leak.
[Cause & Measure] Cause: After calling CAcloseSslConnection endpoint wasn't freed which led to memory leak.
[Checking Method] n/a

[Team] IoT Connection
[Developer] Robert Chudek / r.chudek
[Solution company] Samsung
[Change Type] bug fix

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/414
(cherry picked from 18a20af57324bc3d816a862e3aa5194712d2e237)

Change-Id: I283055bea913401c6c23953857b7ccfe5db3581b
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoReturning less than MTU from CALEClientGetMtuSize 54/201654/1
kush agrawal [Wed, 6 Mar 2019 13:09:08 +0000 (18:39 +0530)]
Returning less than MTU from CALEClientGetMtuSize

We are not able to send data of MTU size over BLE in TV
due to there is a bug in TV's BT framework. There is need of
this change untill the bug gets fixed in BT framework.

NOTE: Revert this patch once the fix is fixed in BT framework.

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

Change-Id: I4390c7083493e2f9b76d30d8b7d3d1b66b5a4c5e
Signed-off-by: kush agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoAdding le client changes in caleclient_vd.c 53/201653/1
Abhishek Sansanwal [Mon, 18 Mar 2019 09:42:11 +0000 (05:42 -0400)]
Adding le client changes in caleclient_vd.c

1. Fix build issue in OICCalloc
2. Added two API's (CALEClientIsConnected and CALEClientSendNegotiationMessage)

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/451
(cherry picked from 26a48f123f35e8d561f4cae381d182bea222a9e6)

Change-Id: Ic8735ab38d6277b6a40d6154344a5ccdd7d5ddf0
Signed-off-by: kush agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoAdd CASetCloudAddressForProxy method 52/201652/1
Robert Chudek [Tue, 12 Feb 2019 10:36:39 +0000 (11:36 +0100)]
Add CASetCloudAddressForProxy method

[Model] IoTivity
[BinType] AP
[Customer] IoT-Core

[Issue#] CONPRO-1393
[Request] Robert Chudek / r.chudek
[Occurrence Version] n/a

[Problem] IoT-Core needs a method to set cloud address for proxy.
[Cause & Measure] Cause: No such method implemented.
[Checking Method] n/a

[Team] IoT Connection
[Developer] Robert Chudek / r.chudek
[Solution company] Samsung
[Change Type] new feature

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/415
(cherry picked from 0689b92fdb5dc0018768cf36b1723f2f55a9395c)

Change-Id: Icc3f706a5e929fcddb32ffebea20070db2ba5680
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoModified logic for LE scanning 68/199568/1 accepted/tizen/unified/20190214.060556 submit/tizen/20190213.055543
Kush Agrawal [Mon, 11 Feb 2019 15:00:44 +0000 (20:30 +0530)]
Modified logic for LE scanning

Issue : If scan fails once and if we retry from above layer then scan is not started.
Cause : Scan was not started for device which is already added once in server list.

Fix : Changed logic by enabling scan for devices which are already added and in UNICAST_PENDING state

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/412
(cherry picked from 3106e414dbe8807c50b439cc19e6b94e86ab50ac)

Change-Id: I66614b0e49291b6f80a32c16b18cf8245508cbfa
Signed-off-by: Kush Agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoChange logging method 51/199251/1 accepted/tizen/unified/20190208.061658 submit/tizen/20190208.002622
agrkush [Thu, 7 Feb 2019 12:42:40 +0000 (18:12 +0530)]
Change logging method

There is a crash reported in InProcServer
destructor when oclog() is called.
So replacing it with OIC_LOG_V

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/411
(cherry picked from 206d2d7556e6c2bc258ec4623fad7d221d23862e)

Change-Id: I133383484e8a673f2d05f297fd1a3da90b2104f7
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot(2019-01-23) 18/199218/1
Abhishek Sansanwal [Tue, 5 Feb 2019 11:11:33 +0000 (16:41 +0530)]
Update Snapshot(2019-01-23)

Change-Id: I97613b3c8dffa531ff989fb6f73a1b50bed35c76
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoProviding build option to disable BLE server 41/199041/3 accepted/tizen/unified/20190208.061532 submit/tizen/20190201.062348 submit/tizen/20190206.231730
Abhishek Sansanwal [Fri, 1 Feb 2019 03:42:36 +0000 (09:12 +0530)]
Providing build option to disable BLE server

Build option DISABLE_BLE_SERVER is added so that BLE server
can be disabled when running in CLIENT_SERVER mode.

Just provide DISABLE_BLE_SERVER = 1 option to disable it.

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

Change-Id: I7552f378406e92b6c847cd73debfd31336d074a5
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Kush Agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoUpdate Snapshot(2019-01-16) 45/198045/1
Abhishek Sansanwal [Fri, 18 Jan 2019 04:18:16 +0000 (09:48 +0530)]
Update Snapshot(2019-01-16)

Change-Id: I216f88f68dcba4711b722d6c9b45a44606268dd5
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
5 years agoChanging the length of access token 18/198018/2 accepted/tizen/unified/20190128.061218 submit/tizen/20190118.010952
sourav bhuwalka [Mon, 14 Jan 2019 13:34:49 +0000 (19:04 +0530)]
Changing the length of access token

Access token property of the cloud needs to be changed from 256bytes to 1kb

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/392
(cherry picked from commit 89f95a89892e44f893c3d395bcd3cde142efb0c0)

Change-Id: I2dfe704b9d293f5fa7d78ee62246b7dfeb7b188b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoEnable auto connect while calling bt_gatt_connect 19/198019/1
agrkush [Thu, 10 Jan 2019 11:43:10 +0000 (17:13 +0530)]
Enable auto connect while calling bt_gatt_connect

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/391

Change-Id: Ifbaf12df7e70dd59690713d1d02b337bb8d590fe
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot(2019-01-09) 77/197177/1
Amit KS [Thu, 10 Jan 2019 06:36:54 +0000 (12:06 +0530)]
Update Snapshot(2019-01-09)

Change-Id: I6b800220eb953a811bd634d56727b46fb12289e1
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoAdded scanning of custom UUID's and MTU Negotiation Logic 76/197176/1
Amit KS [Thu, 10 Jan 2019 06:31:45 +0000 (12:01 +0530)]
Added scanning of custom UUID's and MTU Negotiation Logic

 -VD Devices advertise custom UUID's
  So added handling of it in scan callback.
 -Added MTU negotiated to be 512

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

Change-Id: I1f7e31b16c86701f08a56d693565f73eaab19fac
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoFixes in Tizen LE Client 75/197175/1
agrkush [Tue, 8 Jan 2019 13:02:46 +0000 (18:32 +0530)]
Fixes in Tizen LE Client

1. Fix for crash when BT disconnect is called in between
   GATT connection procedure.

2. Setting NULL terminated manufacture data string.

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

Change-Id: Ib372b1ab4ad1f2484c5aa8f8a8cbf412a497d6e9
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoOption to skip close TCP on IF down. 74/197174/1
Harish Kumara M [Fri, 4 Jan 2019 14:22:45 +0000 (19:52 +0530)]
Option to skip close TCP on IF down.

This is VD specific requirement, not to close TCP
servers when interface down event is received.
New API "CAUtilSkipTCPCloseOnInterfaceDown" is
defined using which application can enable/disable
skip TCP server feature.

Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
fix: save build error

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/388
(cherry picked from commit 725041caab8e0c1f14c6333cd066ea61a845893d)

Change-Id: Ifaf37379955d0d5615f08d43824148b6cbe075d3
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoSetting descriptor in write characterstic in LE server 73/197173/1
agrkush [Fri, 4 Jan 2019 13:58:10 +0000 (19:28 +0530)]
Setting descriptor in write characterstic in LE server

This sequence of adding characterstics and descriptor works with
Android and Tizen both.
If we use the previous sequence of adding characterstics and descriptor
then Android writes on wrong attribute handle and fails.

Reverting changes done in LE Server in this patch:
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/d7a3c45d3ab7d4a0ee01a3a4fb639f5ba7f366f8

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

Change-Id: I1e0a3a136a14807fc97d95c05116775421b73f51
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoUpdate Snapshot(2018-12-26) 86/196286/1
Amit KS [Thu, 27 Dec 2018 03:47:11 +0000 (09:17 +0530)]
Update Snapshot(2018-12-26)

Change-Id: I6fe253632611cb25430ca91dd125d4fa726ff104
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoFix deleting request on slow response 85/196285/1
Harish Kumara M [Wed, 26 Dec 2018 11:56:34 +0000 (17:26 +0530)]
Fix deleting request on slow response

Server request is getting deleted when observe request
received again with same previous request token even
the new server request is not being added to sever request
list. Duplicate requests with same token are expected when
when ACK for the first request is not reached at client side.

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

Change-Id: I97968ae99a0abca39eb1bbe860cbfe73f684a738
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoReturning less than MTU from CALEClientGetMtuSize 84/196284/1
Harish Kumara M [Wed, 19 Dec 2018 15:40:00 +0000 (21:10 +0530)]
Returning less than MTU from CALEClientGetMtuSize

We are not able to send data of MTU size over BLE in TV
due to there is a bug in TV's BT framework. There is need of
this change untill the bug gets fixed in BT framework.

NOTE: Revert this patch once the fix is fixed in BT framework.

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

Change-Id: I90044e8fd11d2f55ce02ccbb7bb8598df5072e30
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoModified additional field 79/196179/1 submit/tizen/20181225.220903
pooja.k@partner.samsung.com [Fri, 21 Dec 2018 10:44:04 +0000 (16:14 +0530)]
Modified additional field

changed Samsung specific x.com.samsung.candidateaps value's key names.

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

Change-Id: I0ff2251fa0e1110455bdcf23c99b579b5f564db3
Signed-off-by: pooja <pooja.k@partner.samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoAdding x.com.samsung.deployenv prop 78/196178/1
Harish Kumara M [Wed, 19 Dec 2018 14:43:00 +0000 (20:13 +0530)]
Adding x.com.samsung.deployenv prop

Adding new additional properties "x.com.samsung.deployenv"
and "x.com.samsung.iatt" as vendor properties to
"oic.r.coapcloudconf" easysetup resource.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/380
(cherry picked from commit 5b0e8e760da8069c53cf5dd5ef083148c39a2cd2)

Change-Id: Ic307cc1fc2551da143fcdfa15b53db83a7871cb4
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoUpdate Snapshot(2018-12-19) 65/196165/1
Amit KS [Mon, 24 Dec 2018 07:02:25 +0000 (12:32 +0530)]
Update Snapshot(2018-12-19)

Change-Id: I2e0a363bffbc09ce8d742668e03a211bb8ce870c
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoChanging logic of fetching MTU size in server size. 47/195847/1 accepted/tizen/unified/20181219.154852 submit/tizen/20181219.010032 submit/tizen/20181219.045745
agrkush [Sun, 16 Dec 2018 15:18:06 +0000 (20:48 +0530)]
Changing logic of fetching MTU size in server size.

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

Change-Id: I39f7a066c4608cff93730771eef756bcd8695d21
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAdding API for setting MTU size in Tizen BLE Client 46/195846/1
samanway-dey [Sat, 15 Dec 2018 09:38:10 +0000 (15:08 +0530)]
Adding API for setting MTU size in Tizen BLE Client

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

Change-Id: I4eef40b48aa15084d2a3b66a2fea10e27b766547
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAdded thread for security and cloud provisioning. 45/195845/1
agrkush [Sun, 16 Dec 2018 15:11:40 +0000 (20:41 +0530)]
Added thread for security and cloud provisioning.

Executing cloud resource discovery and secure resource discovery in
different thread to avoid blocking of main event loop of Tizen

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

Change-Id: I4263302ee004ccbcbb27b1092c393e870099b3db
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix 64bit build error for tizen dlog print format 26/195626/1 accepted/tizen/unified/20181217.142341 submit/tizen/20181217.021058
DoHyun Pyun [Sun, 16 Dec 2018 23:58:17 +0000 (08:58 +0900)]
Fix 64bit build error for tizen dlog print format

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/371
(cherry picked from commit 526d318695746521886ecf8bb9a542d309cf7d28)

Change-Id: If27fd08ce8edb15675fa6e264a09bf9fc5b6455c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot(2018-12-12) 93/195393/1 accepted/tizen/unified/20181214.065332 submit/tizen/20181213.225116
Amit KS [Thu, 13 Dec 2018 06:08:37 +0000 (11:38 +0530)]
Update Snapshot(2018-12-12)

Change-Id: Ib0eb957e83135c1d1c0ad2fc70afbb3d25142b98
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoAdding more samsung specific properties 90/195390/1
sourav bhuwalka [Tue, 11 Dec 2018 17:22:33 +0000 (22:52 +0530)]
Adding more samsung specific properties

Changes:
    1.Backward compatibility for "mnmo", "lang", "ctry", "loc" properties.
    2.Adding OC_LOW_QOS_WITH_TCP to OCQualityOfService.
    3.Adding support for new samsung specific properties:
    4."x.com.samsung.serverid", "x.com.samsung.timezoneid",
    5."x.com.samsung.saapiserver", "x.com.samsung.saauthserver",
    6."x.com.samsung.sadsc", "x.com.samsung.hidden", "x.com.samsung.hubid"
    7.Adding new WiFi Auth type - FT_PSK
    8.Setting DeviceID seed while configuring stack.
    9.Redundant m_observeCacheList removed from ResourceCacheManager.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/364
(cherry picked from commit 1f00a113fcf6a7f65144d259ec4f39aac7288e02)

Change-Id: I4b0712904ba2144370c0009bc3fdecc4a2a15851
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoFixes for scan in VD 35/195235/1 accepted/tizen/unified/20181212.062520 submit/tizen/20181212.005641
agrkush [Sun, 9 Dec 2018 18:23:35 +0000 (23:53 +0530)]
Fixes for scan in VD

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

Change-Id: Ifa2d29429b9e0b4b57635d1e948477284dc23397
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoRPK API update 34/195234/1
Oleksii Beketov [Thu, 19 Jul 2018 13:38:43 +0000 (16:38 +0300)]
RPK API update

Callback for RPK master key declaration corrected

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

Change-Id: I3d4b0d37388de91f771b5f6f111270d38b95f62a
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix for crash in JniOnPostListener 33/195233/1
Harish Kumara M [Wed, 5 Dec 2018 08:48:51 +0000 (14:18 +0530)]
Fix for crash in JniOnPostListener

Crash was due to post response received on deleted JniOnPostListener
object. This change make sure of valid JniOcResource object when CRUDN
callback invoked from core stack layer.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/360
(cherry picked from commit 494f1578d7edceec084dd42b59c3198bdd2fb6a8)

Change-Id: I5c7d42cbfaa522f2c4707cb0271422eecbd5b396
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: pilli manikanta <p.manikanta@partner.samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoRevert "[CONPRO-1333] Fix for crash in virtual device" 32/195232/1
Harish Kumara M [Tue, 4 Dec 2018 14:08:35 +0000 (19:38 +0530)]
Revert "[CONPRO-1333] Fix for crash in virtual device"

This reverts commit 3f24e6e008ba6de12fe6ef8dd45cf4a096bc528c.

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

Change-Id: I8890b28943a37717c94bea1cbe1be51f38f4459a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoGetPstatIsop() API fix 31/195231/1
Vitalii Irkha [Fri, 7 Dec 2018 10:36:17 +0000 (12:36 +0200)]
GetPstatIsop() API fix

Check pointer to NULL  before using

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

Change-Id: I622552d46b2d7bb22ec8f1b01820c07b672cc645
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoUpdate Snapshot History (2018-11-22 & 2018-11-28) 29/195029/1
Amit KS [Mon, 10 Dec 2018 06:45:31 +0000 (12:15 +0530)]
Update Snapshot History (2018-11-22 & 2018-11-28)

Change-Id: I57cadda13d0b43e3c1be705a27caa4b16c754264
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoUpdate Snapshot(2018-12-05) 53/194853/1 accepted/tizen/unified/20181210.060235 submit/tizen/20181209.235818
Amit KS [Fri, 7 Dec 2018 11:22:33 +0000 (16:52 +0530)]
Update Snapshot(2018-12-05)

Change-Id: Id7b5660b7a106e16c1cc72face0efbe078fe59ac
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoChange scan and connect sequence for Tizen LE Client (VD). 52/194852/1
agrkush [Wed, 5 Dec 2018 14:57:22 +0000 (20:27 +0530)]
Change scan and connect sequence for Tizen LE Client (VD).

1. Scan Will be initiated at time of starting le client.
2. Connect will be initiated before sending data.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/355
(cherry picked from commit 1929cb2f5ba51de21343857dc30dcefa370a6f80)

Change-Id: I3d69cc621185daa4c5580ceb545ce8d4c5eebde5
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoAdd vd specific caleclient code 51/194851/1
agrkush [Thu, 22 Nov 2018 13:55:40 +0000 (19:25 +0530)]
Add vd specific caleclient code

Change-Id: I9939f7748733c4290ed4eed1781a5d218fe2ec48
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoFix build break in JNI layer 50/194850/1
Harish Kumara M [Wed, 5 Dec 2018 14:36:48 +0000 (20:06 +0530)]
Fix build break in JNI layer

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/354
(cherry picked from commit 896a6e15761a50d7c34ce01d75b674015f4871fd)

Change-Id: Ibde2c0ef310afb276b22ada1bd4adac329f6dc36
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
5 years agoCheck Device Operational State 60/194560/1 accepted/tizen/5.0/unified/20181206.055549 submit/tizen_5.0/20181206.000945
Vitalii Irkha [Wed, 5 Dec 2018 12:17:46 +0000 (14:17 +0200)]
Check Device Operational State

Add API - OCGetDeviceOperationalState() to get isop value of pstat.

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

Change-Id: Icc64e0d8767dbb98620860955c84004418505531
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoOXM notify CB 16/194516/1
Oleksii Beketov [Mon, 3 Dec 2018 12:08:56 +0000 (14:08 +0200)]
OXM notify CB

Added selected OXM notification callback

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/336
(cherry picked from commit 57e8641fcc434d15a4d078bd0d8a4b036c99d140)

Change-Id: I29faaa328082eb4ac41a47c5a1024ff9e04b3392
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoAdd OTM select callback 15/194515/1
Oleksii Beketov [Thu, 29 Nov 2018 12:33:36 +0000 (14:33 +0200)]
Add OTM select callback

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/334
(cherry picked from commit 532f133abc97e9a165ced0fd94b24d513362237c)

Change-Id: Ifa6e264c2a900a5927ff15ec240a45f210ca9b59
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agofreed payload in OCSendKeepAliveRequest 14/194514/1
samanway-dey [Tue, 27 Nov 2018 16:35:00 +0000 (22:05 +0530)]
freed payload in OCSendKeepAliveRequest

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/346
(cherry picked from commit 80cddcb478a802a2d7b6705eeb0624caca15d660)

Change-Id: Id86c7fce30d9f5a2fa137ac6ca8be89005ab3c29
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1333] Fix for crash in virtual device 13/194513/1
pilli manikanta [Wed, 28 Nov 2018 09:10:22 +0000 (14:40 +0530)]
[CONPRO-1333] Fix for crash in virtual device

Post response received on deleted JniOnPostListener object.
Binding weak reference of JniOnPostListener gives safe way
for checking the existance of JniOnPostListener object.

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

Change-Id: Ie2305571e562202b69374bfc7960b2d5689b624d
Signed-off-by: pilli manikanta <p.manikanta@partner.samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years ago[CONPRO-1343] Removing unused code 12/194512/1
sourav bhuwalka [Tue, 20 Nov 2018 14:38:55 +0000 (20:08 +0530)]
[CONPRO-1343] Removing unused code

Here g_connectionHandler and g_adapterHandler are removed as they are always NULL and will never be called.

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

Change-Id: I656da132c3d3f948e0f84230d456476fca968f10
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>