platform/upstream/evolution-data-server.git
10 years agoUpdated Brazilian Portuguese translation
Rafael Ferreira [Wed, 21 Aug 2013 01:17:40 +0000 (22:17 -0300)]
Updated Brazilian Portuguese translation

10 years agoUpdated Polish translation
Piotr Drąg [Tue, 20 Aug 2013 21:20:01 +0000 (23:20 +0200)]
Updated Polish translation

10 years agoRename CamelIMAPXStoreSummary API: 'full' to 'mailbox'.
Matthew Barnes [Tue, 20 Aug 2013 17:21:28 +0000 (13:21 -0400)]
Rename CamelIMAPXStoreSummary API: 'full' to 'mailbox'.

The namespace code becomes a little clearer with these renames.

Renamed functions:

  - camel_imapx_store_summary_namespace_find_path
  + camel_imapx_store_summary_namespace_find_by_path

  - camel_imapx_store_summary_namespace_find_full
  + camel_imapx_store_summary_namespace_find_by_mailbox

  - camel_imapx_store_summary_full_to_path
  + camel_imapx_store_summary_mailbox_to_path

  - camel_imapx_store_summary_path_to_full
  + camel_imapx_store_summary_path_to_mailbox

  - camel_imapx_store_summary_full_name
  + camel_imapx_store_summary_mailbox

  - camel_imapx_store_summary_add_from_full
  + camel_imapx_store_summary_add_from_mailbox

  - camel_imapx_store_summary_full_from_path
  + camel_imapx_store_summary_mailbox_from_path

10 years agoCamelIMAPXStoreInfo: Rename 'full_name' member to 'mailbox'.
Matthew Barnes [Tue, 20 Aug 2013 17:07:04 +0000 (13:07 -0400)]
CamelIMAPXStoreInfo: Rename 'full_name' member to 'mailbox'.

I find the 'full_name' versus 'path' terminology to be very confusing.
Replace 'full_name' with 'mailbox' to match IMAP RFC terminology.

10 years agoCamelIMAPXStoreSummary: Remove 'capabilities' member.
Matthew Barnes [Tue, 20 Aug 2013 15:57:28 +0000 (11:57 -0400)]
CamelIMAPXStoreSummary: Remove 'capabilities' member.

Was this intended for caching server capabilities locally?  WTF.
Thankfully we weren't actually using it for anything.

10 years agoCamelIMAPXNamespaceList: Remove 'full_name' member.
Matthew Barnes [Tue, 20 Aug 2013 15:40:26 +0000 (11:40 -0400)]
CamelIMAPXNamespaceList: Remove 'full_name' member.

The 'full_name' member is always identical to 'prefix', so not needed.

10 years agoRemove unused camel_imapx_store_summary_namespace_new().
Matthew Barnes [Tue, 20 Aug 2013 14:13:33 +0000 (10:13 -0400)]
Remove unused camel_imapx_store_summary_namespace_new().

10 years agoCamelIMAPXStoreNamespace: Rename 'path' member to 'prefix'.
Matthew Barnes [Tue, 20 Aug 2013 13:52:55 +0000 (09:52 -0400)]
CamelIMAPXStoreNamespace: Rename 'path' member to 'prefix'.

Just so I can grok this stuff easier.  The 'path' member stored the
namespace prefix, minus any trailing mailbox separator character from
the NAMESPACE response (which btw is wrong; can't assume a namespace
prefix always has a trailing separator character.  e.g. a '~' prefix
for the "other users" namespace).

10 years agoCamelIMAPXListResponse: Fix a documentation typo.
Matthew Barnes [Mon, 19 Aug 2013 12:04:06 +0000 (08:04 -0400)]
CamelIMAPXListResponse: Fix a documentation typo.

10 years agoFix a possible memory leak in sasl_ntlm_try_empty_password_sync()
Milan Crha [Tue, 20 Aug 2013 04:51:26 +0000 (06:51 +0200)]
Fix a possible memory leak in sasl_ntlm_try_empty_password_sync()

10 years agoUpdated Polish translation
Piotr Drąg [Sun, 18 Aug 2013 20:36:28 +0000 (22:36 +0200)]
Updated Polish translation

10 years agoPost-release version bump.
Matthew Barnes [Sun, 18 Aug 2013 09:38:47 +0000 (05:38 -0400)]
Post-release version bump.

10 years agoNEWS update for 3.9.90 release.
Matthew Barnes [Sun, 18 Aug 2013 09:12:07 +0000 (05:12 -0400)]
NEWS update for 3.9.90 release.

10 years agoBump SOURCES_DBUS_SERVICE_NAME version.
Matthew Barnes [Sun, 18 Aug 2013 09:22:23 +0000 (05:22 -0400)]
Bump SOURCES_DBUS_SERVICE_NAME version.

For the addition of the "WithoutPassword" property in
org.gnome.evolution.dataserver.Authenticator.

10 years agoUpdate API documentation.
Matthew Barnes [Sun, 18 Aug 2013 09:20:04 +0000 (05:20 -0400)]
Update API documentation.

10 years agoUpdated Slovenian translation
Matej Urbančič [Sat, 17 Aug 2013 23:56:30 +0000 (01:56 +0200)]
Updated Slovenian translation

10 years agoFix typos in imapx_list_response_parse_extended_item().
Matthew Barnes [Sat, 17 Aug 2013 16:21:04 +0000 (12:21 -0400)]
Fix typos in imapx_list_response_parse_extended_item().

10 years agoAddendum to the previous commit.
Matthew Barnes [Sat, 17 Aug 2013 13:52:50 +0000 (09:52 -0400)]
Addendum to the previous commit.

10 years agoCamelIMAPXStore: Obtain a fresh folder list on startup.
Matthew Barnes [Sat, 17 Aug 2013 13:33:19 +0000 (09:33 -0400)]
CamelIMAPXStore: Obtain a fresh folder list on startup.

Unless we're offline, always obtain a fresh mailbox listing from the
IMAP server on startup.  The result of get_folder_info_sync() should
always be as complete and accurate as possible.

10 years agoCamelIMAPXStore: Move folder info refresh stuff to private section.
Matthew Barnes [Sat, 17 Aug 2013 13:26:40 +0000 (09:26 -0400)]
CamelIMAPXStore: Move folder info refresh stuff to private section.

10 years agoCamelIMAPXStore: Remove unused public members.
Matthew Barnes [Sat, 17 Aug 2013 13:20:01 +0000 (09:20 -0400)]
CamelIMAPXStore: Remove unused public members.

10 years agoimapx_store_get_folder_info_sync() cleanups.
Matthew Barnes [Sat, 17 Aug 2013 13:17:41 +0000 (09:17 -0400)]
imapx_store_get_folder_info_sync() cleanups.

10 years agocamel_store_get_folder_info_sync: Connect first unless offline.
Matthew Barnes [Sat, 17 Aug 2013 11:58:34 +0000 (07:58 -0400)]
camel_store_get_folder_info_sync: Connect first unless offline.

10 years agoCamelStoreSummary: Fix another boo boo.
Matthew Barnes [Sat, 17 Aug 2013 12:57:38 +0000 (08:57 -0400)]
CamelStoreSummary: Fix another boo boo.

Similarly, don't throw away CamelStoreInfo flags when saving to disk.

10 years agoCamelStoreSummary: Fix a boo boo.
Matthew Barnes [Fri, 16 Aug 2013 21:32:39 +0000 (17:32 -0400)]
CamelStoreSummary: Fix a boo boo.

Don't throw away CamelStoreInfo flags, those are kind of important.

10 years agoCamelStoreSummary: Move 'summary_path' member to private section.
Matthew Barnes [Fri, 16 Aug 2013 20:35:17 +0000 (16:35 -0400)]
CamelStoreSummary: Move 'summary_path' member to private section.

10 years agoCamelStoreSummary: Remove CAMEL_STORE_SUMMARY_DIRTY flag.
Matthew Barnes [Fri, 16 Aug 2013 20:23:11 +0000 (16:23 -0400)]
CamelStoreSummary: Remove CAMEL_STORE_SUMMARY_DIRTY flag.

Just use a gboolean.

