diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-08-12 20:58:50 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-12 23:44:37 +0800 |
commit | 6be2668e483cfc7a2e75ae2efcd9675388d08601 (patch) | |
tree | 3f0d28830d54da205467bf973eea9895f8003b35 /shell | |
parent | 6456e814fae763ecd9dbdbe4d3caa952ddca0a3d (diff) | |
download | gsoc2013-evolution-6be2668e483cfc7a2e75ae2efcd9675388d08601.tar.gz gsoc2013-evolution-6be2668e483cfc7a2e75ae2efcd9675388d08601.tar.zst gsoc2013-evolution-6be2668e483cfc7a2e75ae2efcd9675388d08601.zip |
Adapt to CamelSession API changes.
These functions now return new references:
camel_session_add_service()
camel_session_list_services()
These functions have been renamed and also return new references:
camel_session_get_service() -> camel_session_ref_service()
camel_session_get_service_by_url() -> camel_session_ref_service_by_url()
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-convert-local-mail.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c index 02d7e094e4..16736c95c4 100644 --- a/shell/e-convert-local-mail.c +++ b/shell/e-convert-local-mail.c @@ -183,8 +183,8 @@ migrate_mbox_to_maildir (EShell *shell, ESourceRegistry *registry; ESourceExtension *extension; const gchar *extension_name; - CamelService *mbox_service; - CamelService *maildir_service; + CamelService *mbox_service = NULL; + CamelService *maildir_service = NULL; CamelSettings *settings; const gchar *data_dir; const gchar *mbox_uid; @@ -227,11 +227,18 @@ migrate_mbox_to_maildir (EShell *shell, CAMEL_PROVIDER_STORE, &error); if (error != NULL) { + if (mbox_service != NULL) + g_object_unref (mbox_service); + if (maildir_service != NULL) + g_object_unref (maildir_service); g_warning ("%s: %s", G_STRFUNC, error->message); g_error_free (error); return FALSE; } + g_return_val_if_fail (CAMEL_IS_STORE (mbox_service), FALSE); + g_return_val_if_fail (CAMEL_IS_STORE (maildir_service), FALSE); + camel_service_set_settings (mbox_service, settings); settings = camel_service_get_settings (maildir_service); @@ -249,6 +256,9 @@ migrate_mbox_to_maildir (EShell *shell, while (!ms.complete) g_main_context_iteration (NULL, TRUE); + g_object_unref (mbox_service); + g_object_unref (maildir_service); + return TRUE; } |