Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
18cd1430
Commit
18cd1430
authored
Sep 08, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Remove the critical section around res_query.
parent
6154bf1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
26 deletions
+1
-26
query.c
dlls/dnsapi/query.c
+1
-26
No files found.
dlls/dnsapi/query.c
View file @
18cd1430
...
...
@@ -52,19 +52,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
#ifdef HAVE_RESOLV
static
CRITICAL_SECTION
resolver_cs
;
static
CRITICAL_SECTION_DEBUG
resolver_cs_debug
=
{
0
,
0
,
&
resolver_cs
,
{
&
resolver_cs_debug
.
ProcessLocksList
,
&
resolver_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": resolver_cs"
)
}
};
static
CRITICAL_SECTION
resolver_cs
=
{
&
resolver_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
#define LOCK_RESOLVER() do { EnterCriticalSection( &resolver_cs ); } while (0)
#define UNLOCK_RESOLVER() do { LeaveCriticalSection( &resolver_cs ); } while (0)
/* 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 */
static
void
initialise_resolver
(
void
)
...
...
@@ -552,8 +539,7 @@ exit:
return
status
;
}
/* The resolver lock must be held and res_init() must have been
* called before calling these three functions.
/* res_init() must have been called before calling these three functions.
*/
static
DNS_STATUS
dns_set_serverlist
(
const
IP4_ARRAY
*
addrs
)
{
...
...
@@ -704,16 +690,11 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
if
(
!
name
||
!
result
)
return
ERROR_INVALID_PARAMETER
;
LOCK_RESOLVER
();
initialise_resolver
();
_res
.
options
|=
dns_map_options
(
options
);
if
(
servers
&&
(
ret
=
dns_set_serverlist
(
servers
)))
{
UNLOCK_RESOLVER
();
return
ret
;
}
ret
=
dns_do_query
(
name
,
type
,
options
,
result
);
...
...
@@ -724,8 +705,6 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
ret
=
dns_do_query_netbios
(
name
,
result
);
}
UNLOCK_RESOLVER
();
#endif
return
ret
;
}
...
...
@@ -822,12 +801,8 @@ DNS_STATUS WINAPI DnsQueryConfig( DNS_CONFIG_TYPE config, DWORD flag, PCWSTR ada
case
DnsConfigDnsServerList
:
{
#ifdef HAVE_RESOLV
LOCK_RESOLVER
();
initialise_resolver
();
ret
=
dns_get_serverlist
(
buffer
,
len
);
UNLOCK_RESOLVER
();
break
;
#else
WARN
(
"compiled without resolver support
\n
"
);
...
...
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