aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-24 07:04:52 +0000
committerRichard M. Stallman1994-09-24 07:04:52 +0000
commitdeec9e7434f1abb2aa8b11adbb73e1cd86b6c407 (patch)
tree04329f389225fdc28e453a16b7486e5938106043
parenta6b512bf8118600f682a3966bf4a5f0f45d73b7c (diff)
downloademacs-deec9e7434f1abb2aa8b11adbb73e1cd86b6c407.tar.gz
emacs-deec9e7434f1abb2aa8b11adbb73e1cd86b6c407.zip
(ange-ftp-start-process): Add use-smart-ftp code.
(ange-ftp-get-process): Use ange-ftp-normal-login if ange-ftp-gateway-host is nil.
-rw-r--r--lisp/ange-ftp.el27
1 files changed, 20 insertions, 7 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 866d8f36dcc..e9d079a5f76 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -214,6 +214,14 @@
214;;; If you have a "smart" ftp program that allows you to issue commands like 214;;; If you have a "smart" ftp program that allows you to issue commands like
215;;; "USER foo@bar" which do nice proxy things, then look at the variables 215;;; "USER foo@bar" which do nice proxy things, then look at the variables
216;;; ange-ftp-smart-gateway and ange-ftp-smart-gateway-port. 216;;; ange-ftp-smart-gateway and ange-ftp-smart-gateway-port.
217;;;
218;;; Otherwise, if there is an alternate ftp program that implements proxy in
219;;; a transparent way (i.e. w/o specifying the proxy host), that will
220;;; connect you directly to the desired destination host:
221;;; Set ange-ftp-gateway-ftp-program-name to that program's name.
222;;; Set ange-ftp-local-host-regexp to a value as stated earlier on.
223;;; Leave ange-ftp-gateway-host set to nil.
224;;; Set ange-ftp-smart-gateway to t.
217 225
218;;; Tips for using ange-ftp: 226;;; Tips for using ange-ftp:
219;;; 227;;;
@@ -711,7 +719,7 @@ If nil then prompt the user for a password.")
711(defvar ange-ftp-local-host-regexp ".*" 719(defvar ange-ftp-local-host-regexp ".*"
712 "*Regexp selecting hosts which can be reached directly with ftp. 720 "*Regexp selecting hosts which can be reached directly with ftp.
713For other hosts the FTP process is started on \`ange-ftp-gateway-host\' 721For other hosts the FTP process is started on \`ange-ftp-gateway-host\'
714instead.") 722instead, and/or reached via \`ange-ftp-gateway-ftp-program-name\'.")
715 723
716(defvar ange-ftp-gateway-program-interactive nil 724(defvar ange-ftp-gateway-program-interactive nil
717 "*If non-nil then the gateway program should give a shell prompt. 725 "*If non-nil then the gateway program should give a shell prompt.
@@ -738,8 +746,9 @@ This command should stop the terminal from echoing each command, and
738arrange to strip out trailing ^M characters.") 746arrange to strip out trailing ^M characters.")
739 747
740(defvar ange-ftp-smart-gateway nil 748(defvar ange-ftp-smart-gateway nil
741 "*Non-nil means the ftp gateway is smart. 749 "*Non-nil means the ftp gateway and/or the gateway ftp program is smart.
742Don't bother telnetting, etc., just issue a user@host command instead.") 750Don't bother telnetting, etc., already connected to desired host transparently,
751or just issue a user@host command in case \`ange-ftp-gateway-host\' is non-nil.")
743 752
744(defvar ange-ftp-smart-gateway-port "21" 753(defvar ange-ftp-smart-gateway-port "21"
745 "*Port on gateway machine to use when smart gateway is in operation.") 754 "*Port on gateway machine to use when smart gateway is in operation.")
@@ -765,7 +774,7 @@ outputs a suitable response to the HASH command.")
765 "*Name of FTP program to run.") 774 "*Name of FTP program to run.")
766 775
767(defvar ange-ftp-gateway-ftp-program-name "ftp" 776(defvar ange-ftp-gateway-ftp-program-name "ftp"
768 "*Name of FTP program to run on gateway machine. 777 "*Name of FTP program to run when accessing non-local hosts.
769Some AT&T folks claim to use something called `pftp' here.") 778Some AT&T folks claim to use something called `pftp' here.")
770 779
771(defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v") 780(defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v")
@@ -851,7 +860,7 @@ SIZE, if supplied, should be a prime number."
851;;;; Internal variables. 860;;;; Internal variables.
852;;;; ------------------------------------------------------------ 861;;;; ------------------------------------------------------------
853 862
854(defconst ange-ftp-version "$Revision: 1.55 $") 863(defconst ange-ftp-version "$Revision: 1.56 $")
855 864
856(defvar ange-ftp-data-buffer-name " *ftp data*" 865(defvar ange-ftp-data-buffer-name " *ftp data*"
857 "Buffer name to hold directory listing data received from ftp process.") 866 "Buffer name to hold directory listing data received from ftp process.")
@@ -1757,7 +1766,10 @@ been queued with no result. CONT will still be called, however."
1757If HOST is only ftp-able through a gateway machine then spawn a shell 1766If HOST is only ftp-able through a gateway machine then spawn a shell
1758on the gateway machine to do the ftp instead." 1767on the gateway machine to do the ftp instead."
1759 (let* ((use-gateway (ange-ftp-use-gateway-p host)) 1768 (let* ((use-gateway (ange-ftp-use-gateway-p host))
1760 (ftp-prog (if use-gateway 1769 (use-smart-ftp (and (not ange-ftp-gateway-host)
1770 (ange-ftp-use-smart-gateway-p host)))
1771 (ftp-prog (if (or use-gateway
1772 use-smart-ftp)
1761 ange-ftp-gateway-ftp-program-name 1773 ange-ftp-gateway-ftp-program-name
1762 ange-ftp-ftp-program-name)) 1774 ange-ftp-ftp-program-name))
1763 (args (append (list ftp-prog) ange-ftp-ftp-program-args)) 1775 (args (append (list ftp-prog) ange-ftp-ftp-program-args))
@@ -1920,7 +1932,8 @@ Create a new process if needed."
1920 (setq proc (ange-ftp-start-process host user name)) 1932 (setq proc (ange-ftp-start-process host user name))
1921 1933
1922 ;; login to FTP server. 1934 ;; login to FTP server.
1923 (if (ange-ftp-use-smart-gateway-p host) 1935 (if (and (ange-ftp-use-smart-gateway-p host)
1936 ange-ftp-gateway-host)
1924 (ange-ftp-smart-login host user pass account proc) 1937 (ange-ftp-smart-login host user pass account proc)
1925 (ange-ftp-normal-login host user pass account proc)) 1938 (ange-ftp-normal-login host user pass account proc))
1926 1939