Browse code
1.11
jkf authored on 18/09/2003 18:12:29
Showing 2 changed files
Showing 2 changed files
... | ... |
@@ -1,3 +1,8 @@ |
1 |
+2003-09-18 <jkf@main.verada.com> |
|
2 |
+imap 1.11 |
|
3 |
+ * imap.cl: fix processing of imap flags into keywords so it |
|
4 |
+ handles lists and nil correctly. |
|
5 |
+ |
|
1 | 6 |
2003-05-21 John Foderaro <jkf@tiger.franz.com> |
2 | 7 |
imap 1.10 |
3 | 8 |
* imap.cl - fix bug in parse-mail header when end of headers |
... | ... |
@@ -19,7 +19,7 @@ |
19 | 19 |
;; Commercial Software developed at private expense as specified in |
20 | 20 |
;; DOD FAR Supplement 52.227-7013 (c) (1) (ii), as applicable. |
21 | 21 |
;; |
22 |
-;; $Id: imap.cl,v 1.22 2003/06/03 23:53:51 jkf Exp $ |
|
22 |
+;; $Id: imap.cl,v 1.23 2003/09/18 18:12:29 jkf Exp $ |
|
23 | 23 |
|
24 | 24 |
;; Description: |
25 | 25 |
;; |
... | ... |
@@ -96,7 +96,7 @@ |
96 | 96 |
|
97 | 97 |
(provide :imap) |
98 | 98 |
|
99 |
-(defparameter *imap-version-number* '(:major 1 :minor 10)) ; major.minor |
|
99 |
+(defparameter *imap-version-number* '(:major 1 :minor 11)) ; major.minor |
|
100 | 100 |
|
101 | 101 |
;; todo |
102 | 102 |
;; have the list of tags selected done on a per connection basis to |
... | ... |
@@ -493,7 +493,7 @@ |
493 | 493 |
(case command |
494 | 494 |
(:exists (setf (mailbox-message-count mb) count)) |
495 | 495 |
(:recent (setf (mailbox-recent-messages mb) count)) |
496 |
- (:flags (setf (mailbox-flags mb) (mapcar #'kwd-intern extra))) |
|
496 |
+ (:flags (setf (mailbox-flags mb) (kwd-intern-possible-list extra))) |
|
497 | 497 |
(:bye ; occurs when connection times out or mailbox lock is stolen |
498 | 498 |
(ignore-errors (close (post-office-socket mb))) |
499 | 499 |
(po-error :server-shutdown-connection |
... | ... |
@@ -510,7 +510,7 @@ |
510 | 510 |
then (setf (mailbox-uidnext mb) (cadr extra)) |
511 | 511 |
elseif (equalp (car extra) "permanentflags") |
512 | 512 |
then (setf (mailbox-permanent-flags mb) |
513 |
- (mapcar #'kwd-intern (cadr extra))) |
|
513 |
+ (kwd-intern-possible-list (cadr extra))) |
|
514 | 514 |
else (po-condition :unknown-ok :server-string comment)))) |
515 | 515 |
(t (po-condition :unknown-untagged :server-string comment))) |
516 | 516 |
|
... | ... |
@@ -710,8 +710,11 @@ |
710 | 710 |
(do ((xx stuff (cddr xx))) |
711 | 711 |
((null xx)) |
712 | 712 |
(if* (equalp (car xx) "flags") |
713 |
- then (setf (cadr xx) (mapcar #'kwd-intern (cadr xx))) |
|
714 |
- (return))) |
|
713 |
+ then ; we can end up with sublists of forms if we |
|
714 |
+ ; do add-flags with a list of flags. this seems like |
|
715 |
+ ; a bug in the imap server.. but we have to deal with it |
|
716 |
+ (setf (cadr xx) (kwd-intern-possible-list (cadr xx))) |
|
717 |
+ (return))) |
|
715 | 718 |
|
716 | 719 |
stuff) |
717 | 720 |
|
... | ... |
@@ -1733,7 +1736,14 @@ |
1733 | 1736 |
; this used to be exported from the excl package |
1734 | 1737 |
#+(version>= 6 0) |
1735 | 1738 |
(defvar *keyword-package* (find-package :keyword)) |
1736 |
- |
|
1739 |
+ |
|
1740 |
+(defun kwd-intern-possible-list (form) |
|
1741 |
+ (if* (null form) |
|
1742 |
+ then nil |
|
1743 |
+ elseif (atom form) |
|
1744 |
+ then (kwd-intern form) |
|
1745 |
+ else (mapcar #'kwd-intern-possible-list form))) |
|
1746 |
+ |
|
1737 | 1747 |
|
1738 | 1748 |
(defun kwd-intern (string) |
1739 | 1749 |
;; convert the string to the current preferred case |