From ed3deacaaf9467b51377120343503567dad9e231 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 21 Apr 2009 10:47:27 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mutt?expand=0&rev=14 --- mutt-1.5.19-msgcount.dif | 109 +++++++++++++++++++++++++++++++++++++++ mutt.changes | 5 ++ mutt.spec | 12 +++-- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 mutt-1.5.19-msgcount.dif diff --git a/mutt-1.5.19-msgcount.dif b/mutt-1.5.19-msgcount.dif new file mode 100644 index 0000000..2e35df5 --- /dev/null +++ b/mutt-1.5.19-msgcount.dif @@ -0,0 +1,109 @@ +--- buffy.c ++++ buffy.c 2009-04-21 11:10:21.738987896 +0200 +@@ -181,7 +181,6 @@ int mutt_parse_mailboxes (BUFFER *path, + { + for (tmp = &Incoming; *tmp;) + { +- FREE (&((*tmp)->path)); + tmp1=(*tmp)->next; + FREE (tmp); /* __FREE_CHECKED__ */ + *tmp=tmp1; +@@ -216,7 +215,7 @@ int mutt_parse_mailboxes (BUFFER *path, + if (!*tmp) + { + *tmp = (BUFFY *) safe_calloc (1, sizeof (BUFFY)); +- (*tmp)->path = safe_strdup (buf); ++ strfcpy ((*tmp)->path, buf, sizeof ((*tmp)->path)); + (*tmp)->next = NULL; + /* it is tempting to set magic right here */ + (*tmp)->magic = 0; +@@ -554,59 +553,31 @@ int mutt_buffy_notify (void) + * mutt_buffy() -- incoming folders completion routine + * + * given a folder name, this routine gives the next incoming folder with new +- * new mail. ++ * mail. + */ + void mutt_buffy (char *s, size_t slen) + { +- int count; + BUFFY *tmp = Incoming; ++ int pass, found = 0; + +- mutt_expand_path (s, _POSIX_PATH_MAX); +- switch (mutt_buffy_check (0)) +- { +- case 0: +- +- *s = '\0'; +- break; ++ mutt_expand_path (s, slen); + +- case 1: +- +- while (tmp && !tmp->new) +- tmp = tmp->next; +- if (!tmp) +- { +- *s = '\0'; +- mutt_buffy_check (1); /* buffy was wrong - resync things */ +- break; +- } +- strfcpy (s, tmp->path, slen); +- mutt_pretty_mailbox (s, slen); +- break; +- +- default: +- +- count = 0; +- while (count < 3) +- { +- if (mutt_strcmp (s, tmp->path) == 0) +- count++; +- else if (count && tmp->new) +- break; +- tmp = tmp->next; +- if (!tmp) +- { +- tmp = Incoming; +- count++; ++ if (mutt_buffy_check (0)) { ++ for (pass = 0; pass < 2; pass++) ++ for (tmp = Incoming; tmp; tmp = tmp->next) { ++ mutt_expand_path (tmp->path, sizeof (tmp->path)); ++ if ((found || pass) && tmp->new) { ++ strfcpy (s, tmp->path, slen); ++ mutt_pretty_mailbox (s, slen); ++ return; ++ } ++ if (mutt_strcmp (s, tmp->path) == 0) ++ found = 1; + } +- } +- if (count >= 3) +- { +- *s = '\0'; +- mutt_buffy_check (1); /* buffy was wrong - resync things */ +- break; +- } +- strfcpy (s, tmp->path, slen); +- mutt_pretty_mailbox (s, slen); +- break; ++ ++ mutt_buffy_check (1); /* buffy was wrong - resync things */ + } ++ ++ /* no folders with new mail */ ++ *s = '\0'; + } +--- buffy.h ++++ buffy.h 2009-04-21 11:10:21.738987896 +0200 +@@ -22,7 +22,7 @@ + + typedef struct buffy_t + { +- char *path; ++ char path[_POSIX_PATH_MAX]; + off_t size; + struct buffy_t *next; + struct buffy_t *prev; diff --git a/mutt.changes b/mutt.changes index f624efd..1dcf758 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 21 11:20:19 CEST 2009 - werner@suse.de + +- Upstream fix to make mutt showing new message count (bnc#487718) + ------------------------------------------------------------------- Tue Mar 3 17:17:51 CET 2009 - werner@suse.de diff --git a/mutt.spec b/mutt.spec index e990b11..cd6de6b 100644 --- a/mutt.spec +++ b/mutt.spec @@ -32,7 +32,7 @@ Requires: smtp_daemon #Requires: desktop-data-SuSE AutoReqProv: on Version: 1.5.19 -Release: 1 +Release: 2 Summary: Mail Program # ftp://ftp.mutt.org/mutt/devel/ Source0: %name-%version.tar.bz2 @@ -53,6 +53,7 @@ Patch5: patch-1.5.5.1.nt.xtitles.3.ab.1 Patch6: patch-%version.sidebar.20080611.txt.bz2 Patch7: mutt-1.5.19.sidebar-fix.dif Patch8: mutt-1.5.19-opennfs.dif +Patch9: mutt-1.5.19-msgcount.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir %{_sysconfdir} @@ -79,6 +80,7 @@ Authors: %patch6 -p1 %patch7 -p0 %patch8 -p0 +%patch9 -p0 cp doc/Muttrc Muttrc.SuSE cp %{S:2} . @@ -167,6 +169,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/Muttrc %changelog +* Tue Apr 21 2009 werner@suse.de +- Upstream fix to make mutt showing new message count (bnc#487718) * Tue Mar 03 2009 werner@suse.de - updated to mutt version 1.5.19 mostly a bugfix release - updated sidebar patch to 1.5.18.sidebar.20080611 @@ -263,7 +267,7 @@ rm -rf $RPM_BUILD_ROOT - Rename mmdf.5 -> mmdf_mutt.5 to not conflict with tin * Tue Feb 01 2005 mmj@suse.de - Update to 1.5.7 -* Tue Jan 11 2005 mmj@suse.de +* Wed Jan 12 2005 mmj@suse.de - Fix plain auth for sasl with patch from HEAD [#49573] - Update header cache patch to latest * Wed Nov 17 2004 mmj@suse.de @@ -363,7 +367,7 @@ rm -rf $RPM_BUILD_ROOT * Fri Jan 24 2003 mmj@suse.de - Add --enable-buffy-size which got lost because the maintainer kept several versions around -* Thu Jan 23 2003 mmj@suse.de +* Fri Jan 24 2003 mmj@suse.de - Add patch to use sasl2 instead og sasl * Mon Jan 06 2003 mmj@suse.de - Below action was not A Good Thing[tm] for all, so made it a @@ -427,7 +431,7 @@ rm -rf $RPM_BUILD_ROOT - po updates * Sun Sep 02 2001 bjacke@suse.de - update to 1.3.22.1 -* Thu Aug 23 2001 bjacke@suse.de +* Fri Aug 24 2001 bjacke@suse.de - update to 1.3.21 which fixes some MH bugs and others * Mon Aug 13 2001 ro@suse.de - changed neededforbuild to