summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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>
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>
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
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
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
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
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
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
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>
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>
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>
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>
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
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
Sung-jae Park [Thu, 26 Sep 2013 01:48:41 +0000 (10:48 +0900)]
Replace gettimeofday with clock_gettime
Change-Id: Ie1e70c0576c9381833981080855cfb9972ae582d
Sung-jae Park [Mon, 9 Sep 2013 10:33:31 +0000 (19:33 +0900)]
Fix build error
Change-Id: I14c4d05d37c792834ce73aa6a3df2c972a488650
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>
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
Sung-jae Park [Mon, 5 Aug 2013 12:40:57 +0000 (21:40 +0900)]
Remote server/client connection is now supported.
Change-Id: Ic3701c4181f61016bd6375844087ecf9480ce746
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
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
Sung-jae Park [Wed, 3 Jul 2013 23:38:28 +0000 (08:38 +0900)]
Remove last trailing comma
Change-Id: I672c28932e275e6d28fe158c1c2c18ee18172cc1
Alexandru Cornea [Mon, 1 Jul 2013 12:37:48 +0000 (15:37 +0300)]
resetting manifest requested domain to floor
Change-Id: I8bcae93851d6fff94c932363d12467ea7711092d
Sung-jae Park [Thu, 27 Jun 2013 05:06:13 +0000 (14:06 +0900)]
Update Log Tag
Change-Id: Ic830d5000575d9cd14012589e040ecf2248d70d8
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
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
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
Xavier Roche [Wed, 29 May 2013 08:30:54 +0000 (10:30 +0200)]
Changes : Fix x86_64 build-install compliance
Change-Id: I51b980eaba16fe84d24e1a9a8494a7ad2e5ddc9f
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
Sung-jae Park [Mon, 6 May 2013 07:14:09 +0000 (16:14 +0900)]
Fix the accessing released memory bug.
Change-Id: I906f8e9a363f719d50c9204fd29363ca0a0a63ad
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
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
Sung-jae Park [Mon, 25 Mar 2013 03:19:49 +0000 (03:19 +0000)]
Update License.
2012 -> 2013
Change-Id: Ieef4c7ae0dedc85d2ed8a23c133a881e53b8ffe6
Jinkun Jang [Sat, 16 Mar 2013 12:33:50 +0000 (21:33 +0900)]
sync with master
HyungKyu Song [Mon, 17 Dec 2012 01:52:16 +0000 (10:52 +0900)]
Initial empty repository