Commit graph

13 commits

Author SHA1 Message Date
Yabin Cui
d6ab3c2245 adb: improve names for transport threads.
The old names seems confusing. output_thread was reading remote data and writing to
local sockets. input_thread was reading local sockets data and writing to remote.
This change tries to make it clear by renaming output_thread to read_transport thread,
and renaming input_thread to write_transport thread.

Change-Id: I2e7b4cde7a94d436f3745e9e3ab10780e7caa8ac
2015-08-31 13:34:27 -07:00
Siva Velusamy
49ee7cf9a1 adb: set thread names (linux & mac)
Bug: 23423333
Change-Id: I0069f32ddbae2a10fb130064f721facf45b2cc09
2015-08-31 07:52:52 -07:00
Elliott Hughes
62077d32a2 Possible Mac build fix.
The error was this:

  system/core/adb/usb_osx.cpp:203:74: error: values of type 'UInt32' should not
  be used as format arguments; add an explicit cast to 'unsigned int' instead
  [-Werror,-Wformat]
    snprintf(devpathBuf, sizeof(devpathBuf), "usb:%" PRIu32 "X", locationId);
                                                  ~~~            ^~~~~~~~~~
                                                                 (unsigned int)

Which seems to be because on LP64 UInt32 is "unsigned int" but on LP32 it was
"unsigned long". We don't have to care about LP32, so -- if we can -- we're
probably better off just using uint32_t instead of UInt32.

Change-Id: I576f76cf2016ee59caccbc317ef74b6e8d71d722
2015-08-25 17:48:12 -07:00
Siva Velusamy
743883b570 Use glog for logging in the OSX USB layer
Change-Id: I8a3a4dfc768fdd335f03dc582c85b410c808aeb7
2015-08-24 08:22:15 -07:00
Elliott Hughes
2d4f852da4 Start iterating USB pipe endpoints from 1.
Bug: http://b/22829602
Change-Id: I5051880730ba8fadae5d78f1d19b5d527610d4a5
2015-08-13 16:00:12 -07:00
Siva Velusamy
d8b48a6281 adb: On Mac, clear both host and device endpoints at startup
This CL clears both the host and device endpoints right at the
beginning when the bulk endpoints are identified. This is in general
a "good idea", but more specifically for us, it fixes the issue
that sometimes when adb quits, it clears the endpoint on the host,
but not on the device which resulted in a subsequent invocation of
adb was seeing a stall.

Bug: https://code.google.com/p/android/issues/detail?id=182151

Change-Id: I331fa6805c40d1f50c153c010ceecd2f6a4045eb
2015-08-13 14:32:50 -07:00
Elliott Hughes
6e02c24cfc Include the error code if GetPipeProperties fails.
Bug: http://b/22829602
Change-Id: I90a89e70518053a4581e1862a7dbd5d09e06dadc
2015-08-06 10:48:19 -07:00
Dan Albert
c89e0ccd40 Revert "Revert "Split adb_main.cpp into client and daemon.""
This reverts commit 218dbccefa.

Change-Id: I74088db34983dc99e316a07c6ddc294340e0eb71
2015-05-08 17:33:21 -07:00
Dan Albert
218dbccefa Revert "Split adb_main.cpp into client and daemon."
This reverts commit cf07494ac2.
2015-05-08 16:08:57 -07:00
Dan Albert
cf07494ac2 Split adb_main.cpp into client and daemon.
The name "client" is somewhat misleading as it also contains the host
side adb server, but it's a part of the client binary.

Change-Id: I128b7bab213e330eb21b5010cd1fec5f7a62c8af
2015-05-08 10:20:26 -07:00
Elliott Hughes
9b0f354fa2 Simplify adb_thread_create.
Change-Id: I36d6021ef8fbc23e8bcd4ddbe1dac0eba467cc70
2015-05-05 13:41:21 -07:00
Elliott Hughes
dc3b459ff9 Add missing null checks after allocations.
Bug: http://b/20317729
Change-Id: I62bb761d48ee59a1f4ddd0cdd0632432305ca2ca
2015-04-21 19:43:22 -07:00
Dan Albert
7447dd05bd Move usb_osx to C++.
Change-Id: I21673211a702cc4f31d4311c36e2a4b22e55fac8
2015-04-16 19:20:40 -07:00
Renamed from adb/usb_osx.c (Browse further)