Commit Graph

630 Commits

Author SHA1 Message Date
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 73d3a63960 efl_net_server_udp: add empty functions
Summary:
these functions are never called from within this class, thus they are
empty here. They are not used because setting up the client does
require here more API than just a fd.

ref T5719
Depends on D7791

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5719

Differential Revision: https://phab.enlightenment.org/D7802
2019-01-28 12:31:55 -05:00
Marcel Hollerbach b7cd3f4bfd efl_net_dialer_websocker: set cannot be called here
the state of eos is decided weather on internals, therefore calling set
on it does not work, and should never do anything.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7777
2019-01-26 11:42:11 +01:00
Marcel Hollerbach 5c36675f31 efl_net: make server_ip abstract
there is no code handling for client_add or client_reject.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7720
2019-01-23 16:43:03 +01:00
Marcel Hollerbach 95160ab136 efl: convert all interfaces to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7687
2019-01-18 16:31:31 +01:00
Marcel Hollerbach 3b6a9152c1 efl: convert all abstracts to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7686
2019-01-18 16:31:30 +01:00
Marcel Hollerbach 34efdfb1b1 efl: convert all classes to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7684
2019-01-18 16:31:26 +01:00
Marcel Hollerbach 0a95767a0c efl_net: make efl.net.server.fd abstract
Summary:
noone instanciantes it directly, further more it has pure_virtual
functions, which are making sense. So making this class abstract does
fix the issue of pure_virtual functions in class.

ref T7632

Depends on D7669

Reviewers: cedric, segfaultxavi, zmike, q66

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7632

Differential Revision: https://phab.enlightenment.org/D7670
2019-01-17 17:17:39 +01:00
Cedric BAIL 563f91eaf9 ecore: remove data parameters of Efl.Loop_Consumer.promise_new to reduce the risk of inadvertently using the wrong data.
If you need data, use a efl_future_then as done in every case here to get the same feature.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7577
2019-01-16 14:33:26 -08:00
Cedric BAIL 5472922467 ecore_con: remove use of eina_promise_data_set.
eina_promise_data_set is a misleading API and result in conflicted use by
multiple independent piece of code leading to bug and crash. It is also not
necessary and we can avoid using it completely.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7545
2019-01-16 14:33:14 -08:00
Carsten Haitzler 1e6d77af90 efl net - connman - fix correct param for promise cancel
the consumer is the obj and the obj is not the pending - it is the
promise data, so warning pointed out an actual bug waiting to happen.
2019-01-12 01:52:38 +00:00
Christopher Michael 121c4030fe ecore-con: Add missing EINA_UNUSED for unused parameter 2019-01-09 10:07:59 -05:00
Christopher Michael a3117c45b4 ecore-con: Minor formatting fix
NB: No functional changes
2019-01-09 10:07:17 -05:00
Carsten Haitzler 318d16846f Revert "Revert "ecore: make efl_loop_promise_new a function of Efl.Loop_Consumer.""
This reverts commit 42e886d8d6.
2018-12-26 17:50:09 +00:00
Marcel Hollerbach 42e886d8d6 Revert "ecore: make efl_loop_promise_new a function of Efl.Loop_Consumer."
This reverts commit 9b5155c9f1.

For now lets revert this, this breaks copy and paste, further more it
has the potential to break a lot more things, as eio_model tends to use
efl_loop_promise new, and then eina_promise_data_set, which is
explicitly forbidden.

This fixes crashing terminology instances.
2018-12-26 12:31:08 +01:00
Cedric BAIL 9b5155c9f1 ecore: make efl_loop_promise_new a function of Efl.Loop_Consumer.
I am not sure this is the right way to do it as binding would have to likely
to bind it manually.

Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D7492
2018-12-20 12:42:34 -08: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
Cedric BAIL 33c00de365 eo: make efl_future_then have a data pointer in addition of the object pointer.
Summary:
In the case when you have multiple future in flight related to one object, you
couldn't use the previous version of efl_future_then. Now all function calls
take a void* pointer that allow multiple future to have their private data
request data accessible in all the callback.

This should not break released API as Eo.h is not released yet and so
was efl_future_Eina_FutureXXX_then.

Depends on D7332

Reviewers: felipealmeida, segfaultxavi, vitor.sousa, SanghyeonLee, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7472

Differential Revision: https://phab.enlightenment.org/D7379
2018-12-07 12:23:11 +01:00
Cedric BAIL 67993500da ecore_con: handle timeout of the attempt to connect.
This has been the fix that prevent random ecore_con DNS tests to fail for me. This should also in case
of failure make the timeout of the ecore_con itself be honored which wasn't anymore.

@fix

