[clonsigna-devel] [PATCH 1/1] send-command format string: zero-arg commands no longer include extra space
Joseph Gay
ysph at psy.ai
Tue Feb 14 03:38:52 UTC 2012
Hello,
First of all, thanks for your effort in producing this library!
Below is a tiny patch to address an issue I found with certain servers
(namely Gmail), returning BAD for zero-argument commands sent with a
trailing space. This was inconsistent in that it did not affect e.g.
CAPABILITY, but did affect LOGOUT. If any of you are format gurus, you
might check my syntax, but I believe the format string does what is
needed to make sure that zero-argument commands end with the terminator
while still preserving spaces between arguments for other commands. I
have tested it with several different commands and it behaved as
expected.
---
src/classes.lisp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/classes.lisp b/src/classes.lisp
index 40a868a..5ef7618 100644
--- a/src/classes.lisp
+++ b/src/classes.lisp
@@ -131,7 +131,7 @@ It's usually instantiated by the MAKE-IMAP function and activated by CMD-CONNECT
(imap-socket-flush-buffer is)
(let ((s (imap-socket-socket is))
(line-term (format nil "~a~a" #\Return #\Linefeed))
- (format-string "~a ~a ~{~a~^ ~}~a"))
+ (format-string "~a ~a~{~#[~:; ~a~]~}~a"))
(imap-socket-next-message is)
(when +debug+
(format t format-string (imap-socket-message-id is) (symbol-name command) args line-term))
--
1.7.2.5
More information about the clonsigna-devel
mailing list