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
7a0f96c9
Commit
7a0f96c9
authored
Sep 06, 2000
by
Ove Kaaven
Committed by
Alexandre Julliard
Sep 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapted Winsock to Linux 2.4 TCP socket poll() behaviour
(thanks to Berend Ozceri for finding the problem).
parent
a1ce9161
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
sock.c
server/sock.c
+13
-3
No files found.
server/sock.c
View file @
7a0f96c9
...
...
@@ -83,6 +83,14 @@ static void sock_reselect( struct sock *sock )
if
(
debug_level
)
fprintf
(
stderr
,
"sock_reselect(%d): new mask %x
\n
"
,
sock
->
obj
.
fd
,
ev
);
if
(
sock
->
obj
.
select
==
-
1
)
{
/* previously unconnected socket, is this reselect supposed to connect it? */
if
(
!
sock
->
state
)
return
;
/* ok, it is, attach it to the wineserver's main poll loop */
add_select_user
(
&
sock
->
obj
);
}
/* update condition mask */
set_select_events
(
&
sock
->
obj
,
ev
);
/* check whether condition is satisfied already */
...
...
@@ -288,8 +296,9 @@ static struct object *create_socket( int family, int type, int protocol )
return
NULL
;
}
fcntl
(
sockfd
,
F_SETFL
,
O_NONBLOCK
);
/* make socket nonblocking */
if
(
!
(
sock
=
alloc_object
(
&
sock_ops
,
sockfd
)))
return
NULL
;
sock
->
state
=
(
type
!=
SOCK_STREAM
)
?
WS_FD_READ
|
WS_FD_WRITE
:
0
;
if
(
!
(
sock
=
alloc_object
(
&
sock_ops
,
-
1
)))
return
NULL
;
sock
->
obj
.
fd
=
sockfd
;
sock
->
state
=
(
type
!=
SOCK_STREAM
)
?
(
WS_FD_READ
|
WS_FD_WRITE
)
:
0
;
sock
->
mask
=
0
;
sock
->
hmask
=
0
;
sock
->
pmask
=
0
;
...
...
@@ -323,12 +332,13 @@ static struct object *accept_socket( int handle )
release_object
(
sock
);
return
NULL
;
}
if
(
!
(
acceptsock
=
alloc_object
(
&
sock_ops
,
acceptfd
)))
if
(
!
(
acceptsock
=
alloc_object
(
&
sock_ops
,
-
1
)))
{
release_object
(
sock
);
return
NULL
;
}
acceptsock
->
obj
.
fd
=
acceptfd
;
acceptsock
->
state
=
WS_FD_CONNECTED
|
WS_FD_READ
|
WS_FD_WRITE
;
acceptsock
->
mask
=
sock
->
mask
;
acceptsock
->
hmask
=
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