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
75242f9b
Commit
75242f9b
authored
Apr 27, 2002
by
Martin Wilck
Committed by
Alexandre Julliard
Apr 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to FD_CLOSE handling.
parent
cf518bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
sock.c
server/sock.c
+6
-4
No files found.
server/sock.c
View file @
75242f9b
...
@@ -188,8 +188,6 @@ static void sock_wake_up( struct sock *sock, int pollev )
...
@@ -188,8 +188,6 @@ static void sock_wake_up( struct sock *sock, int pollev )
/* We need this to delay FD_CLOSE events until all pending overlapped requests are processed */
/* We need this to delay FD_CLOSE events until all pending overlapped requests are processed */
if
(
!
events
||
async_active
)
return
;
if
(
!
events
||
async_active
)
return
;
if
(
events
&
FD_CLOSE
)
sock
->
hmask
|=
FD_CLOSE
;
if
(
sock
->
event
)
if
(
sock
->
event
)
{
{
if
(
debug_level
)
fprintf
(
stderr
,
"signalling events %x ptr %p
\n
"
,
events
,
sock
->
event
);
if
(
debug_level
)
fprintf
(
stderr
,
"signalling events %x ptr %p
\n
"
,
events
,
sock
->
event
);
...
@@ -284,7 +282,7 @@ static void sock_poll_event( struct object *obj, int event )
...
@@ -284,7 +282,7 @@ static void sock_poll_event( struct object *obj, int event )
{
{
/* incoming data */
/* incoming data */
sock
->
pmask
|=
FD_READ
;
sock
->
pmask
|=
FD_READ
;
sock
->
hmask
|=
FD_READ
;
sock
->
hmask
|=
(
FD_READ
|
FD_CLOSE
)
;
sock
->
errors
[
FD_READ_BIT
]
=
0
;
sock
->
errors
[
FD_READ_BIT
]
=
0
;
if
(
debug_level
)
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d is readable
\n
"
,
sock
->
obj
.
fd
);
fprintf
(
stderr
,
"socket %d is readable
\n
"
,
sock
->
obj
.
fd
);
...
@@ -330,6 +328,7 @@ static void sock_poll_event( struct object *obj, int event )
...
@@ -330,6 +328,7 @@ static void sock_poll_event( struct object *obj, int event )
if
(
event
&
(
POLLERR
|
POLLHUP
)
)
if
(
event
&
(
POLLERR
|
POLLHUP
)
)
sock
->
state
&=
~
(
FD_WINE_CONNECTED
|
FD_WRITE
);
sock
->
state
&=
~
(
FD_WINE_CONNECTED
|
FD_WRITE
);
sock
->
pmask
|=
FD_CLOSE
;
sock
->
pmask
|=
FD_CLOSE
;
sock
->
hmask
|=
FD_CLOSE
;
if
(
debug_level
)
if
(
debug_level
)
fprintf
(
stderr
,
"socket %d aborted by error %d, event: %x - removing from select loop
\n
"
,
fprintf
(
stderr
,
"socket %d aborted by error %d, event: %x - removing from select loop
\n
"
,
sock
->
obj
.
fd
,
sock
->
errors
[
FD_CLOSE_BIT
],
event
);
sock
->
obj
.
fd
,
sock
->
errors
[
FD_CLOSE_BIT
],
event
);
...
@@ -390,7 +389,7 @@ static int sock_get_poll_events( struct object *obj )
...
@@ -390,7 +389,7 @@ static int sock_get_poll_events( struct object *obj )
if
(
mask
&
FD_WRITE
||
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
&&
IS_READY
(
sock
->
write_q
)))
if
(
mask
&
FD_WRITE
||
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
&&
IS_READY
(
sock
->
write_q
)))
ev
|=
POLLOUT
;
ev
|=
POLLOUT
;
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication. */
/* We use POLLIN with 0 bytes recv() as FD_CLOSE indication. */
if
(
sock
->
mask
&
~
sock
->
hmask
&
FD_CLOSE
&&
!
(
sock
->
hmask
&
FD_READ
)
)
if
(
sock
->
mask
&
~
sock
->
hmask
&
FD_CLOSE
)
ev
|=
POLLIN
;
ev
|=
POLLIN
;
return
ev
;
return
ev
;
...
@@ -447,6 +446,7 @@ static void sock_queue_async(struct object *obj, void *ptr, unsigned int status,
...
@@ -447,6 +446,7 @@ static void sock_queue_async(struct object *obj, void *ptr, unsigned int status,
{
{
case
ASYNC_TYPE_READ
:
case
ASYNC_TYPE_READ
:
q
=
&
sock
->
read_q
;
q
=
&
sock
->
read_q
;
sock
->
hmask
&=
~
FD_CLOSE
;
break
;
break
;
case
ASYNC_TYPE_WRITE
:
case
ASYNC_TYPE_WRITE
:
q
=
&
sock
->
write_q
;
q
=
&
sock
->
write_q
;
...
@@ -788,6 +788,8 @@ DECL_HANDLER(enable_socket_event)
...
@@ -788,6 +788,8 @@ DECL_HANDLER(enable_socket_event)
sock
->
pmask
&=
~
req
->
mask
;
/* is this safe? */
sock
->
pmask
&=
~
req
->
mask
;
/* is this safe? */
sock
->
hmask
&=
~
req
->
mask
;
sock
->
hmask
&=
~
req
->
mask
;
if
(
req
->
mask
&
FD_READ
)
sock
->
hmask
&=
~
FD_CLOSE
;
sock
->
state
|=
req
->
sstate
;
sock
->
state
|=
req
->
sstate
;
sock
->
state
&=
~
req
->
cstate
;
sock
->
state
&=
~
req
->
cstate
;
...
...
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