platform/core/appfw/rpc-port.git
21 months agoModify Port::Write() method 99/286999/1
Hwankyu Jhun [Wed, 18 Jan 2023 06:20:02 +0000 (06:20 +0000)]
Modify Port::Write() method

After this patch is applied, if the cache buffer is not empty, the
rpc-port library checks the socket whether writing is possible or not.
If it's possible, the rpc-port library writes the delayed message to
the socket fd.

Change-Id: If54967bbc7fce4d4494b9fee44d8dcfe5e57de50
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 1.13.12 93/286693/1 accepted/tizen/unified/20230113.091214
Hwankyu Jhun [Wed, 11 Jan 2023 23:26:02 +0000 (23:26 +0000)]
Release version 1.13.12

Changes:
 - Use tizen_base::SharedQueue

Change-Id: I03fac659f314b95277f3552beca0765989ef0870
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoUse tizen_base::SharedQueue 67/286667/1
Hwankyu Jhun [Wed, 11 Jan 2023 10:55:05 +0000 (10:55 +0000)]
Use tizen_base::SharedQueue

To remove duplicated codes about shared queue, we add a
tizen-shared-queue library. This patch uses the tizen_base::SharedQueue
and removes duplicated shared queue codes.

Change-Id: I43e1aa4ecce2c97524046145b0db02e3cb3e1d0d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 1.13.11 72/286372/1
Hwankyu Jhun [Thu, 5 Jan 2023 01:42:10 +0000 (01:42 +0000)]
Release version 1.13.11

Changes:
 - Modify connect method of proxy

Change-Id: I703dd13a99aaaa1bd96bceefcb49e93a8e99f719
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoModify connect method of proxy 26/286326/7
Hwankyu Jhun [Wed, 4 Jan 2023 03:46:37 +0000 (03:46 +0000)]
Modify connect method of proxy

The proxy is able to call the rpc_port_proxy_connect() function after
calling the rpc_port_proxy_disconnect() function.

Change-Id: Ib9cb6758b1792e4f3413164745b5c34819ef51ce
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoRelease version 1.13.10 12/286012/1 accepted/tizen/7.0/unified/20221227.171429 accepted/tizen/unified/20221227.170641
Hwankyu Jhun [Mon, 26 Dec 2022 05:28:38 +0000 (05:28 +0000)]
Release version 1.13.10

Changes:
 - Call abort() when double free occurs

Change-Id: I9f7508c7010188f9cdb72200a6539dd620b6ed0a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
22 months agoCall abort() when double free occurs 11/286011/1
Hwankyu Jhun [Mon, 26 Dec 2022 05:14:37 +0000 (05:14 +0000)]
Call abort() when double free occurs

When double free occurs, rpc-port library calls abort().
This is for deubgging C# applications.

Change-Id: I15465d756f8b17d21b4b56bb2938cb2c8b536fe4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
23 months agoRelease version 1.13.9 67/284667/1
Changgyu Choi [Wed, 23 Nov 2022 01:14:42 +0000 (10:14 +0900)]
Release version 1.13.9

Changes:
 - Add client reset step in OnTimedOut()

Change-Id: I70f808c4c1c82902f8e9278f2e8a0044625a5d7c
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
23 months agoAdd client reset step in OnTimedOut() 31/284631/3
Changgyu Choi [Tue, 22 Nov 2022 05:29:40 +0000 (14:29 +0900)]
Add client reset step in OnTimedOut()

If the timeout occurs between OnAppeared and Connected events,
even if try to reconnect, the port may not be valid.
After applying this patch, the client is reset to protect the possibility of accessing invalid ports.

Change-Id: Ic268bac9f899f96c2ceda196f5def1abdd624159
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.13.8 83/283083/1 accepted/tizen/unified/20221104.082313
Changgyu Choi [Tue, 18 Oct 2022 02:25:12 +0000 (11:25 +0900)]
Release version 1.13.8

Changes:
 - Fix wrong exception handling
 - Release the client handle
 - Fix static analysis issues

Change-Id: Ia6118104adb388f2a6387b8f5ad0295949df1402
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix static analysis issues 31/283031/1
Changgyu Choi [Mon, 17 Oct 2022 04:14:44 +0000 (13:14 +0900)]
Fix static analysis issues

Change-Id: I443f2472f98001c1b279cc27d835dc341024e846
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease the client handle 36/282836/1
Hwankyu Jhun [Wed, 12 Oct 2022 06:41:39 +0000 (06:41 +0000)]
Release the client handle

When the client application calls the rpc_port_proxy_connect() function
after the diconnected event is received, the main_client_ and the
delegate_client_ handles have to be released.

Change-Id: I2aeef18323bc9f438b048cfef42fb9dd1c82f62e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix wrong exception handling 48/282448/4
Changgyu Choi [Tue, 4 Oct 2022 02:47:34 +0000 (11:47 +0900)]
Fix wrong exception handling