Also, the flags value was not used for anything else so remove it.
We still need to load/save a 32-bit value in that spot in the file
to not break binary compatibility, but it's an unused placeholder.

10 years agoCamelStoreSummary: Move header info to private section.
Matthew Barnes [Fri, 16 Aug 2013 20:08:15 +0000 (16:08 -0400)]
CamelStoreSummary: Move header info to private section.

10 years agoRemove CAMEL_STORE_SUMMARY_SUMMARY_LOCK.
Matthew Barnes [Fri, 16 Aug 2013 19:36:13 +0000 (15:36 -0400)]
Remove CAMEL_STORE_SUMMARY_SUMMARY_LOCK.

Keep this internal to CamelStoreSummary.

Removed functions:

  camel_store_summary_lock()
  camel_store_summary_unlock()

10 years agoLock the CamelStoreSummary before invoking store_info_set_string().
Matthew Barnes [Fri, 16 Aug 2013 19:28:12 +0000 (15:28 -0400)]
Lock the CamelStoreSummary before invoking store_info_set_string().

Not the best approach since we're invoking unknown code with a mutex
locked, but beats the hell out of exposing the mutex in the public API.

10 years agoRemove camel_store_summary_index().
Matthew Barnes [Fri, 16 Aug 2013 19:23:13 +0000 (15:23 -0400)]
Remove camel_store_summary_index().

No longer used.

10 years agoAvoid camel_store_summary_index().
Matthew Barnes [Fri, 16 Aug 2013 16:23:28 +0000 (12:23 -0400)]
Avoid camel_store_summary_index().

camel_store_summary_index() is only called when looping over summary
items from 0 to camel_store_summary_count().  But this pattern is not
thread-safe, because another thread could add or remove summary items
while the loop is in progress.

Use camel_store_summary_array() instead to avoid these issues.

10 years agoRemove unused CAMEL_STORE_INFO_NAME.
Matthew Barnes [Fri, 16 Aug 2013 15:36:25 +0000 (11:36 -0400)]
Remove unused CAMEL_STORE_INFO_NAME.

CAMEL_STORE_INFO_NAME is just a variation of the path string,
and makes no sense to use with camel_store_info_set_string().

10 years agoRemove camel_store_info_string().
Matthew Barnes [Fri, 16 Aug 2013 15:30:45 +0000 (11:30 -0400)]
Remove camel_store_info_string().

No longer used, and the class method was pointless.

10 years agoAvoid camel_store_info_string().
Matthew Barnes [Fri, 16 Aug 2013 15:11:24 +0000 (11:11 -0400)]
Avoid camel_store_info_string().

It's not like calling the function is any more thread-safe than just
accessing the CamelStoreInfo struct member directly.

Avoid the function so we can get rid of it.

10 years agoConvert camel_store_info_name() macro to a function.
Matthew Barnes [Fri, 16 Aug 2013 14:54:08 +0000 (10:54 -0400)]
Convert camel_store_info_name() macro to a function.

10 years agoConvert camel_store_info_path() macro to a function.
Matthew Barnes [Fri, 16 Aug 2013 14:36:49 +0000 (10:36 -0400)]
Convert camel_store_info_path() macro to a function.

10 years agoRemove unused camel_store_summary_clear().
Matthew Barnes [Fri, 16 Aug 2013 14:12:38 +0000 (10:12 -0400)]
Remove unused camel_store_summary_clear().

Was only called from CamelStoreSummary's finalize().

10 years agoRemove unused camel_store_summary_remove_index().
Matthew Barnes [Fri, 16 Aug 2013 14:02:09 +0000 (10:02 -0400)]
Remove unused camel_store_summary_remove_index().

10 years agoRemove unused camel_store_summary_info_new_from_path().
Matthew Barnes [Fri, 16 Aug 2013 13:55:05 +0000 (09:55 -0400)]
Remove unused camel_store_summary_info_new_from_path().

10 years agoRemove unused camel_store_summary_header_load().
Matthew Barnes [Fri, 16 Aug 2013 13:42:29 +0000 (09:42 -0400)]
Remove unused camel_store_summary_header_load().

