Commit Graph

79 Commits

Author SHA1 Message Date
Yeongjong Lee 4e24854f46 ecore_ipc: remove duplicated condition
The same condition is used above.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12077
2020-07-31 10:14:00 +02:00
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02:00
Subhransu Mohanty a02deffad7 ecore_ipc: Fix memory leak
Summary:
As delete_me flag was not updated in the delete callback it dosen't
call ecore_ipc_client_del() on the client hence the leak.

Reviewers: Hermet, raster, bu5hm4n, CHAN

Reviewed By: Hermet, CHAN

Subscribers: CHAN, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11927
2020-06-08 20:27:42 +09:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Stefan Schmidt 3ca9d72825 build: lib: harmonize the use of package_c_args in all libs
Add it to subprojects which are not using it and remove and old
ELEMENTARY_BUILD define we no longer use. This allows us to have a
central place in the main meson.build file to set this variable.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11854
2020-05-26 10:15:21 +02:00
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01:00
Hosang Kim 020a59b0f2 ecore_ipc: close dialer io closer when dialer is deleted.
Summary:
dialer uses copier class, so dialer's close on invalidate flag is EINA_FALSE.
Therefore dialer io closer is not closed automatically.

Reviewers: barbieri, raster, Hermet, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8922
2019-05-22 08:01:58 -04:00
Mike Blumenkrantz 36661a436e efl-net: namespace events to avoid naming conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8260
2019-03-08 12:17:51 -08:00
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Cedric BAIL 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Carsten Haitzler 86c855bdd3 ecore ipc - fix send to skip data payload if null/0
conversion to efl.nmet didnt deal with null/0 zised payloads properly
and tried to send them, resulting in lots of ERR complaints which were
not errors. fix that to not try and send such empty payloads

@fix
2018-04-11 14:34:40 +09:00
Carsten Haitzler fd6d9da8fa ecore ipc - fix flush to not lose messages
it wasn't looking at the copier queue "todo" at all thus skipping it
on flush. this will fix flushing of ecore ipc message buffers. this
happens to also now fix terminology's "one process" mode.

@fix
2018-03-26 23:17:56 +09:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Carsten Haitzler 047141fc90 ecore ipc/con: fix nasty ... they dont mutually exclude
by deleting the socket they wont mutually exclude at bind which means
eny new server just nides the pror one and you can get lots of copies
of the same server. this wasnt the case before. it shouldnt have been.
i think ther was an rm path for stale sockets when connecting failed
or something. anyway... this here was causing multilpe efreetd's and
all sorts of nastiness. this is the root cause. so... fix it.

@fix
2017-11-26 14:01:14 +09:00
JinYong Park b86e4ca88b ecore_ipc: rename parameters and annotations for doxygen
Summary:
Some parameters' name are different in annotations and statements,
so it occurs doxygen warning.
To fix it, change it appropriately.

Test Plan: API Doxygen Revision

Reviewers: raster, cedric, jpeg, myoungwoon, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5316

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:58:00 -07:00
Cedric BAIL 871b6ac0ad ecore_con: simplify Efl.Net.Server.Ssl by inheriting from Efl.Net.Server.Tcp. 2017-09-29 16:01:02 -07:00
Cedric BAIL b7049e8c43 ecore_con: add an intermediate Efl.Net.Server.Ip 2017-09-29 14:12:03 -07:00
Jean-Philippe Andre f839905184 ecore_ipc: Unregister log domain on shutdown
An old comment mentioned that this was explicitely not unregistered, but
I believe the comment isn't valid since ecore_event_type_flush() was
introduced.
2017-09-26 17:58:07 +09:00
Guilherme Iscaro 45a767632d Ecore_Conn: Enable CLOEXEC by default.
This flag should be enabled by default in order to avoid socket leaks.
2017-07-27 16:54:34 +02:00
Guilherme Iscaro 97f6803be1 Ecore_IPC: Preserve Ecore_Con legacy behaviour.
This patch sets some Ecore_Con flags that were missing after
the EO migration. These flags must be set in order
maintain the Ecore_IPC behaviour before Ecore_Con EO was implemented.

Fixes T5722
2017-07-27 16:54:16 +02:00
Mike Blumenkrantz f2edb935a4 ecore-ipc: don't return dead clients in ecore_ipc_server_clients_get
@fix

fix T5383
2017-06-09 19:14:59 -04:00
Gustavo Sverzut Barbieri 6877ee8ad4 ecore_ipc: use new efl_net_*_windows classes. 2017-03-29 12:44:19 -03:00
Cedric BAIL 988344f3e5 ecore_ipc: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Myoungwoon Roy, Kim 5d389a1df6 doxygen: fix typos and some wrong expressions in API reference.
Summary: I had fixed some typos and some wrong expressions, such as capital letters, singular, and orders of groups in API reference doxygen.

Test Plan: Doxygen revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4658

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-15 16:30:22 -08:00
Gustavo Sverzut Barbieri 5fcdfa96aa cmake: add ecore_ipc. 2017-02-02 17:15:31 -02:00
Gustavo Sverzut Barbieri a7657e821f ecore_con/ecore_ipc: flush should wait for connection.
Some applications will create the handle, immediately send data, flush
and delete it, expecting the data to be sent to remote peer.

This is a bad behavior as the application would become unresponsive
until the connection is established, data can be written (since
depends on server consuming it), then allow it to be closed.

A proper behavior here would be to chain based on events, with the
usage of a copier would be simply wait for "done" event.

