Optional separator for FORMAT-INTERNET-HOST-ADRESS (which had been
ripped out at some point).
This commit is contained in:
parent
10567fd22e
commit
7b285f1fd3
16
ftpd.scm
16
ftpd.scm
|
@ -499,22 +499,24 @@
|
|||
(format-internet-host-address host-address ",")
|
||||
(format-port port))))))))
|
||||
|
||||
; This doesn't look right. But I can't look into the socket of the
|
||||
; control connection if we're running under inetd---there's no way to
|
||||
; coerce a port to a socket as there is in C.
|
||||
;; This doesn't look right. But I can't look into the socket of the
|
||||
;; control connection if we're running under inetd---there's no way to
|
||||
;; coerce a port to a socket as there is in C.
|
||||
|
||||
(define (this-host-address)
|
||||
(car (host-info:addresses (host-info (system-name)))))
|
||||
|
||||
(define (format-internet-host-address address)
|
||||
(define (format-internet-host-address address . maybe-separator)
|
||||
|
||||
(define (extract shift)
|
||||
(number->string
|
||||
(bitwise-and (arithmetic-shift address (- shift))
|
||||
255)))
|
||||
|
||||
(string-append
|
||||
(extract 24) "." (extract 16) "." (extract 8) "." (extract 0)))
|
||||
(let ((separator (optional maybe-separator ".")))
|
||||
(string-append
|
||||
(extract 24) separator (extract 16) separator
|
||||
(extract 8) separator (extract 0))))
|
||||
|
||||
(define (format-port port)
|
||||
(string-append
|
||||
|
@ -808,7 +810,7 @@
|
|||
|
||||
; Version
|
||||
|
||||
(define *ftpd-version* "$Revision: 1.13 $")
|
||||
(define *ftpd-version* "$Revision: 1.14 $")
|
||||
|
||||
(define (copy-port->port-binary input-port output-port)
|
||||
(let ((buffer (make-string *window-size*)))
|
||||
|
|
Loading…
Reference in New Issue