aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-ops.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 10d300ff27..d932e9bd33 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
+ * mail-ops.c (do_fetch_mail): Updated to not send hook/unhook data
+ to filter_driver_run as it no longer takes those args.
+ (do_filter_ondemand): Same. Also wrap filtering in freeze/thaw to
+ prevent signals from being queued up
+
+2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
+
* mail-ops.c (do_fetch_mail): Freeze the default folder before
filtering and thaw it afterward to prevent a ton of
"folder_changed" signals from being queued.
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 0335910259..271fc578bb 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -180,7 +180,6 @@ do_fetch_mail (gpointer in_data, gpointer op_data, CamelException *ex)
filter_driver_run (filter, message, info,
input->destination, FILTER_SOURCE_INCOMING,
- input->hook_func, input->hook_data,
TRUE, ex);
if (free_info)
@@ -347,6 +346,9 @@ do_filter_ondemand (gpointer in_data, gpointer op_data, CamelException *ex)
int i;
uids = camel_folder_get_uids (input->source);
+
+ camel_folder_freeze (input->source);
+
for (i = 0; i < uids->len; i++) {
CamelMimeMessage *message;
CamelMessageInfo *info;
@@ -366,7 +368,7 @@ do_filter_ondemand (gpointer in_data, gpointer op_data, CamelException *ex)
}
filtered = filter_driver_run (input->driver, message, info, NULL,
- FILTER_SOURCE_DEMAND, NULL, NULL, TRUE, ex);
+ FILTER_SOURCE_DEMAND, TRUE, ex);
if (free_info)
camel_message_info_free (info);
@@ -385,6 +387,9 @@ do_filter_ondemand (gpointer in_data, gpointer op_data, CamelException *ex)
}
camel_folder_sync (input->source, TRUE, ex);
+
+ camel_folder_thaw (input->source);
+
camel_folder_free_uids (input->source, uids);
data->empty = FALSE;