However the legacy API allowed this and terminology depends on this
awkward "feature", thus be bug-compatible.

This fixes T5015.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri ae054e6c0b ecore_con/ecore_ipc legacy: fail early for local sockets.
In the old/legacy API the socket would be opened early in non-blocking
mode (connect returned errno==EINPROGRESS), with UNIX socket being
path-validated early and returning NULL as 'server' handle.

Some applications relied on this instead of monitoring the "ERROR"
events, considering the connection to be successful if there was a
handle -- this was the case with Terminology after it moved from DBus
to Ecore_Ipc.

Although this is not correct, we must keep compatibility and thus we
stat() in compatibility layer, failing early as the old API would do.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri 482437ee14 ecore_con/ecore_ipc: keep log domain alive after shutdown.
These legacy API had the nasty behavior of keeping handles alive until
the pending events were dispatched, this could happen after the module
itself was shutdown, resulting in log to unregistered domains.

Then do not unregister the domain -- eina_shutdown will avoid leaks
anyway.
2016-12-19 13:03:33 -02:00
Gustavo Sverzut Barbieri 4812d9eb74 add missing includes for BSD.
Thanks @netstar.
2016-12-12 12:17:11 -02:00
Stefan Schmidt 12fccd1d3c ecore_ipc: silence a maybe unitialized warning
I always got this during the build:
lib/ecore_ipc/ecore_ipc.c:537:6: warning: ‘old_mask’ may be used uninitialized in this function
[-Wmaybe-uninitialized]

Looking at the code it really is a false positive. Gettign the mask is behind
an if it is the same if condistion used before writing it. Anyway, silencing the
warning here.
2016-12-02 16:28:31 +01:00
Gustavo Sverzut Barbieri 48049a4ce2 efl_net_server_unix: add leading_directories_create property.
This allows us to crete any parent directories that are missing.
2016-11-25 18:01:29 -02:00
Gustavo Sverzut Barbieri 16be61c7e1 efl_io_copier_flush: add may_block and ignore_line_delimiter parameters.
The may_block parameter is useful to force a flush without blocking on
read/write, sometimes particularly useful if ignore_line_delimiter is
true, then you get the data events without blocking -- as if a server
sending some content misses a trailing line delimiter, you do not want
to block on recv() but still want to flush data to user.

The ignore_line_delimiter parameter is useful if we're going to close
the copier and want to flush pending data which may exist due missing
trailing terminator. The close method will also force that if
destination can take more data.
2016-11-25 17:25:18 -02:00
Gustavo Sverzut Barbieri 9805f4ec36 ecore_ipc: isolate legacy within ifdefs.
Compile out the legacy code when running on platforms that support
Efl.Net.Dialer.Unix and Efl.Net.Server.Unix.
2016-11-23 22:35:48 -02:00
Gustavo Sverzut Barbieri 400f3932d9 ecore_ipc: fix user after free in error handling.
Fixes Coverity 1366274.
2016-11-23 22:15:25 -02:00
Gustavo Sverzut Barbieri 6f3220ffc6 ecore_ipc: convert ecore_ipc_server_add() to Efl_Net_Server.
Each client (Ecore_Ipc_Client) is very similar to the handle
configured by ecore_ipc_server_connect() (the dialer), except we do
not have events such as "connected" and "error", as well as we don't
delete the socket as it's owned by the server, instead we close it.

The UNIX socket is configured similarly to ecore_con, setting the same
masks and mode for directories.
2016-11-23 19:45:33 -02:00
Gustavo Sverzut Barbieri fc76abccd6 ecore_ipc: free(address) on dialer error. 2016-11-23 18:22:21 -02:00
Gustavo Sverzut Barbieri 768e6498b1 ecore_ipc: dialers should use max_buf_size = -1.
nothing appears to break, but let's use the same value as legacy.
2016-11-23 17:38:18 -02:00
Gustavo Sverzut Barbieri 3131a966c9 ecore_ipc: rename 'server' to 'legacy_server'.
Since the plan is to introduce a server based on efl_net_server, first
rename the existing handle with 'legacy_' prefix.
2016-11-23 17:09:18 -02:00
Gustavo Sverzut Barbieri e34b07e6e2 ecore_ipc: implement ecore_con_server_connect() using Efl.Net.Dialer.
Use the new Efl.Net.Dialer classes to implement
ecore_con_server_connect() scenario.

Note that since Windows still doesn't provide any equivalent to
Efl.Net.Dialer.Unix, we keep the legacy code for it.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri 715c882073 ecore_ipc: check if client is still alive efore emitting 'del' event.
Using the ecore_ipc_server_example with -m/--single-message, if we
deleted the client from the callback it would find a dead "cl".

As the "cl" handle is removed from svr->clients before it's deleted,
it's safe to check if we have that handle in the list before
proceeding.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri e6939ebc90 ecore_ipc: refactor client data processing in its own function.
When we move to efl_net we'll reuse the same function to process
incoming data, thus refactor the code in their own function so it can
be reused.
2016-11-23 00:01:14 -02:00
Gustavo Sverzut Barbieri 520b57e974 ecore_ipc: refactor server data processing in its own function.
When we move to efl_net we'll reuse the same function to process
incoming data, thus refactor the code in their own function so it can
be reused.
2016-11-22 23:55:57 -02:00
Gustavo Sverzut Barbieri 89c326cd00 ecore_ipc: refactor code related to event posting.
When we move to efl_net we'll reuse the same event posting, thus
refactor the code in their own function so it can be reused.
2016-11-22 23:20:40 -02:00