Commit Graph

51603 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri f4306d654d ecore_con: Ecore_Con_Server now on top of Efl_Net!
This is a major work and unfortunately couldn't be split into smaller
pieces as old code was highly coupled.

Ecore_Con_Server is now a wrapper around Efl_Net_Dialer_Simple
(ecore_con_server_connect()) and Efl_Net_Server_Simple
(ecore_con_server_add()), doing all that the original version did with
some fixes so ecore_con_ssl_server_upgrade() and
ecore_con_ssl_client_upgrade() are more usable -- see the examples and
-t/--type=tcp+ssl.

I tried to be bug-compatible, with code annotations where things
doesn't make sense. This was based on ecore_con_suite tests and some
manual experimenting with the examples, these can be helpful if you
find regressions (report/assign to me).
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 72ad2c5eb7 ecore_con_server_example: add --socket-activated 2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 2fab8462ce ecore_con_server_example: add tcp+ssl, upgrades a live client.
add a new -t/--type=tcp+ssl, there you can send "Upgrade: SSL\n" to
request the server to start the handshake.

This can be paired with the ecore_con_client_example, there you can
type:

   Upgrade: SSL\n
   STARTTLS\n

The second is a dialer local command to upgrade it to SSL, matching
what the server expects.
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri f4f782eb20 ecore_con_client_example: allow tcp->ssl upgrades.
The example now offers --type=tcp+ssl, in this case it won't send a
"hello!" message to avoid messing with the handshake. Once the client
(dialer) receives the user command STARTTLS
(--starttls-local-command), then it will upgrade the connection.

Usually in real life you need to send some command to server, such as
upgrade, STARTTLS and then upgrade... unless you connect to a SSL-only
server (ie: ecore_con_server_example --type=ssl).
2016-12-10 08:44:06 -02:00
Andy Williams 3d913e8fb3 elm_code: Fix cursor x offset calculations 2016-12-10 00:44:38 +00:00
Gustavo Sverzut Barbieri c5fc33d378 ecore_con_url: only close the request if we got a final response.
if we're doing 30x redirects or anything else, keep going. If it's an
error it will be reported later, otherwise EOS. Fact is we're only
interested if 20x.
2016-12-09 22:18:27 -02:00
Gustavo Sverzut Barbieri 2945b972ef efl_net_dialer_http: fix delete-from-CURL callback.
This was annoying to identify as the sequence is kinda difficult to
get, but Terminology was doing a HEAD request and it was triggering
this case in particular.

Fixes T4975.
2016-12-09 22:18:18 -02:00
Shinwoo Kim 7605fbc9d0 elementary: set atspi role before sending a signal
It is necessary to check atspi role before sending a object:state-changed:showing signal.
The signal is fired when _elm_widget_efl_gfx_visible_set is called.
2016-12-10 08:44:18 +09:00
Andy Williams 78ac434769 elm_code: Use cursor theme from elm_entry 2016-12-09 23:32:20 +00:00
Gustavo Sverzut Barbieri fb0e716c1a efl_net: fix formatting warnings from windows. 2016-12-09 19:33:40 -02:00
Gustavo Sverzut Barbieri 345bba3ef1 efl_net_dialer_http: fix build on windows.
Windows time_t is not a long, but long-long, then stick with int64_t
so it works everywhere (converts to time_t internally).

And there is no gmtime_r(), then use the gmtime() if not detected.
2016-12-09 19:32:14 -02:00
Gustavo Sverzut Barbieri e5b3d43c4f efl_io_closer_fd: fix warning on windows. 2016-12-09 19:12:33 -02:00
Daniel Kolesa 2f5db8c7d5 docgen: migrate to new Eolian-provided tokenizer 2016-12-09 17:19:03 +01:00
Andy Williams 91e84aa3b8 elm_code: use geometry of cells to paint a simple cursor
Also allows others to figure out where cells are :)
2016-12-09 15:55:34 +00:00
Gustavo Sverzut Barbieri 324b4e93f5 efl_net_server_unix: do not mkpath for abstract sockets. 2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 5939f0d9c2 efl_net_dialer: emit 'resolved' even if connection failed.
If we resolved the address but couldn't connect, use
efl_net_socket_address_remote_set() and emit
EFL_NET_DIALER_EVENT_RESOLVED.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri afdbe897a0 efl_net: optimize serving of IP addresses.
If we can parse the IP using inet_pton() and the port, there is no
reason to call getaddrinfo() in a thread.

