*** /home/albinus/src/tramp/lisp/tramp-smb.el.~2.60~ 2006-11-27 06:51:24.000000000 +0100 --- /home/albinus/src/tramp/lisp/tramp-smb.el 2006-11-27 06:38:33.000000000 +0100 *************** *** 845,855 **** (tramp-smb-wait-for-output vec)) (defun tramp-smb-maybe-open-connection (vec share) ! "Maybe open a connection to HOST, logging in as USER, using `tramp-smb-program'. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." ! (let ((process-connection-type tramp-process-connection-type) ! (p (get-buffer-process (tramp-get-buffer vec)))) ;; Check whether it is still the same share (unless (and p (processp p) --- 845,856 ---- (tramp-smb-wait-for-output vec)) (defun tramp-smb-maybe-open-connection (vec share) ! "Maybe open a connection to HOST, log in as USER, using `tramp-smb-program'. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." ! (let* ((process-connection-type tramp-process-connection-type) ! (buf (tramp-get-buffer vec)) ! (p (get-buffer-process buf))) ;; Check whether it is still the same share (unless (and p (processp p) *************** *** 857,864 **** (string-equal share (tramp-get-connection-property p "smb-share" ""))) ! (when (and p (processp p)) ! (delete-process p)) (tramp-smb-open-connection vec share)))) (defun tramp-smb-open-connection (vec share) --- 858,866 ---- (string-equal share (tramp-get-connection-property p "smb-share" ""))) ! ;; There might be unread output from checking for share names. ! (when buf (with-current-buffer buf (erase-buffer))) ! (when (and p (processp p)) (delete-process p)) (tramp-smb-open-connection vec share)))) (defun tramp-smb-open-connection (vec share)