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
12783dab
Commit
12783dab
authored
Feb 08, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Hold a reference to both sockets in the accept_req structure.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
27db2834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
sock.c
server/sock.c
+12
-5
No files found.
server/sock.c
View file @
12783dab
...
...
@@ -127,7 +127,7 @@ struct accept_req
struct
list
entry
;
struct
async
*
async
;
struct
iosb
*
iosb
;
struct
sock
*
acceptsock
;
struct
sock
*
sock
,
*
acceptsock
;
int
accepted
;
unsigned
int
recv_len
,
local_len
;
};
...
...
@@ -452,9 +452,14 @@ static inline int sock_error( struct fd *fd )
static
void
free_accept_req
(
struct
accept_req
*
req
)
{
list_remove
(
&
req
->
entry
);
if
(
req
->
acceptsock
)
req
->
acceptsock
->
accept_recv_req
=
NULL
;
if
(
req
->
acceptsock
)
{
req
->
acceptsock
->
accept_recv_req
=
NULL
;
release_object
(
req
->
acceptsock
);
}
release_object
(
req
->
async
);
release_object
(
req
->
iosb
);
release_object
(
req
->
sock
);
free
(
req
);
}
...
...
@@ -1361,7 +1366,7 @@ static int sock_get_ntstatus( int err )
}
}
static
struct
accept_req
*
alloc_accept_req
(
struct
sock
*
acceptsock
,
struct
async
*
async
,
static
struct
accept_req
*
alloc_accept_req
(
struct
sock
*
sock
,
struct
sock
*
acceptsock
,
struct
async
*
async
,
const
struct
afd_accept_into_params
*
params
)
{
struct
accept_req
*
req
=
mem_alloc
(
sizeof
(
*
req
)
);
...
...
@@ -1370,7 +1375,9 @@ static struct accept_req *alloc_accept_req( struct sock *acceptsock, struct asyn
{
req
->
async
=
(
struct
async
*
)
grab_object
(
async
);
req
->
iosb
=
async_get_iosb
(
async
);
req
->
sock
=
(
struct
sock
*
)
grab_object
(
sock
);
req
->
acceptsock
=
acceptsock
;
if
(
acceptsock
)
grab_object
(
acceptsock
);
req
->
accepted
=
0
;
req
->
recv_len
=
0
;
req
->
local_len
=
0
;
...
...
@@ -1424,7 +1431,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
if
(
sock
->
state
&
FD_WINE_NONBLOCKING
)
return
0
;
if
(
get_error
()
!=
(
0xc0010000
|
WSAEWOULDBLOCK
))
return
0
;
if
(
!
(
req
=
alloc_accept_req
(
NULL
,
async
,
NULL
)))
return
0
;
if
(
!
(
req
=
alloc_accept_req
(
sock
,
NULL
,
async
,
NULL
)))
return
0
;
list_add_tail
(
&
sock
->
accept_list
,
&
req
->
entry
);
queue_async
(
&
sock
->
accept_q
,
async
);
...
...
@@ -1473,7 +1480,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return
0
;
}
if
(
!
(
req
=
alloc_accept_req
(
acceptsock
,
async
,
params
)))
if
(
!
(
req
=
alloc_accept_req
(
sock
,
acceptsock
,
async
,
params
)))
{
release_object
(
acceptsock
);
return
0
;
...
...
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