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
a282c150
Commit
a282c150
authored
Jun 03, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jun 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Fix some test thread procedure prototypes.
parent
e9e0df23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
sock.c
dlls/ws2_32/tests/sock.c
+13
-7
No files found.
dlls/ws2_32/tests/sock.c
View file @
a282c150
...
...
@@ -1550,7 +1550,7 @@ static void test_UDP(void)
}
}
static
void
WINAPI
do_getservbyname
(
HANDLE
*
starttest
)
static
DWORD
WINAPI
do_getservbyname
(
void
*
param
)
{
struct
{
const
char
*
name
;
...
...
@@ -1558,6 +1558,7 @@ static void WINAPI do_getservbyname( HANDLE *starttest )
int
port
;
}
serv
[
2
]
=
{
{
"domain"
,
"udp"
,
53
},
{
"telnet"
,
"tcp"
,
23
}
};
HANDLE
*
starttest
=
param
;
int
i
,
j
;
struct
servent
*
pserv
[
2
];
...
...
@@ -1579,6 +1580,8 @@ static void WINAPI do_getservbyname( HANDLE *starttest )
ok
(
pserv
[
0
]
==
pserv
[
1
],
"getservbyname: winsock resized servent buffer when not necessary
\n
"
);
}
return
0
;
}
static
void
test_getservbyname
(
void
)
...
...
@@ -1591,7 +1594,7 @@ static void test_getservbyname(void)
/* create threads */
for
(
i
=
0
;
i
<
NUM_THREADS
;
i
++
)
{
thread
[
i
]
=
CreateThread
(
NULL
,
0
,
(
LPTHREAD_START_ROUTINE
)
&
do_getservbyname
,
&
starttest
,
0
,
&
thread_id
[
i
]
);
thread
[
i
]
=
CreateThread
(
NULL
,
0
,
do_getservbyname
,
&
starttest
,
0
,
&
thread_id
[
i
]
);
}
/* signal threads to start */
...
...
@@ -2235,8 +2238,9 @@ static void test_WSAStringToAddressW(void)
}
static
VOID
WINAPI
SelectReadThread
(
select_thread_params
*
par
)
static
DWORD
WINAPI
SelectReadThread
(
void
*
param
)
{
select_thread_params
*
par
=
param
;
fd_set
readfds
;
int
ret
;
struct
sockaddr_in
addr
;
...
...
@@ -2256,6 +2260,8 @@ static VOID WINAPI SelectReadThread(select_thread_params *par)
SetEvent
(
server_ready
);
ret
=
select
(
par
->
s
+
1
,
&
readfds
,
NULL
,
NULL
,
&
select_timeout
);
par
->
ReadKilled
=
(
ret
==
1
);
return
0
;
}
static
void
test_errors
(
void
)
...
...
@@ -2344,7 +2350,7 @@ static void test_select(void)
thread_params
.
s
=
fdRead
;
thread_params
.
ReadKilled
=
FALSE
;
server_ready
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
thread_handle
=
CreateThread
(
NULL
,
0
,
(
LPTHREAD_START_ROUTINE
)
&
SelectReadThread
,
&
thread_params
,
0
,
&
id
);
thread_handle
=
CreateThread
(
NULL
,
0
,
SelectReadThread
,
&
thread_params
,
0
,
&
id
);
ok
(
(
thread_handle
!=
NULL
),
"CreateThread failed unexpectedly: %d
\n
"
,
GetLastError
());
WaitForSingleObject
(
server_ready
,
INFINITE
);
...
...
@@ -2396,8 +2402,9 @@ static void test_select(void)
ok
(
!
FD_ISSET
(
fdRead
,
&
exceptfds
),
"FD should not be set
\n
"
);
}
static
DWORD
WINAPI
AcceptKillThread
(
select_thread_params
*
par
)
static
DWORD
WINAPI
AcceptKillThread
(
void
*
param
)
{
select_thread_params
*
par
=
param
;
struct
sockaddr_in
address
;
int
len
=
sizeof
(
address
);
SOCKET
client_socket
;
...
...
@@ -2482,8 +2489,7 @@ static void test_accept(void)
thread_params
.
s
=
server_socket
;
thread_params
.
ReadKilled
=
FALSE
;
thread_handle
=
CreateThread
(
NULL
,
0
,
(
LPTHREAD_START_ROUTINE
)
AcceptKillThread
,
&
thread_params
,
0
,
&
id
);
thread_handle
=
CreateThread
(
NULL
,
0
,
AcceptKillThread
,
&
thread_params
,
0
,
&
id
);
if
(
thread_handle
==
NULL
)
{
trace
(
"error creating thread: %d
\n
"
,
GetLastError
());
...
...
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