Change-Id: Ifd4f0104ad69dbcaddbdc31a75e84b676471716e
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.13.7 32/282232/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061819 accepted/tizen/7.0/unified/hotfix/20221116.105042 accepted/tizen/unified/20220929.140025 tizen_7.0_m2_release
Hwankyu Jhun [Wed, 28 Sep 2022 23:20:50 +0000 (23:20 +0000)]
Release version 1.13.7

Changes:
 - Fix bugs about getting and setting raw data

Change-Id: I55f35f2f2506158285f6b3f07ac8a924e73e6206
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix bugs about getting and setting raw data 16/282216/1
Hwankyu Jhun [Wed, 28 Sep 2022 10:27:29 +0000 (10:27 +0000)]
Fix bugs about getting and setting raw data

Unfortunately, there is a bug about the raw data of the parcel.
When the rpc_port_parcel_get_raw() is called, the function allocates a
tizen_base::Parcel to set the raw data internally.

Change-Id: I4297f7fab5ba144bafd17366b518627bfbd1e5d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.6 23/282123/1 accepted/tizen/unified/20220928.144443
Hwankyu Jhun [Tue, 27 Sep 2022 06:56:16 +0000 (06:56 +0000)]
Release version 1.13.6

Changes:
 - Use modified tizen_base::Parcel
 - Fix static analysis issue

Change-Id: Ifad26b8f42b17f3b793f751659203e6e27ccccc1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix static analysis issue 02/282102/4
Hwankyu Jhun [Tue, 27 Sep 2022 05:30:49 +0000 (05:30 +0000)]
Fix static analysis issue

The following issue is fixed:
 - ODR_VIOLATION

Change-Id: Icece742e174148c3af52fed4e7346a04b51e1790
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoUse modified tizen_base::Parcel 66/281966/2
Hwankyu Jhun [Fri, 23 Sep 2022 11:06:39 +0000 (11:06 +0000)]
Use modified tizen_base::Parcel

To improve the performance of the parcel creation, the implementation of
the Parcel is changed. It uses malloc() instead of std::vector.

Requires:
 - https://review.tizen.org/gerrit/#/c/platform/core/base/bundle/+/281779/

Change-Id: Iaf01e6e94e34e10a36b8ca17081c6aba3b3b51e1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.5 13/281813/1 accepted/tizen/unified/20220923.125143
Hwankyu Jhun [Thu, 22 Sep 2022 05:42:25 +0000 (05:42 +0000)]
Release version 1.13.5

Changes:
 - Check debug port connection
 - Fix static analysis issue

Change-Id: Iad333eae69105012fa456e08f0f042b792e7883e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix static analysis issue 78/281778/2
Hwankyu Jhun [Thu, 22 Sep 2022 01:29:11 +0000 (01:29 +0000)]
Fix static analysis issue

- Initializes member variables

Change-Id: Iea984746028c53001d2a2100cc57d03fc3315f30
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoCheck debug port connection 40/281740/2
Hwankyu Jhun [Wed, 21 Sep 2022 08:20:13 +0000 (08:20 +0000)]
Check debug port connection

If the debug port is not connected, the rpc-port doesn't send and
receive the sequence number.

Change-Id: I7697410a0500a790fad2328d9aa4ff54a93da652
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.4 55/281355/1 accepted/tizen/unified/20220919.090127
Hwankyu Jhun [Fri, 16 Sep 2022 01:52:10 +0000 (01:52 +0000)]
Release version 1.13.4

Changes:
 - Remove build warning messages
 - Fix DebugPort implementation

Change-Id: I4c5e8edcee9604326d7344dea0a52384a7f232aa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix DebugPort implementation 36/281336/2
Hwankyu Jhun [Thu, 15 Sep 2022 10:42:36 +0000 (10:42 +0000)]
Fix DebugPort implementation

The DebugPort implementation is changed. The method are changed to 'static'.
The implementation of the DebugPort is moved to the DebugPortImpl.
To avoid unnecessary locking mutex, the flag that is connected_ is changed to
std::atomic<bool>.

Change-Id: I4aca67730639664c7a2646f9486be49124dad0ff
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRemove build warning messages 37/281337/2
Hwankyu Jhun [Thu, 15 Sep 2022 10:47:54 +0000 (10:47 +0000)]
Remove build warning messages

To remove -Wwrite-strings warning messages, char array is added to set
the SERVER_BIN.

Change-Id: I66cb1c3d325f794f6d89b66b378b2f0f15836297
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.3 66/280966/1 accepted/tizen/unified/20220913.175629
Changgyu Choi [Wed, 7 Sep 2022 07:42:42 +0000 (16:42 +0900)]
Release version 1.13.3

Changes:
 - Fix static analysis issues

Change-Id: I0e0669a5f02715647d3e93a25d1e3ae24f302629
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoFix static analysis issues 33/280933/2
Changgyu Choi [Wed, 7 Sep 2022 02:17:50 +0000 (11:17 +0900)]
Fix static analysis issues

