imap4d: further improvements.
* imap4d/sync.c (notify): Do not emit FETCH replies for recent messages.
Showing
1 changed file
with
6 additions
and
0 deletions
... | @@ -81,6 +81,7 @@ notify (void) | ... | @@ -81,6 +81,7 @@ notify (void) |
81 | } | 81 | } |
82 | else | 82 | else |
83 | { | 83 | { |
84 | size_t old_total = attr_table_count; | ||
84 | size_t i; | 85 | size_t i; |
85 | 86 | ||
86 | realloc_attributes (total); | 87 | realloc_attributes (total); |
... | @@ -94,6 +95,8 @@ notify (void) | ... | @@ -94,6 +95,8 @@ notify (void) |
94 | mu_message_get_attribute (msg, &nattr); | 95 | mu_message_get_attribute (msg, &nattr); |
95 | mu_attribute_get_flags (nattr, &nflags); | 96 | mu_attribute_get_flags (nattr, &nflags); |
96 | 97 | ||
98 | if (i <= old_total) | ||
99 | { | ||
97 | if (nflags != attr_table[i-1]) | 100 | if (nflags != attr_table[i-1]) |
98 | { | 101 | { |
99 | io_sendf ("* %lu FETCH FLAGS (", (unsigned long) i); | 102 | io_sendf ("* %lu FETCH FLAGS (", (unsigned long) i); |
... | @@ -102,6 +105,9 @@ notify (void) | ... | @@ -102,6 +105,9 @@ notify (void) |
102 | attr_table[i-1] = nflags; | 105 | attr_table[i-1] = nflags; |
103 | } | 106 | } |
104 | } | 107 | } |
108 | else | ||
109 | attr_table[i-1] = nflags; | ||
110 | } | ||
105 | } | 111 | } |
106 | 112 | ||
107 | io_untagged_response (RESP_NONE, "%lu EXISTS", (unsigned long) total); | 113 | io_untagged_response (RESP_NONE, "%lu EXISTS", (unsigned long) total); | ... | ... |
-
Please register or sign in to post a comment