Merge "adb: bail out if wait_for_device fails in send_shell_command."

am: 4e5b292299

* commit '4e5b2922991dddf03c122963fb197968de5764e3':
  adb: bail out if wait_for_device fails in send_shell_command.
This commit is contained in:
Josh Gao 2016-02-25 18:46:40 +00:00 committed by android-build-merger
commit 2b7f69d0f1
1 changed files with 3 additions and 2 deletions

View File

@ -1106,8 +1106,9 @@ static int send_shell_command(TransportType transport_type, const char* serial,
}
fprintf(stderr,"- waiting for device -\n");
adb_sleep_ms(1000);
wait_for_device("wait-for-device", transport_type, serial);
if (!wait_for_device("wait-for-device", transport_type, serial)) {
return 1;
}
}
int exit_code = read_and_dump(fd, use_shell_protocol);