Changes:
 - Adds exception handling logic.
 - Fix to using const_cast instead of strdup.

Change-Id: Ic6b54c8257f1099f37b1fea33ba5a6894dc751ad
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
2 years agoRelease version 1.13.2 35/279935/1 accepted/tizen/unified/20220821.211120 submit/tizen/20220819.071936
Hwankyu Jhun [Fri, 19 Aug 2022 07:18:07 +0000 (07:18 +0000)]
Release version 1.13.2

Changes:
 - Remove circular dependency

Change-Id: I9708de830a33ec1690ca93a99575cbe60a372ba0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRemove circular dependency 34/279934/1
Hwankyu Jhun [Fri, 19 Aug 2022 07:16:34 +0000 (07:16 +0000)]
Remove circular dependency

tidl package has a dependency of rpc-port. Currently, there is a
circular dedenecy problem. This patch solves it.

Change-Id: If60079ad21220fece3624d34f3cb9487fd17c006
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.1 83/279883/1 submit/tizen/20220819.013532
Hwankyu Jhun [Fri, 19 Aug 2022 01:23:05 +0000 (01:23 +0000)]
Release version 1.13.1

Changes:
 - Add a missing exception handling

Change-Id: Id4c9e64b626f31cc034a0537e106f55734ab9760
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoAdd a missing exception handling 80/279880/2
Hwankyu Jhun [Fri, 19 Aug 2022 00:17:13 +0000 (00:17 +0000)]
Add a missing exception handling

The SetReceiveTimeout() method throws an exception when the error occurs.

Change-Id: I8ea11f4d7e04a127efebe4c516a1fbe32bf6a435
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.13.0 79/279879/1 submit/tizen/20220819.000528
Hwankyu Jhun [Thu, 18 Aug 2022 23:47:36 +0000 (23:47 +0000)]
Release version 1.13.0

Changes:
 - Add benchmark tool
 - Execute benchmark server as child process
 - Add options

Change-Id: Ib9115dcceb1a62cb17d668609970f5e96f06a901
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoAdd options 73/279573/1
jh9216.park [Fri, 12 Aug 2022 00:47:33 +0000 (20:47 -0400)]
Add options

- Added options
  -f, --funcation  Use function call instead of RPC
  -a, --all        Test pre-defined test-cases

Change-Id: I993432e219bb16a0bd3d9a80a24daae60e781f41
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
2 years agoExecute benchmark server as child process 41/279541/2
Hwankyu Jhun [Thu, 11 Aug 2022 07:42:00 +0000 (16:42 +0900)]
Execute benchmark server as child process

To test the performance easily, the benchmark-server will be executed
using fork() & execv() by the tool.

Change-Id: I394131d6294a78c869adfcb6f6565397feb9b77b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoAdd benchmark tool 29/279529/5
jh9216.park [Thu, 11 Aug 2022 03:46:55 +0000 (23:46 -0400)]
Add benchmark tool

Change-Id: I8360367d6a62e00f4c2a3525a409aa9e8079ab87
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
2 years agoRelease version 1.12.13 58/277858/1 accepted/tizen/unified/20220728.131939 submit/tizen/20220714.070033 submit/tizen/20220724.222434 submit/tizen/20220725.232057
Hwankyu Jhun [Thu, 14 Jul 2022 06:40:32 +0000 (15:40 +0900)]
Release version 1.12.13

Changes:
 - Fix run-unittest.sh script

Change-Id: I5009ec01aad2c5efeb05238b517a05b61f683504
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix run-unittest.sh script 49/277849/1
Hwankyu Jhun [Thu, 14 Jul 2022 05:51:24 +0000 (14:51 +0900)]
Fix run-unittest.sh script

For code coverage measurement, the permission of directories and files should be
changed for applications.
The script sets the smack label as "System::Run" to files.

Change-Id: I7c405e0fc8e6548298e3addffcdaeaa2b6a460a0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.12.12 20/276020/1 accepted/tizen/unified/20220610.134735 submit/tizen/20220608.235643 submit/tizen/20220609.221238
Hwankyu Jhun [Wed, 8 Jun 2022 22:47:33 +0000 (07:47 +0900)]
Release version 1.12.12

Changes:
 - Fix memory leak

Change-Id: Icecb3fb8c38746afa1ae833c3c6354cba732da2a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix memory leak 94/275994/2
Hwankyu Jhun [Wed, 8 Jun 2022 07:33:22 +0000 (16:33 +0900)]
Fix memory leak

When the handle is destroying, the session information of the DebugPort
has to be removed.

Change-Id: I6c931b889261d4d5374ac89775c2b50a1c6ad483
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.12.11 04/275804/1 accepted/tizen/unified/20220603.141257 submit/tizen/20220602.042544
Hwankyu Jhun [Thu, 2 Jun 2022 04:02:48 +0000 (13:02 +0900)]
Release version 1.12.11

Changes:
 - Use source ID instead of GSource

