emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Tue, 09 Jan 2007 05:04:17 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/01/09 05:04:15

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -b -r1.115 -r1.116
--- net/tramp.el        31 Dec 2006 15:03:51 -0000      1.115
+++ net/tramp.el        9 Jan 2007 05:04:15 -0000       1.116
@@ -2,7 +2,7 @@
 ;;; tramp.el --- Transparent Remote Access, Multiple Protocol
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Kai Gro,A_(Bjohann <address@hidden>
 ;;         Michael Albinus <address@hidden>
@@ -5540,7 +5540,6 @@
   (let (found item pattern action todo)
     (erase-buffer)
     (tramp-message 9 "Waiting 60s for prompt from remote shell")
-    (with-timeout (60 (throw 'tramp-action 'timeout))
       (while (not found)
        (tramp-accept-process-output p 1)
        (goto-char (point-min))
@@ -5554,18 +5553,23 @@
                         pattern)
          (when (re-search-forward (concat pattern "\\'") nil t)
            (setq found (funcall action p multi-method method user host)))))
-      found)))
+    found))
 
-(defun tramp-process-actions (p multi-method method user host actions)
-  "Perform actions until success."
+(defun tramp-process-actions
+  (p multi-method method user host actions &optional timeout)
+  "Perform actions until success or TIMEOUT."
   (tramp-message 10 "%s" (mapconcat 'identity (process-command p) " "))
   (let (exit)
     (while (not exit)
       (tramp-message 9 "Waiting for prompts from remote shell")
       (setq exit
            (catch 'tramp-action
+             (if timeout
+                 (with-timeout (timeout)
+                   (tramp-process-one-action
+                    p multi-method method user host actions))
              (tramp-process-one-action
-              p multi-method method user host actions)
+                p multi-method method user host actions))
              nil)))
     (unless (eq exit 'ok)
       (tramp-clear-passwd user host)
@@ -5689,7 +5693,7 @@
        (set-buffer (tramp-get-buffer multi-method method user host))
        (erase-buffer)
        (tramp-process-actions p multi-method method user host
-                              tramp-actions-before-shell)
+                              tramp-actions-before-shell 60)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
         (tramp-post-connection multi-method method user host)))))
@@ -5762,7 +5766,7 @@
 
        (set-buffer buf)
        (tramp-process-actions p multi-method method user host
-                              tramp-actions-before-shell)
+                              tramp-actions-before-shell 60)
         (tramp-message 7 "Initializing remote shell")
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
@@ -5823,7 +5827,7 @@
         (tramp-set-process-query-on-exit-flag p nil)
        (set-buffer (tramp-get-buffer multi-method method user host))
        (tramp-process-actions p multi-method method user host
-                              tramp-actions-before-shell)
+                              tramp-actions-before-shell 60)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
         (tramp-post-connection multi-method method




reply via email to

[Prev in Thread] Current Thread [Next in Thread]