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
3aa93e11
Commit
3aa93e11
authored
May 12, 2010
by
Mike Kaplinskiy
Committed by
Alexandre Julliard
May 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use a less hackish approach to not POLLIN when we have a hung up socket.
parent
535f878e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
sock.c
server/sock.c
+3
-5
No files found.
server/sock.c
View file @
3aa93e11
...
...
@@ -406,7 +406,7 @@ static void sock_poll_event( struct fd *fd, int event )
if
(
event
&
POLLIN
&&
!
hangup_seen
)
{
sock
->
pmask
|=
FD_READ
;
sock
->
hmask
|=
(
FD_READ
|
FD_CLOSE
)
;
sock
->
hmask
|=
FD_READ
;
sock
->
errors
[
FD_READ_BIT
]
=
0
;
if
(
debug_level
)
fprintf
(
stderr
,
"socket %p is readable
\n
"
,
sock
);
...
...
@@ -498,7 +498,8 @@ static int sock_get_poll_events( struct fd *fd )
if
(
mask
&
FD_READ
||
async_waiting
(
sock
->
read_q
))
ev
|=
POLLIN
|
POLLPRI
;
if
(
mask
&
FD_WRITE
||
async_waiting
(
sock
->
write_q
))
ev
|=
POLLOUT
;
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication for stream sockets. */
if
(
sock
->
type
==
SOCK_STREAM
&&
(
sock
->
mask
&
~
sock
->
hmask
&
FD_CLOSE
)
)
if
(
sock
->
type
==
SOCK_STREAM
&&
(
sock
->
mask
&
~
sock
->
hmask
&
FD_CLOSE
)
&&
!
(
sock
->
hmask
&
FD_READ
)
&&
sock
->
state
&
FD_READ
)
ev
|=
POLLIN
;
return
ev
;
...
...
@@ -522,7 +523,6 @@ static void sock_queue_async( struct fd *fd, const async_data_t *data, int type,
case
ASYNC_TYPE_READ
:
if
(
!
sock
->
read_q
&&
!
(
sock
->
read_q
=
create_async_queue
(
sock
->
fd
)))
return
;
queue
=
sock
->
read_q
;
sock
->
hmask
&=
~
FD_CLOSE
;
break
;
case
ASYNC_TYPE_WRITE
:
if
(
!
sock
->
write_q
&&
!
(
sock
->
write_q
=
create_async_queue
(
sock
->
fd
)))
return
;
...
...
@@ -956,8 +956,6 @@ DECL_HANDLER(enable_socket_event)
sock
->
pmask
&=
~
req
->
mask
;
/* is this safe? */
sock
->
hmask
&=
~
req
->
mask
;
if
(
req
->
mask
&
FD_READ
)
sock
->
hmask
&=
~
FD_CLOSE
;
sock
->
state
|=
req
->
sstate
;
sock
->
state
&=
~
req
->
cstate
;
if
(
sock
->
type
!=
SOCK_STREAM
)
sock
->
state
&=
~
STREAM_FLAG_MASK
;
...
...
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