Make sure that adb_poll sets revents for all of the structs passed in.
Also, zero initialize all of the adb_pollfd structs in the tests.
Change-Id: Ia639679a7e6f77483655f1552e89081c4673aa87
When sending a file, do a 0-timeout poll to check to see if an error has
occurred, so that we can immediately report failure.
Bug: http://b/26816782
Change-Id: I4a8aa8408a36940bfda7b0ecfa5d13755f4aa14d
Restore the previous file sync error handling behavior of reporting
failure, and then consuming packets from the other end until receiving a
DONE packet.
Bug: http://b/26816782
Change-Id: I9708f2a36c072547e191fa0b6b42dffc31f8a2f2
The collection thread should unblock the parent when it fails in order
to prevent a 100 second timeout delay. Also reduce the timeout to 30
seconds, and fix a few log messages.
Change-Id: I47f9ce4f645c453810fec57bef557c32a665eefb
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
Windows has a maximum fd limit of 2048, so we can avoid collision with
real file descriptors by starting from there. Also, fds would be
previously be allocated by a linear walk from the last allocated FD,
instead of the lowest available FD, as required by POSIX. Keep track of
the lowest available file descriptor to make things feel more familiar.
Change-Id: Id6ac1c54f4f7964a6cdfa8d3f4f96262e4881964
system/core/debuggerd/debuggerd.cpp:683:5: warning: Value stored to 'logsocket' is never read
logsocket = -1;
^ ~~
Bug: http://b/27264392
Change-Id: I8eab8a02b67f219c32aea49e4d4957e5642df38f
Add utility methods that convert String16 and String8 into
std::string.
Also, remove a repeated include of <utils/Unicode.h> in
String16.h, since it is not used in that header file,
and is already included in String16.cpp.
BUG: 27200800
Change-Id: I5238aeb70689499763060a99dff9950fbb7adb3e
TEST: libutils builds successfully.
It was previously -1 (the default from Google style, since it uses 2
space indentation), instead of -2.
Change-Id: I1865505ce17a2cc13b85de58bda55c3b1dfcf08c
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI. The
minui and associated libs and charging image files are not built into the
executable in this case.
Always select charger No UI operation for Brillo devices.
Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
Use static space for long lived allocations as they
will appear to act like a memory leak. Resort to a
larger on-stack iovec to reduce the chances of an
allocation. Fix bug in writer where not enough size
was available for "security" buffer name. Minor
transitions to more consistent coding style.
Bug: 27107691
Change-Id: I68c918e7b916b1ae3b04829d48b3eddaa0a7e739
Currently the TCP handshake fails if the device TCP protocol version
doesn't match the host exactly, but the protocol is supposed to allow
for forwards compatibility by accepting any protocol version >= itself.
That way the other side can potentially lower its protocol to match and
keep going.
This CL fixes the protocol version check and adds corresponding unit
tests.
Bug: http://b/27220700
Change-Id: Ib17f0a55eb910105a27609bc94bf76a30442e92e
This patch replaces the locally defined clang-format with a symlink
to the one defined in build/tools.
Bug: 27121653
TEST=Ran clang-format.
Change-Id: I8810428d12b60c7463bc7f9a96228600ec8b425d