platform/core/appfw/com-core.git
9 years agoallocate BUFSIZ size instead of payload_size when creating packet 56/28956/1 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_3.0_ivi accepted/tizen_common tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.m14.3_ivi tizen_3.0_ivi accepted/tizen/3.0.2014.q3/common/20141022.093402 accepted/tizen/3.0.m14.3/ivi/20141022.104126 accepted/tizen/common/20141021.112611 accepted/tizen/ivi/20141022.015303 submit/tizen_3.0.2014.q3_common/20141021.112639 submit/tizen_3.0.m14.3_ivi/20141021.112858 submit/tizen_common/20141021.090218 submit/tizen_common/20141021.111902 submit/tizen_ivi/20141021.113442 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.3_ivi_release tizen_3.0_ivi_release
Corentin Lecouvey [Fri, 17 Oct 2014 12:17:41 +0000 (14:17 +0200)]
allocate BUFSIZ size instead of payload_size when creating packet

Using notification API, it appears that allocating payload_size
when creating a packet could makes notification-service crash sometimes
when removing a notification.

Checking some packet sizes shows that allocates BUFSIZ is enough and
fix the problem.

Change-Id: I4b1d134fe43b235b586ba184053134299cc56cb0
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
9 years agoRevert "Keep address alignment to prevent from bus error." 96/28296/1 accepted/tizen/common/20141003.171248 accepted/tizen/ivi/20141009.080623 submit/tizen_common/20141003.142427 submit/tizen_ivi/20141007.444444
Corentin Lecouvey [Wed, 1 Oct 2014 14:52:11 +0000 (16:52 +0200)]
Revert "Keep address alignment to prevent from bus error."

This reverts commit 1ce8ea32c6b0943454823d642d961cd8b3e1c8f0.

This change is not compatible with 64 bits system.
In some cases, it generates a segfault in packet_create()
when allocating memory for packet->data struct with calloc.

Btw according to the reverted commit message, this commit was a consequence
of errors with GCC 4.6 that we do not use anymore.

Change-Id: I56a23552df1d84aefa83fac4d60121d2545213b7
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
10 years agoValidate socket FD & optimize recv context. 28/18428/1 accepted/tizen_ivi_panda tizen_3.0.m14.2_ivi tizen_ivi_panda accepted/tizen/common/20140506.092610 accepted/tizen/ivi/20140430.194310 accepted/tizen/ivi/panda/20140403.015123 accepted/tizen/mobile/20140702.100351 submit/tizen/20140430.015826 submit/tizen_ivi_panda/20140403.011837 tizen_3.0.m14.2_ivi_release
Sung-jae Park [Mon, 24 Mar 2014 00:35:39 +0000 (09:35 +0900)]
Validate socket FD & optimize recv context.