Change-Id: I01c1634f39f83a5e6986491a9290e847d03f34c7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoUse source ID instead of GSource 01/275801/3
Hwankyu Jhun [Thu, 2 Jun 2022 03:15:10 +0000 (12:15 +0900)]
Use source ID instead of GSource

To find the GSource properly from the GMainContext, the port object uses
the source_id instead of the GSource. And, if creating shared_ptr is failed,
the OnEventReceived callback function should return G_SOURCE_REMOVE to
prevent recalling the function.

Change-Id: I26604a7671f73f1d48476434e180ec4d542c05f2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.12.10 10/275510/1 accepted/tizen/unified/20220530.140751 submit/tizen/20220526.014753
Hwankyu Jhun [Thu, 26 May 2022 01:45:04 +0000 (10:45 +0900)]
Release version 1.12.10

Changes:
 - Fix spec file for coverage measurement

Change-Id: I3f2ad32077205536e3ac4d403471b6c0a9771494
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix spec file for coverage measurement 98/275498/1
Hwankyu Jhun [Thu, 26 May 2022 01:34:32 +0000 (10:34 +0900)]
Fix spec file for coverage measurement

To measure code coverages automatically, a run-unittest.sh is needed.

Change-Id: I298bc4d70010af80024374f49e8d5a8682b480e5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.12.9 47/271647/1 accepted/tizen/6.5/unified/20220225.151927 accepted/tizen/unified/20220228.132711 submit/tizen/20220224.231138 submit/tizen_6.5/20220224.231154
Hwankyu Jhun [Thu, 24 Feb 2022 06:05:35 +0000 (15:05 +0900)]
Release version 1.12.9

Changes:
 - Fix a bug about callback invocation

Change-Id: I5a13ebfd08fbe181384c8ae461aa795caf82797c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix a bug about callback invocation 38/271638/1
Hwankyu Jhun [Thu, 24 Feb 2022 02:56:32 +0000 (11:56 +0900)]
Fix a bug about callback invocation

The connection request will not be successful until the stub is the idle state.
After sending the connection request to the stub, the proxy cannot get
the rejected event or the disconnected event until the stub is the idle
state. Because, when the port is appeared, the proxy removes the connection timer.
This patch adjusts a position of the UnsetConnTimer() call to remove
the connection timer properly.

Change-Id: I4d0fb651fd30c77df9088580b38b171f1a98ca5d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoRelease version 1.12.8 73/269773/1 accepted/tizen/6.5/unified/20220125.122541 accepted/tizen/unified/20220124.020354 submit/tizen/20220120.064930 submit/tizen/20220120.083417 submit/tizen/20220120.231448 submit/tizen_6.5/20220120.064818 submit/tizen_6.5/20220121.000129 submit/tizen_6.5/20220123.222508
Hwankyu Jhun [Thu, 20 Jan 2022 06:22:13 +0000 (15:22 +0900)]
Release version 1.12.8

Changes:
 - Fix installation path of gcov result

Change-Id: Ied2f20a9c2f7e8b5ba493b430c17e7b59773a600
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2 years agoFix installation path of gcov result 26/269726/1
Hwankyu Jhun [Thu, 20 Jan 2022 05:44:38 +0000 (14:44 +0900)]
Fix installation path of gcov result

Change-Id: Ic6638bd0c1fd8c86e28f27f9e8dcf341c679237d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.7 53/265753/1 accepted/tizen/6.5/unified/20211109.041712 accepted/tizen/unified/20211101.140318 submit/tizen/20211028.054746 submit/tizen/20211028.063318 submit/tizen/20211101.102058 submit/tizen_6.5/20211105.053806
Hwankyu Jhun [Thu, 28 Oct 2021 05:38:19 +0000 (14:38 +0900)]
Release version 1.12.7

Changes:
 - Revert "Fix Write() method of Port"
 - Separate locking mutex

Change-Id: I4bb6117a01b18445e7feb8233f99e09cecd4b2ff
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoSeparate locking mutex 49/265749/1
Hwankyu Jhun [Thu, 28 Oct 2021 05:14:49 +0000 (14:14 +0900)]
Separate locking mutex

Currently, the rpc_port_parcel_create_from_port() function and the
rpc_port_parcel_send() function use the mutex of the Port to locking the mutex.
After this patch is applied, a new mutex is added to the Port to avoid problems
that cannot be written.
And, the maximum queue size of the delayed messages is increased to 10MB.

Change-Id: I048adec69643b6cd975f7b2c3345e4babfb4a222
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRevert "Fix Write() method of Port" 48/265748/1
Hwankyu Jhun [Thu, 28 Oct 2021 04:18:59 +0000 (13:18 +0900)]
Revert "Fix Write() method of Port"

This reverts commit 99cc275334f64d281a3e10e5ace5e22e1f15a6a3.

Change-Id: I0b38339eb5d44d6136a9d49cf129f52dbcd28d8e

