[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111389: * net/tramp-adb.el (tramp-ad
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111389: * net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle errors |
Date: |
Mon, 31 Dec 2012 16:29:23 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111389
author: Jürgen Hötzel <address@hidden>
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2012-12-31 16:29:23 +0100
message:
* net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle errors
(No device connected, invalid device name). (Bug #13299)
modified:
lisp/ChangeLog
lisp/net/tramp-adb.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-31 11:35:13 +0000
+++ b/lisp/ChangeLog 2012-12-31 15:29:23 +0000
@@ -1,3 +1,8 @@
+2012-12-31 Jürgen Hötzel <address@hidden>
+
+ * net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle errors
+ (No device connected, invalid device name). (Bug #13299)
+
2012-12-31 Martin Rudalics <address@hidden>
* window.el (window-resizable--p): Rename to window-resizable-p.
=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el 2012-12-27 19:00:57 +0000
+++ b/lisp/net/tramp-adb.el 2012-12-31 15:29:23 +0000
@@ -998,11 +998,24 @@
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* ((buf (tramp-get-connection-buffer vec))
- (p (get-buffer-process buf)))
+ (p (get-buffer-process buf))
+ (devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
(unless
(and p (processp p) (memq (process-status p) '(run open)))
(save-match-data
(when (and p (processp p)) (delete-process p))
+ (if (not devices)
+ (tramp-error vec 'file-error "No device connected"))
+ (if (and (tramp-file-name-host vec)
+ (not (member (tramp-file-name-host vec) devices)))
+ (tramp-error
+ vec 'file-error
+ "Device %s not connected" (tramp-file-name-host vec)))
+ (if (and (not (eq (length devices) 1))
+ (not (tramp-file-name-host vec)))
+ (tramp-error
+ vec 'file-error
+ "Multiple Devices connected: No Host/Device specified"))
(with-tramp-progress-reporter vec 3 "Opening adb shell connection"
(let* ((coding-system-for-read 'utf-8-dos) ;is this correct?
(process-connection-type tramp-process-connection-type)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111389: * net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle errors,
Michael Albinus <=