diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-04-23 10:15:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-04-23 10:15:45 +0800 |
commit | dfc8e2ad3f8f0ce91c16a6538e28491699b0bc99 (patch) | |
tree | 945e6c2a77ac77d02038ce3ecd423c8a19a26660 /mail/mail-callbacks.c | |
parent | 29b0f2cffcc43b4d0d6ebf194ed8bc17fccd777f (diff) | |
download | gsoc2013-evolution-dfc8e2ad3f8f0ce91c16a6538e28491699b0bc99.tar.gz gsoc2013-evolution-dfc8e2ad3f8f0ce91c16a6538e28491699b0bc99.tar.zst gsoc2013-evolution-dfc8e2ad3f8f0ce91c16a6538e28491699b0bc99.zip |
Only set the X-Evolution-* header if that value is non-NULL.
2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_get_message): Only set the
X-Evolution-* header if that value is non-NULL.
* mail-ops.c (mail_send_message): Lets do proper refcounting on
the sent-folder. Also, g_strdup() the sent_folder_uri since we
later free it. If we don't, then we get lovely corrupt memory.
svn path=/trunk/; revision=9498
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 871a63325e..b59e4efcb2 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -330,9 +330,17 @@ composer_get_message (EMsgComposer *composer) /* Add info about the sending account */ account = e_msg_composer_get_preferred_account (composer); if (account) { - camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Account", account->name); - camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", account->transport->url); - camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri); + if (account->name) + camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Account", + account->name); + + if (account->transport && account->transport->url) + camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", + account->transport->url); + + if (account->sent_folder_uri) + camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", + account->sent_folder_uri); } return message; |