From 3b9cee463820f543b5d4f790097773b4f7ba8771 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 12 May 2010 12:22:40 +0000 Subject: 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 --- maintainers/scripts/gnu/gnupdate.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'maintainers') diff --git a/maintainers/scripts/gnu/gnupdate.scm b/maintainers/scripts/gnu/gnupdate.scm index c00184665884..33a2d530b22f 100644 --- a/maintainers/scripts/gnu/gnupdate.scm +++ b/maintainers/scripts/gnu/gnupdate.scm @@ -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 -- cgit 1.4.1