Commit graph

5 commits

Author SHA1 Message Date
Josh Gao
022d447e9e 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
2016-02-19 11:24:51 -08:00
Yabin Cui
6dfef255b8 adb: keep file flags in fdevent_install.
Bug: 24615098
Change-Id: Ia791ecbe612f09aca3bbd5787513f121fae54da5
2015-10-06 16:15:30 -07:00
Yabin Cui
c1b1f6ff5d 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
2015-09-16 15:00:59 -07:00
Yabin Cui
a10801674c adb: move adb to poll.
It is reported that the registered fd can be bigger than FD_SETSIZE, and can't be
handled by select(). By moving to poll(), we can remove the limitation.
Although we can't ignore the possibility that there is a fd leak, but we can
still make the potential bug more explicit by moving to poll().
We didn't move to epoll() because it is not supported on mac.

Bug: 23820751

Change-Id: Icb39329c4984f1fef749472c9e088682ee8c3444
2015-09-15 10:12:31 -07:00
Yabin Cui
bec02fc43d adb: add unit test for fdevent.
Change-Id: Ic26cda5d8e84425bc60ce36bc686bb6917c4ca3c
2015-08-28 21:33:22 -07:00