aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-11-17 11:32:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-11-17 11:32:41 +0800
commitf71a064770e324fb61d4e595151184c94d3f90d1 (patch)
tree9bf3e1327e0a034cddf7c92d74e8e7d724b8f17c /mail/mail-ops.c
parent4daa7491aad977c5fa705076e3ca9b80e51b3ab5 (diff)
downloadgsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar.gz
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar.bz2
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar.lz
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar.xz
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.tar.zst
gsoc2013-evolution-f71a064770e324fb61d4e595151184c94d3f90d1.zip
thin wrapper on mail_component_get_local_inbox.
2003-11-17 Not Zed <NotZed@Ximian.com> * mail-tools.c (mail_tool_get_local_inbox): thin wrapper on mail_component_get_local_inbox. * mail-component.c (mail_component_get_local_inbox): helper to get the default local inbox. * mail-ops.c (fetch_mail_fetch): if we can't get the inbox, make sure we still unref the filter driver here by using hte same exit code. Fixes a crash. svn path=/trunk/; revision=23377
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index b7aad2e55b..7174ea1b71 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -270,15 +270,12 @@ fetch_mail_fetch (struct _mail_msg *mm)
struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
struct _filter_mail_msg *fm = (struct _filter_mail_msg *)mm;
int i;
-
+
if (m->cancel)
camel_operation_register (m->cancel);
- if ((fm->destination = mail_tool_get_local_inbox (&mm->ex)) == NULL) {
- if (m->cancel)
- camel_operation_unregister (m->cancel);
- return;
- }
+ if ((fm->destination = mail_tool_get_local_inbox (&mm->ex)) == NULL)
+ goto fail;
/* FIXME: this should support keep_on_server too, which would then perform a spool
access thingy, right? problem is matching raw messages to uid's etc. */
@@ -355,7 +352,7 @@ fetch_mail_fetch (struct _mail_msg *mm)
fm->source_folder = NULL;
}
}
-
+fail:
if (m->cancel)
camel_operation_unregister (m->cancel);
@@ -372,7 +369,7 @@ static void
fetch_mail_fetched (struct _mail_msg *mm)
{
struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
-
+
if (m->done)
m->done (m->source_uri, m->data);
}
@@ -385,7 +382,7 @@ fetch_mail_free (struct _mail_msg *mm)
g_free (m->source_uri);
if (m->cancel)
camel_operation_unref (m->cancel);
-
+
filter_folder_free (mm);
}
@@ -417,7 +414,7 @@ mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation
}
m->done = done;
m->data = data;
-
+
fm->driver = camel_session_get_filter_driver (session, type, NULL);
camel_filter_driver_set_folder_func (fm->driver, get_folder, get_data);
if (status)