summaryrefslogtreecommitdiff
path: root/lisp/ange-ftp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-30 01:07:22 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-30 01:07:22 +0000
commita6c522213600dfa5c1866daefaf03a2a8dd50066 (patch)
treef5f906a51ad03ca87fe5df66d3c440dc12781ff2 /lisp/ange-ftp.el
parent26d7cc1f8e3370577d5a03b5fb067daa2e349d74 (diff)
downloademacs-a6c522213600dfa5c1866daefaf03a2a8dd50066.tar.gz
(ange-ftp-normal-login): if ange-ftp-smart-gateway
is set but ange-ftp-gateway-host is nil, use user@host proxy protocol.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r--lisp/ange-ftp.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 0da2944c5fa..512d357e808 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -1861,9 +1861,10 @@ host specified in ``ange-ftp-gateway-host''."
(defun ange-ftp-normal-login (host user pass account proc)
"Connect to the FTP-server on HOST as USER using PASSWORD and ACCOUNT.
PROC is the process to the FTP-client."
- (let ((result (ange-ftp-raw-send-cmd
+ (let* ((nshost (ange-ftp-nslookup-host host))
+ (result (ange-ftp-raw-send-cmd
proc
- (format "open %s" (ange-ftp-nslookup-host host))
+ (format "open %s" nshost)
(format "Opening FTP connection to %s" host))))
(or (car result)
(ange-ftp-error host user
@@ -1871,7 +1872,9 @@ PROC is the process to the FTP-client."
(cdr result))))
(setq result (ange-ftp-raw-send-cmd
proc
- (format "user \"%s\" %s %s" user pass account)
+ (if (ange-ftp-use-smart-gateway-p host)
+ (format "user \"%s\"@%s %s %s" user nshost pass account)
+ (format "user \"%s\" %s %s" user pass account))
(format "Logging in as user %s@%s" user host)))
(or (car result)
(progn