Differential Revision: https://phab.enlightenment.org/D7402
2018-12-06 09:29:29 +01:00
Cedric BAIL 913ea32a7a ecore_con: wait for thread to finish at the same time as canceled to avoid race condition.
Differential Revision: https://phab.enlightenment.org/D7401
2018-12-06 09:29:28 +01:00
Cedric BAIL b6346d0bb3 ecore_con: enforce connection state to not let a hanging connection continue.
It is expected that when the connection state is forcefully set, that all
hanging connection should be stopped instead of them continuing and later
resetting the state to having a connection.

Differential Revision: https://phab.enlightenment.org/D7397
2018-12-06 09:29:28 +01:00
Cedric BAIL 4485cf64a0 ecore_con: refactor TCP Dialer to always wait for thread to finish.
This is a better way to avoid race execution by the async end callback
that could happen at some later random point in time. The thread are
cancelled right away, so event if their is a "wait" time set, it should
never actually matter and be always instantaneous.

Differential Revision: https://phab.enlightenment.org/D7396
2018-12-06 09:29:28 +01:00
Marcel Hollerbach c1dd57d210 meson: use eolian_gen with -S
this ensures that eolian does not parse installed .eo files

Differential Revision: https://phab.enlightenment.org/D7405
2018-12-03 19:00:26 +01:00
Cedric BAIL d652231fcd ecore_con: simplify code by using helper that create future directly.
The new helper help replace call to eina_future_resolved and eina_future_rejected with
a scheduler lookup to just one function call.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7342
2018-11-30 14:58:29 -08:00
Cedric BAIL bf445d2476 ecore_con: simplify code by using proper helper.
efl_loop_promise_new is a helper function that does automatically figure out an
available scheduler and create a promise from it. Basically replacing the call to
eina_promise_new(efl_loop_future_scheduler_get(o), ...).

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7333
2018-11-30 14:58:05 -08:00
Xavi Artigas 05682eed7d eo-docs: Remove Doxygen tags from efl*.eo files
Summary:
- Replace '\@ref name' with '@name'
- Remove unused \@internal tag
    This tag affects text AFTER it, and there is no text after it.
- Remove \@note tag
    Replaced with a simple NOTE: text, since eolian does not have an equivalent tag.
- Remove spurious \@Efl... tags
    They should really be @Efl...
- Remove \@p tags
    There is no eolian equivalent, and a simpler $ suffices in this case.

Fixes T7482

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7482

Differential Revision: https://phab.enlightenment.org/D7372
2018-11-28 13:33:46 +01:00
Cedric BAIL 5de51f84fb eo: rename efl_future_Eina_FutureXXX_then in efl_future_then as this has been available for some time.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7327
2018-11-23 11:39:43 -08:00
Carsten Haitzler 33ed41f4fd efl net - warn - fix eldbus service struct to fill all fields
no more warnings about uninit fields
2018-11-09 11:43:59 +00:00
Carsten Haitzler 95a538d1f8 ecore con - fix buffer truncate warnign by a bigger buffer 2018-11-09 11:43:59 +00:00
Carsten Haitzler 0fd2b812cc efl net - fix dbus field init to init all fields in a struct 2018-11-09 11:43:59 +00:00
Daniel Kolesa 5a3d79d383 meson: add eolian custom dependencies support
This uses the meson/ninja depfile functionality + eolian to make
sure proper dependencies between generated files and .eo files
are managed, to ensure consistent re-generation of all generated
files that are affected upon .eo file modification.

For custom rules with multiple outputs, Ninja currently does not
support depfiles. Therefore, split those into two custom rules
so that the depfiles functionality can be enabled. While this
is ugly and slows down the process a little by having to invoke
Eolian twice instead of once, it has to be done and it's still
better than what we had in Autotools anyway.

Differential revision: D7187

Fixes T6700.
2018-10-24 12:02:55 +02:00
junsu choi ecc6fe749c ecore_con_legacy: fix coverity issues (use after free)
Summary: for hard failures (highly unlikely), the handle would be deleted and the next use would crash.

Test Plan: N/A

Reviewers: Jaehyun_Cho, zmike, cedric, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7139
2018-10-08 11:19:53 +09:00
Marcel Hollerbach 347dc66ba9 meson: unify system properties
this unifies the system types into 4 boolean flags
This fixes the fact that meson changed the system string accross
versions.

Differential Revision: https://phab.enlightenment.org/D7144
2018-10-05 13:40:29 +02: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
junsu choi f19ff5312b ecore_con: Add docs for ecore_con legacy functions
Summary:
Find docs of missing legacy functions
from 9c33623(ecore: add ecore_con_url_ssl_ca_set.),
40edc9c(ecore: add ecore_con_url_ssl_verify_peer_set patch by Raoul Hecky.)
and add them.

Test Plan: make doc

