- READ-LINE -> READ-CRLF-LINE

- lower-case "IN" and "OUT"
This commit is contained in:
sperber 2003-01-20 14:53:50 +00:00
parent 74f9e4f704
commit 490565781a
1 changed files with 7 additions and 7 deletions

View File

@ -228,8 +228,8 @@
(define (pop3-read-response connection) (define (pop3-read-response connection)
(let* ((sock (pop3-connection-command-socket connection)) (let* ((sock (pop3-connection-command-socket connection))
(IN (socket:inport sock)) (in (socket:inport sock))
(line (read-line IN))) (line (read-crlf-line in)))
(pop3-log connection (format #f "-> ~a" line)) (pop3-log connection (format #f "-> ~a" line))
line)) line))
@ -253,9 +253,9 @@
(define (pop3-send-command connection command) (define (pop3-send-command connection command)
(let* ((sock (pop3-connection-command-socket connection)) (let* ((sock (pop3-connection-command-socket connection))
(OUT (socket:outport sock))) (out (socket:outport sock)))
(write-string command OUT) (write-string command out)
(write-crlf OUT) (write-crlf out)
(pop3-log connection (format #f "<- ~a" command)) (pop3-log connection (format #f "<- ~a" command))
(pop3-handle-response (pop3-read-response connection) command))) (pop3-handle-response (pop3-read-response connection) command)))
@ -267,7 +267,7 @@
; e.g. in FreeBSD it is called md5 ; e.g. in FreeBSD it is called md5
(define (pop3-dump fd) (define (pop3-dump fd)
(let loop ((line (read-line fd))) (let loop ((line (read-crlf-line fd)))
(cond ((and (not (eof-object? line)) (cond ((and (not (eof-object? line))
(not (equal? line ".\r"))) (not (equal? line ".\r")))
(and (eq? 0 (string-index line #\.)) ; fix byte-stuffed lines (and (eq? 0 (string-index line #\.)) ; fix byte-stuffed lines
@ -275,6 +275,6 @@
(set! line (substring line 1 (string-length line)))) (set! line (substring line 1 (string-length line))))
(write-string line) (write-string line)
(newline) (newline)
(loop (read-line fd)))))) (loop (read-crlf-line fd))))))
;; EOF ;; EOF