Commit b6671a03 b6671a035bf23e10299749504cd26c33ab4ea004 by Sergey Poznyakoff

imap4d: further improvements.

* imap4d/sync.c (notify): Do not emit FETCH replies for recent
messages.
1 parent ab6e7ba0
......@@ -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;
}
}
......