]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-handle-start-file-process ): Set connection
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 6 Aug 2010 14:34:23 +0000 (16:34 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 6 Aug 2010 14:34:23 +0000 (16:34 +0200)
property "vec".
(tramp-process-sentinel): Use it for flushing the cache.  We
cannot do it via the process buffer, the buffer could be deleted
already when running the sentinel.

lisp/ChangeLog
lisp/net/tramp.el

index 67ff0d920790c105975901be38cee53cf8910aa7..b5d7984c04f85d5df751d9935cd0aa76948e3ed9 100644 (file)
@@ -1,4 +1,12 @@
-2010-08-06  Jürgen Hötzel  <juergen@archlinux.org>
+2010-08-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-start-file-process ): Set connection
+       property "vec".
+       (tramp-process-sentinel): Use it for flushing the cache.  We
+       cannot do it via the process buffer, the buffer could be deleted
+       already when running the sentinel.
+
+2010-08-06  Jürgen Hötzel  <juergen@archlinux.org>  (tiny change)
 
        * comint.el (comint-mode): Make directory tracking functions
        functional on remote files.  (Bug#6764)
index 65713580b1bd9417f61ce4cb82a99f633ad1e824..a9870823f80bf2cacdcbfdea1e68d4cdfbd0b585 100644 (file)
@@ -4506,10 +4506,10 @@ beginning of local filename are not substituted."
 (defun tramp-process-sentinel (proc event)
   "Flush file caches."
   (unless (memq (process-status proc) '(run open))
-    (with-current-buffer (process-buffer proc)
-      (with-parsed-tramp-file-name default-directory nil
-       (tramp-message v 5 "Sentinel called: `%s' `%s'" proc event)
-        (tramp-flush-directory-property v "")))))
+    (let ((vec (tramp-get-connection-property proc "vector" nil)))
+      (when vec
+       (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event)
+        (tramp-flush-directory-property vec "")))))
 
 ;; We use BUFFER also as connection buffer during setup. Because of
 ;; this, its original contents must be saved, and restored once
@@ -4556,6 +4556,7 @@ beginning of local filename are not substituted."
               v 'file-error "pty association is not supported for `%s'" name)))
          (let ((p (tramp-get-connection-process v)))
            ;; Set sentinel and query flag for this process.
+           (tramp-set-connection-property p "vector" v)
            (set-process-sentinel p 'tramp-process-sentinel)
            (tramp-set-process-query-on-exit-flag p t)
            ;; Return process.