3 years agoRelease version 1.12.6 22/265722/1
Hwankyu Jhun [Wed, 27 Oct 2021 23:58:12 +0000 (08:58 +0900)]
Release version 1.12.6

Changes:
 - Fix Write() method of Port

Change-Id: Ie55b187a6bc1f3ad70393c4eb56a6a5b61c78475
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix Write() method of Port 54/265654/1
Hwankyu Jhun [Tue, 26 Oct 2021 09:00:41 +0000 (18:00 +0900)]
Fix Write() method of Port

If the data is larger than the maximum socket buffer size, the port divides
the data by the maximum socket buffer size and transmits it.
And, the queue size of delayed messages is changed to '1024 * 1024 * 10'.

Change-Id: I357efb0c55af9bf61abb06dcc49e63f031ba1091
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.5 81/265481/1
Hwankyu Jhun [Wed, 20 Oct 2021 09:32:22 +0000 (18:32 +0900)]
Release version 1.12.5

Changes:
 - Use destructor attribute for disposing thread
 - Fix Debug Port
 - Fix crash issue
 - Set nullptr to the listener ptr

Change-Id: I26c5417705aff76fcc0f1ab792218bb38665bf16
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoSet nullptr to the listener ptr 79/265479/2
Hwankyu Jhun [Wed, 20 Oct 2021 09:02:04 +0000 (18:02 +0900)]
Set nullptr to the listener ptr

When the timed out error occurred, the listener ptr should be nullptr.
While calling the rejected callback function, the proxy process tries to
connect to the stub process.

Change-Id: I48b03e9eaa56f832c45b26384f0bf8c3aa5c0ad1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix crash issue 77/265477/1
Hwankyu Jhun [Wed, 20 Oct 2021 08:50:29 +0000 (17:50 +0900)]
Fix crash issue

While the process is terminating, the DebugPort::Dispose() call causes
SIGSEGV. Because, the context instance already destroyed in that time.
This patch adds a parameter to solve the crash issue. If the do_leave is
false, the method does not close the app com connection.

Change-Id: I69a0471d5a5deaeccab74ed04cb83d445b3f74b9
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix Debug Port 09/265009/3
Hwankyu Jhun [Thu, 7 Oct 2021 01:53:38 +0000 (10:53 +0900)]
Fix Debug Port

After this patch is applied, the thread of the DebugPort is created when
the socket is connected to the tool(server). The rpc-port-util tool
sends the event at start time.

Requires:
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/amd/+/265008/

Change-Id: Ib5b58099cc541f12db6329324b9e71fa15435c01
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoUse destructor attribute for disposing thread 84/264984/3
Hwankyu Jhun [Wed, 6 Oct 2021 23:33:06 +0000 (08:33 +0900)]
Use destructor attribute for disposing thread

The rpc-port library can be loaded and unloaded using dlopen() and
dlclose() in the runtime. In this case, the process has crashed by
the thread of the rpc-port library. Before unloading the library, the thread
has to be terminated. This patch uses destructor attribute to terminate
the thread appropriately before unloading the library is finished.

Change-Id: I2338a4419f02fb67dff042fd308ba1d590bf0ac3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.4 70/264670/1 accepted/tizen/6.5/unified/20211028.100309 accepted/tizen/unified/20211001.001408 submit/tizen/20210928.055316 submit/tizen/20210928.222418 submit/tizen_6.5/20211028.162101 tizen_6.5.m2_release
Hwankyu Jhun [Tue, 28 Sep 2021 05:31:45 +0000 (14:31 +0900)]
Release version 1.12.4

Changes:
 - Remove unnecesary log print
 - Fix Session Addition for DebugPort

Change-Id: Ic867209987e14104993350d07ce146cb9d051bc7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix Session Addition for DebugPort 12/264612/1
Hwankyu Jhun [Mon, 27 Sep 2021 07:32:48 +0000 (16:32 +0900)]
Fix Session Addition for DebugPort

To reduce the error log print related to debug-port, calling AddSession()
is moved.

Change-Id: Iaf3f064d12054fa108d99ae796502043aeae801c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRemove unnecesary log print 80/264580/1
Hwankyu Jhun [Mon, 27 Sep 2021 00:21:23 +0000 (09:21 +0900)]
Remove unnecesary log print

When EAGAIN error occurs, the rpc-port waits for POLLIN event.
If the timeout error occurs, the rpc-port prints the error log.

Change-Id: Icfaf163226072986e1d99e08a307ad2eb7ff83e0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.3 89/264489/1 accepted/tizen/unified/20210924.132722 submit/tizen/20210923.064123
Hwankyu Jhun [Thu, 23 Sep 2021 06:35:55 +0000 (15:35 +0900)]
Release version 1.12.3

Changes:
 - Change file name
 - Fix coding style
 - Fix locking the mutex
 - Check debug socket existence
 - Wait fd event to read data

