Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
22434f49
Commit
22434f49
authored
Feb 08, 2010
by
Dan Kegel
Committed by
Alexandre Julliard
Feb 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: _res is per-thread in glibc.
parent
e66198ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+3
-6
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+10
-2
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
22434f49
...
...
@@ -66,16 +66,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(iphlpapi);
#define INADDR_NONE ~0UL
#endif
static
int
resolver_initialised
;
/* call res_init() just once because of a bug in Mac OS X 10.4 */
/* Call once per thread on systems that have per-thread _res. */
/* FIXME: should do same fix in dnsapi (or use dnsapi here?) */
static
void
initialise_resolver
(
void
)
{
if
(
!
resolver_initialised
)
{
if
((
_res
.
options
&
RES_INIT
)
==
0
)
res_init
();
resolver_initialised
=
1
;
}
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
22434f49
...
...
@@ -765,11 +765,12 @@ GetBestRoute
IpReleaseAddress
IpRenewAddress
*/
static
void
testWin98Functions
(
void
)
static
DWORD
CALLBACK
testWin98Functions
(
void
*
p
)
{
testGetInterfaceInfo
();
testGetAdaptersInfo
();
testGetNetworkParams
();
return
0
;
}
static
void
testGetPerAdapterInfo
(
void
)
...
...
@@ -885,9 +886,16 @@ START_TEST(iphlpapi)
loadIPHlpApi
();
if
(
hLibrary
)
{
HANDLE
thread
;
testWin98OnlyFunctions
();
testWinNT4Functions
();
testWin98Functions
();
/* run testGetXXXX in two threads at once to make sure we don't crash in that case */
thread
=
CreateThread
(
NULL
,
0
,
testWin98Functions
,
NULL
,
0
,
NULL
);
testWin98Functions
(
NULL
);
WaitForSingleObject
(
thread
,
INFINITE
);
testWin2KFunctions
();
test_GetAdaptersAddresses
();
freeIPHlpApi
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment