Commit Graph

534 Commits

Author SHA1 Message Date
Cedric BAIL 7db7d84fa2 ecore_con: missed compiler warning. 2018-01-25 09:54:36 -08:00
Cedric BAIL fb3e49d66d ecore_con: restore ability for negative port on local connection.
Thanks make check.
2018-01-25 09:40:20 -08:00
Carsten Haitzler 3f8c282544 ecore-con pass port into err print 2018-01-26 01:53:58 +09:00
Carsten Haitzler eb951e99a6 ecore_con - give error output if port num is invalid 2018-01-26 01:04:12 +09:00
Myoungwoon Roy, Kim 1837253935 ecore_con: Check for the valid port number
Summary:
This patch checks whether the port number is valid or not.
The valid port number is an unsigned 16-bit integer, so 1-65535.
0 is reserved already.

Test Plan: Execute test suite

Reviewers: cedric, raster, stefan, Jaehyun_Cho

Reviewed By: raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5761
2018-01-25 13:23:25 +09: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
Cedric BAIL 0f7c5582a4 ecore_con: we should just stop using ecore_main_loop_get. 2018-01-03 12:49:10 -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
Andy Williams d234458dfc Fix and simpligy windows behaviour.
Author: Vincent Torri
2017-12-31 16:08:31 +00:00
Andy Williams b9401d7e0a docs: Update ecore_con eo files for grammar and readability
Author: Nate Drake
2017-12-20 17:30:29 +00:00
Carsten Haitzler b22b2ded1d ecore_con: bug workaround SO_REUSEADDR and EADDRINUSE from bind (fix)
what i'm seeing is this with local unix sockets:

1. server process not cleanly shut down (kill -9 for example).
2. run server process again and bind fails due to EADDRINUSE
3. we ARE doing setsockopt() with SO_REUSEADDR set to 1 ...

this just makes no sense because setsockopt() SHOULD allow use to
re-use... the previous efreetd process for example is gone. no such
process, yet socket is not re-usable. this should just not happen due
to SO_REUSEADDR, but it does. this has nasty consequences like efreetd
maybe never running because of stale sockets. this should never have
happened, but it does. odd. so a hacky workaround:

