]> granicus.if.org Git - mutt/commit
Add msn_index and max_msn to find and check boundaries by MSN. (see #3942)
authorKevin McCarthy <kevin@8t8.us>
Sun, 21 May 2017 01:52:18 +0000 (18:52 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sun, 21 May 2017 01:52:18 +0000 (18:52 -0700)
commite0376c75d8fd4c90684a541ad703a3e37d25b02a
tree8a25367ce7f4954a1f515976d11f5a081bfe03ed
parentc757f4a033570ddc9d90ff17f2d7bb52056abac0
Add msn_index and max_msn to find and check boundaries by MSN. (see #3942)

Since there can be gaps in MSNs, the largest MSN in the context is not
necessarily ctx->msgcount.

Use max_msn instead of ctx->msgcount for:
  - the starting MSN of new mail header fetching
  - boundary checking in fetch, expunge, and other places

Use msn_index to efficiently look up headers by MSN.  This makes the
expunge code slightly more efficient.  It also makes FETCH handling, and
duplicate FETCH FLAG handling efficient.
imap/command.c
imap/imap.c
imap/imap_private.h
imap/message.c