+ Temporary fix in this-host-address: close the socket obtained from

port->socket.

+ read-crlf-line doesn't accept a timeout and it would be nonsense in
  copy-ascii-port->port anyway.
This commit is contained in:
mainzelm 2002-12-11 10:05:50 +00:00
parent 4bee3e42f5
commit 34a2ace724
1 changed files with 12 additions and 10 deletions

View File

@ -974,13 +974,17 @@
formatted-port))))))))
(define (this-host-address)
(call-with-values
(lambda ()
(socket-address->internet-address
(socket-local-address (port->socket (the-session-control-input-port)
protocol-family/internet))))
(lambda (host-address control-port)
host-address)))
(let ((socket (port->socket (the-session-control-input-port)
protocol-family/internet)))
(call-with-values
(lambda ()
(socket-address->internet-address
(socket-local-address socket)))
(lambda (host-address control-port)
(log (syslog-level debug) "Closing ~A ~A"
(socket:inport socket) (socket:outport socket))
(close-socket socket)
host-address))))
(define (handle-nlst arg)
(log-command (syslog-level info) "NLST" arg)
@ -1367,9 +1371,7 @@
(define (copy-ascii-port->port input-port output-port)
(let loop ()
(let* ((line (read-crlf-line input-port
#f
90000 ; timeout
500)) ; max interval
#f))
(length (string-length line)))
(if (not (eof-object? line))
(begin