aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/mail-config.c4
-rw-r--r--mail/mail-ops.c11
-rw-r--r--mail/mail-send-recv.c17
4 files changed, 36 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3365d0bf31..9ba2e19933 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,18 @@
+2001-08-07 Not Zed <NotZed@Ximian.com>
+
+ * mail-config.c (mail_config_get_thread_list): Free the dbkey if
+ we found the config option.
+
+ * mail-send-recv.c (build_dialogue): Free the pretty_url after
+ we've used it.
+ (free_send_info): Free the 'what' string.
+ (receive_done): Use free_send_info to make sure we free
+ everything.
+
+ * mail-ops.c (send_queue_free): Unref the filter driver when done.
+ (send_queue_send): Unref the driver here too, force any long
+ taking operations to run in our thread.
+
2001-08-07 Peter Williams <peterw@ximian.com>
* Revert Jeff's changes to subscribe-dialog.[ch]. It's not a widget,
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 40d0fc8cbc..7002a20584 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -973,8 +973,10 @@ mail_config_get_thread_list (const char *uri)
GINT_TO_POINTER (value));
return value;
- } else
+ } else {
+ g_free(dbkey);
return GPOINTER_TO_INT (val);
+ }
}
/* return the default value */
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index bf3427c2b2..0f404af174 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -724,12 +724,17 @@ send_queue_send(struct _mail_msg *mm)
camel_folder_set_message_flags (m->queue, uids->pdata[i], CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
}
-
+
if (camel_exception_is_set (&mm->ex))
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d of %d"), i+1, uids->len);
else
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Complete."));
-
+
+ if (m->driver) {
+ camel_object_unref((CamelObject *)m->driver);
+ m->driver = NULL;
+ }
+
camel_folder_free_uids (m->queue, uids);
if (!camel_exception_is_set (&mm->ex))
@@ -756,6 +761,8 @@ send_queue_free(struct _mail_msg *mm)
{
struct _send_queue_msg *m = (struct _send_queue_msg *)mm;
+ if (m->driver)
+ camel_object_unref((CamelObject *)m->driver);
camel_object_unref((CamelObject *)m->queue);
g_free(m->destination);
if (m->cancel)
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index d0fed294b4..7012b5fd35 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -158,6 +158,7 @@ static void free_send_info(void *key, struct _send_info *info, void *data)
camel_operation_unref(info->cancel);
if (info->timeout_id != 0)
gtk_timeout_remove(info->timeout_id);
+ g_free(info->what);
g_free(info);
}
@@ -299,9 +300,11 @@ static struct _send_data *build_dialogue(GSList *sources, CamelFolder *outbox, c
info->timeout_id = gtk_timeout_add(STATUS_TIMEOUT, operation_status_timeout, info);
recv_icon = gnome_pixmap_new_from_file(EVOLUTION_BUTTONSDIR "/receive-24.png");
+
pretty_url = format_url(source->url);
-
label = (GtkLabel *)gtk_label_new(pretty_url);
+ g_free(pretty_url);
+
bar = (GtkProgressBar *)gtk_progress_bar_new();
gtk_progress_set_show_text((GtkProgress *)bar, FALSE);
stop = (GtkButton *)gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL);
@@ -350,10 +353,12 @@ static struct _send_data *build_dialogue(GSList *sources, CamelFolder *outbox, c
} else if (info->timeout_id == 0)
info->timeout_id = gtk_timeout_add(STATUS_TIMEOUT, operation_status_timeout, info);
- pretty_url = format_url(destination);
-
send_icon = gnome_pixmap_new_from_file(EVOLUTION_BUTTONSDIR "/send-24.png");
+
+ pretty_url = format_url(destination);
label = (GtkLabel *)gtk_label_new(pretty_url);
+ g_free(pretty_url);
+
bar = (GtkProgressBar *)gtk_progress_bar_new();
stop = (GtkButton *)gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL);
status_label = (GtkLabel *)gtk_label_new(_("Waiting..."));
@@ -514,10 +519,6 @@ receive_done (char *uri, void *data)
d(printf("%s: freeing info %p\n", __FUNCTION__, info));
g_hash_table_remove(info->data->active, info->uri);
info->data->infos = g_list_remove(info->data->infos, info);
- g_free(info->uri);
- camel_operation_unref(info->cancel);
- if (info->timeout_id)
- gtk_timeout_remove(info->timeout_id);
if (g_hash_table_size(info->data->active) == 0) {
if (info->data->gd)
@@ -525,7 +526,7 @@ receive_done (char *uri, void *data)
free_send_data();
}
- g_free(info);
+ free_send_info(NULL, info, NULL);
}
/* same for updating */