summaryrefslogtreecommitdiff
authoralwin <alwin>2003-12-11 18:06:25 (UTC)
committer alwin <alwin>2003-12-11 18:06:25 (UTC)
commit55c5ead7002ae30638e14f7db6c324f64db96ce6 (patch) (unidiff)
treefb3ac8ef095db347b22fc6564d3878c81b07c036
parentefa09eadddc16220cc1e8a55da93115538b091bb (diff)
downloadopie-55c5ead7002ae30638e14f7db6c324f64db96ce6.zip
opie-55c5ead7002ae30638e14f7db6c324f64db96ce6.tar.gz
opie-55c5ead7002ae30638e14f7db6c324f64db96ce6.tar.bz2
bugfix patch for libetpan 0.3.1 - without that the imap part is broken
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libetpanstuff/libetpan_031_patch308
1 files changed, 308 insertions, 0 deletions
diff --git a/noncore/net/mail/libetpanstuff/libetpan_031_patch b/noncore/net/mail/libetpanstuff/libetpan_031_patch
new file mode 100644
index 0000000..0e6bb41
--- a/dev/null
+++ b/noncore/net/mail/libetpanstuff/libetpan_031_patch
@@ -0,0 +1,308 @@
1Index: imap/mailimap_helper.c
2===================================================================
3RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_helper.c,v
4retrieving revision 1.8
5retrieving revision 1.9
6diff -u -r1.8 -r1.9
7 --- imap/mailimap_helper.c 1 Dec 2003 05:06:28 -00001.8
8 +++ imap/mailimap_helper.c 11 Dec 2003 00:50:47 -00001.9
9@@ -30,7 +30,7 @@
10 */
11
12 /*
13- * $Id$
14+ * $Id$
15 */
16
17 #include "mailimap_helper.h"
18@@ -87,8 +87,8 @@
19 goto free;
20 }
21
22- * result = item->att_data.att_static->att_data.att_rfc822;
23- item->att_data.att_static->att_data.att_rfc822 = NULL;
24+ * result = item->att_data.att_static->att_data.att_rfc822.att_content;
25+ item->att_data.att_static->att_data.att_rfc822.att_content = NULL;
26 mailimap_fetch_list_free(fetch_list);
27
28 return MAILIMAP_NO_ERROR;
29@@ -149,8 +149,8 @@
30 goto err;
31 }
32
33- * result = item->att_data.att_static->att_data.att_rfc822_header;
34- item->att_data.att_static->att_data.att_rfc822_header = NULL;
35+ * result = item->att_data.att_static->att_data.att_rfc822_header.att_content;
36+ item->att_data.att_static->att_data.att_rfc822_header.att_content = NULL;
37 mailimap_fetch_list_free(fetch_list);
38
39 return MAILIMAP_NO_ERROR;
40Index: imap/mailimap_parser.c
41===================================================================
42RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_parser.c,v
43retrieving revision 1.21
44retrieving revision 1.22
45diff -u -r1.21 -r1.22
46 --- imap/mailimap_parser.c 17 Nov 2003 01:03:25 -00001.21
47 +++ imap/mailimap_parser.c 11 Dec 2003 00:50:47 -00001.22
48@@ -30,7 +30,7 @@
49 */
50
51 /*
52- * $Id$
53+ * $Id$
54 */
55
56 #include <string.h>
57@@ -5868,7 +5868,7 @@
58 goto err;
59 }
60
61- sflag = 0;
62+ sflag = MAILIMAP_MBX_LIST_SFLAG_ERROR;
63 oflags_2 = NULL;
64
65 r = mailimap_struct_spaced_list_parse(fd, buffer, &cur_token,
66Index: imap/mailimap_print.c
67===================================================================
68RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_print.c,v
69retrieving revision 1.11
70retrieving revision 1.12
71diff -u -r1.11 -r1.12
72 --- imap/mailimap_print.c 8 Dec 2003 15:36:38 -00001.11
73 +++ imap/mailimap_print.c 11 Dec 2003 00:50:47 -00001.12
74@@ -30,7 +30,7 @@
75 */
76
77 /*
78- * $Id$
79+ * $Id$
80 */
81 #ifdef DEBUG
82 #include "mailimap_print.h"
83@@ -736,7 +736,7 @@
84 case MAILIMAP_MSG_ATT_RFC822:
85 print_indent();
86 printf("rfc822 {\n");
87- printf("%s\n", msg_att_static->att_data.att_rfc822);
88+ printf("%s\n", msg_att_static->att_data.att_rfc822.att_content);
89 print_indent();
90 printf("}\n");
91 break;
92@@ -744,7 +744,7 @@
93 case MAILIMAP_MSG_ATT_RFC822_HEADER:
94 print_indent();
95 printf("rfc822-header {\n");
96- printf("%s\n", msg_att_static->att_data.att_rfc822_header);
97+ printf("%s\n", msg_att_static->att_data.att_rfc822_header.att_content);
98 print_indent();
99 printf("}\n");
100 break;
101@@ -752,7 +752,7 @@
102 case MAILIMAP_MSG_ATT_RFC822_TEXT:
103 print_indent();
104 printf("rfc822-text {\n");
105- printf("%s\n", msg_att_static->att_data.att_rfc822_text);
106+ printf("%s\n", msg_att_static->att_data.att_rfc822_text.att_content);
107 print_indent();
108 printf("}\n");
109 break;
110@@ -1039,9 +1039,9 @@
111 indent();
112
113 if (mbx_list_flags->mbf_type == MAILIMAP_MBX_LIST_FLAGS_SFLAG)
114- mailimap_mbx_list_sflag_print(mbx_list_flags->mbf_data.mbf_sflag);
115+ mailimap_mbx_list_sflag_print(mbx_list_flags->mbf_sflag);
116
117- for(cur = clist_begin(mbx_list_flags->mbf_data.mbf_oflags) ; cur != NULL ;
118+ for(cur = clist_begin(mbx_list_flags->mbf_oflags) ; cur != NULL ;
119 cur = clist_next(cur)) {
120 struct mailimap_mbx_list_oflag * oflag;
121
122Index: imap/mailimap_sender.c
123===================================================================
124RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_sender.c,v
125retrieving revision 1.16
126retrieving revision 1.17
127diff -u -r1.16 -r1.17
128 --- imap/mailimap_sender.c 8 Dec 2003 15:36:38 -00001.16
129 +++ imap/mailimap_sender.c 11 Dec 2003 00:50:47 -00001.17
130@@ -30,7 +30,7 @@
131 */
132
133 /*
134- * $Id$
135+ * $Id$
136 */
137
138 #include "mailstream.h"
139@@ -396,6 +396,9 @@
140
141 static int is_atom(const char * str)
142 {
143+ if (* str == '\0')
144+ return 0;
145+
146 while (* str != '\0') {
147 unsigned char uch = (unsigned char) * str;
148
149Index: imap/mailimap_types.c
150===================================================================
151RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_types.c,v
152retrieving revision 1.16
153retrieving revision 1.17
154diff -u -r1.16 -r1.17
155 --- imap/mailimap_types.c 1 Dec 2003 05:06:28 -00001.16
156 +++ imap/mailimap_types.c 11 Dec 2003 00:50:47 -00001.17
157@@ -30,7 +30,7 @@
158 */
159
160 /*
161- * $Id$
162+ * $Id$
163 */
164
165 #include "mailimap_types.h"
166@@ -1417,14 +1417,8 @@
167 return NULL;
168
169 mbx_list_flags->mbf_type = mbf_type;
170- switch (mbf_type) {
171- case MAILIMAP_MBX_LIST_FLAGS_SFLAG:
172- mbx_list_flags->mbf_data.mbf_oflags = mbf_oflags;
173- break;
174- case MAILIMAP_MBX_LIST_FLAGS_NO_SFLAG:
175- mbx_list_flags->mbf_data.mbf_sflag = mbf_sflag;
176- break;
177- }
178+ mbx_list_flags->mbf_oflags = mbf_oflags;
179+ mbx_list_flags->mbf_sflag = mbf_sflag;
180
181 return mbx_list_flags;
182 }
183@@ -1432,14 +1426,10 @@
184 void
185 mailimap_mbx_list_flags_free(struct mailimap_mbx_list_flags * mbx_list_flags)
186 {
187- switch (mbx_list_flags->mbf_type) {
188- case MAILIMAP_MBX_LIST_FLAGS_NO_SFLAG:
189- clist_foreach(mbx_list_flags->mbf_data.mbf_oflags,
190 - (clist_func) mailimap_mbx_list_oflag_free,
191 - NULL);
192- clist_free(mbx_list_flags->mbf_data.mbf_oflags);
193- break;
194- }
195+ clist_foreach(mbx_list_flags->mbf_oflags,
196+ (clist_func) mailimap_mbx_list_oflag_free,
197+ NULL);
198+ clist_free(mbx_list_flags->mbf_oflags);
199
200 free(mbx_list_flags);
201 }
202@@ -1765,14 +1755,16 @@
203 item->att_data.att_internal_date = att_internal_date;
204 break;
205 case MAILIMAP_MSG_ATT_RFC822:
206- item->att_data.att_rfc822 = att_rfc822;
207+ item->att_data.att_rfc822.att_content = att_rfc822;
208+ item->att_data.att_rfc822.att_length = att_length;
209 break;
210 case MAILIMAP_MSG_ATT_RFC822_HEADER:
211- item->att_data.att_rfc822_header = att_rfc822_header;
212+ item->att_data.att_rfc822_header.att_content = att_rfc822_header;
213+ item->att_data.att_rfc822_header.att_length = att_length;
214 break;
215 case MAILIMAP_MSG_ATT_RFC822_TEXT:
216- item->att_data.att_rfc822_text = att_rfc822_text;
217- item->att_data.att_length = att_length;
218+ item->att_data.att_rfc822_text.att_content = att_rfc822_text;
219+ item->att_data.att_rfc822_text.att_length = att_length;
220 break;
221 case MAILIMAP_MSG_ATT_RFC822_SIZE:
222 item->att_data.att_rfc822_size = att_rfc822_size;
223@@ -1807,16 +1799,16 @@
224 mailimap_msg_att_internaldate_free(item->att_data.att_internal_date);
225 break;
226 case MAILIMAP_MSG_ATT_RFC822:
227- if (item->att_data.att_rfc822 != NULL)
228- mailimap_msg_att_rfc822_free(item->att_data.att_rfc822);
229+ if (item->att_data.att_rfc822.att_content != NULL)
230+ mailimap_msg_att_rfc822_free(item->att_data.att_rfc822.att_content);
231 break;
232 case MAILIMAP_MSG_ATT_RFC822_HEADER:
233- if (item->att_data.att_rfc822_header != NULL)
234- mailimap_msg_att_rfc822_header_free(item->att_data.att_rfc822_header);
235+ if (item->att_data.att_rfc822_header.att_content != NULL)
236+ mailimap_msg_att_rfc822_header_free(item->att_data.att_rfc822_header.att_content);
237 break;
238 case MAILIMAP_MSG_ATT_RFC822_TEXT:
239- if (item->att_data.att_rfc822_text != NULL)
240- mailimap_msg_att_rfc822_text_free(item->att_data.att_rfc822_text);
241+ if (item->att_data.att_rfc822_text.att_content != NULL)
242+ mailimap_msg_att_rfc822_text_free(item->att_data.att_rfc822_text.att_content);
243 break;
244 case MAILIMAP_MSG_ATT_BODYSTRUCTURE:
245 if (item->att_data.att_bodystructure != NULL)
246Index: imap/mailimap_types.h
247===================================================================
248RCS file: /cvsroot/libetpan/libetpan/imap/mailimap_types.h,v
249retrieving revision 1.17
250retrieving revision 1.18
251diff -u -r1.17 -r1.18
252 --- imap/mailimap_types.h 1 Dec 2003 05:06:28 -00001.17
253 +++ imap/mailimap_types.h 11 Dec 2003 00:50:47 -00001.18
254@@ -30,7 +30,7 @@
255 */
256
257 /*
258- * $Id$
259+ * $Id$
260 */
261
262
263@@ -1642,6 +1642,7 @@
264 /* this is a single flag type */
265
266 enum {
267+ MAILIMAP_MBX_LIST_SFLAG_ERROR,
268 MAILIMAP_MBX_LIST_SFLAG_MARKED,
269 MAILIMAP_MBX_LIST_SFLAG_NOSELECT,
270 MAILIMAP_MBX_LIST_SFLAG_UNMARKED
271@@ -1660,11 +1661,9 @@
272
273 struct mailimap_mbx_list_flags {
274 int mbf_type;
275- union {
276- clist * mbf_oflags; /* list of
277- (struct mailimap_mbx_list_oflag *), != NULL */
278- int mbf_sflag;
279- } mbf_data;
280+ clist * mbf_oflags; /* list of
281+ (struct mailimap_mbx_list_oflag *), != NULL */
282+ int mbf_sflag;
283 };
284
285 struct mailimap_mbx_list_flags *
286@@ -1984,10 +1983,18 @@
287 union {
288 struct mailimap_envelope * att_env; /* can be NULL */
289 struct mailimap_date_time * att_internal_date; /* can be NULL */
290- char * att_rfc822; /* can be NULL */
291- char * att_rfc822_header; /* can be NULL */
292- char * att_rfc822_text; /* can be NULL */
293- size_t att_length;
294+ struct {
295+ char * att_content; /* can be NULL */
296+ size_t att_length;
297+ } att_rfc822;
298+ struct {
299+ char * att_content; /* can be NULL */
300+ size_t att_length;
301+ } att_rfc822_header;
302+ struct {
303+ char * att_content; /* can be NULL */
304+ size_t att_length;
305+ } att_rfc822_text;
306 uint32_t att_rfc822_size;
307 struct mailimap_body * att_bodystructure; /* can be NULL */
308 struct mailimap_body * att_body; /* can be NULL */