diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-08-29 03:31:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-08-29 03:31:45 +0800 |
commit | fe8cf8c71d99d823d40bf09059e8312399d8e85e (patch) | |
tree | d04632e150f6ee144ff1725f0ca323128a46f22a /mail/mail-callbacks.c | |
parent | 2c06d4b09c0e53ee04d5f3a5277393e6f3a8c241 (diff) | |
download | gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.gz gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.bz2 gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.lz gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.xz gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.zst gsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.zip |
Free the from address when we're done with it. Also,
2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
* mail-callbacks.c (composer_send_cb): Free the from address when
we're done with it. Also, e_msg_composer_hdrs_get_from returns
alloc'd memory so don't strdup it.
svn path=/trunk/; revision=5083
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 90dd3d3ab9..f67557022b 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -215,17 +215,15 @@ composer_send_cb (EMsgComposer *composer, gpointer data) MailConfigService *xport = NULL; CamelMimeMessage *message; const char *subject; - struct post_send_data *psd = data; - + /* Config info */ - id = mail_config_get_default_identity (); xport = mail_config_get_transport (); - - /* Generate our from address */ - from = g_strdup (e_msg_composer_hdrs_get_from (E_MSG_COMPOSER_HDRS (composer->hdrs))); + /* Generate our from address */ + /* FIXME: we shouldn't need this code anymore as it's taken care of in the composer */ + from = e_msg_composer_hdrs_get_from (E_MSG_COMPOSER_HDRS (composer->hdrs)); if (!from) { CamelInternetAddress *ciaddr; @@ -236,20 +234,18 @@ composer_send_cb (EMsgComposer *composer, gpointer data) } /* Get the message */ - message = e_msg_composer_get_message (composer); - + /* Check for no subject */ - subject = camel_mime_message_get_subject (message); if (subject == NULL || subject[0] == '\0') { - if (! ask_confirm_for_empty_subject (composer)) { + if (!ask_confirm_for_empty_subject (composer)) { camel_object_unref (CAMEL_OBJECT (message)); free_psd (psd); /* will take care of psd == NULL */ return; } } - + if (psd) { mail_do_send_mail (xport->url, message, from, psd->folder, psd->uid, psd->flags, @@ -259,7 +255,9 @@ composer_send_cb (EMsgComposer *composer, gpointer data) NULL, NULL, 0, GTK_WIDGET (composer)); } - + + g_free (from); + free_psd (psd); } |