[SCM] GNU Mailutils branch, master, updated. release-2.2-336-gb6671a0

"Sergey Poznyakoff" <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=b6671a035bf23e10299749504cd26c33ab4ea004

The branch, master has been updated
       via  b6671a035bf23e10299749504cd26c33ab4ea004 (commit)
      from  ab6e7ba0fc41cffbd189f55689e016c811e8bc80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b6671a035bf23e10299749504cd26c33ab4ea004
Author: Sergey Poznyakoff <[email protected]>
Date:   Fri Dec 31 14:08:37 2010 +0200

    imap4d: further improvements.
    
    * imap4d/sync.c (notify): Do not emit FETCH replies for recent
    messages.

-----------------------------------------------------------------------

Summary of changes:
 imap4d/sync.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/imap4d/sync.c b/imap4d/sync.c
index 27377e1..59de781 100644
--- a/imap4d/sync.c
+++ b/imap4d/sync.c
@@ -81,6 +81,7 @@ notify (void)
     }
   else 
     {
+      size_t old_total = attr_table_count;
       size_t i;
 
       realloc_attributes (total);
@@ -94,13 +95,18 @@ notify (void)
 	  mu_message_get_attribute (msg, &nattr);
 	  mu_attribute_get_flags (nattr, &nflags);
 
-	  if (nflags != attr_table[i-1])
+	  if (i <= old_total)
 	    {
-	      io_sendf ("* %lu FETCH FLAGS (",  (unsigned long) i);
-	      util_format_attribute_flags (iostream, nflags);
-	      io_sendf (")\n");
-	      attr_table[i-1] = nflags;
+	      if (nflags != attr_table[i-1])
+		{
+		  io_sendf ("* %lu FETCH FLAGS (",  (unsigned long) i);
+		  util_format_attribute_flags (iostream, nflags);
+		  io_sendf (")\n");
+		  attr_table[i-1] = nflags;
+		}
 	    }
+	  else
+	    attr_table[i-1] = nflags;
 	}
     }
   


hooks/post-receive
-- 
GNU Mailutils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.