X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=hcache.c;h=7e3b0befaf4eaf5f28e9b3761bea566efe4cbeb4;hb=7268d1308fc75ad77a6bf6d48362a0dc1fd6104b;hp=5e2674357f66f52f0d9fa3e55c78bdc77e415529;hpb=0f44dc85fc1280372ffab911d701e703d803fb4b;p=apps%2Fmadmutt.git diff --git a/hcache.c b/hcache.c index 5e26743..7e3b0be 100644 --- a/hcache.c +++ b/hcache.c @@ -370,6 +370,13 @@ static unsigned char *dump_envelope (ENVELOPE * e, unsigned char *d, int *off) d = dump_char (e->date, d, off); d = dump_char (e->x_label, d, off); +#ifdef USE_NNTP + d = dump_char (e->newsgroups, d, off); + d = dump_char (e->xref, d, off); + d = dump_char (e->followup_to, d, off); + d = dump_char (e->x_comment_to, d, off); +#endif + d = dump_list (e->references, d, off); d = dump_list (e->in_reply_to, d, off); d = dump_list (e->userhdrs, d, off); @@ -402,6 +409,13 @@ static void restore_envelope (ENVELOPE * e, const unsigned char *d, int *off) restore_char (&e->supersedes, d, off); restore_char (&e->date, d, off); restore_char (&e->x_label, d, off); + +#ifdef USE_NNTP + restore_char (&e->newsgroups, d, off); + restore_char (&e->xref, d, off); + restore_char (&e->followup_to, d, off); + restore_char (&e->x_comment_to, d, off); +#endif restore_list (&e->references, d, off); restore_list (&e->in_reply_to, d, off); @@ -458,6 +472,11 @@ static int generate_crc32 () crc = crc32 (crc, (unsigned char const *) "USE_IMAP", safe_strlen ("USE_IMAP")); #endif + +#ifdef USE_NNTP + crc = + crc32 (crc, (unsigned char const *) "USE_NNTP", safe_strlen ("USE_NNTP")); +#endif return crc; } @@ -652,7 +671,7 @@ void *mutt_hcache_fetch (void *db, const char *filename, data = gdbm_fetch (h->db, key); if (!crc32_matches (data.dptr, h->crc)) { - free (data.dptr); + FREE(data.dptr); return NULL; } @@ -832,7 +851,7 @@ void *mutt_hcache_fetch (void *db, const char *filename, h->db->get (h->db, NULL, &key, &data, 0); if (!crc32_matches (data.data, h->crc)) { - free (data.data); + FREE(data.data); return NULL; }