Reviewers: cedric, Hermet, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7117
2018-09-27 11:30:19 +02:00
Yeongjong Lee 4e0b2c2fff docs: Fix typos in API reference doc
Reviewers: segfaultxavi, kimcinoo

Reviewed By: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6960
2018-09-03 10:55:16 +09:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Marcel Hollerbach f6579e47ab ecore_con: migrate to eina_vpath
Summary:
the logic here was against the xdg standard, thus we migrate to
eina_vpath which uses the correct xdg standard

Depends on D6745

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6746
2018-08-20 12:58:35 -04:00
Mike Blumenkrantz 017cc0d4a3 ecore-con/proxy_helper: fix in-tree run path
this is located in the bin/ecore_con directory, not bin/ecore_con/utils,
so ensure that we pass the correct path in order to avoid not finding the
file

@fix
ref T6713

Differential Revision: https://phab.enlightenment.org/D6515
2018-07-06 15:51:59 +02:00
Mike Blumenkrantz 683cddf90c ecore-con/legacy: kill server with DEL event if a dialer error occurs
Summary:
in the course of the efl-net rewrite, the previous relied-upon behavior
sequence of error -> disconnect -> del was broken, and error events no
longer triggered disconnects or server deletion.

the failure was caused by a check for the 'connecting' flag, preventing
DEL events from being triggered

further, the ordering of the events was flipped from ERROR -> DEL to
DEL -> ERROR; this is also fixed now

this caused any failed connection to leak the entire server connection
since existing handlers for the del event were never triggered and the
server was never destroyed

@fix
fix T6330

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6330

Differential Revision: https://phab.enlightenment.org/D6481
2018-07-03 12:42:00 -04:00
Mike Blumenkrantz 0e40fad446 ecore_con: make dns resolver thread stop blocking when canceled
Summary:
if the user or system attempts to cancel this thread then it should
stop blocking and exit in order to avoid potentially exiting after
efl has expected ecore-con to stop being active

@fix
fix T7041
Depends on D6354

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7041

Differential Revision: https://phab.enlightenment.org/D6355
2018-06-25 15:14:31 -04:00
Alastair Poole afa0c52351 ecore_con: do proper version test for TLS_method. 2018-06-21 10:22:08 +01:00
Alastair Poole 271113de0b ecore_con: FreeBSD 11.2 not providing TLS generic methods.
On some systems the TLS_client/server_method() is not available.
Using fallback. In time as openssl changes propagate this really
shouldn't be necessary.
2018-06-20 15:24:02 +01:00
Alastair Poole d1cbd161bd Patch for T6342
Summary: Deprecate SSLv3.

Reviewers: zmike, raster, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6334
2018-06-20 14:17:25 +01:00
junsu choi 4db762ee6c ecore_con : Fix that null pointer access for segmentation fault
Summary:
"cl->svr" was to be null on line 281.
This problem occurred from 384f30c8ec.
Replacing "cl->svr" with "svr" corrects the error
while preserving the changes in 384f30c8ec.

Test Plan: N/A

Reviewers: #committers, cedric, Hermet, zmike

Subscribers: bowonryu, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6255
2018-06-07 10:49:42 -04:00
Cedric BAIL b8396add70 ecore_con: efl_net_socket_ssl_adopted_get is EFL_NET_SOCKET_SSL_PROTECTED. 2018-05-25 10:40:56 -07:00
junsu choi 7ef4ab6b88 ecore_con : Fix class check to check inner_socket class
Summary:
cl->socket is a Efl.Net.Socket_Simple. it is not inherit the Efl.Loop.fd class.
and The target of the class check have to be the inner_socket.
But inner_socket is Efl.Net.Socket_Ssl. Efl.Net.Socket_Ssl class is not inherit FD class.
Efl.Net.Socket_Tcp is inherit Efl.Loop.fd class. So, Need to add Efl.Net.Socket_Tcp to inheritance.
(The server side is a similar hierarchy. (ssl -> tcp -> ip -> fd))

Test Plan: N/A

Reviewers: cedric, jypark, myoungwoon, zmike, barbieri

Reviewed By: cedric

Subscribers: #committers, bowonryu, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:07:05 -07:00
Cedric BAIL 384f30c8ec ecore_con: disconnect from the server as soon as it request it.
Ecore_Event can still be in flight while the client get freed by the server.
We are protected agaist that and keep the client partially alive until the event
are processed, but we need to disconnect from the server as soon as possible
as we might outlive the server.
2018-05-24 16:02:21 -07:00
Cedric Bail 301340baf6 ecore_con: allow for NULL to do nothing. 2018-05-24 16:02:20 -07:00
Cedric BAIL 69c9d5bb50 ecore_con: correct lifecycle of object used by Efl.Net.Dialer.Ssl.
Differential Revision: https://phab.enlightenment.org/D6084
2018-05-24 16:02:18 -07:00