Commit Graph

51733 Commits

Author SHA1 Message Date
Stefan Schmidt c9e761da54 ethumb: fix resource leak introduced in file path sanitization rework
This extra snaitized path assign path does not make sense and leads to a leak
in the end. We already have sanitized_path and handle that correctly.

Fixes 62a0c41fd3

CID: 1366925
2016-12-12 16:44:02 +01:00
Gustavo Sverzut Barbieri c1b20aa1fb ecore_con_legacy: fix coverity issues (use after free)
for hard failures (highly unlikely), the handle would be deleted and
the next use would crash.

guard against those or reorder when it makes sense.
2016-12-12 13:17:40 -02:00
Gustavo Sverzut Barbieri 4f44287a59 efl_net_ip_address: make coverity happy.
host and port were already checked, but let's quiet CID 1366921
2016-12-12 13:02:55 -02:00
Gustavo Sverzut Barbieri c4ab9882e1 test efl_net_ip_address: also check localhost6.
Fedora and other systems use localhost6 for ::1, then use that in
addition to localhost.
2016-12-12 12:27:45 -02:00
Gustavo Sverzut Barbieri 4812d9eb74 add missing includes for BSD.
Thanks @netstar.
2016-12-12 12:17:11 -02:00
Andy Williams 780da3c878 elm_code: Fix tests for parameter reordering
Apologies for the badness of not running the tests before
2016-12-12 14:01:20 +00:00
Gustavo Sverzut Barbieri 8415626397 test efl_net_ip_address: check if /etc/hosts has '::1 localhost'
it seems that the bot and some users do not have ::1 localhost in
/etc/hosts, check for that and print it out.

be more verbose on resolve errors, showing the results and error code.

also allow more time for resolution, otherwise the local timeout may
expire before getaddrinfo() returns with failures.
2016-12-12 11:22:16 -02:00
Gustavo Sverzut Barbieri 7e648c46df efl_net_ip_address: improve docs.
thanks stefan for reminding me of these :-)
2016-12-12 09:57:36 -02:00
Daniel Hirt 43949062eb Ui text: remove unimplemented imf api 2016-12-12 11:21:01 +02:00
Daniel Hirt 6accf13b34 Canvas text: call "changed" on style_set
Needs to be picked up by widgets e.g. Ui.Text to update the positions of
decorations.
2016-12-12 10:48:28 +02:00
Daniel Hirt dcfbeb6063 Ui text: move tests to test_efl_ui_text.c
Merge this into the file that already tests the label-like behavior.
2016-12-12 10:48:28 +02:00
Daniel Hirt 7abd3f8637 Canvas text: call "changed" on annotation_insert
This was missing from non-item type of annotations.
2016-12-12 10:48:28 +02:00
Daniel Hirt ac59549a79 Ui text interactive: fix passing of wrong object 2016-12-12 10:48:28 +02:00
Daniel Hirt a8cea307dc Ui text: implement non-editable beahvior
Non-editable behavior resembles a label. It doesn't allow changing the
text in any interactive form. The blinking cursor is also hidden.
Selection, however, it allowed.

Among the changes, I added a test which you can run using:
"elementary_test -to "efl ui text label".
2016-12-12 10:48:28 +02:00
Daniel Hirt 4f9ef4989c Ui text: disable selection handler from test 2016-12-12 10:48:28 +02:00
Daniel Hirt b6cf837196 Ui text: fix selection handler behavior 2016-12-12 10:48:28 +02:00
Daniel Hirt c0331b41eb Ui text: implement scrolling with line wrap 2016-12-12 10:48:28 +02:00
Stefan Schmidt fcd131e122 docs: ecore_con: fill gaps in newly added efl_net_ip_address documentation 2016-12-12 09:34:33 +01:00
Stefan Schmidt cd477e0217 docs: ecore_con: document newly added extern struct item 2016-12-12 09:34:33 +01:00
Andy Williams e0299f3510 elm_code: Fix parameter ordering for consistency 2016-12-12 08:29:51 +00:00
Woochan Lee 1e4c44f025 elm_spinner: Spinner internal focus logic fixed to following new focused UI concept.
Summary:
The spinner entry will be activated when user gives a focus to text button in new focused ui concept.

To support this, we have to change internal logic about change text button to entry, entry to text button.

@fix

Test Plan:
elementary_test
spinner sample.

Reviewers: woohyun, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4475
2016-12-12 16:51:27 +09:00
Gustavo Sverzut Barbieri 0073e87761 efl_net_dialer_http: fix HEAD requests.
We do not need to keep a "only_head" flag, but we must set
CURLOPT_NOBODY instead of going the "CUSTOMREQUEST" route, otherwise
curl won't follow redirects, etc.
2016-12-12 03:17:35 -02:00
Gustavo Sverzut Barbieri d52daf8dd7 efl_net_dialer_http: fix reference check.
With the last patch to fix delete-from-curl callback it went too much,
considering it was always dead (in the test scenario it was, so it was
"right"), but broke normal cases.
2016-12-12 03:16:07 -02:00
Gustavo Sverzut Barbieri 633ec445b8 efl_net: add Efl.Net.Ip_Address
This is a string parser, serializer and asynchronous resolver.

It's purpose is to convert to and from the strings we use in our
dialers and servers, such as "127.0.0.1:1234" or "[::1]:1234",
properties allow to check the family, port, address bytes (slice) and
even get a struct sockaddr pointer to use with bind()/connect() in
outside code.

It will also offer some utilities present in netinet/in.h in an easy
to use way, after all IN6_IS_ADDR_LOOPBACK() works one way, while
there is no IN_LOOPBACK and comparing with INADDR_LOOPBACK will lead
to errors since it's in network order.

Last but not least, it will do asynchronous resolve of host and port
names using an internal thread and getaddrinfo(). The results are
delivered using a Future with an array of objects.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 96eccc2753 efl_net: move error COULDNT_RESOLVE_HOST to broader scope.
This error is shared by Dialer and Server, will also be used by IP
resolution.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 47ddca0f42 Efl_Future: class name (string) using "." for namespace.
Following recent eolian change, the string must have "." to split
namespace, not "_".
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 21759f713a yoda-style inactivity timeout.
s/inactivity_timeout/timeout_inactivity/g so it matches the EFL names
with scope first, like timeout_connect, etc.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri e9a72ea8f4 efl_net: spell check s/revogation/revocation/g
Sorry, in pt_BR it's revoGar... so I did misspell :-)
2016-12-12 02:30:33 -02:00
Hosang Kim 12c50e5522 efl_canvas_proxy: fix the parameter of EINA_COW_WRITE
Summary:
EINA_COW_WRITE_BEGIN and EINA_COW_WRITE_END's parameters must be same.
But 'Read' paramter is different. So wrong variable's value is changed.
@fix

Reviewers: woohyun, Hermet, cedric, raster, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D4472
2016-12-12 11:42:01 +09:00
Shinwoo Kim ba03d68117 elementary: naviframe uses widget item for atspi
Application developer could rewrite accessible information of naviframe item.
But view object - VIEW(item) - is not accessible from application side.
So the accessible information should be set to widget item.
2016-12-11 19:38:00 +09:00
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