summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pielmeier <billie@gentoo.org>2013-01-11 18:14:42 +0000
committerDaniel Pielmeier <billie@gentoo.org>2013-01-11 18:14:42 +0000
commit5c8c0ade69f3f1985053452d227fb581b7e76359 (patch)
tree7359a824b3e5109df011113b16deb854a0ddd419 /app-admin/conky
parentWorkaround python-3.3 sandbox issue bug #364877, patch by chutzpah (fixes bug... (diff)
downloadgentoo-2-5c8c0ade69f3f1985053452d227fb581b7e76359.tar.gz
gentoo-2-5c8c0ade69f3f1985053452d227fb581b7e76359.tar.bz2
gentoo-2-5c8c0ade69f3f1985053452d227fb581b7e76359.zip
Add patch missing from the previous commit.
(Portage version: 2.1.11.31/cvs/Linux i686, signed Manifest commit with key 215AD14D)
Diffstat (limited to 'app-admin/conky')
-rw-r--r--app-admin/conky/ChangeLog6
-rw-r--r--app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch75
2 files changed, 80 insertions, 1 deletions
diff --git a/app-admin/conky/ChangeLog b/app-admin/conky/ChangeLog
index 6f151375a027..21bbe415be18 100644
--- a/app-admin/conky/ChangeLog
+++ b/app-admin/conky/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/conky
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/conky/ChangeLog,v 1.196 2013/01/11 18:10:36 billie Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/conky/ChangeLog,v 1.197 2013/01/11 18:14:42 billie Exp $
+
+ 11 Jan 2013; Daniel Pielmeier <billie@gentoo.org>
+ +files/conky-1.9.0-update-when-message-count-decreases.patch:
+ Add patch missing from the previous commit.
*conky-1.9.0-r2 (11 Jan 2013)
diff --git a/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch b/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch
new file mode 100644
index 000000000000..dd422c584e35
--- /dev/null
+++ b/app-admin/conky/files/conky-1.9.0-update-when-message-count-decreases.patch
@@ -0,0 +1,75 @@
+diff --git a/src/mail.c b/src/mail.c
+index 7f60ba3..882b7c8 100644
+--- a/src/mail.c
++++ b/src/mail.c
+@@ -630,8 +630,15 @@ int imap_check_status(char *recvbuf, struct mail_s *mail)
+
+ void imap_unseen_command(struct mail_s *mail, unsigned long old_unseen, unsigned long old_messages)
+ {
+- if (strlen(mail->command) > 1 && (mail->unseen > old_unseen
+- || (mail->messages > old_messages && mail->unseen > 0))) {
++ /*
++ * Georg Hopp (2012-12-23):
++ * Well, i will read mails from time to time and i want the unseen
++ * count to be reduced when they are read...so, this seems wrong.
++ * Try a better one.... :)
++ */
++ if (strlen(mail->command) > 1
++ && (mail->unseen != old_unseen
++ || mail->messages != old_messages)) {
+ // new mail goodie
+ if (system(mail->command) == -1) {
+ perror("system()");
+@@ -813,7 +820,7 @@ static void *imap_thread(void *arg)
+ if (strlen(recvbuf) > 2) {
+ unsigned long messages, recent = 0;
+ char *buf = recvbuf;
+- char force_check = 0;
++ char force_check = 1;
+ buf = strstr(buf, "EXISTS");
+ while (buf && strlen(buf) > 1 && strstr(buf + 1, "EXISTS")) {
+ buf = strstr(buf + 1, "EXISTS");
+@@ -825,9 +832,7 @@ static void *imap_thread(void *arg)
+ }
+ if (sscanf(buf, "* %lu EXISTS\r\n", &messages) == 1) {
+ timed_thread_lock(mail->p_timed_thread);
+- if (mail->messages != messages) {
+- force_check = 1;
+- }
++ force_check = 1;
+ timed_thread_unlock(mail->p_timed_thread);
+ }
+ }
+@@ -850,7 +855,10 @@ static void *imap_thread(void *arg)
+ * something other than 0, or we had a timeout
+ */
+ buf = recvbuf;
+- if (recent > 0 || (buf && strstr(buf, " FETCH ")) || fetchtimeout.tv_sec == 0 || force_check) {
++ if (recent > 0
++ || (buf && strstr(buf, " FETCH "))
++ || (buf && strstr(buf, " EXPUNGE "))
++ || fetchtimeout.tv_sec == 0 || force_check) {
+ // re-check messages and unseen
+ if (imap_command(sockfd, "DONE\r\n", recvbuf, "a5 OK")) {
+ fail++;
+@@ -868,6 +876,9 @@ static void *imap_thread(void *arg)
+ fail++;
+ break;
+ }
++ imap_unseen_command(mail, old_unseen, old_messages);
++ old_unseen = mail->unseen;
++ old_messages = mail->messages;
+ strncpy(sendbuf, "a5 IDLE\r\n", MAXDATASIZE);
+ if (imap_command(sockfd, sendbuf, recvbuf, "+ idling")) {
+ fail++;
+@@ -886,10 +897,7 @@ static void *imap_thread(void *arg)
+ fail++;
+ break;
+ }
+- imap_unseen_command(mail, old_unseen, old_messages);
+ fail = 0;
+- old_unseen = mail->unseen;
+- old_messages = mail->messages;
+ }
+ if (fail) break;
+ } else {