Commit Graph

49 Commits

Author SHA1 Message Date
Milan Crha 78ab9b1133 Bug 762759 - Crash on start when ~/.cache is not accessible 2016-03-03 19:03:08 +01:00
Tomas Popela 6f29002a24 EHTTPRequest - GFileInfo not valid when machine is under heavy load
When the machine is under heavy load and I'm moving between messages with
inline images (that are already downloaded and are in the cache) I get warnings
that GFileInfo object is not valid. I managed to get these warnings when the task
was already cancelled (I already moved to another message) but for the active task
as well. So try to access the GFileInfo object just when we know that it is valid.
2015-05-06 15:04:13 +02:00
Milan Crha eb40aa6cff [EHTTPRequest] Immediately cancel ongoing download on request cancel
No need to continue any download when the request had been cancelled.
This could cause starving of other requests with download of large images.
2015-04-03 08:27:10 +02:00
Milan Crha 9bc76a6084 Use own thread pool for WebKit content download
Mails with many images (remote content in general) could block GTask's
thread pool for a long time, making starve other requests. Adding our
own thread pool avoids such job starving.
2015-04-03 08:22:10 +02:00
Milan Crha 9dcac58b21 Use thread safe variants of g_object_bind_property*() functions from evolution-data-server 2015-02-24 09:54:41 +01:00
Milan Crha 36776bab4a Bug 745013 - handle_http_request: GBinding not thread safe 2015-02-24 08:42:04 +01:00
Milan Crha 2f7e0badb4 handle_http_request: Skip invalid URIs
It wasn't checked whether the passed-in URI was correct, but the message
object returned from soup_message_new() was dereferenced anyway, which
could cause a crash.
2015-02-20 14:31:21 +01:00
Milan Crha 59e2efa774 Share GSettings objects with e_util_ref_settings()
A simple Evolution run and move between all views means creation of
more than 100 GSettings objects, with only a bit more than 10 schemas.
Reusing the objects should have a positive impact on a performance too.
2014-11-13 10:06:04 +01:00
Tomas Popela 8650fb139a Bug 540362: [webkit-composer] Use webkit for composer
Merge wip/webkit-composer branch into master.
2014-06-09 16:32:25 +02:00
Milan Crha 2acd31fe1c EHttpRequest: Avoid possible data stream memory leak
The request's finish function is not called in case when the request
is cancelled, which meant that the whole data stream was leaked.
2014-01-31 14:01:57 +01:00
Milan Crha f77ad2a662 EHTTPRequest: Drop unneeded reference to EMailPartList 2014-01-30 18:26:05 +01:00
Matthew Barnes b21733d067 Bug 721545 - License text contains obsolete FSF postal address 2014-01-07 16:05:51 -05:00
Matthew Barnes 989efd6c2e EHttpRequest: Simplify proxy handling.
When creating a temporary SoupSession, synchronize its GProxyResolver
with the SoupRequest's SoupSession which is already configured to use
our built-in proxy ESource.
2013-11-26 17:00:55 -05:00
Matthew Barnes 7f008d11a2 EHttpRequest cleanups. 2013-11-26 17:00:55 -05:00
Matthew Barnes df8d6d045b Use plain SoupSesson everywhere.
SoupSessionAsync and SoupSessionSync are deprecated in libsoup 2.42.
2013-11-26 10:50:10 -05:00
Milan Crha 838e0ec392 Bug #711499 - Failed image download lefts opened file descriptor 2013-11-20 18:32:43 +01:00
Milan Crha 570c637480 Fix/mute issues found by Coverity scan
This makes the code free of Coverity scan issues.
It is sometimes quite pedantic and expects/suggests some
coding habits, thus certain changes may look weird, but for a good
thing, I hope. The code is also tagged with Coverity scan
suppressions, to keep the code as is and hide the warning too.
Also note that Coverity treats g_return_if_fail(), g_assert() and
similar macros as unreliable, and it's true these can be disabled
during the compile time, thus it brings in other set of 'weird'
changes.
2013-11-15 09:06:57 +01:00
Matthew Barnes 3c30fb1747 Convert libemail-engine to a single-include model.
Use: #include <libemail-engine/libemail-engine.h>
2013-11-11 12:07:43 -05:00
Matthew Barnes 4c2233114d Rename e-mail-enums.h to e-mail-engine-enums.h. 2013-11-11 08:29:20 -05:00
Matthew Barnes 428b0a481b Adapt to CamelDataCache API changes. 2013-11-02 09:39:37 -04:00
Milan Crha 6d96953703 Add debugging for formatter requests
With CAMEL_DEBUG=emformat:requests the evolution prints a debug messages
about requests being processed when formatting messages.
2013-09-25 09:19:47 +02:00
Milan Crha 77a825c693 Bug #705119 - File descriptors for images not closed 2013-07-30 12:32:15 +02:00
Milan Crha dcf302c2ba Bug #703389 - Proxy ignored for images 2013-07-15 18:40:38 +02:00
Matthew Barnes 2e87aa81fc Remove EMailShellSettings.
EShellSettings predates GSettings and is no longer necessary.

