1 |
grobian 09/07/30 08:03:56 |
2 |
|
3 |
Added: |
4 |
mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch |
5 |
Removed: mutt-1.5.20-hcache-uidvalidity-size-fix.patch |
6 |
Log: |
7 |
Switch to using the real committed patch, which is codewise identical to the suggested patch. |
8 |
(Portage version: 2.1.6.13/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch |
17 |
=================================================================== |
18 |
http://dev.mutt.org/trac/changeset/a2a4286491b4 |
19 |
http://dev.mutt.org/trac/ticket/3296 |
20 |
|
21 |
Harmonize hcache uidvalidity size to unsigned int (per IMAP RFC). |
22 |
Closes #3296. |
23 |
|
24 |
|
25 |
Index: hcache.c |
26 |
=================================================================== |
27 |
--- hcache.c (revision 5986:848f08512bf3) |
28 |
+++ hcache.c (revision 6002:a2a4286491b4) |
29 |
@@ -87,5 +87,5 @@ |
30 |
{ |
31 |
struct timeval timeval; |
32 |
- unsigned long uid_validity; |
33 |
+ unsigned int uidvalidity; |
34 |
} validate; |
35 |
|
36 |
@@ -590,5 +590,5 @@ |
37 |
static void * |
38 |
mutt_hcache_dump(header_cache_t *h, HEADER * header, int *off, |
39 |
- unsigned long uid_validity) |
40 |
+ unsigned int uidvalidity) |
41 |
{ |
42 |
unsigned char *d = NULL; |
43 |
@@ -599,6 +599,6 @@ |
44 |
d = lazy_malloc(sizeof (validate)); |
45 |
|
46 |
- if (uid_validity) |
47 |
- memcpy(d, &uid_validity, sizeof (unsigned long)); |
48 |
+ if (uidvalidity) |
49 |
+ memcpy(d, &uidvalidity, sizeof (uidvalidity)); |
50 |
else |
51 |
{ |
52 |
@@ -759,5 +759,5 @@ |
53 |
int |
54 |
mutt_hcache_store(header_cache_t *h, const char *filename, HEADER * header, |
55 |
- unsigned long uid_validity, |
56 |
+ unsigned int uidvalidity, |
57 |
size_t(*keylen) (const char *fn)) |
58 |
{ |
59 |
@@ -769,5 +769,5 @@ |
60 |
return -1; |
61 |
|
62 |
- data = mutt_hcache_dump(h, header, &dlen, uid_validity); |
63 |
+ data = mutt_hcache_dump(h, header, &dlen, uidvalidity); |
64 |
ret = mutt_hcache_store_raw (h, filename, data, dlen, keylen); |
65 |
|
66 |
Index: hcache.h |
67 |
=================================================================== |
68 |
--- hcache.h (revision 5224:010084b62288) |
69 |
+++ hcache.h (revision 6002:a2a4286491b4) |
70 |
@@ -34,6 +34,7 @@ |
71 |
void *mutt_hcache_fetch_raw (header_cache_t *h, const char *filename, |
72 |
size_t (*keylen)(const char *fn)); |
73 |
+/* uidvalidity is an IMAP-specific unsigned 32 bit number */ |
74 |
int mutt_hcache_store(header_cache_t *h, const char *filename, HEADER *header, |
75 |
- unsigned long uid_validity, size_t (*keylen)(const char *fn)); |
76 |
+ unsigned int uidvalidity, size_t (*keylen)(const char *fn)); |
77 |
int mutt_hcache_store_raw (header_cache_t *h, const char* filename, void* data, |
78 |
size_t dlen, size_t(*keylen) (const char* fn)); |
79 |
Index: imap/util.c |
80 |
=================================================================== |
81 |
--- imap/util.c (revision 5957:ecea9568202f) |
82 |
+++ imap/util.c (revision 6002:a2a4286491b4) |
83 |
@@ -130,4 +130,6 @@ |
84 |
if (*uv == idata->uid_validity) |
85 |
h = mutt_hcache_restore ((unsigned char*)uv, NULL); |
86 |
+ else |
87 |
+ dprint (3, (debugfile, "hcache uidvalidity mismatch: %u", *uv)); |
88 |
FREE (&uv); |
89 |
} |