10 years agoRemove CAMEL_STORE_SUMMARY_IO_LOCK.
Matthew Barnes [Fri, 16 Aug 2013 13:32:32 +0000 (09:32 -0400)]
Remove CAMEL_STORE_SUMMARY_IO_LOCK.

Keep this internal to CamelStoreSummary.

10 years agoAdd camel_store_summary_info_unref().
Matthew Barnes [Fri, 16 Aug 2013 13:19:16 +0000 (09:19 -0400)]
Add camel_store_summary_info_unref().

Replaces camel_store_summary_info_free(), although for the moment we'll
retain an alias for backward-compatibility.

Calling a function "free" when it actually only decrements a reference
count is very misleading.

10 years agoRemove CAMEL_STORE_SUMMARY_REF_LOCK.
Matthew Barnes [Fri, 16 Aug 2013 12:52:13 +0000 (08:52 -0400)]
Remove CAMEL_STORE_SUMMARY_REF_LOCK.

Use atomic integer operations to ref/unref a CamelStoreInfo struct.

10 years agoCamelStoreSummary: Remove unused "store_info_chunks" member.
Matthew Barnes [Fri, 16 Aug 2013 12:25:59 +0000 (08:25 -0400)]
CamelStoreSummary: Remove unused "store_info_chunks" member.

This reduces the size of CamelStoreSummary and therefore requires a
libcamel soname bump.

10 years agocamel-store-summary.h readability cleanups.
Matthew Barnes [Fri, 16 Aug 2013 12:18:59 +0000 (08:18 -0400)]
camel-store-summary.h readability cleanups.

10 years agoBug #703181 - Book/calendar backends can authenticate without password
Milan Crha [Fri, 16 Aug 2013 14:17:53 +0000 (16:17 +0200)]
Bug #703181 - Book/calendar backends can authenticate without password

