Patch: small fix to avoid a lock joining the imap idle thread
- From: José Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Patch: small fix to avoid a lock joining the imap idle thread
- Date: Wed, 02 Jul 2008 12:23:04 +0200
Hi,
Following the patches for removing threads on closing tinymail, this is
a fix for them.
This should avoid trying to join the thread inside the thread loop
(happened when disconnect was called inside it).
Changelog would be:
* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c:
* Avoid joining idle_thread from itself causing a crash/lock.
--
José Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c (revision 3714)
+++ libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c (working copy)
@@ -4247,7 +4247,7 @@
if ((store->capabilities & IMAP_CAPABILITY_IDLE))
{
g_static_rec_mutex_lock (store->idle_t_lock);
- if (store->in_idle && store->idle_thread) {
+ if (store->in_idle && store->idle_thread && (g_thread_self () != store->idle_thread)) {
IdleResponse *idle_resp = NULL;
store->idle_cont = FALSE;
idle_resp = g_thread_join (store->idle_thread);
@@ -4311,7 +4311,7 @@
g_static_rec_mutex_lock (store->idle_t_lock);
- if (!store->in_idle && store->idle_thread) {
+ if (!store->in_idle && store->idle_thread && (g_thread_self () != store->idle_thread)) {
IdleResponse *idle_resp = NULL;
store->idle_cont = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]