aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-05-22 20:00:14 +0800
committerSrinivasa Ragavan <sragavan@novell.com>2009-05-22 20:13:57 +0800
commit6d70e07d0842496327e1ca74f93047693ddc545c (patch)
tree01b40699c5371af70e97c81f3918eda6e3ae7ec1 /mail/mail-ops.c
parentff25805086bbd20226e4684f028912bdb29f0ae1 (diff)
downloadgsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar.gz
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar.bz2
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar.lz
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar.xz
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.tar.zst
gsoc2013-evolution-6d70e07d0842496327e1ca74f93047693ddc545c.zip
Mail changes required for Anjal.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 6feadd5b9c..24628a5f91 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -72,6 +72,8 @@
#define w(x)
#define d(x)
+extern const char *x_mailer;
+
/* used for both just filtering a folder + uid's, and for filtering a whole folder */
/* used both for fetching mail, and for filtering mail */
struct _filter_mail_msg {
@@ -461,7 +463,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
if (!message)
return;
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
+ camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer);
err = g_string_new("");
xev = mail_tool_remove_xevolution_headers (message);
@@ -918,8 +920,7 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
if (!camel_medium_get_header (CAMEL_MEDIUM (message), "X-Mailer"))
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer",
- "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
+ camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer);
m = mail_msg_new (&append_mail_info);
m->folder = folder;
@@ -1878,7 +1879,7 @@ typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage
static void
get_messagex_done (struct _get_message_msg *m)
{
- if (m->done) {
+ if (m->done && !camel_operation_cancel_check (m->cancel)) {
get_done done = (get_done)m->done;
done(m->folder, m->uid, m->message, m->data, &m->base.ex);
}
@@ -1894,7 +1895,7 @@ static MailMsgInfo get_messagex_info = {
/* This is temporary, to avoid having to rewrite everything that uses
mail_get_message; it adds an exception argument to the callback */
-void
+CamelOperation *
mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
void *data, MailMsgDispatchFunc dispatch)
{
@@ -1909,6 +1910,8 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
+
+ return m->cancel;
}
/* ********************************************************************** */