aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-sync-stream.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-28 10:31:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-28 23:24:49 +0800
commit2c4510e858fcf96e8f3d02f3f92564460752e983 (patch)
tree777c673d5fdaf649fb1c9eabd9357eac622b15f6 /mail/em-sync-stream.c
parent3fe8269156da1b57b0fc7391f5cf07cab6f61606 (diff)
parent067ef5580fc287809958d4503691bfcba2b29ee5 (diff)
downloadgsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar.gz
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar.bz2
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar.lz
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar.xz
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.tar.zst
gsoc2013-evolution-2c4510e858fcf96e8f3d02f3f92564460752e983.zip
Merge commit 'EVOLUTION_2_27_5' into kill-bonobo
Diffstat (limited to 'mail/em-sync-stream.c')
-rw-r--r--mail/em-sync-stream.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 7e93b33dde..982a56c90a 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -89,6 +89,7 @@ emss_process_message (struct _write_msg *msg)
break;
}
+ emss->idle_id = 0;
e_flag_set (msg->done);
return FALSE;
@@ -108,7 +109,9 @@ emss_sync_op (EMSyncStream *emss, enum _write_msg_t op,
camel_object_ref (emss);
- g_idle_add ((GSourceFunc) emss_process_message, &msg);
+ if (emss->idle_id)
+ g_source_remove (emss->idle_id);
+ emss->idle_id = g_idle_add ((GSourceFunc) emss_process_message, &msg);
e_flag_wait (msg.done);
e_flag_free (msg.done);
@@ -162,6 +165,8 @@ emss_stream_close (CamelStream *stream)
if (emss->cancel)
return -1;
+ emss->idle_id = 0;
+
if (mail_in_main_thread ())
return EMSS_CLASS (emss)->sync_close (stream);
else
@@ -187,6 +192,8 @@ em_sync_stream_finalize (EMSyncStream *emss)
{
if (emss->buffer != NULL)
g_string_free (emss->buffer, TRUE);
+ if (emss->idle_id)
+ g_source_remove (emss->idle_id);
}
CamelType