moving proc socket-address->string from ftpd internal to sunet-utilities exports
This commit is contained in:
parent
dc20fd05b6
commit
514d61b986
|
@ -179,17 +179,6 @@
|
||||||
(socket:outport socket)))
|
(socket:outport socket)))
|
||||||
|
|
||||||
|
|
||||||
(define (socket-address->string socket-address . with-port?)
|
|
||||||
(let ((with-port? (optional with-port? #t)))
|
|
||||||
(receive (host-address service-port)
|
|
||||||
(socket-address->internet-address socket-address)
|
|
||||||
(if with-port?
|
|
||||||
(format #f "~A:~A"
|
|
||||||
(format-internet-host-address host-address)
|
|
||||||
(format-port service-port))
|
|
||||||
(format #f "~A"
|
|
||||||
(format-internet-host-address host-address))))))
|
|
||||||
|
|
||||||
;;; ftpd -------------------------------------------------------
|
;;; ftpd -------------------------------------------------------
|
||||||
|
|
||||||
(define (ftpd anonymous-home . maybe-args)
|
(define (ftpd anonymous-home . maybe-args)
|
||||||
|
@ -1229,7 +1218,7 @@
|
||||||
|
|
||||||
; Version
|
; Version
|
||||||
|
|
||||||
(define *ftpd-version* "$Revision: 1.4 $")
|
(define *ftpd-version* "$Revision: 1.5 $")
|
||||||
|
|
||||||
(define (copy-port->port-binary input-port output-port)
|
(define (copy-port->port-binary input-port output-port)
|
||||||
(let ((buffer (make-string *window-size*)))
|
(let ((buffer (make-string *window-size*)))
|
||||||
|
|
|
@ -14,3 +14,15 @@
|
||||||
(let ((next (next-sigevent event interrupt)))
|
(let ((next (next-sigevent event interrupt)))
|
||||||
(thunk)
|
(thunk)
|
||||||
(lp next))))
|
(lp next))))
|
||||||
|
|
||||||
|
(define (socket-address->string socket-address . with-port?)
|
||||||
|
(let ((with-port? (:optional with-port? #t)))
|
||||||
|
(receive (host-address service-port)
|
||||||
|
(socket-address->internet-address socket-address)
|
||||||
|
(if with-port?
|
||||||
|
(format #f "~A:~A"
|
||||||
|
(format-internet-host-address host-address)
|
||||||
|
(format-port service-port))
|
||||||
|
(format #f "~A"
|
||||||
|
(format-internet-host-address host-address))))))
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,8 @@
|
||||||
|
|
||||||
(define-interface sunet-utilities-interface
|
(define-interface sunet-utilities-interface
|
||||||
(export host-name-or-ip
|
(export host-name-or-ip
|
||||||
on-interrupt))
|
on-interrupt
|
||||||
|
socket-address->string))
|
||||||
|
|
||||||
(define-interface handle-fatal-error-interface
|
(define-interface handle-fatal-error-interface
|
||||||
(export with-fatal-error-handler*
|
(export with-fatal-error-handler*
|
||||||
|
@ -598,6 +599,7 @@
|
||||||
scheme
|
scheme
|
||||||
format-net
|
format-net
|
||||||
sigevents
|
sigevents
|
||||||
|
let-opt
|
||||||
handle-fatal-error)
|
handle-fatal-error)
|
||||||
(files (lib sunet-utilities)))
|
(files (lib sunet-utilities)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue