]> granicus.if.org Git - neomutt/commitdiff
Add envelope's Organization field to hcache
authorStéphane Lesimple <speed47_github@speed47.net>
Thu, 22 Aug 2019 07:08:47 +0000 (09:08 +0200)
committerRichard Russon <rich@flatcap.org>
Thu, 22 Aug 2019 09:53:09 +0000 (10:53 +0100)
This ensures using %W in index_format while having
header cache enabled works as expected.

Note that as we don't modify the header files that
hcachever.sh is looking for, but the serial_dump_envelope
and serial_restore_envelope functions instead, we have
to increment BASEVERSION to ensure that cache built with
previous versions gets invalidated in all cases.

Fixes #1808

hcache/hcachever.sh
hcache/serialize.c

index a9c849b3ba9a0525a4e7c533569141d5f477ca80..68f09578156d80981d5d8d1f12c181f0a6fc4800 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-BASEVERSION=2
+BASEVERSION=3
 STRUCTURES="Address Body Buffer Email Envelope ListNode Parameter"
 
 cleanstruct () {
index a786beec281817a12426c5969d4005aeb4711d78..d50ce1133c68351d45c8566d448d4cb0779d63e7 100644 (file)
@@ -500,6 +500,7 @@ unsigned char *serial_dump_envelope(struct Envelope *env, unsigned char *d,
   d = serial_dump_char(env->supersedes, d, off, false);
   d = serial_dump_char(env->date, d, off, false);
   d = serial_dump_char(env->x_label, d, off, convert);
+  d = serial_dump_char(env->organization, d, off, convert);
 
   d = serial_dump_buffer(env->spam, d, off, convert);
 
@@ -553,6 +554,7 @@ void serial_restore_envelope(struct Envelope *env, const unsigned char *d, int *
   serial_restore_char(&env->supersedes, d, off, false);
   serial_restore_char(&env->date, d, off, false);
   serial_restore_char(&env->x_label, d, off, convert);
+  serial_restore_char(&env->organization, d, off, convert);
 
   serial_restore_buffer(&env->spam, d, off, convert);