Commit 222e97c1 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(ange-ftp-normal-login): if ange-ftp-smart-gateway

is set but ange-ftp-gateway-host is nil, use user@host proxy protocol.
parent 83656a19
...@@ -1861,9 +1861,10 @@ host specified in ``ange-ftp-gateway-host''." ...@@ -1861,9 +1861,10 @@ host specified in ``ange-ftp-gateway-host''."
(defun ange-ftp-normal-login (host user pass account proc) (defun ange-ftp-normal-login (host user pass account proc)
"Connect to the FTP-server on HOST as USER using PASSWORD and ACCOUNT. "Connect to the FTP-server on HOST as USER using PASSWORD and ACCOUNT.
PROC is the process to the FTP-client." 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 proc
(format "open %s" (ange-ftp-nslookup-host host)) (format "open %s" nshost)
(format "Opening FTP connection to %s" host)))) (format "Opening FTP connection to %s" host))))
(or (car result) (or (car result)
(ange-ftp-error host user (ange-ftp-error host user
...@@ -1871,7 +1872,9 @@ PROC is the process to the FTP-client." ...@@ -1871,7 +1872,9 @@ PROC is the process to the FTP-client."
(cdr result)))) (cdr result))))
(setq result (ange-ftp-raw-send-cmd (setq result (ange-ftp-raw-send-cmd
proc 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))) (format "Logging in as user %s@%s" user host)))
(or (car result) (or (car result)
(progn (progn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment