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
5a446236
Commit
5a446236
authored
Feb 09, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ce0e86d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
106 additions
and
125 deletions
+106
-125
Makefile.in
dlls/dnsapi/Makefile.in
+0
-1
libresolv.c
dlls/dnsapi/libresolv.c
+1
-1
main.c
dlls/dnsapi/main.c
+31
-50
query.c
dlls/dnsapi/query.c
+17
-20
Makefile.in
dlls/dnsapi/tests/Makefile.in
+0
-1
name.c
dlls/dnsapi/tests/name.c
+2
-2
query.c
dlls/dnsapi/tests/query.c
+34
-29
record.c
dlls/dnsapi/tests/record.c
+21
-21
No files found.
dlls/dnsapi/Makefile.in
View file @
5a446236
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
dnsapi.dll
UNIXLIB
=
dnsapi.so
IMPORTLIB
=
dnsapi
...
...
dlls/dnsapi/libresolv.c
View file @
5a446236
...
...
@@ -314,7 +314,7 @@ static NTSTATUS resolv_set_serverlist( void *args )
if
(
addrs
->
AddrCount
>
MAXNS
)
{
WARN
(
"too many servers: %d only using the first: %d
\n
"
,
addrs
->
AddrCount
,
MAXNS
);
(
UINT
)
addrs
->
AddrCount
,
MAXNS
);
_res
.
nscount
=
MAXNS
;
}
else
_res
.
nscount
=
addrs
->
AddrCount
;
...
...
dlls/dnsapi/main.c
View file @
5a446236
...
...
@@ -36,7 +36,7 @@ unixlib_handle_t resolv_handle = 0;
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
TRACE
(
"(%p,
%u,
%p)
\n
"
,
hinst
,
reason
,
reserved
);
TRACE
(
"(%p,
%lu,
%p)
\n
"
,
hinst
,
reason
,
reserved
);
switch
(
reason
)
{
...
...
@@ -56,10 +56,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
* DnsAcquireContextHandle_A [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsAcquireContextHandle_A
(
DWORD
flags
,
PVOID
cred
,
PHANDLE
context
)
DNS_STATUS
WINAPI
DnsAcquireContextHandle_A
(
DWORD
flags
,
void
*
cred
,
HANDLE
*
context
)
{
FIXME
(
"(
0x%08x,%p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
FIXME
(
"(
%#lx, %p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
*
context
=
(
HANDLE
)
0xdeadbeef
;
return
ERROR_SUCCESS
;
...
...
@@ -69,10 +68,9 @@ DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, PVOID cred,
* DnsAcquireContextHandle_UTF8 [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsAcquireContextHandle_UTF8
(
DWORD
flags
,
PVOID
cred
,
PHANDLE
context
)
DNS_STATUS
WINAPI
DnsAcquireContextHandle_UTF8
(
DWORD
flags
,
void
*
cred
,
HANDLE
*
context
)
{
FIXME
(
"(
0x%08x,%p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
FIXME
(
"(
%#lx, %p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
*
context
=
(
HANDLE
)
0xdeadbeef
;
return
ERROR_SUCCESS
;
...
...
@@ -82,10 +80,9 @@ DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, PVOID cred,
* DnsAcquireContextHandle_W [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsAcquireContextHandle_W
(
DWORD
flags
,
PVOID
cred
,
PHANDLE
context
)
DNS_STATUS
WINAPI
DnsAcquireContextHandle_W
(
DWORD
flags
,
void
*
cred
,
HANDLE
*
context
)
{
FIXME
(
"(
0x%08x,%p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
FIXME
(
"(
%#lx, %p,
%p) stub
\n
"
,
flags
,
cred
,
context
);
*
context
=
(
HANDLE
)
0xdeadbeef
;
return
ERROR_SUCCESS
;
...
...
@@ -156,12 +153,10 @@ VOID WINAPI DnsReleaseContextHandle( HANDLE context )
* DnsModifyRecordsInSet_A [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_A
(
PDNS_RECORDA
add
,
PDNS_RECORDA
delete
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_A
(
DNS_RECORDA
*
add
,
DNS_RECORDA
*
delete
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,%p,0x%08x,%p,%p,%p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %p, %#lx, %p, %p, %p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
...
...
@@ -169,12 +164,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_A( PDNS_RECORDA add, PDNS_RECORDA delete
* DnsModifyRecordsInSet_UTF8 [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_UTF8
(
PDNS_RECORDA
add
,
PDNS_RECORDA
delete
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_UTF8
(
DNS_RECORDA
*
add
,
DNS_RECORDA
*
delete
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,%p,0x%08x,%p,%p,%p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %p, %#lx, %p, %p, %p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
...
...
@@ -182,12 +175,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( PDNS_RECORDA add, PDNS_RECORDA del
* DnsModifyRecordsInSet_W [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_W
(
PDNS_RECORDW
add
,
PDNS_RECORDW
delete
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsModifyRecordsInSet_W
(
DNS_RECORDW
*
add
,
DNS_RECORDW
*
delete
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,%p,0x%08x,%p,%p,%p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %p, %#lx, %p, %p, %p) stub
\n
"
,
add
,
delete
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
...
...
@@ -195,12 +186,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_W( PDNS_RECORDW add, PDNS_RECORDW delete
* DnsWriteQuestionToBuffer_UTF8 [DNSAPI.@]
*
*/
BOOL
WINAPI
DnsWriteQuestionToBuffer_UTF8
(
PDNS_MESSAGE_BUFFER
buffer
,
PDWORD
size
,
PCSTR
name
,
WORD
type
,
WORD
xid
,
BOOL
recurse
)
BOOL
WINAPI
DnsWriteQuestionToBuffer_UTF8
(
DNS_MESSAGE_BUFFER
*
buffer
,
DWORD
*
size
,
const
char
*
name
,
WORD
type
,
WORD
xid
,
BOOL
recurse
)
{
FIXME
(
"(%p,%p,%s,%d,%d,%d) stub
\n
"
,
buffer
,
size
,
debugstr_a
(
name
),
type
,
xid
,
recurse
);
FIXME
(
"(%p, %p, %s, %d, %d, %d) stub
\n
"
,
buffer
,
size
,
debugstr_a
(
name
),
type
,
xid
,
recurse
);
return
FALSE
;
}
...
...
@@ -208,12 +197,10 @@ BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER buffer, PDWORD si
* DnsWriteQuestionToBuffer_W [DNSAPI.@]
*
*/
BOOL
WINAPI
DnsWriteQuestionToBuffer_W
(
PDNS_MESSAGE_BUFFER
buffer
,
PDWORD
size
,
PCWSTR
name
,
WORD
type
,
WORD
xid
,
BOOL
recurse
)
BOOL
WINAPI
DnsWriteQuestionToBuffer_W
(
DNS_MESSAGE_BUFFER
*
buffer
,
DWORD
*
size
,
const
WCHAR
*
name
,
WORD
type
,
WORD
xid
,
BOOL
recurse
)
{
FIXME
(
"(%p,%p,%s,%d,%d,%d) stub
\n
"
,
buffer
,
size
,
debugstr_w
(
name
),
type
,
xid
,
recurse
);
FIXME
(
"(%p, %p, %s, %d, %d, %d) stub
\n
"
,
buffer
,
size
,
debugstr_w
(
name
),
type
,
xid
,
recurse
);
return
FALSE
;
}
...
...
@@ -221,12 +208,10 @@ BOOL WINAPI DnsWriteQuestionToBuffer_W( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
* DnsReplaceRecordSetA [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsReplaceRecordSetA
(
PDNS_RECORDA
set
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsReplaceRecordSetA
(
DNS_RECORDA
*
set
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,0x%08x,%p,%p,%p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %#lx, %p, %p, %p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
...
...
@@ -234,12 +219,10 @@ DNS_STATUS WINAPI DnsReplaceRecordSetA( PDNS_RECORDA set, DWORD options,
* DnsReplaceRecordSetUTF8 [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsReplaceRecordSetUTF8
(
PDNS_RECORDA
set
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsReplaceRecordSetUTF8
(
DNS_RECORDA
*
set
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,0x%08x,%p,%p,%p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %#lx, %p, %p, %p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
...
...
@@ -247,11 +230,9 @@ DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( PDNS_RECORDA set, DWORD options,
* DnsReplaceRecordSetW [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsReplaceRecordSetW
(
PDNS_RECORDW
set
,
DWORD
options
,
HANDLE
context
,
PVOID
servers
,
PVOID
reserved
)
DNS_STATUS
WINAPI
DnsReplaceRecordSetW
(
DNS_RECORDW
*
set
,
DWORD
options
,
HANDLE
context
,
void
*
servers
,
void
*
reserved
)
{
FIXME
(
"(%p,0x%08x,%p,%p,%p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
FIXME
(
"(%p, %#lx, %p, %p, %p) stub
\n
"
,
set
,
options
,
context
,
servers
,
reserved
);
return
ERROR_SUCCESS
;
}
dlls/dnsapi/query.c
View file @
5a446236
...
...
@@ -106,13 +106,11 @@ exit:
static
const
char
*
debugstr_query_request
(
const
DNS_QUERY_REQUEST
*
req
)
{
if
(
!
req
)
return
"(null)"
;
return
wine_dbg_sprintf
(
"{%d %s %s %x%08x %p %d %p %p}"
,
req
->
Version
,
if
(
!
req
)
return
"(null)"
;
return
wine_dbg_sprintf
(
"{%lu %s %s %I64x %p %lu %p %p}"
,
req
->
Version
,
debugstr_w
(
req
->
QueryName
),
debugstr_type
(
req
->
QueryType
),
(
UINT32
)(
req
->
QueryOptions
>>
32u
),
(
UINT32
)
req
->
QueryOptions
,
req
->
pDnsServerList
,
req
->
InterfaceIndex
,
req
->
pQueryCompletionCallback
,
req
->
pQueryContext
);
req
->
QueryOptions
,
req
->
pDnsServerList
,
req
->
InterfaceIndex
,
req
->
pQueryCompletionCallback
,
req
->
pQueryContext
);
}
/******************************************************************************
...
...
@@ -121,7 +119,7 @@ static const char *debugstr_query_request(const DNS_QUERY_REQUEST *req)
*/
DNS_STATUS
WINAPI
DnsQueryEx
(
DNS_QUERY_REQUEST
*
request
,
DNS_QUERY_RESULT
*
result
,
DNS_QUERY_CANCEL
*
cancel
)
{
FIXME
(
"(%s
%p
%p)
\n
"
,
debugstr_query_request
(
request
),
result
,
cancel
);
FIXME
(
"(%s
, %p,
%p)
\n
"
,
debugstr_query_request
(
request
),
result
,
cancel
);
return
DNS_ERROR_RCODE_NOT_IMPLEMENTED
;
}
...
...
@@ -129,14 +127,14 @@ DNS_STATUS WINAPI DnsQueryEx(DNS_QUERY_REQUEST *request, DNS_QUERY_RESULT *resul
* DnsQuery_A [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsQuery_A
(
PCSTR
name
,
WORD
type
,
DWORD
options
,
PVOID
servers
,
PDNS_RECORDA
*
result
,
PVOID
*
reserved
)
DNS_STATUS
WINAPI
DnsQuery_A
(
const
char
*
name
,
WORD
type
,
DWORD
options
,
void
*
servers
,
DNS_RECORDA
**
result
,
void
*
*
reserved
)
{
WCHAR
*
nameW
;
DNS_RECORDW
*
resultW
;
DNS_STATUS
status
;
TRACE
(
"(%s,
%s,0x%08x,%p,%p,
%p)
\n
"
,
debugstr_a
(
name
),
debugstr_type
(
type
),
TRACE
(
"(%s,
%s, %#lx, %p, %p,
%p)
\n
"
,
debugstr_a
(
name
),
debugstr_type
(
type
),
options
,
servers
,
result
,
reserved
);
if
(
!
name
||
!
result
)
...
...
@@ -164,15 +162,15 @@ DNS_STATUS WINAPI DnsQuery_A( PCSTR name, WORD type, DWORD options, PVOID server
* DnsQuery_UTF8 [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsQuery_UTF8
(
PCSTR
name
,
WORD
type
,
DWORD
options
,
PVOID
servers
,
PDNS_RECORDA
*
result
,
PVOID
*
reserved
)
DNS_STATUS
WINAPI
DnsQuery_UTF8
(
const
char
*
name
,
WORD
type
,
DWORD
options
,
void
*
servers
,
DNS_RECORDA
**
result
,
void
*
*
reserved
)
{
DNS_STATUS
ret
=
DNS_ERROR_RCODE_NOT_IMPLEMENTED
;
unsigned
char
answer
[
4096
];
DWORD
len
=
sizeof
(
answer
);
struct
query_params
query_params
=
{
name
,
type
,
options
,
answer
,
&
len
};
TRACE
(
"(%s,
%s,0x%08x,%p,%p,
%p)
\n
"
,
debugstr_a
(
name
),
debugstr_type
(
type
),
TRACE
(
"(%s,
%s, %#lx, %p, %p,
%p)
\n
"
,
debugstr_a
(
name
),
debugstr_type
(
type
),
options
,
servers
,
result
,
reserved
);
if
(
!
name
||
!
result
)
...
...
@@ -218,14 +216,14 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
* DnsQuery_W [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsQuery_W
(
PCWSTR
name
,
WORD
type
,
DWORD
options
,
PVOID
servers
,
PDNS_RECORDW
*
result
,
PVOID
*
reserved
)
DNS_STATUS
WINAPI
DnsQuery_W
(
const
WCHAR
*
name
,
WORD
type
,
DWORD
options
,
void
*
servers
,
DNS_RECORDW
**
result
,
void
*
*
reserved
)
{
char
*
nameU
;
DNS_RECORDA
*
resultA
;
DNS_STATUS
status
;
TRACE
(
"(%s,
%s,0x%08x,%p,%p,
%p)
\n
"
,
debugstr_w
(
name
),
debugstr_type
(
type
),
TRACE
(
"(%s,
%s, %#lx, %p, %p,
%p)
\n
"
,
debugstr_w
(
name
),
debugstr_type
(
type
),
options
,
servers
,
result
,
reserved
);
if
(
!
name
||
!
result
)
...
...
@@ -329,13 +327,12 @@ err:
* DnsQueryConfig [DNSAPI.@]
*
*/
DNS_STATUS
WINAPI
DnsQueryConfig
(
DNS_CONFIG_TYPE
config
,
DWORD
flag
,
PCWSTR
adapter
,
PVOID
reserved
,
PVOID
buffer
,
PDWORD
len
)
DNS_STATUS
WINAPI
DnsQueryConfig
(
DNS_CONFIG_TYPE
config
,
DWORD
flag
,
const
WCHAR
*
adapter
,
void
*
reserved
,
void
*
buffer
,
DWORD
*
len
)
{
DNS_STATUS
ret
=
ERROR_INVALID_PARAMETER
;
TRACE
(
"(%d,0x%08x,%s,%p,%p,%p)
\n
"
,
config
,
flag
,
debugstr_w
(
adapter
),
reserved
,
buffer
,
len
);
TRACE
(
"(%d, %#lx, %s, %p, %p, %p)
\n
"
,
config
,
flag
,
debugstr_w
(
adapter
),
reserved
,
buffer
,
len
);
if
(
!
len
)
return
ERROR_INVALID_PARAMETER
;
...
...
dlls/dnsapi/tests/Makefile.in
View file @
5a446236
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
dnsapi.dll
IMPORTS
=
dnsapi ws2_32 iphlpapi
...
...
dlls/dnsapi/tests/name.c
View file @
5a446236
...
...
@@ -150,7 +150,7 @@ static void test_DnsValidateName_A( void )
{
status
=
DnsValidateName_A
(
test_data
[
i
].
name
,
test_data
[
i
].
format
);
ok
(
status
==
test_data
[
i
].
status
||
broken
(
status
==
test_data
[
i
].
status_broken
),
"%
d:
\'
%s
\'
: got %d, expected %
d
\n
"
,
i
,
test_data
[
i
].
name
,
status
,
test_data
[
i
].
status
);
"%
u:
\'
%s
\'
: got %ld, expected %l
d
\n
"
,
i
,
test_data
[
i
].
name
,
status
,
test_data
[
i
].
status
);
}
}
...
...
@@ -213,7 +213,7 @@ static void test_DnsFlushResolverCacheEntry_A(void)
ret
=
DnsFlushResolverCacheEntry_A
(
NULL
);
err
=
GetLastError
();
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
err
==
0xdeadbeef
,
"got %u
\n
"
,
err
);
ok
(
err
==
0xdeadbeef
,
"got %
l
u
\n
"
,
err
);
ret
=
DnsFlushResolverCacheEntry_A
(
"localhost"
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
...
...
dlls/dnsapi/tests/query.c
View file @
5a446236
...
...
@@ -46,20 +46,22 @@ static void test_DnsQuery(void)
skip
(
"query timed out
\n
"
);
return
;
}
ok
(
status
==
ERROR_SUCCESS
,
"got %d
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"got %
l
d
\n
"
,
status
);
DnsRecordListFree
(
rec
,
DnsFreeRecordList
);
status
=
DnsQuery_W
(
L""
,
DNS_TYPE_SRV
,
DNS_QUERY_STANDARD
,
NULL
,
&
rec
,
NULL
);
ok
(
status
==
DNS_ERROR_RCODE_NAME_ERROR
||
status
==
DNS_INFO_NO_RECORDS
||
status
==
ERROR_INVALID_NAME
/* XP */
,
"got %u
\n
"
,
status
);
ok
(
status
==
DNS_ERROR_RCODE_NAME_ERROR
||
status
==
DNS_INFO_NO_RECORDS
||
status
==
ERROR_INVALID_NAME
/* XP */
,
"got %ld
\n
"
,
status
);
wcscpy
(
domain
,
L"_ldap._tcp.deadbeef"
);
status
=
DnsQuery_W
(
domain
,
DNS_TYPE_SRV
,
DNS_QUERY_STANDARD
,
NULL
,
&
rec
,
NULL
);
ok
(
status
==
DNS_ERROR_RCODE_NAME_ERROR
||
status
==
DNS_INFO_NO_RECORDS
||
status
==
ERROR_INVALID_NAME
/* XP */
,
"got %u
\n
"
,
status
);
ok
(
status
==
DNS_ERROR_RCODE_NAME_ERROR
||
status
==
DNS_INFO_NO_RECORDS
||
status
==
ERROR_INVALID_NAME
/* XP */
,
"got %ld
\n
"
,
status
);
wcscpy
(
domain
,
L"_ldap._tcp.dc._msdcs."
);
size
=
ARRAY_SIZE
(
domain
)
-
wcslen
(
domain
);
ret
=
GetComputerNameExW
(
ComputerNameDnsDomain
,
domain
+
wcslen
(
domain
),
&
size
);
ok
(
ret
,
"GetComputerNameEx error %u
\n
"
,
GetLastError
());
ok
(
ret
,
"GetComputerNameEx error %
l
u
\n
"
,
GetLastError
());
if
(
!
size
)
{
skip
(
"computer is not in a domain
\n
"
);
...
...
@@ -67,7 +69,7 @@ static void test_DnsQuery(void)
}
status
=
DnsQuery_W
(
domain
,
DNS_TYPE_SRV
,
DNS_QUERY_STANDARD
,
NULL
,
&
rec
,
NULL
);
trace
(
"DnsQuery_W(%s) => %d
\n
"
,
wine_dbgstr_w
(
domain
),
status
);
trace
(
"DnsQuery_W(%s) => %
l
d
\n
"
,
wine_dbgstr_w
(
domain
),
status
);
if
(
status
!=
ERROR_SUCCESS
)
{
skip
(
"domain %s doesn't have an SRV entry
\n
"
,
wine_dbgstr_w
(
domain
));
...
...
@@ -81,7 +83,8 @@ static void test_DnsQuery(void)
/* IPv4 */
status
=
DnsQuery_W
(
name
,
DNS_TYPE_A
,
DNS_QUERY_STANDARD
,
NULL
,
&
rec
,
NULL
);
ok
(
status
==
ERROR_SUCCESS
||
status
==
DNS_ERROR_RCODE_NAME_ERROR
,
"DnsQuery_W(%s) => %d
\n
"
,
wine_dbgstr_w
(
name
),
status
);
ok
(
status
==
ERROR_SUCCESS
||
status
==
DNS_ERROR_RCODE_NAME_ERROR
,
"DnsQuery_W(%s) => %ld
\n
"
,
wine_dbgstr_w
(
name
),
status
);
if
(
status
==
ERROR_SUCCESS
)
{
SOCKADDR_IN
addr
;
...
...
@@ -92,7 +95,7 @@ static void test_DnsQuery(void)
addr
.
sin_addr
.
s_addr
=
rec
->
Data
.
A
.
IpAddress
;
size
=
sizeof
(
buf
);
ret
=
WSAAddressToStringW
((
SOCKADDR
*
)
&
addr
,
sizeof
(
addr
),
NULL
,
buf
,
&
size
);
ok
(
!
ret
,
"WSAAddressToStringW error %
d
\n
"
,
ret
);
ok
(
!
ret
,
"WSAAddressToStringW error %
lu
\n
"
,
ret
);
trace
(
"WSAAddressToStringW => %s
\n
"
,
wine_dbgstr_w
(
buf
));
DnsRecordListFree
(
rec
,
DnsFreeRecordList
);
...
...
@@ -100,7 +103,8 @@ static void test_DnsQuery(void)
/* IPv6 */
status
=
DnsQuery_W
(
name
,
DNS_TYPE_AAAA
,
DNS_QUERY_STANDARD
,
NULL
,
&
rec
,
NULL
);
ok
(
status
==
ERROR_SUCCESS
||
status
==
DNS_ERROR_RCODE_NAME_ERROR
,
"DnsQuery_W(%s) => %d
\n
"
,
wine_dbgstr_w
(
name
),
status
);
ok
(
status
==
ERROR_SUCCESS
||
status
==
DNS_ERROR_RCODE_NAME_ERROR
,
"DnsQuery_W(%s) => %ld
\n
"
,
wine_dbgstr_w
(
name
),
status
);
if
(
status
==
ERROR_SUCCESS
)
{
SOCKADDR_IN6
addr
;
...
...
@@ -112,7 +116,7 @@ static void test_DnsQuery(void)
memcpy
(
addr
.
sin6_addr
.
s6_addr
,
&
rec
->
Data
.
AAAA
.
Ip6Address
,
sizeof
(
rec
->
Data
.
AAAA
.
Ip6Address
));
size
=
sizeof
(
buf
);
ret
=
WSAAddressToStringW
((
SOCKADDR
*
)
&
addr
,
sizeof
(
addr
),
NULL
,
buf
,
&
size
);
ok
(
!
ret
,
"WSAAddressToStringW error %
d
\n
"
,
ret
);
ok
(
!
ret
,
"WSAAddressToStringW error %
lu
\n
"
,
ret
);
trace
(
"WSAAddressToStringW => %s
\n
"
,
wine_dbgstr_w
(
buf
));
DnsRecordListFree
(
rec
,
DnsFreeRecordList
);
...
...
@@ -138,7 +142,8 @@ static IP_ADAPTER_ADDRESSES *get_adapters(void)
static
void
test_DnsQueryConfig
(
void
)
{
DWORD
err
,
size
,
i
,
ipv6_count
;
DNS_STATUS
err
;
DWORD
size
,
i
,
ipv6_count
;
WCHAR
name
[
MAX_ADAPTER_NAME_LENGTH
+
1
];
IP_ADAPTER_ADDRESSES
*
adapters
,
*
ptr
;
DNS_ADDR_ARRAY
*
ipv4
,
*
ipv6
,
*
unspec
;
...
...
@@ -157,61 +162,61 @@ static void test_DnsQueryConfig( void )
ipv4
=
malloc
(
size
);
size
--
;
err
=
DnsQueryConfig
(
DnsConfigDnsServersIpv4
,
0
,
name
,
NULL
,
ipv4
,
&
size
);
ok
(
err
==
ERROR_MORE_DATA
,
"got %d
\n
"
,
err
);
ok
(
err
==
ERROR_MORE_DATA
,
"got %
l
d
\n
"
,
err
);
size
++
;
err
=
DnsQueryConfig
(
DnsConfigDnsServersIpv4
,
0
,
name
,
NULL
,
ipv4
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
ok
(
ipv4
->
AddrCount
==
ipv4
->
MaxCount
,
"got %
d vs %d
\n
"
,
ipv4
->
AddrCount
,
ipv4
->
MaxCount
);
ok
(
!
ipv4
->
Tag
,
"got %
08
x
\n
"
,
ipv4
->
Tag
);
ok
(
ipv4
->
AddrCount
==
ipv4
->
MaxCount
,
"got %
lu vs %lu
\n
"
,
ipv4
->
AddrCount
,
ipv4
->
MaxCount
);
ok
(
!
ipv4
->
Tag
,
"got %
#l
x
\n
"
,
ipv4
->
Tag
);
ok
(
!
ipv4
->
Family
,
"got %d
\n
"
,
ipv4
->
Family
);
ok
(
!
ipv4
->
WordReserved
,
"got %
04
x
\n
"
,
ipv4
->
WordReserved
);
ok
(
!
ipv4
->
Flags
,
"got %
08
x
\n
"
,
ipv4
->
Flags
);
ok
(
!
ipv4
->
MatchFlag
,
"got %
08
x
\n
"
,
ipv4
->
MatchFlag
);
ok
(
!
ipv4
->
Reserved1
,
"got %
08
x
\n
"
,
ipv4
->
Reserved1
);
ok
(
!
ipv4
->
Reserved2
,
"got %
08
x
\n
"
,
ipv4
->
Reserved2
);
ok
(
!
ipv4
->
WordReserved
,
"got %
#
x
\n
"
,
ipv4
->
WordReserved
);
ok
(
!
ipv4
->
Flags
,
"got %
#l
x
\n
"
,
ipv4
->
Flags
);
ok
(
!
ipv4
->
MatchFlag
,
"got %
#l
x
\n
"
,
ipv4
->
MatchFlag
);
ok
(
!
ipv4
->
Reserved1
,
"got %
#l
x
\n
"
,
ipv4
->
Reserved1
);
ok
(
!
ipv4
->
Reserved2
,
"got %
#l
x
\n
"
,
ipv4
->
Reserved2
);
size
=
0
;
err
=
DnsQueryConfig
(
DnsConfigDnsServerList
,
0
,
name
,
NULL
,
NULL
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
ip4_array
=
malloc
(
size
);
err
=
DnsQueryConfig
(
DnsConfigDnsServerList
,
0
,
name
,
NULL
,
ip4_array
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
ok
(
ipv4
->
AddrCount
==
ip4_array
->
AddrCount
,
"got %
d vs %d
\n
"
,
ipv4
->
AddrCount
,
ip4_array
->
AddrCount
);
ok
(
ipv4
->
AddrCount
==
ip4_array
->
AddrCount
,
"got %
lu vs %lu
\n
"
,
ipv4
->
AddrCount
,
ip4_array
->
AddrCount
);
for
(
i
=
0
;
i
<
ipv4
->
AddrCount
;
i
++
)
{
SOCKADDR_IN
*
sa
=
(
SOCKADDR_IN
*
)
ipv4
->
AddrArray
[
i
].
MaxSa
;
ok
(
sa
->
sin_family
==
AF_INET
,
"got %d
\n
"
,
sa
->
sin_family
);
ok
(
sa
->
sin_addr
.
s_addr
==
ip4_array
->
AddrArray
[
i
],
"got %
08x vs %08
x
\n
"
,
ok
(
sa
->
sin_addr
.
s_addr
==
ip4_array
->
AddrArray
[
i
],
"got %
#lx vs %#l
x
\n
"
,
sa
->
sin_addr
.
s_addr
,
ip4_array
->
AddrArray
[
i
]
);
ok
(
ipv4
->
AddrArray
[
i
].
Data
.
DnsAddrUserDword
[
0
]
==
sizeof
(
*
sa
),
"got %
d
\n
"
,
ok
(
ipv4
->
AddrArray
[
i
].
Data
.
DnsAddrUserDword
[
0
]
==
sizeof
(
*
sa
),
"got %
lu
\n
"
,
ipv4
->
AddrArray
[
i
].
Data
.
DnsAddrUserDword
[
0
]
);
}
size
=
0
;
err
=
DnsQueryConfig
(
DnsConfigDnsServersIpv6
,
0
,
name
,
NULL
,
NULL
,
&
size
);
ok
(
!
err
||
err
==
DNS_ERROR_NO_DNS_SERVERS
,
"got %d
\n
"
,
err
);
ok
(
!
err
||
err
==
DNS_ERROR_NO_DNS_SERVERS
,
"got %
l
d
\n
"
,
err
);
ipv6_count
=
0
;
ipv6
=
NULL
;
if
(
!
err
)
{
ipv6
=
malloc
(
size
);
err
=
DnsQueryConfig
(
DnsConfigDnsServersIpv6
,
0
,
name
,
NULL
,
ipv6
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
ipv6_count
=
ipv6
->
AddrCount
;
}
size
=
0
;
err
=
DnsQueryConfig
(
DnsConfigDnsServersUnspec
,
0
,
name
,
NULL
,
NULL
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
unspec
=
malloc
(
size
);
err
=
DnsQueryConfig
(
DnsConfigDnsServersUnspec
,
0
,
name
,
NULL
,
unspec
,
&
size
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
!
err
,
"got %
l
d
\n
"
,
err
);
ok
(
unspec
->
AddrCount
==
ipv4
->
AddrCount
+
ipv6_count
,
"got %
d vs %d + %d
\n
"
,
ok
(
unspec
->
AddrCount
==
ipv4
->
AddrCount
+
ipv6_count
,
"got %
lu vs %lu + %lu
\n
"
,
unspec
->
AddrCount
,
ipv4
->
AddrCount
,
ipv6_count
);
free
(
ip4_array
);
...
...
dlls/dnsapi/tests/record.c
View file @
5a446236
...
...
@@ -202,58 +202,58 @@ static void test_DnsExtractRecordsFromMessage(void)
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_empty
,
sizeof
(
msg_empty
)
-
1
,
&
rec
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
||
broken
(
ret
==
DNS_ERROR_BAD_PACKET
)
/* win7 */
,
"failed %
u
\n
"
,
ret
);
"failed %
ld
\n
"
,
ret
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_empty
,
sizeof
(
msg_empty
),
&
rec
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
u
\n
"
,
ret
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
ld
\n
"
,
ret
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_empty_answer
,
sizeof
(
msg_empty_answer
),
&
rec
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
u
\n
"
,
ret
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
ld
\n
"
,
ret
);
rec
=
(
void
*
)
0xdeadbeef
;
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_question
,
sizeof
(
msg_question
),
&
rec
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
ok
(
!
rec
,
"record %p
\n
"
,
rec
);
rec
=
(
void
*
)
0xdeadbeef
;
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_winehq
,
sizeof
(
msg_winehq
),
&
rec
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
ok
(
rec
!=
NULL
,
"record not set
\n
"
);
ok
(
!
strcmp
(
rec
->
pName
,
"winehq.org"
),
"wrong name %s
\n
"
,
rec
->
pName
);
ok
(
rec
->
Flags
.
S
.
Section
==
DnsSectionAnswer
,
"wrong section %u
\n
"
,
rec
->
Flags
.
S
.
Section
);
ok
(
rec
->
Flags
.
S
.
CharSet
==
DnsCharSetUtf8
,
"wrong charset %u
\n
"
,
rec
->
Flags
.
S
.
CharSet
);
ok
(
rec
->
wType
==
DNS_TYPE_A
,
"wrong type %u
\n
"
,
rec
->
wType
);
ok
(
rec
->
wDataLength
==
sizeof
(
DNS_A_DATA
),
"wrong len %u
\n
"
,
rec
->
wDataLength
);
ok
(
rec
->
dwTtl
==
0x04050607
,
"wrong ttl %x
\n
"
,
rec
->
dwTtl
);
ok
(
rec
->
Data
.
A
.
IpAddress
==
0x7c510404
,
"wrong addr %
08
x
\n
"
,
rec
->
Data
.
A
.
IpAddress
);
ok
(
rec
->
dwTtl
==
0x04050607
,
"wrong ttl %
#l
x
\n
"
,
rec
->
dwTtl
);
ok
(
rec
->
Data
.
A
.
IpAddress
==
0x7c510404
,
"wrong addr %
#l
x
\n
"
,
rec
->
Data
.
A
.
IpAddress
);
ok
(
!
rec
->
pNext
,
"next record %p
\n
"
,
rec
->
pNext
);
DnsRecordListFree
(
(
DNS_RECORD
*
)
rec
,
DnsFreeRecordList
);
recW
=
(
void
*
)
0xdeadbeef
;
ret
=
DnsExtractRecordsFromMessage_W
(
(
DNS_MESSAGE_BUFFER
*
)
msg_winehq
,
sizeof
(
msg_winehq
),
&
recW
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
ok
(
recW
!=
NULL
,
"record not set
\n
"
);
ok
(
!
wcscmp
(
recW
->
pName
,
L"winehq.org"
),
"wrong name %s
\n
"
,
debugstr_w
(
recW
->
pName
)
);
DnsRecordListFree
(
(
DNS_RECORD
*
)
recW
,
DnsFreeRecordList
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_invchars
,
sizeof
(
msg_invchars
),
&
rec
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
ok
(
!
strcmp
(
rec
->
pName
,
"a$.b
\\
.c..
\t
d"
),
"wrong name %s
\n
"
,
rec
->
pName
);
DnsRecordListFree
(
(
DNS_RECORD
*
)
rec
,
DnsFreeRecordList
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_root
,
sizeof
(
msg_root
),
&
rec
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
ok
(
!
strcmp
(
rec
->
pName
,
"."
),
"wrong name %s
\n
"
,
rec
->
pName
);
DnsRecordListFree
(
(
DNS_RECORD
*
)
rec
,
DnsFreeRecordList
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_label
,
sizeof
(
msg_label
),
&
rec
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
u
\n
"
,
ret
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
ld
\n
"
,
ret
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_loop
,
sizeof
(
msg_loop
),
&
rec
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
u
\n
"
,
ret
);
ok
(
ret
==
DNS_ERROR_BAD_PACKET
,
"failed %
ld
\n
"
,
ret
);
ret
=
DnsExtractRecordsFromMessage_UTF8
(
(
DNS_MESSAGE_BUFFER
*
)
msg_types
,
sizeof
(
msg_types
),
&
rec
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
r
=
rec
;
ok
(
r
!=
NULL
,
"record not set
\n
"
);
ok
(
!
strcmp
(
r
->
pName
,
"winehq.org"
),
"wrong name %s
\n
"
,
r
->
pName
);
...
...
@@ -271,15 +271,15 @@ static void test_DnsExtractRecordsFromMessage(void)
ok
(
r
!=
NULL
,
"record not set
\n
"
);
ok
(
!
strcmp
(
r
->
pName
,
"winehq.org"
),
"wrong name %s
\n
"
,
r
->
pName
);
ok
(
r
->
wType
==
DNS_TYPE_AAAA
,
"wrong type %u
\n
"
,
r
->
wType
);
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
0
]
==
0x04030201
,
"wrong addr %x
\n
"
,
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
0
]
==
0x04030201
,
"wrong addr %
#l
x
\n
"
,
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
0
]
);
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
1
]
==
0x08070605
,
"wrong addr %x
\n
"
,
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
1
]
==
0x08070605
,
"wrong addr %
#l
x
\n
"
,
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
1
]
);
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
2
]
==
0x0c0b0a09
,
"wrong addr %x
\n
"
,
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
2
]
==
0x0c0b0a09
,
"wrong addr %
#l
x
\n
"
,
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
2
]
);
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
3
]
==
0x000f0e0d
,
"wrong addr %x
\n
"
,
ok
(
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
3
]
==
0x000f0e0d
,
"wrong addr %
#l
x
\n
"
,
r
->
Data
.
AAAA
.
Ip6Address
.
IP6Dword
[
3
]
);
ok
(
r
->
wDataLength
==
sizeof
(
DNS_AAAA_DATA
),
"wrong len %
x
\n
"
,
r
->
wDataLength
);
ok
(
r
->
wDataLength
==
sizeof
(
DNS_AAAA_DATA
),
"wrong len %
u
\n
"
,
r
->
wDataLength
);
r
=
r
->
pNext
;
ok
(
r
!=
NULL
,
"record not set
\n
"
);
ok
(
!
strcmp
(
r
->
pName
,
"winehq.org"
),
"wrong name %s
\n
"
,
r
->
pName
);
...
...
@@ -296,7 +296,7 @@ static void test_DnsExtractRecordsFromMessage(void)
ok
(
r
!=
NULL
,
"record not set
\n
"
);
ok
(
!
strcmp
(
r
->
pName
,
"t.x"
),
"wrong name %s
\n
"
,
r
->
pName
);
ok
(
r
->
wType
==
DNS_TYPE_TEXT
,
"wrong type %u
\n
"
,
r
->
wType
);
ok
(
r
->
Data
.
TXT
.
dwStringCount
==
3
,
"wrong count %u
\n
"
,
r
->
Data
.
TXT
.
dwStringCount
);
ok
(
r
->
Data
.
TXT
.
dwStringCount
==
3
,
"wrong count %
l
u
\n
"
,
r
->
Data
.
TXT
.
dwStringCount
);
ok
(
!
strcmp
(
r
->
Data
.
TXT
.
pStringArray
[
0
],
"zy"
),
"wrong string %s
\n
"
,
r
->
Data
.
TXT
.
pStringArray
[
0
]
);
ok
(
!
strcmp
(
r
->
Data
.
TXT
.
pStringArray
[
1
],
""
),
"wrong string %s
\n
"
,
r
->
Data
.
TXT
.
pStringArray
[
1
]
);
ok
(
!
strcmp
(
r
->
Data
.
TXT
.
pStringArray
[
2
],
"XY
\xc3\xa9
"
),
"wrong string %s
\n
"
,
r
->
Data
.
TXT
.
pStringArray
[
2
]
);
...
...
@@ -306,7 +306,7 @@ static void test_DnsExtractRecordsFromMessage(void)
DnsRecordListFree
(
(
DNS_RECORD
*
)
rec
,
DnsFreeRecordList
);
ret
=
DnsExtractRecordsFromMessage_W
(
(
DNS_MESSAGE_BUFFER
*
)
msg_types
,
sizeof
(
msg_types
),
&
recW
);
ok
(
!
ret
,
"failed %
u
\n
"
,
ret
);
ok
(
!
ret
,
"failed %
ld
\n
"
,
ret
);
rW
=
recW
;
ok
(
rW
!=
NULL
,
"record not set
\n
"
);
ok
(
!
wcscmp
(
rW
->
pName
,
L"winehq.org"
),
"wrong name %s
\n
"
,
debugstr_w
(
rW
->
pName
)
);
...
...
@@ -328,7 +328,7 @@ static void test_DnsExtractRecordsFromMessage(void)
ok
(
r
!=
NULL
,
"record not set
\n
"
);
ok
(
!
wcscmp
(
rW
->
pName
,
L"t.x"
),
"wrong name %s
\n
"
,
debugstr_w
(
rW
->
pName
)
);
ok
(
rW
->
wType
==
DNS_TYPE_TEXT
,
"wrong type %u
\n
"
,
rW
->
wType
);
ok
(
rW
->
Data
.
TXT
.
dwStringCount
==
3
,
"wrong count %u
\n
"
,
rW
->
Data
.
TXT
.
dwStringCount
);
ok
(
rW
->
Data
.
TXT
.
dwStringCount
==
3
,
"wrong count %
l
u
\n
"
,
rW
->
Data
.
TXT
.
dwStringCount
);
ok
(
!
wcscmp
(
rW
->
Data
.
TXT
.
pStringArray
[
0
],
L"zy"
),
"wrong string %s
\n
"
,
debugstr_w
(
rW
->
Data
.
TXT
.
pStringArray
[
0
])
);
ok
(
!
wcscmp
(
rW
->
Data
.
TXT
.
pStringArray
[
1
],
L""
),
"wrong string %s
\n
"
,
debugstr_w
(
rW
->
Data
.
TXT
.
pStringArray
[
1
])
);
ok
(
!
wcscmp
(
rW
->
Data
.
TXT
.
pStringArray
[
2
],
L"XY
\x00e9
"
),
"wrong string %s
\n
"
,
debugstr_w
(
rW
->
Data
.
TXT
.
pStringArray
[
2
])
);
...
...
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