Commit Graph

197 Commits

Author SHA1 Message Date
Cedric BAIL 94d9981d8c ecore_con_eet: fix dereferencing of object during callback that crashed some tests case. 2015-07-28 03:05:37 +02:00
Daniel Kolesa 18502b8429 efl: fix doc references across the tree to validate right 2015-07-08 15:13:26 +01:00
Vincent Torri 74cbbd204c Ecore Con: Fix ecore_con_local hangs on Windows.
Since the move to eo, ecore_con_local hangs on Windows, hence edje_cc can
not compile edc files (e.g.).
Problem was a loop that was used to finish some threads which is now endless.

For now, comment out that loop

@fix
2015-07-07 12:05:34 +01:00
Vincent Torri fe4e464fb6 Ecore_Con: decrease log level in ecore_con_local_win32 2015-07-07 12:05:34 +01:00
Srivardhan Hebbar c0731cdd51 ecore_con: convert doc of ecore_con_eet.eo
Summary:
converted docs of ecore_con_eet.eo to the new style.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, tasn

Subscribers: yashu21985, cedric

Differential Revision: https://phab.enlightenment.org/D2795
2015-07-06 10:20:28 +01:00
Vincent Torri 2f677eddef Ecore_Con_Ares: fix undefined variable warning 2015-07-03 16:23:05 +01:00
Srivardhan Hebbar 947edc8471 ecore_con: eoify ecore_con_eet functions.
Summary:
Depends on D2602
Made all functions eo.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-29 14:56:23 +02:00
Carsten Haitzler 6483dc3ce9 ecore con - fix object data referencing for deleted objects
if the object has been deleted already, scope data is null. handle it
correctly. this fixes a segv in the new efreetd when it starts and
there is an existing efreet running thus owning the socket fails.

@fix
2015-06-25 13:18:22 +09:00
Carsten Haitzler b68853fd7d ecore con dns - a failed dns lookup is not an err log event
spewing out errors for a failed dns lookup is not somehting to ERR out
in logs all the time. it is at best a debug log. the caller handles
the failed connect itself.

@fix
2015-06-25 13:17:04 +09:00
Srivardhan Hebbar 12257053a0 ecore_con: eoifying ecore_con_eet.
Summary:
This is still work in progress. I've added new file for temporary
purpose. Idea is to first eoify everything then change its namespace properly.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-22 18:55:57 +02:00
Daniel Kolesa 5541f8ead1 ecore_con: convert docs 2015-06-19 15:44:22 +01:00
Daniel Kolesa 69b9f0044b ecore_con_base: converted docs 2015-06-19 15:18:38 +01:00
Daniel Kolesa 27237976ad eo: move all event doc comments to new syntax 2015-06-11 17:09:02 +01:00
Daniel Kolesa 786f848f67 evas,ecore_con: more struct/enum doc updates 2015-06-11 16:51:43 +01:00
Cedric BAIL 69e44c24e3 ecore_con: fix error handling case.
Since the move to Eo, in case of error we do not need to cleanup anything when
finalize finish. The kill function was arranged to do so, but it was still emiting
an event exposing the invalid Eo object. Looking closely at the code, that should
have not happened, as there was no symetrical ADD event and the function would do
nothing else. So removing it. This prevent any potential SEGV from a function that
would catch the DEL event.

@fix
2015-06-03 17:14:12 +02:00
Srivardhan Hebbar 9dcb827d12 ecore_con: add eo_event handler to efl_networ_url.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-29 18:22:09 +02:00
Daniel Kolesa 9214fa3db9 eolian: disallow cyclic dependencies between .eo files
Eo files will now fail to compile if a cycle is detected.

This required some temporary changes in existing eo files
(we had 2 cycles) for which I added a FIXME (they do not
affect C generation).

@feature
2015-05-22 15:03:38 +01:00
Tom Hacohen 92fb2917cb Eo: Remove eo_error_set() and clean up finalizer()
This is another cleanup in perparation for the Eo stable release.
This is no longer needed thanks to the proper error reporting with
eo_constructor()'s new return value.

The finalizer change cleans it up a bit so it catches more cases/issues.
This also means that the finalizer cleans up the object in all cases,
and not only some.

@feature.
2015-05-20 16:25:38 +01:00
Tom Hacohen 7c769163d9 Ecore con url: Fix wrong object destruction.
Because we defer the deletion of this object until we get all the
responses from the network, we must manually free it. A better solution
would possibly be to just free the requests upon object deletion instead
of deferring the deletion.

@fix
2015-05-20 16:10:50 +01:00
Tom Hacohen 29d11200c6 Ecore con url: correctly destruct the object. 2015-05-20 16:10:50 +01:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Daniel Kolesa 058a9c9d88 eolian: new syntax for params/values/keys
Instead of "@in type name;" we now use "@in name: type;". This change
is done because of consistency with the rest of Eolian; pretty much
every other part of Eolian syntax uses the latter form.

This is a big breaking change in the .eo format, so please update your
.eo files accordingly and compile Elementary together with the EFL.

@feature
2015-05-18 16:14:31 +01:00
Srivardhan Hebbar 183cef932e ecore_con: changed Ecore_Con_Url to Efl_Network_Url.
Summary: This is just the beginning. I tried for one class to check.
Tell me if this is fine, I'll change in other classes also. The goal
is to simplify and make our API clearer to understand to new comers.

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-18 11:36:16 +02:00
Cedric BAIL 94eaaf889b ecore_con: use portable environment lookup. 2015-05-14 18:41:48 +02:00
Cedric BAIL 9c571f01f7 ecore_con: it doesn't make sense to get port on local protocol. 2015-05-14 18:41:48 +02:00
Vincent Torri ebaa04c318 ecore_con: add missing declarations on Windows.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-14 18:41:48 +02:00
Daniel Kolesa ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Daniel Kolesa 8c51033d49 eolian: fix doc comments across the tree 2015-05-11 15:38:03 +01:00
Daniel Kolesa ed0988a22d eolian: change all EFL .eo files to use new syntax for properties 2015-05-07 16:36:58 +01:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Srivardhan Hebbar 5af99bdc7a ecore_con: fix double free issue in ecore_con_eet.
Summary:
While creating ecore_con_eet_server, if client is not set to false, then while deleting, it is checking for client and it is by default not false. So set it.
ecore_con_reply object is being deleted twice. So removed code to delete the reply object as it would be deleted after the callback.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Maniphest Tasks: T2372

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-28 14:14:07 +02:00
Thiep Ha 663bdcaf07 ecore_con: fix typos and improve document consistence.
Summary:
This patch fixes typos and uses primitive verb in brief section
to improve document consistence for ecore_con.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-25 19:35:27 +02:00
Raoul Hecky a01b243405 ecore-con: try to load libcurl.so.5 before .so.4
Curl is using a strange soname bumping where soname version is changed by configure when it detects some differences with off_t.
Explanations here: http://curl.haxx.se/dev/readme-curl_off_t.html

