OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/android/common/adb_connection.h" | 5 #include "tools/android/common/adb_connection.h" |
6 | 6 |
7 #include <arpa/inet.h> | 7 #include <arpa/inet.h> |
8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <stdio.h> |
9 #include <stdlib.h> | 10 #include <stdlib.h> |
10 #include <sys/socket.h> | 11 #include <sys/socket.h> |
11 #include <sys/types.h> | 12 #include <sys/types.h> |
12 #include <unistd.h> | 13 #include <unistd.h> |
13 | 14 |
14 #include "base/eintr_wrapper.h" | 15 #include "base/eintr_wrapper.h" |
15 #include "base/logging.h" | 16 #include "base/logging.h" |
16 #include "tools/android/common/net.h" | 17 #include "tools/android/common/net.h" |
17 | 18 |
18 namespace tools { | 19 namespace tools { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 LOG(ERROR) << "Bad response from ADB: length: " << response_length | 87 LOG(ERROR) << "Bad response from ADB: length: " << response_length |
87 << " data: " << DumpBinary(response, response_length); | 88 << " data: " << DumpBinary(response, response_length); |
88 HANDLE_EINTR(close(host_socket)); | 89 HANDLE_EINTR(close(host_socket)); |
89 return -1; | 90 return -1; |
90 } | 91 } |
91 | 92 |
92 return host_socket; | 93 return host_socket; |
93 } | 94 } |
94 | 95 |
95 } // namespace tools | 96 } // namespace tools |
96 | |
OLD | NEW |