Change-Id: I9f7f7baae0c2e9d6293b30826070d4b2755cdf2f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoWait fd event to read data 76/264476/6
Hwankyu Jhun [Thu, 23 Sep 2021 02:02:57 +0000 (11:02 +0900)]
Wait fd event to read data

This patch uses poll() instead of nanosleep(). If the pol() returns a
positive number, the Read() method tries to read the data from the file
descriptor immediately.

Change-Id: I4d0f3e548ba038538a2463b17a5dbff64e4cf8a2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoCheck debug socket existence 79/264479/1
Hwankyu Jhun [Thu, 23 Sep 2021 02:54:12 +0000 (11:54 +0900)]
Check debug socket existence

If the socket path is not existed, rpc-port library doesn't try to connect to
the debug-socket.

Change-Id: Ia2c99e0c888e37764d31736d031d370cf288ea8c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix locking the mutex 59/264359/4
Hwankyu Jhun [Thu, 16 Sep 2021 09:06:53 +0000 (18:06 +0900)]
Fix locking the mutex

This patch uses lock() and unlock() instead of std::lock_guard to reduce
the instance creation of std::lock_guard.

Change-Id: Ia7988caf0e9165bab79b785c19db7b989e41b077
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix coding style 57/264357/1
Hwankyu Jhun [Thu, 16 Sep 2021 09:02:27 +0000 (18:02 +0900)]
Fix coding style

- Fixes header guards properly
- Removes unnecessary header inclusion
- Removes unused method

Change-Id: Id7fcc4b985f094225ea1d3c45b0251a0eb9b8e4b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoChange file name 18/264318/1
Hwankyu Jhun [Thu, 16 Sep 2021 02:36:50 +0000 (11:36 +0900)]
Change file name

'message_sending_thread' is changed to 'message-sending-thread-internal'.

Change-Id: Ie899d980c17283ccc48967b17566f3906ec3067f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.2 14/264314/1 accepted/tizen/unified/20210916.123518 submit/tizen/20210916.013401
Hwankyu Jhun [Thu, 16 Sep 2021 01:32:51 +0000 (10:32 +0900)]
Release version 1.12.2

Changes:
 - Fix locking the mutex of the Port class
 - Remove GDBus dependency from rpc-port library

Change-Id: I87b75981d8ee402207189bf28ebeab4cb77ecf8d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix locking the mutex of the Port class 11/264311/1
Hwankyu Jhun [Thu, 16 Sep 2021 00:19:52 +0000 (09:19 +0900)]
Fix locking the mutex of the Port class

To reduce the interval of locking the mutex, the mutex lock in the Read() method
ie separated using braces. And, the mutex lock is added to the Disconnect() method.

Change-Id: I60657385bc73cb988de0f53433bb1d22a21dad74
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRemove GDBus dependency from rpc-port library 02/264202/3
Hwankyu Jhun [Tue, 14 Sep 2021 10:14:36 +0000 (19:14 +0900)]
Remove GDBus dependency from rpc-port library

The rpc-port was used the GDBusConnection to notify the presence of debug port.
After this patch is applied, the rpc-port library doesn't use the GDBusConnection.
The thread of the debug-port tries to connect to the debug port of the tool
automatically if it's not connected.

Change-Id: Ife29d7960360e9da21819b16993d406750a4d990
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.1 08/263908/1 accepted/tizen/unified/20210915.001806 submit/tizen/20210913.085158 submit/tizen/20210914.043614
Hwankyu Jhun [Mon, 13 Sep 2021 08:46:30 +0000 (17:46 +0900)]
Release version 1.12.1

Changes:
 - Fix Disconnect() method of Port
 - Fix rpc_port_read() function

Change-Id: I6132825793cf726538d92bb4cef22fadba0081db
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoMerge "Fix rpc_port_read() function" into tizen
HwanKyu Jhun [Mon, 13 Sep 2021 08:15:56 +0000 (08:15 +0000)]
Merge "Fix rpc_port_read() function" into tizen

3 years agoFix rpc_port_read() function 01/263901/1
Hwankyu Jhun [Mon, 13 Sep 2021 07:51:35 +0000 (16:51 +0900)]
Fix rpc_port_read() function

Currently, calling Read() is failed, the port will be disconnected.
The header of the parcel is added to check the procotol validation.
This patch removes to call Disconnect() method when the Read() is failed.

Change-Id: I070d9e361917a0bee6a0cd2f673f7157306af8cb
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix Disconnect() method of Port 92/263892/1
Hwankyu Jhun [Mon, 13 Sep 2021 07:14:05 +0000 (16:14 +0900)]
Fix Disconnect() method of Port

Before closing the file descriptor, the method calls IgnoreIOEvent() to
release the GSource.

Change-Id: I8e7c91de98e1db838def468564ca98117d1985eb
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.12.0 95/263795/1 accepted/tizen/unified/20210913.123400 submit/tizen/20210910.074525 submit/tizen/20210913.035428
Hwankyu Jhun [Fri, 10 Sep 2021 07:13:42 +0000 (16:13 +0900)]
Release version 1.12.0

