aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-12-22 14:51:01 +0100
committerJoakim Verona2012-12-22 14:51:01 +0100
commite8088e3c5d4eca723fe0e5ed7a5d506f8777bfe8 (patch)
tree7bc1175fe51200455155a06b6d6dc57dcd304c23
parent91485c8efc44a54d9ba6557ca633190dac16b11f (diff)
parentcdb075396213de91d318dbb6739d1885453a910c (diff)
downloademacs-e8088e3c5d4eca723fe0e5ed7a5d506f8777bfe8.tar.gz
emacs-e8088e3c5d4eca723fe0e5ed7a5d506f8777bfe8.zip
auto upstream
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp-adb.el26
2 files changed, 31 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5e26ee1fca1..c256c7f8179 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-12-22 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-adb.el (tramp-adb-maybe-open-connection): Check
4 properties of remote device. Restart connection, if there is a
5 change.
6
12012-12-21 Chong Yidong <cyd@gnu.org> 72012-12-21 Chong Yidong <cyd@gnu.org>
2 8
3 * sort.el (sort-subr): Doc fix (Bug#13056). 9 * sort.el (sort-subr): Doc fix (Bug#13056).
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 261c65ffdae..b500b1bba61 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -982,7 +982,31 @@ connection if a previous connection has died for some reason."
982 (tramp-adb-wait-for-output p) 982 (tramp-adb-wait-for-output p)
983 (unless (eq 'run (process-status p)) 983 (unless (eq 'run (process-status p))
984 (tramp-error vec 'file-error "Terminated!")) 984 (tramp-error vec 'file-error "Terminated!"))
985 (set-process-query-on-exit-flag p nil))))))) 985 (set-process-query-on-exit-flag p nil)
986
987 ;; Check whether the properties have been changed. If
988 ;; yes, this is a strong indication that we must expire all
989 ;; connection properties. We start again.
990 (tramp-message vec 5 "Checking system information")
991 (tramp-adb-send-command
992 vec "echo \\\"`getprop ro.product.model` `getprop ro.product.version` `getprop ro.build.version.release`\\\"")
993 (let ((old-getprop
994 (tramp-get-connection-property vec "getprop" nil))
995 (new-getprop
996 (tramp-set-connection-property
997 vec "getprop"
998 (with-current-buffer (tramp-get-connection-buffer vec)
999 ;; Read the expression.
1000 (goto-char (point-min))
1001 (read (current-buffer))))))
1002 (when (and (stringp old-getprop)
1003 (not (string-equal old-getprop new-getprop)))
1004 (tramp-cleanup vec)
1005 (tramp-message
1006 vec 3
1007 "Connection reset, because remote host changed from `%s' to `%s'"
1008 old-getprop new-getprop)
1009 (tramp-adb-maybe-open-connection vec)))))))))
986 1010
987(provide 'tramp-adb) 1011(provide 'tramp-adb)
988;;; tramp-adb.el ends here 1012;;; tramp-adb.el ends here