1. try bind.
2. if bind fails with EADDRINUSE and its a socket path AND
pd->unlink_before_bind is NOT set... then try a connect to the socket.
3. if connect succeeds then fail as normal (close socket and error on
bind'ing)
   if connect fails then we have a stale socket, so unlink it
forcibly. create the socket again and try bind again.

hacky but... fixes the core issue.

@fix
2017-12-20 21:10:53 +09:00
Jean-Philippe Andre fce444bb18 ecore_con: Make sure the proxy helper is valid
If the http proxy helper gets deleted at shutdown rather than because
the process actually exited, the object pointer becomes invalid. This
patch tries to avoid a situation where the object is not valid.
2017-12-18 19:54:31 +09:00
Jean-Philippe Andre c0c5e72408 ecore_con: Properly shutdown and unregister log domain
I believe the comment saying we should not unregister the log domain is
invalid as we try to flush the pending ecore events.
2017-12-18 19:54:31 +09:00
Jean-Philippe Andre 81bad9f47c ecore_con: Always get the loop on init
In case of init/shutdown/init cycles, the loop EO ID has changed, so it
must be fetched again.
2017-12-18 19:54:31 +09:00
Jean-Philippe Andre a90746378d ecore_con: Avoid safety errors when closing http
When setting EOS on the dialoer, it's possible that it will also get
automatically closed (by a callback). This results in safety check error
messages, while everything is fine (at least I believe it is).
2017-12-18 19:54:31 +09:00
Cedric Bail affd07a11f ecore_con: move Efl.Net.Control.Access_Point to use Eina_Future. 2017-12-14 16:42:44 -08:00
Cedric BAIL df032058fd ecore: rename Efl.Loop_User to Efl.Loop.Consumer. 2017-12-13 14:54:57 -08:00
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Cedric BAIL ac63a74d1d ecore_con: implement FIXME for Efl.Net.Control.Technology by returning EINA_VALUE_EMPTY. 2017-12-11 15:08:48 -08:00
Cedric BAIL a8197a8c40 ecore_con: use Eina_Future for Efl.Net.Control.Technology. 2017-12-11 15:03:11 -08:00
Cedric BAIL d614894d04 ecore: rename efl_loop_Eina_FutureXXX_job to efl_loop_job. 2017-12-11 14:04:09 -08:00
Vincent Torri 771bb6e6a7 Evil: use static buffer to store error messages
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5394
2017-12-11 16:04:02 +09:00
Cedric Bail 25747d0881 ecore: rename efl_loop_Eina_FutureXXX_timeout to efl_loop_timeout. 2017-12-03 16:30:53 -08: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
Pawel Aksiutowicz 03152b8958 ecore_con: quiet 2 "clobbered" warnings in ecore_con
Reviewers: stanluk, lukasz.stanislawski

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-11-23 15:38:52 -08:00
Cedric Bail fee2b1beb4 ecore_con: add support for EFL_MAIN with ecore_con support. 2017-11-09 15:25:51 -08:00
Andy Williams d5dbcdabd1 eo: Rename efl_ref_get to efl_ref_count 2017-11-08 09:30:42 +00:00
Carsten Haitzler ede0587887 efl net - handle proxy helper fails better and abort proxy lookups
if proxy fails are too many then give up on queued lookups as they
likely will continue. i noticed a process continually spawning efl net
proxy helper because one queued lookup failed and could be looked up
so it kept trying again and again.

@fix
2017-11-07 22:42:49 +09:00
Daniel Kolesa 4f5b72a3ed eo files: convert various to use @cref 2017-11-02 16:41:01 +01:00
Daniel Kolesa cf63573e73 eolian: only allow reference (ownable) types in containers 2017-11-02 13:51:02 +01:00
Cedric Bail 6d8ceab4be ecore_con: add an Efl_Net.h 2017-10-27 18:51:38 -07:00
Taehyub Kim 5360034675 ecore: remove doxygen warning messages
Summary:
remove doxygen warning messages
@fix

Reviewers: jpeg, cedric, woohyun

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D5339
2017-10-18 19:24:28 +09:00
Prince Kumar Dubey 41197981ab efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:07:28 -07:00
Chris Michael ae49b6b6df ecore-con: Mark unused function paramater as unused
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-02 08:12:06 -04:00
Vincent Torri 10ba064b65 Windows: remove XP support and forbid compilation and run on this platform
Test Plan: run on XP

Reviewers: jpeg, cedric, ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D5245
2017-10-01 18:09:46 +01: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
Daniel Kolesa f36e5bd543 eolian: add mstring
This is a new type representing a mutable string (no const).
Regular strings cannot be made mutable with @owned because
they might be hidden behind typedefs.
2017-09-22 17:10:42 +02:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Carsten Haitzler aec79f9d0d efl net http - fix protocol error handling to not crash and handle it
if http server doesnt send even a valid http response and just closes
your conenction... dont segv with null pd->cm

@fix
2017-09-17 18:18:12 +09:00
Daniel Kolesa 8f6ba61011 ecore: convert existing eo files to new ownership 2017-09-15 16:51:37 +02:00
Carsten Haitzler f179d32157 efl net - adapt to openssl 1.1.0 changes with tls method support
support the tls methods if on openssl 1.1.0 so we don't get
"unsupported cipher" as it does support it just with a new api.

@fix
2017-09-15 16:12:59 +09:00
Guilherme Iscaro ec27ceac27 efl_net: Use the new Eina_Future API. 2017-09-04 10:24:00 -03:00
Daniel Kolesa 436815ca00 ecore, ecore_con: fix const on Eina.Slice
Fixes TODOs from dd5cdda64b
after fixing T5024.
2017-08-10 12:53:14 +02:00
Carsten Haitzler ff26991220 efl net - fix ipv6 getsockname to use the proper struct to do it
struct sockaddr_storage *addr;

AS the actual storage ( a ptr to store the whole data). kind of...
wrong. it should be:

      struct sockaddr_storage addr;

see examples of this kind of usage of getsockname:

http://www.masterraghu.com/subjects/np/introduction/unix_network_programming_v1.3/ch04lev1sec10.html

found by PVS studio

@fix
2017-07-29 10:56:47 +09:00
Carsten Haitzler 16abe895c6 efl net ssl constructor - remove double set of same var
all struct vars are set... one 2x. not a bug but pointless code in the
src

found by PVS studio
2017-07-29 09:08:40 +09:00
Guilherme Iscaro ef03ecd89c Ecore_Con: Fix wrong comparison.
Otherwise it will always evaluate to false.
2017-07-28 15:22:51 -03:00
Guilherme Iscaro 493f75587d Ecore_Conn: Set EOS only if the connection is not closed.#algo.
This check prevents that EOS is set on a closed connection.

Fixes T5180
2017-07-28 15:22:51 -03:00
Guilherme Iscaro 0a51ac2997 Ecore_Con: Fix CLOEXEC documentation.
The socket attributes are inherited by the child.
2017-07-28 15:22:51 -03: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