This is required since ecore_con_suite (for ecore_con-over-efl_net) will
assume the server is running as soon as it's created.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 83cbcf7cb5 efl_io_copier: callbacks may close the copier.
direct or indirect events may trigger the user to close the buffer.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 416fa27066 efl_io_buffer: callbacks may close the buffer.
direct or indirect events (ie: can_read_set/can_write_set) may trigger
the user to close the buffer.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 36612adeff efl_io_queue: callbacks may close the queue.
For example, _efl_io_queue_update_cans() triggers "can_read,changed"
and from there users may close the queue, in such case we shouldn't
set can_write.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 47f9d06d0b efl_io_buffered_stream: del inner_io if we're the parent.
This is a nice convenience if inner_io was reparented to the wrapper.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri b2bbc1c188 efl_net_server_simple: fix leak reported by eo_debug
eo_debug now reports leaked objects, which is very nice :-)
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 9e682774d2 efl_net_dialer_socket: allow us to create a dialer from existing object.
If we want to upgrade a dialer, then we must have a way to know if
that socket has already adopted another socket so we don't create it.

We can't simply use efl_net_socket_ssl, otherwise we'd miss some
methods such as efl_net_dialer_address_dial_get() and events such as
connected.
2016-12-09 13:47:04 -02:00
Gustavo Sverzut Barbieri 3fc0fbba42 efl_net_socket_fd: do not close stdout if nothing was set.
if we create an object, say a TCP dialer, and don't connect/bind, then
we have no FD (=0). If we set FD to INVALID_SOCKET on start, other
parts of the code will fail since they consider that "closed", but
we're not closed yet.

Then check for family == AF_UNSPEC && fd == 0, if so don't close it.
2016-12-09 13:47:03 -02:00
Gustavo Sverzut Barbieri cfc21c16fb efl_net_ssl: do not access torn down sockets.
OpenSSL crashes if given a NULL pointer, then be safe and remember if
we did the tear down -- print error so bugs can be identified more
easily.
2016-12-09 13:47:03 -02:00
Gustavo Sverzut Barbieri c97111bf3c efl_net_ssl_conn-openssl: fix dlsym() for X509_check_ip_asc.
At least in ArchLinux the function has no "_" in the symbol name,
matching perfectly what's in the header.

If in other systems it misses such symbol, then check for both.
2016-12-09 13:47:03 -02:00
Andrii Kroitor 518910990c ethumb_slave: fix work on Windows
Ecore_Fd_Handler doesn't work on Windows as expected.
Replaced it with Ecore_Win32_Handler on Windows.
2016-12-09 16:54:12 +02:00
Andrii Kroitor 62a0c41fd3 ethumb: fix absolute path generation
replace _ethumb_build_absolute_path with eina_file_path_sanitize
It makes same thing and works on Windows correctly.
2016-12-09 16:54:12 +02:00
Daniel Kolesa 05ca887e41 elm: move Elm.Icon.Type to elm_general
This unbreaks installed eo file database as certain installed eo files import
elm_icon which is not installed, causing parse errors.
2016-12-09 15:05:26 +01:00
Jihoon Kim fdbc5a4019 Fix typo in doxygen about ecore_idler_add 2016-12-09 19:58:54 +09:00
Stefan Schmidt d46829f0f9 tests: ecore: detect if the timeout test runs on Jenkins and increase allowed offset
From time to time we run into trouble with this test. It goes over the, already
increased, limit on Jenkins. Most likely due to high load on the server. Neither
Cedric nor me have been able to pin this down on local runs and we already had
increased it from the initial 0.01 to 0.02 but just today we hit 0.38.

What we do now is to detect if we run on our jenkins and increase the allowed value
while having the intial lower value back for normal local runs.
2016-12-09 11:09:47 +01:00
Vitalii Vorobiov 4a5e9421e6 edje_pick: export aliases and entire dependency list
A lot of cases were missed, cases that are making resulting edj file
useless.
> Now export all aliases
> If group "1" source of group "2" which is source of group "3", it will
> be imported as well!

@fix
2016-12-09 11:52:33 +02:00
Vitalii Vorobiov 39e67b500c edje_pick: use correct id's for exported groups
@fix
2016-12-09 11:50:43 +02:00
Marcel Hollerbach 712ec60012 eina: add free cb to eina_iterator_filter_new
if you allocate memory for the data param data you can free it in this callback.
2016-12-09 10:16:08 +01:00
JEONGHYUN YUN 8784ba97ad elm_entry: Init cursor position when entry text set.
Summary: Cursor position should be initialized because entry will be cleared when entry text set.

Reviewers: woohyun, id213sin

Reviewed By: id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4469
2016-12-09 11:33:27 +09:00
Jean-Philippe Andre 509cce5e43 eina: Set magic number in eina_file_virtualize
This fixes make check
2016-12-09 11:08:38 +09:00
Jean-Philippe Andre 68e6e46015 evas: Fix compilation after @cedric's "fix"
Don't forget git add!
2016-12-09 10:57:12 +09:00
Cedric Bail 7316bda150 evas: refactor swap mode info get. 2016-12-08 15:06:25 -08:00
Jean Guyomarc'h 42a722be23 evas-gl_cocoa: fix complete b0rkage of the engine
73b308fb66 slaughtered the gl_cocoa
engine. It's now back to life, lighter and shinier.
2016-12-08 20:53:27 +01:00
Chris Michael 8ebf4cd972 elput: Improve checks for keyboard & pointer devices
Some devices reported by libinput show up as both keyboard and mouse,
even tho they are physically only just a keyboard or just a mouse.
When a device gets added, we can verify if it is actually a mouse by
checking if the device has BTN_LEFT (and for keyboards, check
KEY_ENTER). This stops us from getting multiple mouse pointers
reported when we really only have one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 14:32:22 -05:00
Chris Michael b66324644c ecore-wl2: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 14:32:22 -05:00
Gustavo Sverzut Barbieri 7d1c7cff21 ecore_con_server_example: show client errors. 2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri a5dd6aa113 ecore_con_client_example: allow no-ssl verify and print errors.
allow to not verify server certificate or hostname, so we can test
with local, self-signed certificates.

Also print errors, so we can say that the server handshake failed.
2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri 17e0204ab3 efl_net_server_ssl: monitor context del and unref on destructor.
we're leaking ssl_ctx on destruction, also monitor it so we don't
access stale data.
2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri 7c7ea6be06 efl_net_ssl_context: check and document constructor only properties.
The context is shared and thus these lists should be static once
object is created.
2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri b64df5e323 efl_net_dialer_ssl: fix copy&paste too much. 2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri 87bed5622e eo_lifecycle: on log level info (3), show leaked objects.
Since we keep a log of created and deleted objects, we can walk the
log and see which were leaked. As this is expensive, do only if log
level is greater than 3 (INFO, DEBUG...), with backtrace of object
creation being displayed as backtrace if running as level 4 (DEBUG).
2016-12-08 16:00:01 -02:00
Mike Blumenkrantz 3b67f8be4c elm_win: update opaque region on resize when borderless
this fixes broken sizing on borderless windows
2016-12-08 11:36:47 -05:00
Daniel Kolesa e8d1ddd86c elua: add bindings to new Eolian APIs 2016-12-08 17:20:22 +01:00
Chris Michael 0397769a65 evas-wayland-egl: Remove unused field from Outbuf structure
This patch just removes the 'evas' field from the Outbuf structure.
This should have actually gone in on the previous patch but I missed
removing it :(

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 09:32:33 -05:00