aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-29 03:31:45 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-29 03:31:45 +0800
commitfe8cf8c71d99d823d40bf09059e8312399d8e85e (patch)
treed04632e150f6ee144ff1725f0ca323128a46f22a /mail
parent2c06d4b09c0e53ee04d5f3a5277393e6f3a8c241 (diff)
downloadgsoc2013-evolution-fe8cf8c71d99d823d40bf09059e8312399d8e85e.tar.gz
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')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c22
2 files changed, 16 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8cd76d1c1c..52234c4d2e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2000-08-28 Peter Williams <peterw@helixcode.com>
* mail-ops.c (do_transfer_messages): Add status messages.
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);
}