wireshark/extcap
Florian Bezold 02a3056af3 androiddump: Fix non-blocking connect on Windows
Commit 043ed1f6 enabled non-blocking connect on Windows. This seems to
break androiddump on Windows completely, since a successful connection
always returns SOCKET_ERROR on connect, with WSAGetLastError() set to
WSAEWOULDBLOCK.

Apparently, the only way to check for a real connection is to try a
write select on the socket:
https://stackoverflow.com/questions/35370239/timeout-in-connect-function-from-winsock

This fixes androiddump on Windows:
- If ADB server is running, extcap interfaces are listed
- If ADB is not running, there is no noticeable delay in Wireshark

Change-Id: I6bd772215c7b232c8fe8e840cb7ad1d54c7d8860
Reviewed-on: https://code.wireshark.org/review/25715
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-10 07:45:56 +00:00
..
.editorconfig Move extcap EditorConfig settings to source dir 2016-03-23 00:24:52 +00:00
Makefile.am replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
androiddump.c androiddump: Fix non-blocking connect on Windows 2018-02-10 07:45:56 +00:00
ciscodump.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
extcap-base.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
extcap-base.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
randpktdump.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ssh-base.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ssh-base.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
sshdump.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
udpdump.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00