Changes:
 - Add new parcel functions

Change-Id: Ic756474c95503bd0860141ac738e0ffe14db2719
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoAdd new parcel functions 01/263201/6
Hwankyu Jhun [Fri, 27 Aug 2021 11:24:37 +0000 (20:24 +0900)]
Add new parcel functions

Adds:
 - rpc_port_parcel_get_raw()
 - rpc_port_parcel_create_from_raw()

Change-Id: I1568112a40405e5fbaef3c47a46fc2a23bf68fa6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.11.3 65/263665/1 accepted/tizen/unified/20210909.002340 submit/tizen/20210908.001618
Hwankyu Jhun [Wed, 8 Sep 2021 00:12:32 +0000 (09:12 +0900)]
Release version 1.11.3

Changes:
 - Add port message sending thread

Change-Id: I741ae6c91cf459a2bf404c98c89e65a6ee87e1ca
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoMerge "Release version 1.11.2" into tizen accepted/tizen/unified/20210908.131632 submit/tizen/20210907.070653
Changgyu Choi [Tue, 7 Sep 2021 07:06:32 +0000 (07:06 +0000)]
Merge "Release version 1.11.2" into tizen

3 years agoRelease version 1.11.2 30/263630/1
Changgyu Choi [Tue, 7 Sep 2021 07:01:45 +0000 (16:01 +0900)]
Release version 1.11.2

Changes:
 - Add port message sending thread

Change-Id: If48b0b8840e444a9d0f5c1032214a131cca29767
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoMerge "Add port message sending thread" into tizen
Changgyu Choi [Tue, 7 Sep 2021 06:59:36 +0000 (06:59 +0000)]
Merge "Add port message sending thread" into tizen

3 years agoAdd port message sending thread 70/263070/17
Changgyu Choi [Tue, 31 Aug 2021 08:52:53 +0000 (17:52 +0900)]
Add port message sending thread

Change-Id: I548ce7bf15613e32cf15397b8fe388efd07252f0
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoRelease version 1.11.2 53/263353/1 accepted/tizen/unified/20210902.131340 submit/tizen/20210901.091219
Changgyu Choi [Wed, 1 Sep 2021 04:27:18 +0000 (13:27 +0900)]
Release version 1.11.2

Changes:
 - Fix svace static issues

Change-Id: I65b2c01103b73d2c538f3bdde482d488b66a42f8
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoFix svace static issues 46/263346/2
Changgyu Choi [Wed, 1 Sep 2021 03:12:45 +0000 (12:12 +0900)]
Fix svace static issues

Change-Id: I3df266e8160fdd3c80ea74d2feabeb3e0dc494e4
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoRelease version 1.11.1 49/262949/1 accepted/tizen/unified/20210824.123731 submit/tizen/20210824.020356
Hwankyu Jhun [Tue, 24 Aug 2021 01:58:20 +0000 (10:58 +0900)]
Release version 1.11.1

Changes:
 - Check current thread ID to destroy handle

Change-Id: I2bb288fd2f3bdb4cee4a7570aed818fe20366047
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoCheck current thread ID to destroy handle 27/262927/2
Hwankyu Jhun [Mon, 23 Aug 2021 22:44:16 +0000 (07:44 +0900)]
Check current thread ID to destroy handle

If the current thread ID is equal to the process ID,
the destroy functions destroy the handle immediately.
If it's not, the rpc-port uses glib idler to destroy the handle
in the main thread.

Change-Id: Iefe8f19a3ad1face2e59046f33e9dc28e2042522
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.11.0 63/262863/1 submit/tizen/20210823.001958
Changgyu Choi [Mon, 23 Aug 2021 00:16:56 +0000 (09:16 +0900)]
Release version 1.11.0

Changes:
 - Add new parcel header APIs

Change-Id: I21a4180c2035c0ebf1fd2201949d0b8c4ccf9316
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoAdd new parcel header APIs 90/262690/14
Changgyu Choi [Wed, 18 Aug 2021 02:17:00 +0000 (11:17 +0900)]
Add new parcel header APIs

Adds:
 - rpc_port_parcel_header_set_tag()
 - rpc_port_parcel_header_get_tag()

Change-Id: I9f8c3d906ba38a66433f49fe32190db7d5d7757b
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoRelease version 1.10.2 65/262765/1 accepted/tizen/unified/20210820.101813 submit/tizen/20210819.084128 submit/tizen/20210819.220259
Hwankyu Jhun [Thu, 19 Aug 2021 08:40:26 +0000 (17:40 +0900)]
Release version 1.10.2

Changes:
 - Make thread safe codes
 - Fix some types
 - Fix some rpc-port-parcel API's description
 - Change num type to unsigned
 - Add missing method call

Change-Id: I7ed22d0d895fa293d454418c926c38b0d9a150e4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoAdd missing method call 63/262763/1
Hwankyu Jhun [Thu, 19 Aug 2021 08:25:09 +0000 (17:25 +0900)]
Add missing method call