From the recv ctx callback, the socket can be closed.
But the glib cannot detect the closed FD correctly.
(It doesn't toggles G_IO_HUP, G_IO_ERR, G_IO_NVAL bits even though I closed the FD)
So I checked the FD from the callback explicitly, before return from it.
However this patch will be available only for the Single-Thread loop. (com-core)

And the receive context is optimized.
Every single loop after done to prepare A receive context,
it will be destroyed. But this patch will reuse it instead of destroying it.
So there is no need to reallocate same memory again.
It will save few milli (or micro) seconds.

for the future-work.
I'll optimize the "packet" creating code.
It can be reused too after finish the processing of receive context.
Then we can save more few milli(micro) seconds (for reallocating time).

Each execution takes small time.
But this scenario occupies almost time for communicating with other processes.
it means, even though it can save few milli(micro) secs for each time.
The total saved time will be meaningful.

Change-Id: Ibb3adc715090b6d78a5cfeb48d28463f35b9a0f4

10 years agoMerge "Keep address alignment to prevent from bus error." into tizen accepted/tizen_generic submit/tizen/mobile/20140225.091425
Sung-jae Park [Tue, 28 Jan 2014 23:19:02 +0000 (15:19 -0800)]
Merge "Keep address alignment to prevent from bus error." into tizen

10 years agoKeep address alignment to prevent from bus error. 95/15795/1
Sung-jae Park [Tue, 28 Jan 2014 11:19:28 +0000 (20:19 +0900)]
Keep address alignment to prevent from bus error.

for the ugly GCC 4.6

Change-Id: I39d6d6666360f2c66896b14ce7e95c71b15c2496

10 years agoMerge "Sync with the latest product code of phone profile" into tizen
Sung-jae Park [Tue, 21 Jan 2014 10:24:41 +0000 (02:24 -0800)]
Merge "Sync with the latest product code of phone profile" into tizen

10 years agoMerge "Apply Rusty Lynch's systemd socket activation feature." into tizen
Sung-jae Park [Tue, 21 Jan 2014 10:24:18 +0000 (02:24 -0800)]
Merge "Apply Rusty Lynch's systemd socket activation feature." into tizen

10 years agoSync with the latest product code of phone profile 70/14470/1
Sung-jae Park [Sun, 5 Jan 2014 08:13:02 +0000 (17:13 +0900)]
Sync with the latest product code of phone profile

Disable O_NONBLOCK option for creating a "pipe".
It makes unpredictable busy waiting problem when it fails to write data to pipe.
In some cases, the consumer thread could not empty the pipe,
the producer thread failed to write with EAGAIN error if the pipe created with O_NONBLOCK.
then the producer thread fall into the busy waiting status.

This patch will keep the producer from busy waiting problem.

Change-Id: I34d1433b4c380deb2bc8f03d476943652de6c23f

10 years agoUpdate changelog 49/13449/2 accepted/tizen/ivi/stable accepted/tizen/mobile accepted/tizen/20131211.175052 accepted/tizen/ivi/20140308.005203 accepted/tizen/mobile/20131216.220336 submit/tizen/20131210.212736 submit/tizen/20140307.080659
Patrick McCarty [Fri, 6 Dec 2013 05:32:59 +0000 (21:32 -0800)]
Update changelog

Change-Id: I48fea5c3dc6d146cc6118f77c61d89569d6058ea
Signed-off-by: Patrick McCarty <patrick.mccarty@linux.intel.com>
10 years agoPTREL-399: fix build in x86_64 96/12496/1
Stephane Desneux [Sat, 16 Nov 2013 00:09:30 +0000 (01:09 +0100)]
PTREL-399: fix build in x86_64
Set LIBDIR to ${LIB_INSTALL_DIR} in CMakeLists.txt

Change-Id: Ic551897588f7d6fc30c5081366a5bf8955204981
Signed-off-by: Stephane Desneux <stephane.desneux@eurogiciel.fr>
10 years agoPTREL-142: Restore use of %cmake macro 50/11350/1 accepted/tizen/20131024.204924 accepted/tizen/20131025.151212 accepted/tizen/20131112.015206 accepted/tizen_ivi_stable/20131116.111038 submit/tizen/20131024.202239 submit/tizen_ivi_stable/20131116.100245
Rusty Lynch [Thu, 24 Oct 2013 20:17:07 +0000 (13:17 -0700)]
PTREL-142: Restore use of %cmake macro

Restore use of %cmake in the spec file so that variables like
LIB_INSTALL_DIR are passed to cmake.

Change-Id: I3ed0b40417728ccbf4e171492ec9a7fc77743097
Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
10 years agoApply Rusty Lynch's systemd socket activation feature. 02/11302/3
Sung-jae Park [Thu, 24 Oct 2013 03:53:21 +0000 (12:53 +0900)]
Apply Rusty Lynch's systemd socket activation feature.

Add a new SCHEME for systemd's socket activation.
This patch already applied by Rusty Lynch, but before, I just discard it because of syncing with latest 2.2 code.
Now I apply his patch to secure-socket again with new SCHEME.

Please review this code and give me some better idea.

To use the socket-activation feature,
user should use "sdlocal://" scheme

practical example.

case #1. for secure-socket layer (the lowest layer)

int handle;
handle = secure_socket_create_server("sdlocal:///tmp/.sd.socket");

case #2. for com-core layer (the middle layer, which is merged with the g-main loop)
int handle;
handle = com_core_server_create("sdlocal:///tmp/.sd.socket", 0, service_cb, NULL);

case #3. for com-core_packet layer (the highest layer)
int handle;
handle = com_core_packet_server_init("sdlocal:///tmp/.sd.socket", method_table);

Change-Id: If62196bf0bea1855bf40f7fc71ea4b87e6d44dd5
Signed-off-by: Sung-jae Park <nicesj.park@samsung.com>
10 years agoMerge branch 'tizen_2.2' of ssh://review.tizendev.org:29418/framework/appfw/com-core... accepted/tizen/20131022.083606 accepted/tizen/20131022.163214 submit/tizen/20131022.035758 submit/tizen/20131022.035853
Sung-jae Park [Tue, 22 Oct 2013 02:26:32 +0000 (11:26 +0900)]
Merge branch 'tizen_2.2' of ssh://review.tizendev.org:29418/framework/appfw/com-core into work

Applying socket activation should be supported by new API or Schema.
The latest com-core supports the inet & ipc socket communication using schema.
To open/connect a socket, user can select inet or ipc using schema.

remote://IPADDR:port
local://SOCKET_FILE_PATH

practical example

remote://192.168.0.1:1234
local:///tmp/.my.socket

So I just discards the systemd socket activation code now.

I think, it should be supported by new socket URI.
such as

systemd://SOCKET_FILE

This new schema should be added to handle the socket activation mode.

Conflicts:
src/secure_socket.c

Change-Id: Ib2c0d1c7f2d6b0337cd408cba11164626ca87ff4

10 years agoTry to use the gettimeofday if clock_gettime is failed
Sung-jae Park [Thu, 26 Sep 2013 02:45:06 +0000 (11:45 +0900)]
Try to use the gettimeofday if clock_gettime is failed

Change-Id: Iceda877ff4fee12b3fe702aeb3c904b043258a96

10 years agoReplace gettimeofday with clock_gettime
Sung-jae Park [Thu, 26 Sep 2013 01:48:41 +0000 (10:48 +0900)]
Replace gettimeofday with clock_gettime

Change-Id: Ie1e70c0576c9381833981080855cfb9972ae582d

10 years agoFix build error
Sung-jae Park [Mon, 9 Sep 2013 10:33:31 +0000 (19:33 +0900)]
Fix build error

Change-Id: I14c4d05d37c792834ce73aa6a3df2c972a488650

10 years agoAdd systemd socket activation support for secure sockets 12/9812/1 accepted/tizen/ivi/genivi accepted/tizen/ivi/release tizen_ivi_genivi tizen_ivi_release accepted/tizen/ivi/genivi/20140131.055907 accepted/tizen_ivi_release/20131120.050511 ivi_oct_m2 submit/tizen/20130909.202456 submit/tizen_ivi_genivi/20140131.060228 submit/tizen_ivi_release/20131120.022616 submit/tizen_ivi_release/20131120.025946
Rusty Lynch [Thu, 5 Sep 2013 23:56:16 +0000 (16:56 -0700)]
Add systemd socket activation support for secure sockets

Change-Id: I306d315b59a56feb2474bd9a460a50c821aaa50e
Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
10 years agoUpdate coding convention.
Sung-jae Park [Tue, 13 Aug 2013 00:34:18 +0000 (09:34 +0900)]
Update coding convention.

Even if a block has only one line, it should be begin with { and end with }

Change-Id: I99c7f6d43cd0b673d2d912dd1835d2b57ad1de66

10 years agoRemote server/client connection is now supported.
Sung-jae Park [Mon, 5 Aug 2013 12:40:57 +0000 (21:40 +0900)]
Remote server/client connection is now supported.

Change-Id: Ic3701c4181f61016bd6375844087ecf9480ce746

10 years agoResize recv/send socket buffer, TCP_NODELAY enabled.
Sung-jae Park [Wed, 24 Jul 2013 00:45:39 +0000 (09:45 +0900)]
Resize recv/send socket buffer, TCP_NODELAY enabled.

Change-Id: I959c74dc3c3ddc442176d22ff0df5a3d687b983d

10 years agoWhile processing the ack callback, if user disconnect to server, it can be crashed.
Sung-jae Park [Thu, 18 Jul 2013 09:07:43 +0000 (18:07 +0900)]
While processing the ack callback, if user disconnect to server, it can be crashed.

Because the disconnected callback is called and it will delete the receive context.
but the ack callback uses resources in the receive context.
This patch will prevent from crash.

Change-Id: I9015d04b6695e86c532b399de46bdc1fa6f31317

10 years agoRemove last trailing comma
Sung-jae Park [Wed, 3 Jul 2013 23:38:28 +0000 (08:38 +0900)]
Remove last trailing comma

Change-Id: I672c28932e275e6d28fe158c1c2c18ee18172cc1

10 years agoresetting manifest requested domain to floor 06/5406/2 accepted/tizen/20130710.221527 submit/tizen/20130710.102905
Alexandru Cornea [Mon, 1 Jul 2013 12:37:48 +0000 (15:37 +0300)]
resetting manifest requested domain to floor

Change-Id: I8bcae93851d6fff94c932363d12467ea7711092d

10 years agoUpdate Log Tag
Sung-jae Park [Thu, 27 Jun 2013 05:06:13 +0000 (14:06 +0900)]
Update Log Tag

Change-Id: Ic830d5000575d9cd14012589e040ecf2248d70d8

10 years agoMerge branch 'tizen_2.1' into tizen_2.2
Sung-jae Park [Thu, 13 Jun 2013 02:04:44 +0000 (11:04 +0900)]
Merge branch 'tizen_2.1' into tizen_2.2

Change-Id: Icdd49054d9092107b5a665156eab743603215e54

10 years agoUpdate the terminating sequence.
Sung-jae Park [Thu, 13 Jun 2013 00:27:46 +0000 (09:27 +0900)]
Update the terminating sequence.

[model] Tizen
[binary_type] AP
[customer] Tizen Developer
[issue#] N/A
[problem] Hangs while terminating thread base com-core.
[cause] When the socket descriptor is used in a thread via "select", main thread should not close it.
[solution] Use the event-pipe to escape from select.
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Ied7a8eccb4fc7ccb1ea180c1c79bed73d800087e

10 years agoFix the invalid print code.
Sung-jae Park [Thu, 30 May 2013 13:18:03 +0000 (22:18 +0900)]
Fix the invalid print code.

Crash occured while printing the integer value as string type.
This patch fixes it.

Change-Id: I064a4643a1586ab3f2f8a69c62e60324ce9331fa

10 years agoChanges : Fix x86_64 build-install compliance 17/3717/1
Xavier Roche [Wed, 29 May 2013 08:30:54 +0000 (10:30 +0200)]
Changes : Fix x86_64 build-install compliance

Change-Id: I51b980eaba16fe84d24e1a9a8494a7ad2e5ddc9f

10 years agoFix x86_64 build-install compliance 16/3716/1
Xavier Roche [Wed, 29 May 2013 08:29:41 +0000 (10:29 +0200)]
Fix x86_64 build-install compliance

  - Fix hardcoded library path in CMakeLists.txt
  - Use %cmake macro to set default path
  - Change library path var in *.pc.in template file

Change-Id: Ifa4e287597670f30de0968f96010f087de0eebf9

10 years agoFix the accessing released memory bug. tizen_2.1 accepted/tizen/20130520.100914 submit/tizen/20130517.044807 submit/tizen_2.1/20130514.052908
Sung-jae Park [Mon, 6 May 2013 07:14:09 +0000 (16:14 +0900)]
Fix the accessing released memory bug.

Change-Id: I906f8e9a363f719d50c9204fd29363ca0a0a63ad

11 years agoVarious patches are applied.
Sung-jae Park [Tue, 30 Apr 2013 12:30:31 +0000 (21:30 +0900)]
Various patches are applied.

Patch 3/3
Do not update chunk->size using return of recv.
Update logging message

Patch 2/3
Update com-core.
Remove pthread_cancel.

Patch 1/3
Put complains of the valgind to sleep calm.

Change-Id: I75503d691b09b70a891e12ed5342cb634ca814b6

11 years agoFix for 64 bit compatibility. 2.1b_release accepted/tizen_2.1/20130425.035450 submit/tizen_2.1/20130424.230822
Junfeng Dong [Fri, 12 Apr 2013 09:38:12 +0000 (17:38 +0800)]
Fix for 64 bit compatibility.

- Fix hardcoding path.
- Use %cmake to set default paths.

Change-Id: I484687e5906fe33fdb435cc14f1a83cd751c67f1

11 years agoUpdate License.
Sung-jae Park [Mon, 25 Mar 2013 03:19:49 +0000 (03:19 +0000)]
Update License.

2012 -> 2013

Change-Id: Ieef4c7ae0dedc85d2ed8a23c133a881e53b8ffe6

11 years agosync with master
Jinkun Jang [Sat, 16 Mar 2013 12:33:50 +0000 (21:33 +0900)]
sync with master

11 years agoInitial empty repository
HyungKyu Song [Mon, 17 Dec 2012 01:52:16 +0000 (10:52 +0900)]
Initial empty repository