10 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Chao-Hsiung Liao [Fri, 16 Aug 2013 04:47:58 +0000 (12:47 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

10 years agoECalBackendCalDAV: Override the shutdown() class method.
Matthew Barnes [Thu, 15 Aug 2013 21:26:00 +0000 (17:26 -0400)]
ECalBackendCalDAV: Override the shutdown() class method.

Allows us to cleanly shut down the slave thread without blocking in
dispose().  This was apparently also causing problems with GWeakRef,
since weak references are destroyed just prior to dispose().

10 years agoECalBackend: Add a "shutdown" signal.
Matthew Barnes [Thu, 15 Aug 2013 21:03:36 +0000 (17:03 -0400)]
ECalBackend: Add a "shutdown" signal.

The "shutdown" signal is emitted when the last client app destroys its
EClient proxy object for a backend.  This signals the backend to begin
final cleanup tasks such as synchronizing data to permanent storage.

This increases the size of ECalBackendClass, and therefore requires a
libedata-cal soname bump.

10 years agoEBookBackend: Add a "shutdown" signal.
Matthew Barnes [Thu, 15 Aug 2013 21:00:56 +0000 (17:00 -0400)]
EBookBackend: Add a "shutdown" signal.

The "shutdown" signal is emitted when the last client app destroys its
EClient proxy object for a backend.  This signals the backend to begin
final cleanup tasks such as synchronizing data to permanent storage.

This increases the size of EBookBackendClass, and therefore requires a
libedata-book soname bump.

10 years agoEDataCalFactory: Work around a GDBus name watching bug.
Matthew Barnes [Thu, 15 Aug 2013 20:24:52 +0000 (16:24 -0400)]
EDataCalFactory: Work around a GDBus name watching bug.

Calling g_bus_unwatch_name() from a GBusNameVanished callback will
corrupt the function arguments.  Work around this GDBus bug [1] by
unwatching the bus name last in the callback.

[1] https://bugzilla.gnome.org/706088

10 years agoEDataCalFactory: Always watch sender's bus name.
Matthew Barnes [Thu, 15 Aug 2013 19:30:54 +0000 (15:30 -0400)]
EDataCalFactory: Always watch sender's bus name.

Watch the sender's bus name on every new connection so we can clean up
its connections if the bus name vanishes (e.g. client program crashes).

Previously we were only watching the sender's bus name if the backend
instance was created for that connection, but that was unintentional.

10 years agoEDataBookFactory: Work around a GDBus name watching bug.
Matthew Barnes [Thu, 15 Aug 2013 20:14:56 +0000 (16:14 -0400)]
EDataBookFactory: Work around a GDBus name watching bug.

Calling g_bus_unwatch_name() from a GBusNameVanished callback will
corrupt the function arguments.  Work around this GDBus bug [1] by
unwatching the bus name last in the callback.

[1] https://bugzilla.gnome.org/706088

10 years agoEDataBookFactory: Always watch sender's bus name.
Matthew Barnes [Thu, 15 Aug 2013 19:23:20 +0000 (15:23 -0400)]
EDataBookFactory: Always watch sender's bus name.

Watch the sender's bus name on every new connection so we can clean up
its connections if the bus name vanishes (e.g. client program crashes).

Previously we were only watching the sender's bus name if the backend
instance was created for that connection, but that was unintentional.

10 years agoRename imapx_select() to imapx_maybe_select().
Matthew Barnes [Thu, 15 Aug 2013 14:04:12 +0000 (10:04 -0400)]
Rename imapx_select() to imapx_maybe_select().

Just for readability, since the function only actually issues a
SELECT command if it deems it necessary given the current state.

10 years agoGOA: Honor GoaMail's "smtp-use-auth" setting.
Matthew Barnes [Thu, 15 Aug 2013 13:13:57 +0000 (09:13 -0400)]
GOA: Honor GoaMail's "smtp-use-auth" setting.

10 years agoGOA: Handle IMAP/SMTP settings before handling OAuth settings.
Matthew Barnes [Thu, 15 Aug 2013 13:11:58 +0000 (09:11 -0400)]
GOA: Handle IMAP/SMTP settings before handling OAuth settings.

To make sure IMAP/SMTP settings don't override OAuth settings.

10 years agosync_folders: Return FALSE on error.
Matthew Barnes [Thu, 15 Aug 2013 02:06:31 +0000 (22:06 -0400)]
sync_folders: Return FALSE on error.

10 years agoCamelIMAPXCommandFunc: Remove GError parameter and boolean return.
Matthew Barnes [Wed, 14 Aug 2013 11:22:52 +0000 (07:22 -0400)]
CamelIMAPXCommandFunc: Remove GError parameter and boolean return.

Callbacks should allocate a GError on the frame stack and hand it to
camel_imapx_job_take_error() before calling imapx_unregister_job().

10 years agoReturn a GError in camel_imapx_job_wait().
Matthew Barnes [Tue, 13 Aug 2013 19:21:29 +0000 (15:21 -0400)]
Return a GError in camel_imapx_job_wait().

Despite the improvements in commit dacf161, there is still a disconnect
in error propagation between CamelIMAPXCommand and CamelIMAPXJob in that
completed jobs are still not aware of whether they failed.

This commit lays the foundations for another attempt to bridge the gap,
this time by adding a means of setting an error on a CamelIMAPXJob with
camel_imapx_job_take_error().  We also break API in order to return the
error through camel_imapx_job_wait().

New functions:

  camel_imapx_job_take_error()

10 years agoIMAPX: Don't pass GError when not checking for error.
Matthew Barnes [Wed, 14 Aug 2013 17:10:51 +0000 (13:10 -0400)]
IMAPX: Don't pass GError when not checking for error.

Error checking around CamelDB and CamelFolderSummary calls are virtually
non-existent, but that's a mess for another day.  In the meantime, avoid
blindly passing GErrors where we don't bother checking for errors, since
that leads to GError overwrite warnings.

10 years agoIMAPX: duplicate_fetch_or_refresh() cleanups.
Matthew Barnes [Wed, 14 Aug 2013 12:30:07 +0000 (08:30 -0400)]
IMAPX: duplicate_fetch_or_refresh() cleanups.

10 years agoimapx_command_queue() should not be failable.
Matthew Barnes [Wed, 14 Aug 2013 16:46:43 +0000 (12:46 -0400)]
imapx_command_queue() should not be failable.

Same rationale as the previous commit; that merely submitting a command
should always work from the caller's point-of-view, even if it triggers
an out-of-band error in the parser thread.

10 years agoimapx_command_start_next() should not be failable.
Matthew Barnes [Wed, 14 Aug 2013 14:56:26 +0000 (10:56 -0400)]
imapx_command_start_next() should not be failable.

If we fail to stop an in-progress IDLE command, the parser thread and
all unfinished commands will terminate on their own.  Don't propagate
back a GError for this particular failure, because the caller is just
trying to enqueue a new CamelIMAPXCommand and doesn't really know how
to handle the error.

10 years agoimapx_select() should not be failable.
Matthew Barnes [Wed, 14 Aug 2013 13:30:25 +0000 (09:30 -0400)]
imapx_select() should not be failable.

imapx_select() either does nothing or starts a new SELECT command.  But
as per the previous commit, imapx_command_start() is no longer failable,
therefore imapx_select() is also no longer failable.

10 years agoimapx_command_start() should not be failable.
Matthew Barnes [Wed, 14 Aug 2013 13:19:57 +0000 (09:19 -0400)]
imapx_command_start() should not be failable.

This might by why error handling in CamelIMAPXServer is so confusing.

The imapx_command_start() function itself should not be failable.  If an
error occurs while starting the given command, stop the parser thread so
it disconnects from the IMAP server, and embed the GError in the command
structure with camel_imapx_command_failed().

I suspect this will simplify the IMAPX dispatching logic significantly.

10 years agoCamelIMAPXCommandFunc: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 12:16:51 +0000 (08:16 -0400)]
CamelIMAPXCommandFunc: Remove the GCancellable parameter.

No longer needed.

10 years agoimapx_command_queue: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 12:01:40 +0000 (08:01 -0400)]
imapx_command_queue: Remove the GCancellable parameter.