When the Timedout callback function is invoked, the Cancel() method has
to be called to remove monitoring the port.

Change-Id: Ie78a890a9e394552b84c68c19e4d9cfb852f7bd3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoChange num type to unsigned 06/262706/2
Changgyu Choi [Wed, 18 Aug 2021 07:32:35 +0000 (16:32 +0900)]
Change num type to unsigned

Change-Id: Ia250c2ed687f796c8ab1865f900ea3054cd0bc8a
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoFix some rpc-port-parcel API's description 97/262697/1
Changgyu Choi [Wed, 18 Aug 2021 05:16:18 +0000 (14:16 +0900)]
Fix some rpc-port-parcel API's description

Change-Id: I113827fbdbee8361bf6d82556c33524c28be861b
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoMerge "Fix some types" into tizen
Changgyu Choi [Wed, 18 Aug 2021 02:54:52 +0000 (02:54 +0000)]
Merge "Fix some types" into tizen

3 years agoFix some types 89/262689/2
Changgyu Choi [Wed, 18 Aug 2021 02:46:51 +0000 (11:46 +0900)]
Fix some types

Change-Id: I2a516191a72c098b8e9f89751a124c38052d66eb
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoMake thread safe codes 42/262642/3
Hwankyu Jhun [Tue, 17 Aug 2021 04:07:53 +0000 (13:07 +0900)]
Make thread safe codes

The rpc_port_stub_h handle destroys in the main thread. The rpc-port
releases the handle using g_idle_add_full(). Before, the idler is added,
the Ignore() method is called to set nullptr to the event listener.
While calling the callback function, the rpc-port checks whether
the event listener is nullptr or not. If it's nullptr, the callback function
will be returned immediately.

Change-Id: I7728552c38173c548c07ce52c1339c6da9c4b29b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.10.1 51/262651/1 accepted/tizen/unified/20210818.124538 submit/tizen/20210817.074851
Hwankyu Jhun [Tue, 17 Aug 2021 07:47:31 +0000 (16:47 +0900)]
Release version 1.10.1

Changes:
 - Use INT_MAX instead of custom variable
 - Fix a bug about ReadParcelable Impl

Change-Id: I0100382e69183b2b8d95648358ac81c934123dee
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix a bug about ReadParcelable Impl 41/262641/2
Hwankyu Jhun [Tue, 17 Aug 2021 02:06:23 +0000 (11:06 +0900)]
Fix a bug about ReadParcelable Impl

In 32-bit machine, the long size is 4 bytes. When calling the
ReadInt64() with timespec.tv_nsec. the buffer overflow is occurred.

Change-Id: Id5bcb26891c63b893b20d50e7dab4c38dbaea14b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoUse INT_MAX instead of custom variable 40/262640/1
Hwankyu Jhun [Tue, 17 Aug 2021 02:04:25 +0000 (11:04 +0900)]
Use INT_MAX instead of custom variable

Change-Id: I9ec72a5c9591ffbfc91b9f6203fc1bf70eeb4087
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.10.0 43/262543/1 submit/tizen/20210813.063429
Changgyu Choi [Fri, 13 Aug 2021 06:06:13 +0000 (15:06 +0900)]
Release version 1.10.0

Changes:
 - Add the header handle of the parcel
 - Add disconnect API

Change-Id: Iee2dddd83ee7a25018a1d6130f6a58c8a7962512
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoAdd disconnect API 44/262244/9
Changgyu Choi [Thu, 5 Aug 2021 04:37:59 +0000 (13:37 +0900)]
Add disconnect API

Adds:
 - rpc_port_disconnect()

Change-Id: I189f0ef05a0ae63c9f8258f17e741eeba8fc96a2
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
3 years agoAdd the header handle of the parcel 03/258603/13
Hwankyu Jhun [Fri, 21 May 2021 04:06:27 +0000 (13:06 +0900)]
Add the header handle of the parcel

Adds:
 - rpc_port_parcel_get_header()
 - rpc_port_parcel_header_set_seq_num()
 - rpc_port_parcel_header_get_seq_num()
 - rpc_port_parcel_header_get_timestamp()

Change-Id: I4049532b2c6a92e657861dbfc1dbe66a895081d1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoRelease version 1.9.4 29/262529/2 accepted/tizen/unified/20210813.125530 submit/tizen/20210813.020747
Hwankyu Jhun [Fri, 13 Aug 2021 02:06:47 +0000 (11:06 +0900)]
Release version 1.9.4

Changes:
 - Fix deadlock issue
 - Fix coding style

Change-Id: Id585a76b59363c92c380480bd82302cbc57efbb6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
3 years agoFix coding style 84/262484/4
Changgyu Choi [Thu, 12 Aug 2021 01:03:16 +0000 (10:03 +0900)]
Fix coding style

Change-Id: I77493692e72af5b2d4af5ca1113ef3f04f608de5
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>