[balsa] Clear an idle callback id before returning
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Clear an idle callback id before returning
- Date: Fri, 10 Mar 2017 17:38:26 +0000 (UTC)
commit cfd2e3758204ab44c69a4c9e76f5c29e356f9d66
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Mar 10 12:36:35 2017 -0500
Clear an idle callback id before returning
* libbalsa/mailbox_local.c (lbml_load_messages_idle_cb): clear
load_messages_id even when returning early.
ChangeLog | 5 +++++
libbalsa/mailbox_local.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fd4c4c9..b9322a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2017-03-10 Peter Bloomfield <pbloomfield bellsouth net>
+ * libbalsa/mailbox_local.c (lbml_load_messages_idle_cb): clear
+ load_messages_id even when returning early.
+
+2017-03-10 Peter Bloomfield <pbloomfield bellsouth net>
+
Lock mailbox while accessing an idle callback id
* libbalsa/mailbox.c (lbm_need_threading_idle_cb),
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index d68a5cb..279ef99 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -1044,6 +1044,8 @@ lbml_load_messages_idle_cb(LibBalsaMailbox * mailbox)
guint);
libbalsa_lock_mailbox(mailbox);
+ local = (LibBalsaMailboxLocal *) mailbox;
+ local->load_messages_id = 0;
gdk_threads_enter();
if (!mailbox->msg_tree) {
@@ -1053,7 +1055,6 @@ lbml_load_messages_idle_cb(LibBalsaMailbox * mailbox)
return FALSE;
}
- local = (LibBalsaMailboxLocal *) mailbox;
lastno = libbalsa_mailbox_total_messages(mailbox);
msgno = local->msgno;
new_messages = lastno - msgno;
@@ -1078,7 +1079,6 @@ lbml_load_messages_idle_cb(LibBalsaMailbox * mailbox)
unread_messages > 0);
}
- local->load_messages_id = 0;
libbalsa_unlock_mailbox(mailbox);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]