No longer needed.

10 years agoimapx_command_start_next: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:57:52 +0000 (07:57 -0400)]
imapx_command_start_next: Remove the GCancellable parameter.

No longer needed.

10 years agoimapx_stop_idle: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:53:48 +0000 (07:53 -0400)]
imapx_stop_idle: Remove the GCancellable parameter.

No longer needed.

10 years agoimapx_command_idle_stop: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:50:26 +0000 (07:50 -0400)]
imapx_command_idle_stop: Remove the GCancellable parameter.

Use the parser thread's GCancellable, not one from some CamelIMAPXJob.

10 years agoimapx_select: Remove the "forced" parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:41:07 +0000 (07:41 -0400)]
imapx_select: Remove the "forced" parameter.

Only ever TRUE in a chunk of disabled code.

Remove the parameter until we actually need it.

10 years agoimapx_select: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:36:54 +0000 (07:36 -0400)]
imapx_select: Remove the GCancellable parameter.

No longer needed.

10 years agoimapx_command_start: Remove the GCancellable parameter.
Matthew Barnes [Wed, 14 Aug 2013 11:33:55 +0000 (07:33 -0400)]
imapx_command_start: Remove the GCancellable parameter.

Use the parser thread's GCancellable, not one from some CamelIMAPXJob.

10 years agoCamelIMAPXServer: Parser cleanups.
Matthew Barnes [Wed, 14 Aug 2013 10:23:16 +0000 (06:23 -0400)]
CamelIMAPXServer: Parser cleanups.

Move public parser-related members to the private section.

Also, use a GWeakRef to share the parser thread's GCancellable.

10 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Wed, 14 Aug 2013 13:17:57 +0000 (15:17 +0200)]
Updated Norwegian bokmål translation

10 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 14 Aug 2013 12:08:02 +0000 (14:08 +0200)]
Updated Spanish translation

10 years agoCamelIMAPXServer: Silence a debugging message.
Matthew Barnes [Mon, 12 Aug 2013 19:58:22 +0000 (15:58 -0400)]
CamelIMAPXServer: Silence a debugging message.

10 years agoCamelIMAPXServer: Simplify CamelIMAPXCommand reference counting.
Matthew Barnes [Mon, 12 Aug 2013 17:50:02 +0000 (13:50 -0400)]
CamelIMAPXServer: Simplify CamelIMAPXCommand reference counting.

