]> granicus.if.org Git - mutt/commitdiff
Adjust context->size on IMAP load and expunge (closes #2749)
authorBrendan Cully <brendan@kublai.com>
Mon, 2 Apr 2007 06:12:45 +0000 (23:12 -0700)
committerBrendan Cully <brendan@kublai.com>
Mon, 2 Apr 2007 06:12:45 +0000 (23:12 -0700)
ChangeLog
imap/imap.c
imap/message.c

index 5be6224cd7a4559dd8b681f23681c4a29d4afd35..7f81aee917f0650eea6f47e2eea726a293bbce80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-01 20:00 -0700  Ambrose Li  <a.c.li@ieee.org>  (38e896c4c192)
+
+       * po/zh_TW.po: Updated Taiwanese translation
+
+2007-04-01 15:40 -0700  TAKAHASHI Tamotsu  <ttakah@lapis.plala.or.jp>  (6dcb53bc679c)
+
+       * crypt-gpgme.c: gpgme: check result for signatures pointer
+       (closes: #2199)
+
 2007-04-01 15:33 -0700  Brendan Cully  <brendan@kublai.com>  (3a81b3793f77)
 
        * doc/muttbug.man: Update flea man page to current addresses
index d788b1ba7c88a433891e833dff9a75ac508b5eb2..8a8c64c4cc150003a2fc172258b58dd17562ff57 100644 (file)
@@ -258,6 +258,7 @@ void imap_expunge_mailbox (IMAP_DATA* idata)
       dprint (2, (debugfile, "Expunging message UID %d.\n", HEADER_DATA (h)->uid));
 
       h->active = 0;
+      idata->ctx->size -= h->content->length;
 
       imap_cache_del (idata, h);
 #if USE_HCACHE
index 3f3b234748bd33f6cfa27f4c5d619b3945839d8d..4a48c45269f1c5753da12ffcb7c82fb4c2e21f65 100644 (file)
@@ -190,6 +190,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
           ctx->hdrs[idx]->data = (void *) (h.data);
 
           ctx->msgcount++;
+          ctx->size += ctx->hdrs[idx]->content->length;
         }
        else
          /* bad header in the cache, we'll have to refetch.
@@ -292,6 +293,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
         0, 0);
       /* content built as a side-effect of mutt_read_rfc822_header */
       ctx->hdrs[idx]->content->length = h.content_length;
+      ctx->size += h.content_length;
 
 #if USE_HCACHE
       sprintf(uid_buf, "/%u", h.data->uid);