Fix for broken wine AllocateAndGetTcpExTableFromStack() implementation.
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 8 Aug 2013 20:42:35 +0000 (22:42 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Fri, 9 Aug 2013 15:53:16 +0000 (17:53 +0200)
commit2fd9e2c2559991295649635969464772bb6fd1e9
treee280234717ca87f98133888224c0100ce11c53cc
parent0b2b6cba926a739ac56666f86ad4f88cbf5a8d48
Fix for broken wine AllocateAndGetTcpExTableFromStack() implementation.

On wine (tested with 1.5.6) the mentioned function could not be located in
iphlpapi.dll using LoadLibrary()/GetProcAddress(), which is the prefered
method to get a tcp peer pid on WinXP <= SP2.
To workaround this limitation we use GetExtendedTcpTable() first to get the peer pid.
If this fails (which happens at least on real WinXP SP2) we then use
AllocateAndGetTcpExTableFromStack() to get the pid.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66060
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-sysdeps-win.c