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
f928580a
Commit
f928580a
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: Set FD_READ in only 1 place (cleanup).
parent
688b94b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
sock.c
server/sock.c
+4
-13
No files found.
server/sock.c
View file @
f928580a
...
...
@@ -381,18 +381,9 @@ static void sock_poll_event( struct fd *fd, int event )
/* Linux 2.4 doesn't report POLLHUP if only one side of the socket
* has been closed, so we need to check for it explicitly here */
nr
=
recv
(
get_unix_fd
(
fd
),
&
dummy
,
1
,
MSG_PEEK
);
if
(
nr
>
0
)
{
/* incoming data */
sock
->
pmask
|=
FD_READ
;
sock
->
hmask
|=
(
FD_READ
|
FD_CLOSE
);
sock
->
errors
[
FD_READ_BIT
]
=
0
;
if
(
debug_level
)
fprintf
(
stderr
,
"socket %p is readable
\n
"
,
sock
);
}
else
if
(
nr
==
0
)
if
(
nr
==
0
)
hangup_seen
=
1
;
else
else
if
(
nr
<
0
)
{
/* EAGAIN can happen if an async recv() falls between the server's poll()
call and the invocation of this routine */
...
...
@@ -411,14 +402,14 @@ static void sock_poll_event( struct fd *fd, int event )
{
hangup_seen
=
1
;
}
else
if
(
event
&
POLLIN
)
/* POLLIN for non-stream socket */
if
(
event
&
POLLIN
&&
!
hangup_seen
)
{
sock
->
pmask
|=
FD_READ
;
sock
->
hmask
|=
(
FD_READ
|
FD_CLOSE
);
sock
->
errors
[
FD_READ_BIT
]
=
0
;
if
(
debug_level
)
fprintf
(
stderr
,
"socket %p is readable
\n
"
,
sock
);
}
if
(
event
&
POLLOUT
)
...
...
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