802c54ebb79453256a8c7fd3c3cab88acc8a84e8 |
|
01-Mar-2016 |
David Pursell <dpursell@google.com> |
adb: relax serial matching rules. Currently targeting a device by serial requires matching the serial number exactly. This CL relaxes the matching rules for local transports to ignore protocol prefixes and make the port optional: [tcp:|udp:]<hostname>[:port] The purpose of this is to allow a user to set ANDROID_SERIAL to something like "tcp:100.100.100.100" and have it work for both fastboot and adb (assuming the device comes up at 100.100.100.100 in both modes). This CL also adds some unit tests for the modified functions to make sure they work as expected. Bug: 27340240 Change-Id: I006e0c70c84331ab44d05d0a0f462d06592eb879 (cherry picked from commit 3f902aad5b427a8162bf860a758878b55b13e775)
/system/core/adb/socket_test.cpp
|
b582fa3bd8223ba1cf5936ffcb10e078d4ff13e1 |
|
10-Feb-2016 |
Josh Gao <jmgao@google.com> |
adb: make fdevent_test, socket_test compile on Windows. Switch pthread_* to use the adb_thread_* abstractions to allow the fdevent and socket tests to compile on Win32. Bug: http://b/27105824 Change-Id: I6541bb1398780b999837e701837d7f86a5eee8ca (cherry picked from commit 022d447e9efcff59e22f0ab13764282116f235dd)
/system/core/adb/socket_test.cpp
|
aa77e22d7384a97757e2d2194f4e265f7ad3b71a |
|
29-Sep-2015 |
Yabin Cui <yabinc@google.com> |
adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux. It is possible that the adb server on host has many sockets in CLOSE_WAIT state. To prevent socket leak, always enable POLLRDHUP in fdevent.cpp to detect sockets in CLOSE_WAIT state. Update LocalSocketTest unit tests: Change half_close_with_packet to read_from_closing_socket, as reading from a SHUT_WR socket is not needed in adb. Change close_with_no_events_installed to close_socket_in_CLOSE_WAIT_state, as the latter is more close to the real situation in use. Bug: 23314034 Change-Id: Ice4f4036624e5584eab6ba5848e7f169c92f037f
/system/core/adb/socket_test.cpp
|
c1b1f6ff5de82b457923eea3f0bbad1ac2e459d7 |
|
16-Sep-2015 |
Yabin Cui <yabinc@google.com> |
Add unit tests for local socket. Add has_write_error flag in asocket, so it will not wait on local_socket_closing_list to write pending packets in local_socket_close(). Although it doesn't fix any problem, it helps to make the code more stable. Add a missing put_apacket() in error handling. Add a check when adding local socket in local_socket_closing_list. Bug: 23314034 Change-Id: I75b07ba8ee59b7f277fba2fb919db63065b291be
/system/core/adb/socket_test.cpp
|