As we are not using curl_off_t in our code, we can simply load libcurl.so.5 if present.
2015-04-24 09:23:34 +02:00
Srivardhan Hebbar 05881ea61a ecore_con: fix dns lookup crash issue.
Summary:
When executed ecore_con_lookup_example function, we were getting a crash. This is the fix for the crash. I analysed it in the valgrind and found the error. Valgrind reported invalid free at this place.
svr->name is getting freed in _ecore_con_server_eo_base_destructor function and svr is getting freed in ecore_con_shutdown function.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:19 +02:00
Jean-Philippe Andre a812df7311 Ecore_Con: Fix clang warnings 2015-04-21 20:11:02 +09:00
Srivardhan Hebbar 709037a95d ecore_con: fix stack overflow in ecore_con_url_timer issue.
Summary:
last_ms is not needed at all. If curl_multi_timeout returns non zero, then its error, if it returns zero, then its fine. If ms is zero, then call curl_multi_perform immediately.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Maniphest Tasks: T2200

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-10 12:05:05 +02:00
Srivardhan Hebbar 3a64b0ccd3 ecore_con: fix ftp upload function to follow documentation.
Summary:
While creating a Ecore_con_url object, the url is given in this format "ftp://ftp.example.com". While uploading a file, this function was prefixing "ftp://" to this url which resulted in DNS failure, and upload fail. So corrected the issue.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-27 18:41:05 +01:00
Nicolas Aguirre 242e108e37 ecore_con: do not try to load /etc/resolv.conf when on windows.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-26 17:46:17 +01:00
Srivardhan Hebbar 9c03e3e728 ecore_con: clean up, refactor and unpdate documentation.
Summary:
1. Have refactored code in ecore_con_local.c
2. Changed env variable from "TMP" to "TMPDIR".
3. Added check for negetive port number when type is ECORE_CON_LOCAL_USER.
4. Added check to check TMPDIR before assuming /tmp as temp directory.
5. Updated documentation in Ecore_Con.h explaining about local socket and port number.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-23 19:44:27 +01:00
Srivardhan Hebbar b1f74c615a ecore_con: fix ECORE_CON_LOCAL_SYSTEM use with negative port number.
Summary:
The socket can be created even with negative port number, but in that case the port
is ignored so that you can connect to non Ecore_Con based IPC. This patch remove
that test to make the client and server match.

@fix

Bug: While creating ECORE_CON_LOCAL_SYSTEM server and client pair, when the socket
name was "test_socket" and port number "-8" (Any negative number). Then while creating
listening socket, the code would go to line no 291 and socket is created in tmp by
".ecore_servicetest_socket|-8". When the same is passed to bind then the code would
go to line 118 and the socket it would try to bind would be ".ecore_servicetest_socket" !!
So the bind would fail.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:37:09 +01:00
Cedric BAIL b301fffe2f ecore_con: fix build with -DISCOMFITOR and OpenSSL. 2015-03-17 09:58:21 +01:00
Cedric BAIL 9b51888104 ecore_con: remove deprecated use of Eina_Binbuf functions. 2015-03-17 09:58:21 +01:00
Cedric BAIL dfe39b3d54 ecore_con: unbreak GNUTLS support. 2015-03-17 09:58:20 +01:00
Cedric BAIL a089d8cd7b emile: Add SSL support. 2015-03-17 09:58:18 +01:00
Cedric BAIL 2913e8c64e ecore_con: initialize emile cipher support on demand. 2015-03-17 09:58:17 +01:00
Cedric BAIL cc88832353 ecore_con: depend on emile for initializing crypto library. 2015-03-17 09:58:17 +01:00
Srivardhan Hebbar 034bcbace5 ecore_con: move Socks API documentation to Ecore_Con.h
Summary:

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-13 09:33:29 +01:00
Cedric BAIL 54fa8c7e42 ecore_con: fix rebase issue.
Catched by Coverity CID 1287124.
2015-03-07 15:53:40 +01:00
Srivardhan Hebbar 9b1cdff941 ecore_con: Not returning error if port is less than zero for local sockets.
Summary:
If the socket is local, then there is no need to through error if the port is less than 0 (i.e., negetive). The behavior is same in _ecore_con_connector_eo_base_finalize funtion. So applied the same here. There is code in ecore_con_local.c to handle if port is less than zero for local sockets.
In _ecore_con_connector_eo_base_finalize function, I've added a space just so that it shows difference in phabricator and  would be easy for you to review.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2089
2015-03-06 20:19:21 +01:00
Srivardhan Hebbar 6721800e7b ecore_con: calling ecore_con_local_init/shutdown from ecore_con_init/shutdown.
Summary:
ecore_con_local doesn't currently require any initialization, but it might need
that on some platform and not having the init make the source code non obvious.
This is just a patch to improve future maintenability.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:21 +01:00