aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2002-10-28 17:16:05 +0800
committerLarry Ewing <lewing@src.gnome.org>2002-10-28 17:16:05 +0800
commit529b6c87c3341d6249a65cd092d0244c704f6aa0 (patch)
treee286dc7bf2a02bcc9a4f3867a8ca3ad5b1e84f32 /mail
parentc8498cbd6164f48558f62a3bc970f419f9102227 (diff)
downloadgsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.gz
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.zst
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.zip
don't queue the action until we've added ourselves to the active list,
2002-10-27 Larry Ewing <lewing@ximian.com> * mail-display.c (fetch_next): don't queue the action until we've added ourselves to the active list, because the fetch_done callback can fire immediately and we'll end up queueing something that has already been destroyed. svn path=/trunk/; revision=18452
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-display.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 30f5853f50..36bd3749c8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-27 Larry Ewing <lewing@ximian.com>
+
+ * mail-display.c (fetch_next): don't queue the action until we've
+ added ourselves to the active list, because the fetch_done
+ callback can fire immediately and we'll end up queueing something
+ that has already been destroyed.
+
2002-10-24 Jeffrey Stedfast <fejj@ximian.com>
Update the upgrade script to handle the new url format introduced
diff --git a/mail/mail-display.c b/mail/mail-display.c
index df71ddb368..c088323f56 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1327,13 +1327,15 @@ static void fetch_next(MailDisplay *md)
&& (rd = (struct _remote_data *)e_dlist_remhead(&p->fetch_queue))) {
ctx = soup_context_get(rd->uri);
- rd->msg = msg = soup_message_new(ctx, SOUP_METHOD_GET);
- soup_context_unref(ctx);
+ rd->msg = msg = soup_message_new(ctx, SOUP_METHOD_GET);
+
+ if (ctx)
+ soup_context_unref(ctx);
+
soup_message_set_flags(msg, SOUP_MESSAGE_OVERWRITE_CHUNKS);
soup_message_add_handler(msg, SOUP_HANDLER_BODY_CHUNK, fetch_data, rd);
- soup_message_queue(msg, fetch_done, rd);
-
e_dlist_addtail(&p->fetch_active, (EDListNode *)rd);
+ soup_message_queue(msg, fetch_done, rd);
}
}