This makes CamelIMAPXCommand reference counting a bit less confusing.

CamelIMAPXJob start() callbacks tend to create a new CamelIMAPXCommand,
hand it off to imapx_command_queue() or imapx_command_run(), but do not
unreference the command before returning.  The callback leaves behind an
unowned CamelIMAPXCommand reference until camel_imapx_command_unref() is
called from the command's own finish() method.

This usage pattern still reflects the time before CamelIMAPXCommand had
a reference count, and was explicitly freed in the finish() method.

To help clarify ownership transfer, the start() callback should release
its CamelIMAPXCommand reference after handing it to imapx_command_queue()
or imapx_command_done() -- each of which takes a new reference -- and the
command's own finish() method should leave the reference count alone.

The CamelIMAPXCommand will finalize itself once it's discarded from the
IMAPX dispatching queue(s).

10 years agoimapx_completion() reference counting cleanups.
Matthew Barnes [Mon, 12 Aug 2013 13:09:19 +0000 (09:09 -0400)]
imapx_completion() reference counting cleanups.

Keep a reference on the CamelIMAPXCommand being completed to ensure it's
not accidentally finalized while still being processed.

10 years agoAdd camel_imapx_command_queue_ref_by_tag().
Matthew Barnes [Mon, 12 Aug 2013 13:43:56 +0000 (09:43 -0400)]
Add camel_imapx_command_queue_ref_by_tag().

Returns a new reference to the CamelIMAPXCommand in the queue with a
matching tag, or NULL if no match is found.

10 years agoIMAPX: Abort commands instead of cancelling jobs on error.
Matthew Barnes [Mon, 12 Aug 2013 10:45:41 +0000 (06:45 -0400)]
IMAPX: Abort commands instead of cancelling jobs on error.

In IMAPX terminology, a "job" executes one or more "commands" on behalf
of an application to accomplish some task on the IMAP server.  Each job
has only one active command at a time.

When the parser loop breaks with an error, distribute the error to all
active and pending commands using camel_imapx_command_failed() instead
of just cancelling their respective jobs.  This allows the commands to
fail gracefully, which will in turn allow the jobs to fail gracefully.

Prior to this, the GError passed to cancel_all_jobs() was simply being
discarded.  The jobs were all cancelled but the commands were allowed to
continue.  This resulted in misinterpreted server responses, local cache
corruption, and all sorts of fun misbehaviors.

10 years agoAdd camel_imapx_command_failed().
Matthew Barnes [Mon, 12 Aug 2013 10:26:24 +0000 (06:26 -0400)]
Add camel_imapx_command_failed().

Sets an error to return in camel_imapx_command_set_error_if_failed().
Call this function if a networking or parsing error occurred to force
all active IMAP commands to abort processing.

10 years agoimapx_step: Add a CamelIMAPXStream parameter.
Matthew Barnes [Mon, 12 Aug 2013 10:03:49 +0000 (06:03 -0400)]
imapx_step: Add a CamelIMAPXStream parameter.

10 years agoimapx_parse_contents: Add a CamelIMAPXStream parameter.
Matthew Barnes [Mon, 12 Aug 2013 09:56:29 +0000 (05:56 -0400)]
imapx_parse_contents: Add a CamelIMAPXStream parameter.

10 years agoimapx_parser_thread: Reacquire the stream on every loop iteration.
Matthew Barnes [Mon, 12 Aug 2013 09:48:35 +0000 (05:48 -0400)]
imapx_parser_thread: Reacquire the stream on every loop iteration.

Set an error if we fail to acquire a CamelIMAPXStream reference.
Once we have a reference, keep it until the next loop iteration.

10 years ago[Maildir] Create the 'tmp' directory, if missing
Milan Crha [Mon, 12 Aug 2013 08:21:08 +0000 (10:21 +0200)]
[Maildir] Create the 'tmp' directory, if missing

If a folder's directory is missing 'tmp' sub-directory, but it has
all the other 'cur' and 'new' directories, then try to create
the 'tmp' to get all three required directories.

It's because some backup tools can drop the 'tmp' directories.

