diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 18 | ||||
-rw-r--r-- | mail/mail-callbacks.h | 2 | ||||
-rw-r--r-- | mail/mail-ops.c | 6 |
4 files changed, 19 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index dc6ed7bc37..bfbb44d7f1 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,7 @@ +2001-02-11 Jeffrey Stedfast <fejj@ximian.com> + + * mail-callbacks.c (forward_inlined): Don't leak memory. + 2001-02-10 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (list_add_addresses): Check the full list of diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 5546e85b60..aba7bee2ac 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -753,8 +753,8 @@ do_forward_attach(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, } } -void -forward_messages(CamelFolder *folder, GPtrArray *uids, int doinline) +static void +forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean doinline) { if (doinline && uids->len == 1) { mail_get_message(folder, uids->pdata[0], do_forward_inline, NULL, mail_thread_new); @@ -766,15 +766,17 @@ forward_messages(CamelFolder *folder, GPtrArray *uids, int doinline) void forward_inlined (GtkWidget *widget, gpointer user_data) { + FolderBrowser *fb = FOLDER_BROWSER (user_data); GPtrArray *uids; - FolderBrowser *fb = (FolderBrowser *)user_data; - + if (!check_send_configuration (fb)) return; - - uids = g_ptr_array_new(); - g_ptr_array_add(uids, g_strdup (fb->message_list->cursor_uid)); - forward_messages(fb->message_list->folder, uids, TRUE); + + uids = g_ptr_array_new (); + g_ptr_array_add (uids, g_strdup (fb->message_list->cursor_uid)); + forward_messages (fb->message_list->folder, uids, TRUE); + g_free (uids->pdata[0]); + g_ptr_array_free (uids, TRUE); } void diff --git a/mail/mail-callbacks.h b/mail/mail-callbacks.h index 742df91121..65bf480227 100644 --- a/mail/mail-callbacks.h +++ b/mail/mail-callbacks.h @@ -79,7 +79,7 @@ void mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const ch void composer_send_cb (EMsgComposer *composer, gpointer data); void composer_postpone_cb (EMsgComposer *composer, gpointer data); -void forward_messages (CamelFolder *folder, GPtrArray *uids, int inline); +void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean inline); void mail_print_preview_msg (MailDisplay *md); void mail_print_msg (MailDisplay *md); diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 48443f3d7c..77a140aaf4 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1562,7 +1562,9 @@ static struct _mail_msg_op get_messages_op = { }; void -mail_get_messages(CamelFolder *folder, GPtrArray *uids, void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data), void *data) +mail_get_messages(CamelFolder *folder, GPtrArray *uids, + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data), + void *data) { struct _get_messages_msg *m; @@ -1608,7 +1610,7 @@ runcleanup(GIOChannel *source, GIOCondition cond, void *d) { struct _op_data *o = d; - printf("ggot notification, blup\n"); + printf("got notification, blup\n"); o->op->cleanup(o->in, o->out, o->ex); |