Commit 34a9b541 34a9b5419ca1ec781bae17b0abbfee611aa685c7 by Sergey Poznyakoff

Bugfixes.

* imap4d/fetch.c (parse_fetch_body): Bugfix, allow another tokens
after BODY.
* imap4d/util.c (util_msgset): Make sure returned number of
elements in set is always correct.
* mailbox/folder.c (is_known_folder): Compare paths as well.  It
was commented out on 2001-04-10 (7 years ago!!!) for unknown
reasons.
* mailbox/url.c (DECL_CMP): Bugfix. The macro effectively created
a scheme comparator, no matter what its second argument was.
1 parent 15602e01
1 2008-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 Bugfixes.
4 * imap4d/fetch.c (parse_fetch_body): Bugfix, allow another tokens
5 after BODY.
6 * imap4d/util.c (util_msgset): Make sure returned number of
7 elements in set is always correct.
8 * mailbox/folder.c (is_known_folder): Compare paths as well. It
9 was commented out on 2001-04-10 (7 years ago!!!) for unknown
10 reasons.
11 * mailbox/url.c (DECL_CMP): Bugfix. The macro effectively created
12 a scheme comparator, no matter what its second argument was.
13
1 2008-08-14 Sergey Poznyakoff <gray@gnu.org.ua> 14 2008-08-14 Sergey Poznyakoff <gray@gnu.org.ua>
2 15
3 New functions. 16 New functions.
......
...@@ -1484,7 +1484,7 @@ parse_fetch_body (struct parsebuf *p) ...@@ -1484,7 +1484,7 @@ parse_fetch_body (struct parsebuf *p)
1484 parsebuf_next (p, 0); 1484 parsebuf_next (p, 0);
1485 } 1485 }
1486 else if (parse_body_args (p, 0)) 1486 else if (parse_body_args (p, 0))
1487 parsebuf_exit (p, "Syntax error"); 1487 append_simple_function (p, "BODY", _frt_bodystructure0);
1488 } 1488 }
1489 1489
1490 static int 1490 static int
......
...@@ -215,6 +215,9 @@ util_msgset (char *s, size_t ** set, int *n, int isuid) ...@@ -215,6 +215,9 @@ util_msgset (char *s, size_t ** set, int *n, int isuid)
215 break; 215 break;
216 } /* while */ 216 } /* while */
217 217
218 if (*n == 0)
219 return 0;
220
218 /* For message sets in form X:Y where Y is a not-existing UID greater 221 /* For message sets in form X:Y where Y is a not-existing UID greater
219 than max UID, replace Y with the max UID in the mailbox */ 222 than max UID, replace Y with the max UID in the mailbox */
220 if (*n == 1 && invalid_uid) 223 if (*n == 1 && invalid_uid)
......
...@@ -494,7 +494,7 @@ is_known_folder (mu_url_t url, mu_folder_t *pfolder) ...@@ -494,7 +494,7 @@ is_known_folder (mu_url_t url, mu_folder_t *pfolder)
494 && mu_url_is_same_scheme (url, folder->url) 494 && mu_url_is_same_scheme (url, folder->url)
495 && mu_url_is_same_user (url, folder->url) 495 && mu_url_is_same_user (url, folder->url)
496 && mu_url_is_same_host (url, folder->url) 496 && mu_url_is_same_host (url, folder->url)
497 /*&& mu_url_is_same_path (url, folder->url) */ 497 && mu_url_is_same_path (url, folder->url)
498 && mu_url_is_same_port (url, folder->url)) 498 && mu_url_is_same_port (url, folder->url))
499 { 499 {
500 ret = 1; 500 ret = 1;
......
...@@ -426,10 +426,10 @@ ACCESSOR(is_same,field) (mu_url_t url1, mu_url_t url2) \ ...@@ -426,10 +426,10 @@ ACCESSOR(is_same,field) (mu_url_t url1, mu_url_t url2) \
426 const char *s1, *s2; \ 426 const char *s1, *s2; \
427 int status1, status2; \ 427 int status1, status2; \
428 \ 428 \
429 status1 = mu_url_sget_scheme (url1, &s1); \ 429 status1 = ACCESSOR(sget, field) (url1, &s1); \
430 if (status1 && status1 != MU_ERR_NOENT) \ 430 if (status1 && status1 != MU_ERR_NOENT) \
431 return 0; \ 431 return 0; \
432 status2 = mu_url_sget_scheme (url2, &s2); \ 432 status2 = ACCESSOR(sget, field) (url2, &s2); \
433 if (status2 && status2 != MU_ERR_NOENT) \ 433 if (status2 && status2 != MU_ERR_NOENT) \
434 return 0; \ 434 return 0; \
435 \ 435 \
......