]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve connection hand-shaking in tramp-adb.el
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 20 Feb 2019 14:59:18 +0000 (15:59 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 20 Feb 2019 14:59:18 +0000 (15:59 +0100)
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Send an additional RET.

lisp/net/tramp-adb.el

index f3ba7f2a1eb74c8bad7723e7f20f7ab9b1cda659..1ba8d6274e547a0660b9e3cc5477973399926467 100644 (file)
@@ -1314,7 +1314,10 @@ connection if a previous connection has died for some reason."
                                      (current-time-string)))))
            (tramp-message
             vec 6 "%s" (mapconcat 'identity (process-command p) " "))
-           ;; Wait for initial prompt.
+           ;; Wait for initial prompt.  On some devices, it needs an
+           ;; initial RET, in order to get it.
+            (sleep-for 0.1)
+           (tramp-send-string vec tramp-rsh-end-of-line)
            (tramp-adb-wait-for-output p 30)
            (unless (process-live-p p)
              (tramp-error vec 'file-error "Terminated!"))