gnupdate: Fix unbound-variable in `%ftp-login'.

* maintainers/scripts/gnu/gnupdate.scm (%ftp-login): Bind `command' to
  the command.

svn path=/nixpkgs/trunk/; revision=21742
This commit is contained in:
Ludovic Courtès 2010-05-12 12:22:40 +00:00
parent 9ec34da2ee
commit 3b9cee4638

View File

@ -308,12 +308,13 @@
(throw 'ftp-error port command code message))))
(define (%ftp-login user pass port)
(display (string-append "USER " user (string #\newline)) port)
(let-values (((code message) (%ftp-listen port)))
(case code
((230) #t)
((331) (%ftp-command (string-append "PASS " pass) 230 port))
(else (throw 'ftp-error port command code message)))))
(let ((command (string-append "USER " user (string #\newline))))
(display command port)
(let-values (((code message) (%ftp-listen port)))
(case code
((230) #t)
((331) (%ftp-command (string-append "PASS " pass) 230 port))
(else (throw 'ftp-error port command code message))))))
(define (ftp-open host)
(catch 'getaddrinfo-error