GSettings allows binding GObject properties to GSettings keys,
with optional mapping functions.  That fulfills the purpose of
EShellSettings.
2013-03-17 08:49:12 -04:00
Matthew Barnes d509f21104 EHTTPRequest: Use e_mail_ui_session_check_known_address_sync().
Use e_mail_ui_session_check_known_address_sync() to help determine
whether to automatically display images in a text/html MIME part.
2013-02-27 10:59:55 -05:00
Matthew Barnes 91822b42dc Make EMailPartList thread-safe.
Exposing data members in the public struct is unwise, especially when
EMailPartList is used from multiple threads.  Instead keep the members
private and provide a set of thread-safe functions to manipulate them.
2012-12-07 14:01:04 -05:00
Milan Crha e9038ba923 Relative URI can crash Evolution in http_request_send_async() 2012-11-13 13:37:10 +01:00
Matthew Barnes 2c4ae5e768 Coding style and whitespace cleanup. 2012-11-10 15:54:43 -05:00
Milan Crha 0bfb97d530 Replace deprecated soup_message_headers_get() with soup_message_headers_get_list() 2012-11-06 16:25:21 +01:00
Dan Vrátil 11bdb5d83a Bug #682295 - Fix deadlock in EHttpRequest
Fix deadlock in EHttpRequest by running each libsoup operation in
it's own GMainContext.

The patch also replaces use of features from libsoup>=2.39, because
we can't change dependency. The code is based on code from CalDAV,
which uses synchronous libsoup API as well and works with
libsoup<2.39
2012-09-14 17:50:56 +02:00
Milan Crha 309254e2ce Bug #683866 - Leaks of EMailFormatter object 2012-09-13 12:01:38 +02:00
Dan Vrátil a5bbf35da5 Fix all 'may be used uninitialized' compiler warnings 2012-08-20 13:06:23 +02:00
Matthew Barnes c85109fc32 Coding style and whitespace cleanup. 2012-08-19 14:17:55 -04:00
Dan Vrátil 0f7ae17400 Bug #680702 - Freeze/crash when loading remote images
Simplify the EHttpRequest by using synchronous libsoup API instead
of spawning another async operation within already asynchronous handler.

This avoids nested event loop, complex locking and makes to code much
simpler.
2012-08-17 22:56:45 +02:00
Dan Vrátil a47f92b5da Bug #681783 - Critical warning and freeze with libsoup-2.39 and webkitgtk-1.9.2 2012-08-17 13:03:34 +02:00
Milan Crha 1852490a93 Preset timeout on SoupSession-s to 90 seconds 2012-07-11 12:37:12 +02:00
Matthew Barnes b724ca9d48 Adapt to CamelDataCache API change.
camel_data_cache_get_filename() dropped its unused GError parameter.
2012-06-19 11:51:41 -04:00
Dan Vrátil 9e88dd64e7 Bug #678293 - Already downloaded images are not shown 2012-06-19 10:27:05 +02:00
Dan Vrátil 3dfda2606c Bug #431497 - Offline mode should disable loading of images from the internet 2012-06-18 15:44:32 +02:00
Dan Vrátil fe59b10f04 Bug #677608 - Fails to open message which is not yet downloaded 2012-06-18 13:44:58 +02:00
Dan Vrátil e439e17e2e Make em_utils_in_addressbook() cancellable 2012-06-14 13:01:57 +02:00
Dan Vrátil 5b8340563c Mail formatter rewrite
All mail-parsing and formatting code has been moved to em-format.
Parsing is handeled by EMailParser class, formatting by EMailFormatter.
Both classes have registry which hold extensions - simple classes
that do actual parsing and formatting. Each supported mime-type
has it's own parser and formatter extension class.
2012-06-06 15:27:19 +02:00
Matthew Barnes 2a39437ee9 Adapt to single-include E-D-S libraries. 2012-06-03 15:14:03 -04:00
Matthew Barnes ec64c08d26 Don't unref GAsyncResult in "finish" functions. 2012-05-14 09:35:54 -04:00
Matthew Barnes 59ba5e620d Fix some GSimpleAsyncResult reference leaks. 2012-05-13 09:40:23 -04:00
Matthew Barnes 53a3d2f4e1 Use g_simple_async_result_set_check_cancellable().
Always call it immediately after g_simple_async_result_new().
2012-05-13 09:40:23 -04:00
Matthew Barnes 89777f0726 Whitespace cleanups. 2012-05-13 09:15:42 -04:00
Dan Vrátil 3016ec7bad Bug #674340 - Evolution hangs on startup 2012-04-26 11:54:42 +02:00
Dan Vrátil d571c56260 Bug #674272 - Contacts preview differs with mailer running and not
This splits the giant EMailRequest to individual EFileRequest, EStockRequest, EHTTPRequest and EMailRequest,
making the first two available globally from e-utils, the othe two are loaded only with mailer,
since no other component uses them.
2012-04-23 08:40:20 +02:00