This was reported as: https://bugzilla.redhat.com/show_bug.cgi?id=995702

10 years agoBug #705814 - Crash in certificate_viewer_new()
Milan Crha [Mon, 12 Aug 2013 07:02:13 +0000 (09:02 +0200)]
Bug #705814 - Crash in certificate_viewer_new()

11 years agoUpdated POTFILES.in
Piotr Drąg [Fri, 9 Aug 2013 20:58:26 +0000 (22:58 +0200)]
Updated POTFILES.in

11 years agoBug #700895 - Decode header's value before comparing with RegEx
Milan Crha [Fri, 9 Aug 2013 16:49:49 +0000 (18:49 +0200)]
Bug #700895 - Decode header's value before comparing with RegEx

11 years agoBug #704688 - HTTP Backend: Don't authenticate unnecessarily
Milan Crha [Fri, 9 Aug 2013 08:10:11 +0000 (10:10 +0200)]
Bug #704688 - HTTP Backend: Don't authenticate unnecessarily

11 years agoRemove unused CamelOfflineJournal.
Matthew Barnes [Fri, 9 Aug 2013 05:15:44 +0000 (07:15 +0200)]
Remove unused CamelOfflineJournal.

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Thu, 8 Aug 2013 19:25:59 +0000 (21:25 +0200)]
Updated Norwegian bokmål translation

11 years agoFix build
Kjartan Maraas [Thu, 8 Aug 2013 19:23:38 +0000 (21:23 +0200)]
Fix build

11 years agoBug #705288 - Custom header search produces error
Milan Crha [Thu, 8 Aug 2013 15:07:32 +0000 (17:07 +0200)]
Bug #705288 - Custom header search produces error

11 years agoAdd camel_imapx_folder_process_status_response().
Matthew Barnes [Thu, 8 Aug 2013 13:12:42 +0000 (15:12 +0200)]
Add camel_imapx_folder_process_status_response().

Updates the folder's local status information from the STATUS response.

11 years agoAdd CamelIMAPXStatusResponse.
Matthew Barnes [Thu, 8 Aug 2013 08:46:34 +0000 (10:46 +0200)]
Add CamelIMAPXStatusResponse.

Represents an IMAP STATUS response.

Replaces the "state_info" struct and associated functions.

New functions:

  camel_imapx_status_response_new()
  camel_imapx_status_response_get_mailbox()
  camel_imapx_status_response_get_messages()
  camel_imapx_status_response_get_recent()
  camel_imapx_status_response_get_uidnext()
  camel_imapx_status_response_get_uidvalidity()
  camel_imapx_status_response_get_unseen()
  camel_imapx_status_response_get_highestmodseq()

Removed functions:

  imapx_parse_status_info()

11 years ago[Camel] Disable SSL v2 and weak ciphers by default
Milan Crha [Thu, 8 Aug 2013 12:36:10 +0000 (14:36 +0200)]
[Camel] Disable SSL v2 and weak ciphers by default

The change for disabled weak ciphers require at least NSS 3.14, thus
weak ciphers are enabled, if it's compiled with older NSS. In case
any server will require either weak ciphers or SSL v2 (while there
really should not anyone use it these days), then two environment
variables were added:

   CAMEL_SSL_V2_ENABLE=1 - to have SSL v2 enabled, otherwise it's disabled,
       regardless what camel providers request (they usually request v2 and
       v3 together)

   CAMEL_SSL_WEAK_CIPHERS=1 - to enable weak ciphers, almost the same as
       before; otherwise these are disabled and only those covered by
       NSS_SetDomesticPolicy() are enabled

These are added to the group of one for SSL V2 compatible hello:

   CAMEL_SSL_V2_HELLO=1 - to force SSL v2 compatible hello on SSL connections

11 years agoBug #705617 - Failed connection hides offline data in online mode
Milan Crha [Thu, 8 Aug 2013 11:46:44 +0000 (13:46 +0200)]
Bug #705617 - Failed connection hides offline data in online mode

Do not call "connect" when changing online state in 'connecting' state,
and similar for "disconnect", to prevent a deadlock, if this change is
called within "connect" or "disconnect" function itself.